|
|
|
@ -10,7 +10,7 @@ class Statistics extends Controller |
|
|
|
|
|
|
|
private $password = 'batyg@2023'; |
|
|
|
|
|
|
|
private function validateToken($token) { |
|
|
|
protected function validateUserToken($token) { |
|
|
|
$xtToken = md5(base64_encode($this->password)); |
|
|
|
return $xtToken === $token; |
|
|
|
} |
|
|
|
@ -25,7 +25,7 @@ class Statistics extends Controller |
|
|
|
$token = $this->request->param('token'); |
|
|
|
if (!is_numeric($year)) return $this->renderError('请求失败'); |
|
|
|
if (empty($token)) return $this->renderError('请求失败'); |
|
|
|
if (!$this->validateToken($token)) return $this->renderError('请求验证不通过'); |
|
|
|
if (!$this->validateUserToken($token)) return $this->renderError('请求验证不通过'); |
|
|
|
|
|
|
|
$dm = new Dm(); |
|
|
|
|
|
|
|
|