Commit ed66e352 authored by wwccw0591's avatar wwccw0591

pc

parent 6279e690
...@@ -92,6 +92,20 @@ class MemberController extends \Our\Controller_AbstractApi { ...@@ -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);
}
/** /**
* 修改密码 * 修改密码
......
...@@ -214,6 +214,14 @@ class MemberServiceModel extends \Business\AbstractModel ...@@ -214,6 +214,14 @@ class MemberServiceModel extends \Business\AbstractModel
$this->clearKey($key); $this->clearKey($key);
return true; return true;
} }
/**
* 退出登录
*/
public function logOutTest($key){
$this->sessionDb0Redis->delSessionKeyTest($key);
return true;
}
/** /**
* 注册时验证手机号码 * 注册时验证手机号码
......
...@@ -66,6 +66,12 @@ class SessionRedisModel extends \Redis\Db0\AbstractModel { ...@@ -66,6 +66,12 @@ class SessionRedisModel extends \Redis\Db0\AbstractModel {
$key=trim($key); $key=trim($key);
return $this->getRedis()->delete($this->calcKey($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){ public function getSessionKey($key){
return $this->getRedis()->get($this->calcKey($key)); return $this->getRedis()->get($this->calcKey($key));
......
<!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
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 to comment