*
Showing
1 changed file
with
5 additions
and
3 deletions
... | @@ -68,8 +68,6 @@ class BaseController extends Controller | ... | @@ -68,8 +68,6 @@ class BaseController extends Controller |
68 | { | 68 | { |
69 | if (!$accessToken = Cache::get(CacheKeyTools::tmeAccessToken())) {$accessToken = $this->getToken();} | 69 | if (!$accessToken = Cache::get(CacheKeyTools::tmeAccessToken())) {$accessToken = $this->getToken();} |
70 | 70 | ||
71 | |||
72 | |||
73 | $headers['appId'] = $this->appId; | 71 | $headers['appId'] = $this->appId; |
74 | $headers['accessToken'] = $accessToken; | 72 | $headers['accessToken'] = $accessToken; |
75 | $headers['timestamp'] = (string)date('YmdHis'); | 73 | $headers['timestamp'] = (string)date('YmdHis'); |
... | @@ -163,11 +161,14 @@ class BaseController extends Controller | ... | @@ -163,11 +161,14 @@ class BaseController extends Controller |
163 | ksort($common_params); | 161 | ksort($common_params); |
164 | $params = ''; | 162 | $params = ''; |
165 | 163 | ||
164 | |||
165 | |||
166 | foreach ($common_params as $k=>$v) | 166 | foreach ($common_params as $k=>$v) |
167 | { | 167 | { |
168 | if ('' === $v || null === $v || [] === $v) { | 168 | if ('' === $v || null === $v || [] === $v) { |
169 | continue; | 169 | continue; |
170 | } | 170 | } |
171 | |||
171 | if (is_array($v)) { | 172 | if (is_array($v)) { |
172 | $params .= $k . json_encode($this->handleSubArrayNumber($v), JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); | 173 | $params .= $k . json_encode($this->handleSubArrayNumber($v), JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); |
173 | } else { | 174 | } else { |
... | @@ -177,8 +178,9 @@ class BaseController extends Controller | ... | @@ -177,8 +178,9 @@ class BaseController extends Controller |
177 | 178 | ||
178 | 179 | ||
179 | Log::channel('api')->info(__METHOD__.':签名参数', [ | 180 | Log::channel('api')->info(__METHOD__.':签名参数', [ |
181 | 'common_params'=>$common_params, | ||
180 | 'appSecret'=>$this->appSecret, | 182 | 'appSecret'=>$this->appSecret, |
181 | '$params'=>$params, | 183 | 'params'=>$params, |
182 | 'sign'=>strtoupper(md5($this->appSecret . $params . $this->appSecret)), | 184 | 'sign'=>strtoupper(md5($this->appSecret . $params . $this->appSecret)), |
183 | ]); | 185 | ]); |
184 | 186 | ... | ... |
-
Please register or sign in to post a comment