小程序修改代码
This commit is contained in:
@ -10,7 +10,15 @@ Page({
|
||||
confirmPwd: '',
|
||||
countdown: 0,
|
||||
codeButtonText: '发送验证码',
|
||||
_timer: null
|
||||
_timer: null,
|
||||
role: '',
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
console.log(options);
|
||||
this.setData({
|
||||
role: options.role
|
||||
})
|
||||
},
|
||||
|
||||
// 手机号输入
|
||||
@ -92,7 +100,7 @@ Page({
|
||||
|
||||
// 重置密码
|
||||
resetPassword() {
|
||||
const { phone, code, newPwd, confirmPwd } = this.data;
|
||||
const { phone, code, newPwd, confirmPwd, role } = this.data;
|
||||
// 1. 非空校验
|
||||
if (!validate(this.data, {
|
||||
phone: '请输入手机号',
|
||||
@ -117,7 +125,8 @@ Page({
|
||||
verificationCode: code,
|
||||
userPassword: newPwd,
|
||||
userConfirmPassword: confirmPwd,
|
||||
sourceToken: null
|
||||
sourceToken: null,
|
||||
role: role
|
||||
},
|
||||
success: res => {
|
||||
if (res.data.code === 1) {
|
||||
|
Reference in New Issue
Block a user