|
|
|
@ -107,16 +107,6 @@ |
|
|
|
this.isTick=!this.isTick |
|
|
|
}, |
|
|
|
|
|
|
|
// 判读两次密码是否相同 |
|
|
|
chkpass(){ |
|
|
|
let that = this |
|
|
|
if (that.vpass != that.repass){ |
|
|
|
this.$toast('两次输入的密码不一样') |
|
|
|
return false |
|
|
|
} |
|
|
|
return ture; |
|
|
|
}, |
|
|
|
|
|
|
|
// 发送验证码 |
|
|
|
getsmscode(){ |
|
|
|
// 检查手机号是否填写 |
|
|
|
@ -172,16 +162,10 @@ |
|
|
|
formValidation() { |
|
|
|
const app = this |
|
|
|
// 验证提交登录 |
|
|
|
if (!app.validteMobile(app.mobile) ||!app.validtePass(app.vpass)) { |
|
|
|
if (!app.validteMobile(app.mobile) ||!app.validtePass(app.vpass) || !app.chkpass()) { |
|
|
|
return false |
|
|
|
} |
|
|
|
// 处理用户类型 |
|
|
|
if(app.utchk1){ |
|
|
|
this.userType="企业" |
|
|
|
} |
|
|
|
if(app.utchk2){ |
|
|
|
this.userType ="个人" |
|
|
|
} |
|
|
|
|
|
|
|
// 检查是否阅读了协议 |
|
|
|
if(!app.isTick){ |
|
|
|
this.$toast("请勾选《隐私保护政策》和 用《户注册协议》。") |
|
|
|
@ -199,6 +183,16 @@ |
|
|
|
return true; |
|
|
|
}, |
|
|
|
|
|
|
|
// 判读两次密码是否相同 |
|
|
|
chkpass(){ |
|
|
|
let that = this |
|
|
|
if (that.vpass != that.repass){ |
|
|
|
this.$toast('两次输入的密码不一样') |
|
|
|
return false |
|
|
|
} |
|
|
|
return ture; |
|
|
|
}, |
|
|
|
|
|
|
|
// 验证手机号 |
|
|
|
validteMobile(str) { |
|
|
|
// 防抖 |
|
|
|
@ -229,7 +223,6 @@ |
|
|
|
const rdata = { |
|
|
|
cellPhone: app.mobile, |
|
|
|
verifyCode: app.verifyCode, |
|
|
|
//password: $.md5($("#newpwd3").val()).toUpperCase(), |
|
|
|
password:app.$md5(app.vpass).toUpperCase(), |
|
|
|
passMd5ed: true |
|
|
|
} |
|
|
|
@ -243,29 +236,6 @@ |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// store.dispatch('Login', { |
|
|
|
// loginName: app.mobile, |
|
|
|
// loginType: "0", |
|
|
|
// password: this.$md5(app.vpass).toUpperCase(), // 转成大写 |
|
|
|
// userType: app.userType |
|
|
|
// }) |
|
|
|
// .then(result => { |
|
|
|
// // 显示登录成功 |
|
|
|
// app.$toast(result.message) |
|
|
|
// // 相应全局事件订阅: 刷新上级页面数据 |
|
|
|
// uni.$emit('syncRefresh', true) |
|
|
|
// // 跳转回原页面 |
|
|
|
// setTimeout(() => app.onNavigateBack(1), 2000) |
|
|
|
// }) |
|
|
|
// .catch(err => { |
|
|
|
// console.log("err",err) |
|
|
|
// // 跳转回原页面 |
|
|
|
// if (err.result.data.isBack) { |
|
|
|
// setTimeout(() => app.onNavigateBack(1), 2000) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// .finally(() => app.isLoading = false) |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
|