|
|
@ -109,14 +109,15 @@ Page({ |
|
|
|
.then((res) => { |
|
|
|
.then((res) => { |
|
|
|
this.submitCallback(res); |
|
|
|
this.submitCallback(res); |
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
.catch((err) => { |
|
|
|
this.setData({ |
|
|
|
if (err.data.code == 100) { |
|
|
|
popupShow: true, |
|
|
|
this.handleShowPopup(); |
|
|
|
popupType: 'popup4', |
|
|
|
} else if (err.data.msg) { |
|
|
|
popupParams: { |
|
|
|
wx.showToast({ |
|
|
|
close: true, |
|
|
|
title: err.data.msg, |
|
|
|
}, |
|
|
|
icon: 'none', |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleWxSubmit(e: WechatMiniprogram.CustomEvent) { |
|
|
|
handleWxSubmit(e: WechatMiniprogram.CustomEvent) { |
|
|
@ -134,14 +135,15 @@ Page({ |
|
|
|
.then((res) => { |
|
|
|
.then((res) => { |
|
|
|
this.submitCallback(res); |
|
|
|
this.submitCallback(res); |
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
.catch((err) => { |
|
|
|
this.setData({ |
|
|
|
if (err.data.code == 100) { |
|
|
|
popupShow: true, |
|
|
|
this.handleShowPopup(); |
|
|
|
popupType: 'popup4', |
|
|
|
} else if (err.data.msg) { |
|
|
|
popupParams: { |
|
|
|
wx.showToast({ |
|
|
|
close: true, |
|
|
|
title: err.data.msg, |
|
|
|
}, |
|
|
|
icon: 'none', |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
@ -149,20 +151,27 @@ Page({ |
|
|
|
console.log('DEBUGPRINT[79]: index.ts:112: res=', res); |
|
|
|
console.log('DEBUGPRINT[79]: index.ts:112: res=', res); |
|
|
|
app.globalData.loginType = res.loginType; |
|
|
|
app.globalData.loginType = res.loginType; |
|
|
|
app.globalData.isLogin = res.isLogin; |
|
|
|
app.globalData.isLogin = res.isLogin; |
|
|
|
if (res.isLogin == 1 && res.loginType == 2) { |
|
|
|
if (res.isLogin == 1) { |
|
|
|
wx.reLaunch({ |
|
|
|
if (res.loginType == 2) { |
|
|
|
url: '/pages/home/index', |
|
|
|
wx.reLaunch({ |
|
|
|
}); |
|
|
|
url: '/pages/home/index', |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.handleShowPopup(); |
|
|
|
|
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.setData({ |
|
|
|
this.handleShowPopup(); |
|
|
|
popupShow: true, |
|
|
|
|
|
|
|
popupType: 'popup4', |
|
|
|
|
|
|
|
popupParams: { |
|
|
|
|
|
|
|
close: true, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
handleShowPopup() { |
|
|
|
|
|
|
|
this.setData({ |
|
|
|
|
|
|
|
popupShow: true, |
|
|
|
|
|
|
|
popupType: 'popup4', |
|
|
|
|
|
|
|
popupParams: { |
|
|
|
|
|
|
|
close: true, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
handleShowTel() { |
|
|
|
handleShowTel() { |
|
|
|
this.setData({ |
|
|
|
this.setData({ |
|
|
|
showTel: !this.data.showTel, |
|
|
|
showTel: !this.data.showTel, |
|
|
|