feat(security): 优化登录与支付密码错误提示文案并完善双端安全中心交互

- 安全校验提示:优化 AccountSecurity 与 MasterSecurity 密码错误提示,区分登录密码与支付密码,并增加剩余可重试次数提示
- 接口响应对齐:优化 Auth、MasterAuth、Security、Sms 控制器在短信验证码发送与密码校验时的异常处理与返回格式
- 腾讯云短信SDK:优化 SmsSingleSender::sendWithParam 方法入参默认值
- 双端小程序:优化用户端与师傅端登录页及账号安全中心的密码修改与找回交互逻辑
这个提交包含在:
2026-11-26 17:29:23 +08:00
父节点 c664d0a5de
当前提交 894da56623
共有 14 个文件被更改,包括 1090 次插入 和 624 次删除

查看文件

@@ -62,9 +62,13 @@ class Auth extends Base
$this->error('该账号尚未设置登录密码,请使用微信一键登录后设置密码');
}
try {
\app\common\library\AccountSecurity::verify((int)$user['id'], 'login', $password);
\app\common\library\AccountSecurity::verify((int)$user['id'], 'login', $password, '登录密码');
} catch (\Throwable $e) {
$this->error($e->getMessage() === '密码不正确' ? '手机号或密码不正确' : $e->getMessage());
$msg = $e->getMessage();
if (strpos($msg, '不正确') !== false) {
$msg = str_replace('登录密码不正确', '手机号或密码不正确', $msg);
}
$this->error($msg);
}
$this->auth->direct($user['id']);
}
@@ -102,12 +106,13 @@ class Auth extends Base
try {
$res = SmsService::sendVerifyCode($mobile, 'user_resetpwd', $this->request->ip());
$this->success('验证码已发送,请注意查收', array_merge($res, [
'mobile' => substr_replace($mobile, '****', 3, 4),
]));
} catch (\Throwable $e) {
$this->error($e->getMessage());
return;
}
$this->success('验证码已发送,请注意查收', array_merge($res, [
'mobile' => substr_replace($mobile, '****', 3, 4),
]));
}
/**