Commit db9a47f6 by 赵增煜

清除验证码

parent 4756f199
...@@ -144,8 +144,11 @@ public function bindRole(Request $request) ...@@ -144,8 +144,11 @@ public function bindRole(Request $request)
$verificationCode = cache()->get("sms_verification_code_{$mobile}"); $verificationCode = cache()->get("sms_verification_code_{$mobile}");
if ($verificationCode != $code) { if ($verificationCode != $code) {
return $this->failed('验证码错误'); return $this->failed('验证码错误,请重新发送!');
} }
# 验证通过清除验证码
cache()->forget("sms_verification_code_{$mobile}");
// 验证手机号是否存在 // 验证手机号是否存在
if ($login_type == User::LOGIN_TYPE_PHARMACY) { if ($login_type == User::LOGIN_TYPE_PHARMACY) {
$pharmacy = PharmacyModel::query()->where('mobile', $mobile)->first(); $pharmacy = PharmacyModel::query()->where('mobile', $mobile)->first();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment