|
|
@@ -116,10 +116,23 @@
|
|
|
if (this.telerror === true) {
|
|
|
return false
|
|
|
}
|
|
|
+ if (!this.passwordNum || this.passwordNum === '') {
|
|
|
+ this.collectResult = '密码不能为空'
|
|
|
+ this.timeoutCount++
|
|
|
+ return false
|
|
|
+ }
|
|
|
let openid = this.$store.state.option.wechatInfo.data.openid
|
|
|
this.$http.post('/wx/bindUser', {userTel: this.telphoneNum, userPwd: this.passwordNum, openId: openid}).then(res => {
|
|
|
- this.$store.commit('option/REQUEST_WECHATINFO_STATUS_SUCCESS', res.data)
|
|
|
- localStorage.setItem('USOFTMALLWECHATINFO', JSON.stringify(res.data))
|
|
|
+ if (res.data.success) {
|
|
|
+ this.$store.commit('option/REQUEST_WECHATINFO_STATUS_SUCCESS', res.data)
|
|
|
+ localStorage.setItem('USOFTMALLWECHATINFO', JSON.stringify(res.data))
|
|
|
+ } else {
|
|
|
+ this.collectResult = res.data.message
|
|
|
+ this.timeoutCount++
|
|
|
+ }
|
|
|
+ }, err => {
|
|
|
+ this.collectResult = err.response.data || '绑定失败'
|
|
|
+ this.timeoutCount++
|
|
|
})
|
|
|
},
|
|
|
resgiter() {
|