diff --git a/src/mods/extra/AppMine/userInfo.vue b/src/mods/extra/AppMine/userInfo.vue index a82893d..c812404 100644 --- a/src/mods/extra/AppMine/userInfo.vue +++ b/src/mods/extra/AppMine/userInfo.vue @@ -10,19 +10,19 @@

用户昵称

-
-

+

+

{{ user.nickName }}

- +

手机号

-
+

{{ user.phone }}

- +
@@ -43,6 +43,7 @@ export default { ...mapState(['user', 'token']), nickName: { set(v) { + this.userName = v }, get() { const {nickName} = this.user @@ -51,7 +52,7 @@ export default { }, phone: { set(v) { - + this.userPhone = v }, get() { const { phone } = this.user @@ -68,6 +69,8 @@ export default { editNickName: false, editPhone: false, avatar: '', + userName: '', + userPhone: '' } }, methods: { @@ -76,9 +79,9 @@ export default { this.$instance.post(`/app/appwechatuser/update-nickName`,null,{ params: { id: this.user.id, - nickName: this.nickName, + nickName: this.userName? this.userName : this.user.nickName, avatarUrl: this.avatar? this.avatar : this.user.avatarUrl, - phone: this.phone? this.phone : this.user.phone, + phone: this.userPhone ? this.userPhone : this.user.phone, } }).then(res=> { if(res?.code==0) { @@ -126,6 +129,7 @@ export default { }, handleWeixin({ detail }) { if(detail.value) { + this.phone = detail.value this.updateInfo() } },