retrieve file
This commit is contained in:
@@ -61,6 +61,7 @@ export default {
|
||||
birthday: '',
|
||||
phoneNumber: '',
|
||||
avatar: '',
|
||||
uploadPath: '', // 上传时的路径
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
@@ -83,7 +84,10 @@ export default {
|
||||
name: 'avatar',
|
||||
filePath: res.tempFilePaths[0]
|
||||
}).then(result => {
|
||||
this.avatar = result;
|
||||
// console.log(result);
|
||||
this.$set(this, 'avatar', result.file_path);
|
||||
// this.avatar = result.file_path;
|
||||
this.uploadPath = result.file_name;
|
||||
}, error => {
|
||||
this.$u.toast(error);
|
||||
})
|
||||
@@ -108,7 +112,7 @@ export default {
|
||||
this.$u.api.updateMemberInfo({
|
||||
nickname: this.nickname,
|
||||
gender: this.gender,
|
||||
avatar: this.avatar,
|
||||
avatar: this.uploadPath,
|
||||
birthday: this.birthday,
|
||||
}).then(res => {
|
||||
if (res.errCode == 0) {
|
||||
|
||||
@@ -51,7 +51,8 @@ export default {
|
||||
getUserInfo() {
|
||||
this.$u.api.getMemberInfo().then(res => {
|
||||
if (res.errCode == 0) {
|
||||
this.userInfo = res.data.MemberArray;
|
||||
// this.userInfo = res.data.MemberArray;
|
||||
this.$set(this, 'userInfo', res.data.MemberArray);
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user