From 038dd03899b5995a5a33801f6b5d9aa35860a1fb Mon Sep 17 00:00:00 2001 From: wang hou sheng <76928547+wanghousheng@users.noreply.github.com> Date: Tue, 9 Apr 2024 11:11:13 +0800 Subject: [PATCH] 1 --- app/common/library/wxserver/Server.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/common/library/wxserver/Server.php b/app/common/library/wxserver/Server.php index ac14c487..c7944fed 100644 --- a/app/common/library/wxserver/Server.php +++ b/app/common/library/wxserver/Server.php @@ -226,8 +226,8 @@ class Server */ public function getTemplatedraftlist() { - if (Cache::has('templatedraftlist')) { - return Cache::get('templatedraftlist'); + if (Cache::has('wx_server_drafttemplatelist')) { + return Cache::get('wx_server_drafttemplatelist'); } $token = $this->getComponentAccessToken(); $list = []; @@ -245,7 +245,7 @@ class Server 'id' => $value['draft_id'], ]; } - Cache::set('templatelist', $list, 86400); + Cache::set('wx_server_drafttemplatelist', $list, 86400); } } return $list; @@ -274,7 +274,7 @@ class Server $res = $this->curlPost($url, json_encode($data)); $res = json_decode($res, true); if ($res && !empty($res['errmsg']) && $res['errmsg'] == 'ok') { - Cache::delete('templatelist'); + Cache::delete('wx_server_templatelist'); return true; } } @@ -296,7 +296,7 @@ class Server $res = $this->curlPost($url, json_encode($data)); $res = json_decode($res, true); if ($res && !empty($res['errmsg']) && $res['errmsg'] == 'ok') { - Cache::delete('templatelist'); + Cache::delete('wx_server_templatelist'); return true; } } @@ -310,8 +310,8 @@ class Server */ public function getTemplatelist(): array { - if (Cache::has('templatelist')) { - return Cache::get('templatelist'); + if (Cache::has('wx_server_templatelist')) { + return Cache::get('wx_server_templatelist'); } $token = $this->getComponentAccessToken(); $list = []; @@ -334,7 +334,7 @@ class Server 'draft_id' => $value['draft_id'], ]; } - Cache::set('templatelist', $list, 86400); + Cache::set('wx_server_templatelist', $list, 86400); } } return $list;