Commit 936755af by lujunyi

药店pc端密码登录

parent fce4cbc0
...@@ -49,6 +49,7 @@ public function getLogin(Content $content) ...@@ -49,6 +49,7 @@ public function getLogin(Content $content)
public function postLogin(Request $request) public function postLogin(Request $request)
{ {
$role = $request->input('role'); // 获取角色参数 $role = $request->input('role'); // 获取角色参数
$loginType = $request->input('type'); // 药店登录类型
$credentials = $request->only([$this->username(), 'password']); $credentials = $request->only([$this->username(), 'password']);
$remember = (bool) $request->input('remember', false); $remember = (bool) $request->input('remember', false);
...@@ -71,7 +72,7 @@ public function postLogin(Request $request) ...@@ -71,7 +72,7 @@ public function postLogin(Request $request)
} }
// 检查用户角色是否为 pharmacy // 检查用户角色是否为 pharmacy
$isPharmacy = $user->roles->pluck('slug')->contains('pharmacy'); $isPharmacy = $user->roles->pluck('slug')->contains('pharmacy');
if ($role === 'store' && $user && $isPharmacy) { if ($role === 'store' && $loginType == 'code' && $user && $isPharmacy) {
// 验证短信验证码 // 验证短信验证码
$verificationCode = $request->input('verification_code'); $verificationCode = $request->input('verification_code');
// 假设您有一个方法来验证短信验证码 // 假设您有一个方法来验证短信验证码
......
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