|
|
@ -81,13 +81,11 @@ |
|
|
|
userInfoForm: { |
|
|
|
headImage: '', |
|
|
|
nickName: '', |
|
|
|
phone : '', |
|
|
|
} |
|
|
|
}; |
|
|
|
}, |
|
|
|
onShow() {}, |
|
|
|
onLoad() { |
|
|
|
this.userInfoForm.phone = this.userInfo.phone || '' |
|
|
|
this.userInfoForm.nickName = this.userInfo.nickName || '' |
|
|
|
this.userInfoForm.headImage = this.userInfo.headImage || '' |
|
|
|
}, |
|
|
@ -99,23 +97,6 @@ |
|
|
|
this.userInfoForm.headImage = url |
|
|
|
}) |
|
|
|
}, |
|
|
|
getPhone(e){ |
|
|
|
this.$api('bindPhone', { |
|
|
|
phoneCode : e.detail.code |
|
|
|
}, res => { |
|
|
|
if(res.code == 200){ |
|
|
|
let phoneObj = JSON.parse(res.result) |
|
|
|
if(phoneObj.errmsg == 'ok'){ |
|
|
|
this.userInfoForm.phone = phoneObj.phone_info.phoneNumber |
|
|
|
}else{ |
|
|
|
uni.showModal({ |
|
|
|
title: phoneObj.errmsg |
|
|
|
}) |
|
|
|
} |
|
|
|
console.log(phoneObj); |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
submit() { |
|
|
|
let self = this |
|
|
|
|
|
|
@ -139,7 +120,6 @@ |
|
|
|
self.$api('updateInfo', { |
|
|
|
avatarUrl : self.userInfoForm.headImage, |
|
|
|
nickName : self.userInfoForm.nickName, |
|
|
|
phone : self.userInfoForm.phone, |
|
|
|
}, res => { |
|
|
|
if (res.code == 200) { |
|
|
|
uni.reLaunch({ |
|
|
|