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