'修改用户信息'

This commit is contained in:
unknown 2026-01-03 11:53:32 +08:00
parent 9d37ddebdd
commit 21fe3090fc

View File

@ -110,8 +110,9 @@
nickname: this.newnickname
},res=>{
if(res.code == '1'){
this.nickname = this.newnickname
// this.nickname = this.newnickname
this.pop4Show = false
this.getauth()
uni.showToast({ title: res.msg , icon: 'success' })
}else{
uni.showToast({ title: res.msg , icon: 'none' })
@ -129,7 +130,8 @@
avatar: res
},res=>{
if(res.code == '1'){
this.avatar = this.path + res;
// this.avatar = this.path + res;
this.getauth()
uni.showToast({ title: res.msg , icon: 'success' })
}else{
uni.showToast({ title: res.msg , icon: 'fail' })
@ -180,12 +182,12 @@
var _this = this;
_this.$api.userInfo({},res=>{
if(res.code == '1'){
if(res.data.user.avatar){
_this.avatar = res.data.user.avatar
if(res.data.person.avatar){
_this.avatar = this.path + res.data.person.avatar
}
_this.nickname = res.data.user.nickname
_this.newnickname = res.data.user.nickname
_this.userinfo = res.data.user
_this.nickname = res.data.person.realname
_this.newnickname = res.data.person.realname
_this.userinfo = res.data.person
}else{
}
})