retrieve file

This commit is contained in:
2020-07-14 10:13:27 +08:00
parent d1e1934239
commit b83b375945
9 changed files with 81 additions and 25 deletions

View File

@@ -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) {

View File

@@ -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);
}
})
},