Selaa lähdekoodia

wesmiler 报恩寺项目

wesmiler 4 vuotta sitten
vanhempi
commit
df2dda112d
1 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. 3 3
      app/Services/WechatService.php

+ 3 - 3
app/Services/WechatService.php

@@ -377,13 +377,13 @@ class WechatService extends BaseService
     public static function getJssdkParams($url = '')
     {
         // token请求次数超出警告范围
-        $countKey = "token:count";
+        $countKey = "caches:tokens:count";
         $requestCount = RedisService::get($countKey);
         if($requestCount>=5000){
             return ['error'=> 'token请求失败次数已超出警告值5000'];
         }
 
-        $countKey = "token:ticketCount:".get_client_ip();
+        $countKey = "caches:tokens:ticketCount:".get_client_ip();
         $requestCount = RedisService::get($countKey);
         if($requestCount>=100){
             return ['error'=> '分享参数请求次数过多请稍后重试'];
@@ -404,7 +404,7 @@ class WechatService extends BaseService
         RedisService::set($countKey, $requestCount+1, 30);
         $signature = WechatService::getJssdkSign($params);
         return [
-            'wx_appid' => WechatService::getConfigs('wx_appid'),
+            'appId' => WechatService::getConfigs('wx_appid'),
             'timestamp' => $params['timestamp'],
             'nonceStr' => $params['noncestr'],
             'signature' => $signature,