...
|
...
|
@@ -83,7 +83,7 @@ Page({ |
|
|
app.post(url, params, {}).then((res) => {
|
|
|
console.log('自动获取手机号', res);
|
|
|
if (+res.code === 1) {
|
|
|
this.setData({phone_number:res.data,is_wrong_phone:false,is_choose_phone:true})
|
|
|
this.setData({'user.tel':res.data,phone_number:res.data,is_wrong_phone:false,is_choose_phone:true})
|
|
|
}
|
|
|
});
|
|
|
},
|
...
|
...
|
@@ -153,25 +153,14 @@ Page({ |
|
|
console.log(2);
|
|
|
this.setData({is_change:true});
|
|
|
}
|
|
|
// if((this.data.is_choose_country&&this.data.country !== '')&&
|
|
|
// (this.data.is_choose_city&&this.data.city !== '') &&
|
|
|
// (this.data.is_choose_phone&&this.data.phone_number !== '') &&
|
|
|
// (this.data.is_choose_introduce&&this.data.introduce !== '')
|
|
|
// ) {
|
|
|
// console.log(1);
|
|
|
// this.setData({is_change:true});
|
|
|
// }else if((this.data.is_choose_country&&this.data.country !== '')){
|
|
|
// console.log(2);
|
|
|
// this.setData({is_change:true});
|
|
|
// }
|
|
|
// if(((this.data.is_choose_country&&this.data.country !== '') || this.data.user.country !== null) &&
|
|
|
// ((this.data.is_choose_city&&this.data.city !== '')|| this.data.user.city !== null) &&
|
|
|
// ((this.data.is_choose_phone&&this.data.phone_number !== '')|| this.data.user.tel !== null) &&
|
|
|
// !this.data.is_wrong_phone &&
|
|
|
// ((this.data.is_choose_introduce&&this.data.introduce !== '') || this.data.user.introduce !== null)) {
|
|
|
// console.log('111');
|
|
|
// this.setData({is_change:true});
|
|
|
// }
|
|
|
if((this.data.is_choose_country&&this.data.country !== '')&&
|
|
|
(this.data.is_choose_city&&this.data.city !== '') &&
|
|
|
(this.data.user.tel!==null&&this.data.user.tel !== '') &&
|
|
|
(this.data.is_choose_introduce&&this.data.introduce !== '')
|
|
|
) {
|
|
|
console.log(1);
|
|
|
this.setData({is_change:true});
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
//保存
|
...
|
...
|
|