From fab9fa7d29ecd22a1d3fe2e3e7df20b3090f8853 Mon Sep 17 00:00:00 2001 From: wang hou sheng <76928547+wanghousheng@users.noreply.github.com> Date: Tue, 9 Apr 2024 11:28:03 +0800 Subject: [PATCH] 1 --- app/common/library/wxserver/Server.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/common/library/wxserver/Server.php b/app/common/library/wxserver/Server.php index 9ca6213e..ab092a57 100644 --- a/app/common/library/wxserver/Server.php +++ b/app/common/library/wxserver/Server.php @@ -54,7 +54,7 @@ class Server public function getComponentAccessToken() { if (Cache::has('ComponentAccessToken')) { - //return Cache::get('ComponentAccessToken'); + return Cache::get('ComponentAccessToken'); } $url = 'https://api.weixin.qq.com/cgi-bin/component/api_component_token'; $ticket = Cache::get('component_verify_ticket'); @@ -65,7 +65,6 @@ class Server $data['component_verify_ticket'] = $ticket; $result = $this->curlPost($url, json_encode($data), 10); $result = json_decode($result, true); - return $result; if (!empty($result['component_access_token'])) { Cache::set('ComponentAccessToken', $result['component_access_token'], 6200); return $result['component_access_token']; @@ -227,12 +226,10 @@ class Server */ public function getTemplatedraftlist() { - if (Cache::has('wx_server_drafttemplatelist')) { //return Cache::get('wx_server_drafttemplatelist'); } $token = $this->getComponentAccessToken(); - return [$token]; $list = []; if ($token) { $url = 'https://api.weixin.qq.com/wxa/gettemplatedraftlist?access_token=' . $token;