Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
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
hujun
tl_estate
Commits
9f61329b
Commit
9f61329b
authored
Aug 28, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
检测登录
parent
d574ecac
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
Login.php
application/index/controller/Login.php
+18
-0
route.php
application/route.php
+1
-0
No files found.
application/index/controller/Login.php
View file @
9f61329b
...
@@ -9,6 +9,7 @@ use app\model\AAgents;
...
@@ -9,6 +9,7 @@ use app\model\AAgents;
use
app\model\AStore
;
use
app\model\AStore
;
use
app\model\AuthGroup
;
use
app\model\AuthGroup
;
use
app\model\AuthRule
;
use
app\model\AuthRule
;
use
phpDocumentor\Reflection\DocBlock\Tags\See
;
use
think\Session
;
use
think\Session
;
/**
/**
...
@@ -152,4 +153,20 @@ class Login extends Basic
...
@@ -152,4 +153,20 @@ class Login extends Basic
Session
::
clear
();
Session
::
clear
();
return
view
(
"/login/login"
,
[
"msg"
=>
"退出成功"
]);
return
view
(
"/login/login"
,
[
"msg"
=>
"退出成功"
]);
}
}
/**
* 检测登录
*
* @return \think\Response
*/
public
function
checkLogin
()
{
Session
::
clear
();
$user_id
=
Session
::
get
(
"userId"
);
if
(
empty
(
$user_id
))
{
return
$this
->
response
(
300
,
'请重新登录'
);
}
else
{
return
$this
->
response
(
200
,
''
);
}
}
}
}
\ No newline at end of file
application/route.php
View file @
9f61329b
...
@@ -90,6 +90,7 @@ Route::group('index', [
...
@@ -90,6 +90,7 @@ Route::group('index', [
'login'
=>
[
'index/login/login'
,
[
'method'
=>
'get'
]
],
'login'
=>
[
'index/login/login'
,
[
'method'
=>
'get'
]
],
'loginVerify'
=>
[
'index/login/loginVerify'
,
[
'method'
=>
'post|get'
]
],
'loginVerify'
=>
[
'index/login/loginVerify'
,
[
'method'
=>
'post|get'
]
],
'logout'
=>
[
'index/login/logout'
,
[
'method'
=>
'get'
]
],
//退出
'logout'
=>
[
'index/login/logout'
,
[
'method'
=>
'get'
]
],
//退出
'checkLogin'
=>
[
'index/login/checkLogin'
,
[
'method'
=>
'get'
]
],
//退出
//watchshop 预约看铺
//watchshop 预约看铺
'watch_shop/:check_status'
=>
[
'index/WatchShop/getList'
,
[
'method'
=>
'get'
],
[
'check_status'
=>
1
]
],
'watch_shop/:check_status'
=>
[
'index/WatchShop/getList'
,
[
'method'
=>
'get'
],
[
'check_status'
=>
1
]
],
'our_watch_shop/:check_status'
=>
[
'index/WatchShop/getList'
,
[
'method'
=>
'get'
],
[
'check_status'
=>
2
]
],
'our_watch_shop/:check_status'
=>
[
'index/WatchShop/getList'
,
[
'method'
=>
'get'
],
[
'check_status'
=>
2
]
],
...
...
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