Commit bdfbbb88 authored by huanle's avatar huanle

0528——

parent 554837ab
......@@ -12,18 +12,18 @@ class Index extends Controller
public function _initialize()
{
// $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);
// }
$token = input('post.token');
$old_token = cache('token_'.$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);
}
}
......
......@@ -86,6 +86,7 @@ class Doclist extends Model
if ($docid) {
$where['docid'] = array('=',$docid);
}
$rs = $this->where($where)->update($data);
......
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