15954078560 2 vuotta sitten
vanhempi
commit
537fdaebff
1 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. 3 3
      application/api/controller/Index.php

+ 3 - 3
application/api/controller/Index.php

@@ -978,9 +978,9 @@ class Index extends Api
 
     //生成小程序邀请二维码
     public function getqrcode($id = 0) {
-        $access_token = Cache::get('access_token');
+//        $access_token = Cache::get('access_token');
 //        $access_token = '';
-        if (!$access_token) {
+//        if (!$access_token) {
             //获取$access_token
             $url = 'https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid='.config('wxchatpay.app_id').'&secret='.config('wxchatpay.app_secret');
 //            $url = 'https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=wx326ed0bf442d2773&secret=33609a3bc45bb407f0b26816158405b8';
@@ -989,7 +989,7 @@ class Index extends Api
             $access_token = $result['access_token'];
             //缓存
             Cache::set('access_token', $access_token, 7000);
-        }
+//        }
         if (!$access_token) {
             $this->error('参数缺失');
         }