王大坤 1 년 전
부모
커밋
d6c4ef0804
3개의 변경된 파일1개의 추가작업 그리고 7개의 파일을 삭제
  1. 0 3
      app/libs/wechat/auth/Gateways/General.php
  2. 1 1
      app/libs/wechat/auth/Gateways/Mini.php
  3. 0 3
      config/swdz.php

+ 0 - 3
app/libs/wechat/auth/Gateways/General.php

xqd xqd
@@ -169,7 +169,6 @@ class General extends Base
             case 'redis':
                 $redis = Redis::instance();
                 $redis->select(15);
-
                 $token = $redis->get($key);
                 break;
             case 'db':
@@ -177,11 +176,9 @@ class General extends Base
                 $token = Db::table('configs')->where('c_key',$key)->where('c_expired','>',time())->value('c_value');
                 break;
         }
-        var_dump($token);
         if ($token) {
             return $token;
         }
-        var_dump(1111);
         $url = 'https://api.weixin.qq.com/cgi-bin/token';
         $res = Curl::requestCurl($url, 'GET', [], http_build_query([
             'grant_type' => 'client_credential',

+ 1 - 1
app/libs/wechat/auth/Gateways/Mini.php

xqd
@@ -159,7 +159,7 @@ class Mini extends Base
                 break;
             case 'db':
             default:
-                $token = Db::table('configs')->where('c_key', $key)->where('c_expired > ' . time())->value('c_value');
+                $token = Db::table('configs')->where('c_key', $key)->where('c_expired','>',time())->value('c_value');
                 break;
         }
         if ($token) {

+ 0 - 3
config/swdz.php

xqd
@@ -7,9 +7,6 @@ return [
         'appid'         => 'wx6e3f027d8bee3ca7',
         // 原生公众号或小程序授权 secret
         'secret'        => '4cc6544a27d2361ba91706cca2b24de5',
-        'cookie_write'  => 1,
-        // 写入 cookie 有效时间
-        'cookie_exp'    => 7200,
         // accessToken 储存驱动 db|redis
         'token_drive'   => 'db'
     ],