From 554eef0a6636234f07463931beccf09cfc78fd8c Mon Sep 17 00:00:00 2001 From: wang hou sheng <76928547+wanghousheng@users.noreply.github.com> Date: Wed, 10 Apr 2024 15:35:25 +0800 Subject: [PATCH] 1 --- app/api/controller/Wxserver.php | 6 ++---- app/common/library/wxserver/Server.php | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/api/controller/Wxserver.php b/app/api/controller/Wxserver.php index 923c4f63..df6164f8 100644 --- a/app/api/controller/Wxserver.php +++ b/app/api/controller/Wxserver.php @@ -12,10 +12,8 @@ class Wxserver extends BaseController { public function index() { - $ext_json['extAppid'] = '123456'; - $ext_json['ext']['attr']['store_id'] = 1001; - $ext_json['window'] = []; - $data['ext_json'] = $ext_json; + $obj = new \app\common\library\wxserver\Server(); + $data = $obj->getAllCategory('wxe3ed157849bd07b5'); return $this->renderSuccess($data); } diff --git a/app/common/library/wxserver/Server.php b/app/common/library/wxserver/Server.php index 1d40f0cb..45ea78b9 100644 --- a/app/common/library/wxserver/Server.php +++ b/app/common/library/wxserver/Server.php @@ -533,7 +533,7 @@ class Server return false; } - private function getAllCategory($appid): array + public function getAllCategory($appid): array { $data = []; $access_token = $this->authorizerAccessToken($appid);