wang hou sheng 8 months ago
parent 4dc8a2fd0f
commit c0a069979d
  1. 2
      app/api/controller/Wxserver.php
  2. 4
      app/common/library/wxserver/Server.php

@ -21,7 +21,7 @@ class Wxserver extends BaseController
$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]);
return $this->renderSuccess(['domain' => $domain, 'arr' => $arr, 'refresh_token' => $refresh_token]);
}

@ -298,10 +298,12 @@ 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);
if ($refresh_token) {
dump($refresh_token);
exit();
$token = $this->getComponentAccessToken();
if ($token) {
$url = 'https://api.weixin.qq.com/cgi-bin/component/api_authorizer_token?component_access_token=' . $token;

Loading…
Cancel
Save