Просмотр исходного кода

[智价云] 验证码校验更新

public 1 месяц назад
Родитель
Сommit
b0473e03d6
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      app/Http/Controllers/Api/Login.php
  2. 1 1
      app/Http/Controllers/Manager/Login.php

+ 1 - 1
app/Http/Controllers/Api/Login.php

@@ -200,7 +200,7 @@ class Login extends Api
 		// 获取数据
 		$session	= Cache::get('loginSmsCode_' . $phone);
 		if (!$session)                     return json_send(['code' => 'error', 'msg' => '请先获取手机号验证码']);
-		if ($session['code'] != $code || $session['phone'] != $phone) return json_send(['code' => 'error', 'msg' => '验证码错误']);
+		if ($session['code'] != $code || $session['mobile'] != $phone) return json_send(['code' => 'error', 'msg' => '验证码错误']);
 		// 查询用户
 		$admin    	= $EmployeeModel->where('mobile', $phone)->first(['id', 'name', 'mobile', 'status', 'password', 'insert_time', 'update_time']);
 		// 用户不存在

+ 1 - 1
app/Http/Controllers/Manager/Login.php

@@ -258,7 +258,7 @@ class Login extends Manager
 		// 获取数据
 		$session	= Cache::get('loginSmsCode_' . $phone);
 		if (!$session)                     return json_send(['code' => 'error', 'msg' => '请先获取手机号验证码']);
-		if ($session['code'] != $code || $session['phone'] != $phone) return json_send(['code' => 'error', 'msg' => '验证码错误']);
+		if ($session['code'] != $code || $session['mobile'] != $phone) return json_send(['code' => 'error', 'msg' => '验证码错误']);
 		// 查询用户
 		$admin    	= $EmployeeModel->where('mobile', $phone)->first(['company_id','id as uid', 'name as username', 'mobile as phone', 'status', 'password', 'insert_time', 'update_time']);
 		// 用户不存在