Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵增煜
/
tzt-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
936755af
authored
Nov 28, 2024
by
lujunyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
药店pc端密码登录
parent
fce4cbc0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
+2
-1
app/Admin/Controllers/AuthController.php
+2
-1
No files found.
app/Admin/Controllers/AuthController.php
View file @
936755af
...
@@ -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'
);
// 假设您有一个方法来验证短信验证码
// 假设您有一个方法来验证短信验证码
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment