From 08e940543c2ddcf9b7ac5a1b8a795035147353ef Mon Sep 17 00:00:00 2001 From: wang hou sheng <76928547+wanghousheng@users.noreply.github.com> Date: Thu, 11 Apr 2024 11:31:20 +0800 Subject: [PATCH] 1 --- app/api/controller/Wxserver.php | 6 ++---- app/common/library/wxserver/Server.php | 4 +--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/app/api/controller/Wxserver.php b/app/api/controller/Wxserver.php index db569764..9d385c80 100644 --- a/app/api/controller/Wxserver.php +++ b/app/api/controller/Wxserver.php @@ -18,10 +18,8 @@ class Wxserver extends BaseController $appid = 'wxe3ed157849bd07b5'; $obj = new \app\common\library\wxserver\Server(); $domain = $this->request->domain(true); - $arr = $obj->setDomain($domain, $appid); - $model = new WxserverAccount(); - $refresh_token = $model->where(['appid' => $appid])->value('refresh_token'); - return $this->renderSuccess(['domain' => $domain, 'arr' => $arr, 'refresh_token' => $refresh_token]); + $arr = $obj->setDomain($appid, $domain); + return $this->renderSuccess(['domain' => $domain, 'arr' => $arr]); } diff --git a/app/common/library/wxserver/Server.php b/app/common/library/wxserver/Server.php index ea8f9c03..321b40ce 100644 --- a/app/common/library/wxserver/Server.php +++ b/app/common/library/wxserver/Server.php @@ -298,11 +298,9 @@ class Server public function authorizerAccessToken($appid) { if (Cache::has($appid . '_authorizer_access_token')) { - //return Cache::get($appid . '_authorizer_access_token'); + return Cache::get($appid . '_authorizer_access_token'); } $refresh_token = $this->getRefreshToken($appid); - dump($appid); - exit(); if ($refresh_token) { $token = $this->getComponentAccessToken(); if ($token) {