小程序修改代码

This commit is contained in:
2025-08-06 13:16:08 +08:00
parent 50e892adc4
commit b6a59ce3d8
14 changed files with 80 additions and 47 deletions

View File

@ -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) {