修复了忘记密码和重置密码的bug
This commit is contained in:
parent
361f6a89d3
commit
e485cae219
2
app.json
2
app.json
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"pages": [
|
||||
"pages/personCenter/mine/mine",
|
||||
"pages/loginModule/pwdLogin/pwdLogin",
|
||||
"pages/personCenter/mine/mine",
|
||||
"pages/personCenter/subCommissionSetting/subCommissionSetting",
|
||||
"pages/test/testVideo/testVideo",
|
||||
"pages/personCenter/withdrawal/withdrawal",
|
||||
|
|
|
@ -103,19 +103,21 @@ Page({
|
|||
// 3. 格式校验手机号
|
||||
if (!/^1\d{10}$/.test(phone)) {
|
||||
return wx.showToast({ title: '手机号格式不正确', icon: 'none' });
|
||||
}
|
||||
}
|
||||
// 2. 密码一致
|
||||
if (newPwd !== confirmPwd) {
|
||||
return wx.showToast({ title: '两次密码不一致', icon: 'none' });
|
||||
}
|
||||
// 4. 发起重置请求
|
||||
wx.request({
|
||||
url: baseUrl + '/userInfo/mini/forgetPwd',
|
||||
url: baseUrl + '/userInfo/mini/out/reset/pwd',
|
||||
method: 'POST',
|
||||
data: {
|
||||
phoneNumber: phone,
|
||||
verificationCode: code,
|
||||
newPassword: newPwd
|
||||
userPassword: newPwd,
|
||||
userConfirmPassword: confirmPwd,
|
||||
sourceToken: null
|
||||
},
|
||||
success: res => {
|
||||
if (res.data.code === 1) {
|
||||
|
|
|
@ -29,7 +29,8 @@ Page({
|
|||
phoneNumber: phone,
|
||||
verificationCode: verificationCode,
|
||||
userPassword: password,
|
||||
userConfirmPassword: currentPwd
|
||||
userConfirmPassword: currentPwd,
|
||||
sourceToken: wx.getStorageSync('token')
|
||||
},
|
||||
success: res => {
|
||||
console.log('修改密码--->',res);
|
||||
|
|
Loading…
Reference in New Issue
Block a user