修复了验证码bug

This commit is contained in:
2025-08-09 22:30:47 +08:00
parent f871831cbc
commit 8a085da7dc
4 changed files with 12 additions and 6 deletions

View File

@ -54,7 +54,7 @@ Page({
},
sendSmsCode() {
const { phone } = this.data;
const { phone, role } = this.data;
if (!phone.trim()) {
wx.showToast({ title: '请输入手机号', icon: 'none' });
return;
@ -68,7 +68,8 @@ Page({
method: 'POST',
header: { 'content-type': 'application/json' },
data: {
templateString: phone
phoneNumber: phone,
userRole: role
},
success: res => {
// 假设后端返回 { success: true, ... }