王大坤 1 year ago
parent
commit
01a70abe0d
1 changed files with 3 additions and 4 deletions
  1. 3 4
      app/libs/wechat/auth/Gateways/General.php

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

xqd xqd
@@ -177,9 +177,9 @@ class General extends Base
                 $token = Db::table('configs')->where('c_key',$key)->where('c_expired',' > ',time())->value('c_value');
                 break;
         }
-//        if ($token) {
-//            return $token;
-//        }
+        if ($token) {
+            return $token;
+        }
 
         $url = 'https://api.weixin.qq.com/cgi-bin/token';
         $res = Curl::requestCurl($url, 'GET', [], http_build_query([
@@ -187,7 +187,6 @@ class General extends Base
             'appid'      => $this->appId,
             'secret'     => $this->secret
         ]));
-        var_dump($res);
         $data = json_decode($res, true);
         if (isset($data['access_token'])) {
             $token = $data['access_token'];