*/ | */ | ||||
data: { | data: { | ||||
imgUrl: app.globalData.urlStatic,//图片路径 | imgUrl: app.globalData.urlStatic,//图片路径 | ||||
httpState:false, | |||||
buyState:false, | buyState:false, | ||||
ruleShow: false,//是否显示游戏玩法 | ruleShow: false,//是否显示游戏玩法 | ||||
ruleCloseShow: true,//是否显示游戏玩法关闭按钮 | ruleCloseShow: true,//是否显示游戏玩法关闭按钮 | ||||
this.beginGame(); | this.beginGame(); | ||||
}, | }, | ||||
beginGame: function () {//开始游戏 | beginGame: function () {//开始游戏 | ||||
if(this.data.httpState){ | |||||
return; | |||||
} | |||||
this.data.httpState = true; | |||||
app.wxRequest(app.globalData.urlRoot + "dollGame/beginGame", {}, res => { | app.wxRequest(app.globalData.urlRoot + "dollGame/beginGame", {}, res => { | ||||
this.data.httpState = false; | |||||
if (res.code == 200) { | if (res.code == 200) { | ||||
this.data.gameSign = res.data.sign; | this.data.gameSign = res.data.sign; | ||||
this.setData({ | this.setData({ |
verificationText:null, | verificationText:null, | ||||
getMobileBtnShow:true, | getMobileBtnShow:true, | ||||
agreement:false,//是否显示协议 | agreement:false,//是否显示协议 | ||||
httpState:false, | |||||
}, | }, | ||||
/** | /** | ||||
}) | }) | ||||
return; | return; | ||||
} | } | ||||
app.wxRequest(app.globalData.urlRoot + "userInfo/getCertificationInfo", { mobile: this.data.mobileText, captcha: this.data.verificationText }, res => { | |||||
if(this.data.httpState){ | |||||
return; | |||||
} | |||||
this.data.httpState = true; | |||||
app.wxRequest(app.globalData.urlRoot + "userInfo/getCertificationInfo", { mobile: this.data.mobileText, captcha: this.data.verificationText }, res => { | |||||
this.data.httpState = false; | |||||
if (res.code == 200) { | if (res.code == 200) { | ||||
wx.setStorageSync('userMobile', this.data.mobileText ); | wx.setStorageSync('userMobile', this.data.mobileText ); | ||||
app.globalData.userMobile = this.data.mobileText ; | app.globalData.userMobile = this.data.mobileText ; |
storeArr: [],//专营店数据 | storeArr: [],//专营店数据 | ||||
storeValue: 0,//选中的专营店下标 | storeValue: 0,//选中的专营店下标 | ||||
realname:"", | realname:"", | ||||
jobDetail:"" | |||||
jobDetail:"", | |||||
httpState:false, | |||||
}, | }, | ||||
/** | /** | ||||
}) | }) | ||||
return; | return; | ||||
} | } | ||||
if(this.data.httpState){ | |||||
return; | |||||
} | |||||
this.data.httpState = true; | |||||
var data = { | var data = { | ||||
realName:this.data.realname, | realName:this.data.realname, | ||||
// jobId: this.data.jobList[this.data.jobValue].jobId, | // jobId: this.data.jobList[this.data.jobValue].jobId, | ||||
province: this.data.provinceDataArr[0][this.data.provinceDataValue[0]] | province: this.data.provinceDataArr[0][this.data.provinceDataValue[0]] | ||||
} | } | ||||
app.wxRequest(app.globalData.urlRoot + "certificationInfo/submitCertificationInfoData", data,res=>{ | app.wxRequest(app.globalData.urlRoot + "certificationInfo/submitCertificationInfoData", data,res=>{ | ||||
this.data.httpState = false; | |||||
if (res.code == 200) { | if (res.code == 200) { | ||||
if (!app.globalData.authenticationStatus) { | if (!app.globalData.authenticationStatus) { | ||||
app.globalData.authenticationStatus = {}; | app.globalData.authenticationStatus = {}; |
}, | }, | ||||
isAddress: false,//是否有地址 | isAddress: false,//是否有地址 | ||||
marginT: 0, | marginT: 0, | ||||
submitDataState:false | |||||
}, | }, | ||||
attached:function(){ | attached:function(){ | ||||
if (app.globalData.userPhoneType == "ios") { | if (app.globalData.userPhoneType == "ios") { | ||||
title: '保存中', | title: '保存中', | ||||
mask: true | mask: true | ||||
}) | }) | ||||
if(this.data.submitDataState){ | |||||
return; | |||||
} | |||||
this.data.submitDataState = true; | |||||
app.wxRequest(app.globalData.urlRoot + "userInfo/updateUserInfo", this.data.userData, res => { | app.wxRequest(app.globalData.urlRoot + "userInfo/updateUserInfo", this.data.userData, res => { | ||||
this.data.submitDataState = false; | |||||
wx.hideLoading(); | wx.hideLoading(); | ||||
if (res.code == 200) { | if (res.code == 200) { | ||||
app.globalData.userInfoData.avatarUrl = this.data.userData.avatarUrl; | app.globalData.userInfoData.avatarUrl = this.data.userData.avatarUrl; |