作者 wumengyu

修改获取用户性别

... ... @@ -121,9 +121,7 @@ Page({
//保存
submit() {
console.log('this.data.phone_number.length', this.data.phone_number.length);
if(this.data.current_sex === undefined && this.data.user.sex === null) {
wx.showToast({title:'请选择性别',icon:'none'})
}else if(this.data.country === '' && this.data.user.country === null) {
if(this.data.country === '' && this.data.user.country === null) {
wx.showToast({title:'请填写国家',icon:'none'})
}else if(this.data.city === '' && this.data.user.city === null) {
wx.showToast({title:'请填写城市',icon:'none'})
... ... @@ -135,9 +133,10 @@ Page({
wx.showToast({title:'请填写简介',icon:'none'})
}else {
let url = '/portal/Member/detail';
let sex = this.data.userInfo.gender;
let params = {
token: wx.getStorageSync('token'),
sex: this.data.user.sex === 1?'男':this.data.user.sex === 2?'女':'',
sex: sex || this.data.user.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.phone_number !== ''?this.data.phone_number:this.data.user.tel,
... ...