Commit e550d98c authored by huanle's avatar huanle

0527—— token

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