王大坤 1 年之前
父节点
当前提交
01a70abe0d
共有 1 个文件被更改,包括 3 次插入4 次删除
  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'];