小程序修改代码
This commit is contained in:
@ -68,7 +68,7 @@ Page({
|
||||
|
||||
// 获取验证码(仅校验手机号)
|
||||
getSmsCode() {
|
||||
const { phone } = this.data;
|
||||
const { phone, role } = this.data;
|
||||
|
||||
// 1. 非空校验
|
||||
if (!validate(this.data, { phone: '请输入手机号' })) {
|
||||
@ -83,7 +83,10 @@ Page({
|
||||
wx.request({
|
||||
url: baseUrl + '/userInfo/code/pwd',
|
||||
method: 'POST',
|
||||
data: { templateString: phone },
|
||||
data: {
|
||||
phoneNumber: phone,
|
||||
userRole: role
|
||||
},
|
||||
success: (res) => {
|
||||
console.log('验证码发送--->',res.data);
|
||||
if (res.data.code === 1) {
|
||||
@ -163,7 +166,7 @@ Page({
|
||||
: baseUrl + '/userInfo/mini/vcd/login';
|
||||
const payload = loginType === 'password'
|
||||
? { phoneNumber: phone, userPassword: credential, userRole: role }
|
||||
: { phoneNumber: phone, verificationCode: credential };
|
||||
: { phoneNumber: phone, verificationCode: credential, userRole: role };
|
||||
|
||||
wx.request({
|
||||
url,
|
||||
|
Reference in New Issue
Block a user