细节优化

feat/task1-c-wallet
gongfuxiang 2023-04-08 22:12:21 +08:00
parent efaf46019a
commit 9edf628bcd
2 changed files with 2 additions and 20 deletions

View File

@ -146,10 +146,7 @@ class Common extends BaseController
if(empty($this->user))
{
exit(json_encode(DataReturn(MyLang('login_failure_tips'), -400)));
} else {
// token验证
$this->TokenCheck();
}
}
}
/**
@ -217,21 +214,6 @@ class Common extends BaseController
$this->page_size = 10;
}
/**
* token验证
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2018-04-18T16:20:58+0800
*/
private function TokenCheck()
{
if(!empty($this->user) && !empty($this->data_request['token']) && $this->data_request['token'] != ApiService::CreatedUserToken($this->user['id']))
{
exit(json_encode(DataReturn(MyLang('token_error_tips'), -1000)));
}
}
/**
* 空方法响应
* @author Devil

View File

@ -64,7 +64,7 @@ class ApiService
}
}
sort($data);
return md5(md5(implode('', $data)).md5($user_id));
return md5(md5(md5(implode('', $data)).md5($user_id).time().GetNumberCode()));
}
}
?>