Commit 5c7e3511 authored by huanle's avatar huanle

0528

parent 3456d78b
...@@ -12,18 +12,18 @@ class Index extends Controller ...@@ -12,18 +12,18 @@ class Index extends Controller
public function _initialize() public function _initialize()
{ {
$token = input('post.token'); // $token = input('post.token');
$old_token =Cache::get('token'); // $old_token =Cache::get('token');
if($old_token){ // if($old_token){
if($token!=$old_token){ // if($token!=$old_token){
$rs = json_encode(code([], 10003, 'token不合法')); // $rs = json_encode(code([], 10003, 'token不合法'));
exit($rs); // exit($rs);
//
} // }
}else{ // }else{
$rs = json_encode(code([], 10003, 'token不存在或已过期')); // $rs = json_encode(code([], 10003, 'token不存在或已过期'));
exit($rs); // exit($rs);
} // }
} }
......
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