Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
media-resource
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨昕
media-resource
Commits
068203cd
Commit
068203cd
authored
Jul 16, 2020
by
杨昕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户登录第三方验权
parent
94aad4ae
Pipeline
#9900
passed with stages
in 34 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletions
+13
-1
UsersController.php
app/Http/Controllers/Api/Client/UsersController.php
+13
-1
No files found.
app/Http/Controllers/Api/Client/UsersController.php
View file @
068203cd
...
...
@@ -10,6 +10,13 @@ use Illuminate\Support\Facades\DB;
class
UsersController
extends
Controller
{
private
$baseAuth
=
[
'develop'
=>
'http://zgadmin.in.d.eoffcn.com'
,
'test'
=>
'http://zgadmin.d.eoffcn.com'
,
'master'
=>
'http://zgadmin.in.eoffcn.com'
,
];
/**
* 第三方验权
* @param Request $request
...
...
@@ -77,7 +84,12 @@ class UsersController extends Controller
}
else
{
$url
=
"http://zgadmin.t.eoffcn.com/api/user?action=check_user&user_name="
.
$username
.
"&password="
.
$password
;
$branch
=
empty
(
getenv
(
'branch'
))
?
'test'
:
getenv
(
'branch'
);
$baseUrl
=
$this
->
baseAuth
[
$branch
];
$url
=
$baseUrl
.
"/api/user?action=check_user&user_name="
.
$username
.
"&password="
.
$password
;
$result
=
http_request_code
(
$url
,
[
'Content-Type'
=>
'application/x-www-form-urlencoded'
],
'POST'
,
...
...
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