Browse Source

获取年各场馆统计数据接口

master
wanghongjun 2 years ago
parent
commit
77eb5456b1
  1. 4
      source/application/api/controller/pass/Statistics.php

4
source/application/api/controller/pass/Statistics.php

@ -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();

Loading…
Cancel
Save