Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
my-yaf-project
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
chenchuanwen
my-yaf-project
Commits
ed66e352
Commit
ed66e352
authored
Sep 05, 2018
by
wwccw0591
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pc
parent
6279e690
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
0 deletions
+46
-0
Member.php
application/controllers/Member.php
+14
-0
MemberService.php
application/models/Business/User/MemberService.php
+8
-0
SessionRedis.php
application/models/Redis/Db0/SessionRedis.php
+6
-0
logOutTest.php
public/test/member/logOutTest.php
+18
-0
No files found.
application/controllers/Member.php
View file @
ed66e352
...
...
@@ -92,6 +92,20 @@ class MemberController extends \Our\Controller_AbstractApi {
}
/**
* 用户退出登录
* @throws Exception
*/
public
function
logOutTestAction
(){
$key
=
$this
->
req
[
\Our\NameConst
::
data
][
'key'
];
$result
=
$this
->
memberService
->
logOutTest
(
$key
);
if
(
$result
){
$this
->
success
(
new
stdClass
());
}
ErrorModel
::
throwException
(
CodeConfigModel
::
noLogin
);
}
/**
* 修改密码
...
...
application/models/Business/User/MemberService.php
View file @
ed66e352
...
...
@@ -214,6 +214,14 @@ class MemberServiceModel extends \Business\AbstractModel
$this
->
clearKey
(
$key
);
return
true
;
}
/**
* 退出登录
*/
public
function
logOutTest
(
$key
){
$this
->
sessionDb0Redis
->
delSessionKeyTest
(
$key
);
return
true
;
}
/**
* 注册时验证手机号码
...
...
application/models/Redis/Db0/SessionRedis.php
View file @
ed66e352
...
...
@@ -66,6 +66,12 @@ class SessionRedisModel extends \Redis\Db0\AbstractModel {
$key
=
trim
(
$key
);
return
$this
->
getRedis
()
->
delete
(
$this
->
calcKey
(
$key
));
}
public
function
delSessionKeyTest
(
$key
){
//\Our\Log::getInstance()->write($this->calcKey($key));
$key
=
trim
(
$key
);
return
$this
->
getRedis
()
->
delete
(
$this
->
calcKey
(
$key
));
}
public
function
getSessionKey
(
$key
){
return
$this
->
getRedis
()
->
get
(
$this
->
calcKey
(
$key
));
...
...
public/test/member/logOutTest.php
0 → 100644
View file @
ed66e352
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns=
"http://www.w3.org/1999/xhtml"
>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<title>
退出登录
</title>
<style>
</style>
</head>
<body>
<form
action=
"/member/logOutTest"
method=
"post"
>
key:
<input
name=
"data[key]"
value=
"64cc7258b88aec2494531234f6954477"
/><br
/>
旧密码:
<input
name=
"data[debug]"
value=
"1"
/><br
/>
<input
type=
"submit"
value=
"提交"
>
</form>
</body>
</html>
\ No newline at end of file
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