...
|
...
|
@@ -42,16 +42,17 @@ Page({ |
|
|
}else {
|
|
|
this.setData({
|
|
|
phone_number_params: this.data.phone_number,
|
|
|
'user.tel':this.data.phone_number,
|
|
|
is_wrong_phone:false,
|
|
|
});
|
|
|
console.log('params', this.data.phone_number_params);
|
|
|
}
|
|
|
}
|
|
|
if(e.detail.value === '') {
|
|
|
console.log('手机号为空',this.data.is_wrong_phone,this.data.phone_number,this.data.is_choose_phone);
|
|
|
console.log('手机号为空',this.data.is_wrong_phone,this.data.phone_number_params,this.data.is_choose_phone);
|
|
|
this.setData({is_change:false});//按钮置灰
|
|
|
}
|
|
|
if((this.data.is_choose_phone&&this.data.phone_number !== '') &&
|
|
|
if((this.data.is_choose_phone&&this.data.phone_number_params !== '') &&
|
|
|
this.data.user.country !== null &&
|
|
|
this.data.user.city !== null &&
|
|
|
this.data.user.introduce !== null
|
...
|
...
|
@@ -193,7 +194,7 @@ Page({ |
|
|
wx.showToast({title:'请填写国家',icon:'none'})
|
|
|
}else if(this.data.city === '' && this.data.user.city === null) {
|
|
|
wx.showToast({title:'请填写城市',icon:'none'})
|
|
|
}else if (this.data.user.tel === null) {
|
|
|
}else if (this.data.user.tel === null && this.data.phone_number === '') {
|
|
|
wx.showToast({title:'请获取手机号',icon:'none'})
|
|
|
}else if(this.data.is_wrong_phone){
|
|
|
wx.showToast({title:'手机号格式错误',icon:'none'})
|
...
|
...
|
@@ -207,7 +208,7 @@ Page({ |
|
|
let sex = this.data.userInfo.gender;
|
|
|
let params = {
|
|
|
token: wx.getStorageSync('token'),
|
|
|
sex: choose_sex || (this.data.is_sex_change === undefined?sex:''),
|
|
|
sex: choose_sex || (this.data.is_sex_change === undefined&&this.data.user.sex?this.data.user.sex:sex),
|
|
|
country:this.data.is_choose_country?this.data.country:this.data.user.country,
|
|
|
city:this.data.is_choose_city?this.data.city:this.data.user.city,
|
|
|
// tel:(this.data.is_choose_phone&&this.data.phone_number !== '')?this.data.phone_number:this.data.user.tel,
|
...
|
...
|
@@ -248,6 +249,9 @@ Page({ |
|
|
}else {
|
|
|
this.setData({is_change:true});
|
|
|
}
|
|
|
if(this.data.user.tel !== null) {
|
|
|
// this.setData({phone_number:this.data.user.tel});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
},
|
...
|
...
|
@@ -259,7 +263,7 @@ Page({ |
|
|
if(this.data.userInfo.tel !== null) {
|
|
|
this.setData({is_wrong_phone:false})
|
|
|
}
|
|
|
// console.log('userInfo', this.data.userInfo);
|
|
|
console.log('userInfo', this.data.userInfo);
|
|
|
this.getDetail();
|
|
|
|
|
|
},
|
...
|
...
|
|