wang hou sheng 8 months ago
parent 142677bf05
commit 08e940543c
  1. 6
      app/api/controller/Wxserver.php
  2. 4
      app/common/library/wxserver/Server.php

@ -18,10 +18,8 @@ class Wxserver extends BaseController
$appid = 'wxe3ed157849bd07b5'; $appid = 'wxe3ed157849bd07b5';
$obj = new \app\common\library\wxserver\Server(); $obj = new \app\common\library\wxserver\Server();
$domain = $this->request->domain(true); $domain = $this->request->domain(true);
$arr = $obj->setDomain($domain, $appid); $arr = $obj->setDomain($appid, $domain);
$model = new WxserverAccount(); return $this->renderSuccess(['domain' => $domain, 'arr' => $arr]);
$refresh_token = $model->where(['appid' => $appid])->value('refresh_token');
return $this->renderSuccess(['domain' => $domain, 'arr' => $arr, 'refresh_token' => $refresh_token]);
} }

@ -298,11 +298,9 @@ class Server
public function authorizerAccessToken($appid) public function authorizerAccessToken($appid)
{ {
if (Cache::has($appid . '_authorizer_access_token')) { 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); $refresh_token = $this->getRefreshToken($appid);
dump($appid);
exit();
if ($refresh_token) { if ($refresh_token) {
$token = $this->getComponentAccessToken(); $token = $this->getComponentAccessToken();
if ($token) { if ($token) {

Loading…
Cancel
Save