wang hou sheng 8 months ago
parent 0e239bcedc
commit fc1b26d8cd
  1. 8
      app/common/library/wxserver/Server.php

@ -298,7 +298,7 @@ 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) {
@ -470,7 +470,9 @@ class Server
*/
public function setDomain($appid, $domain)
{
$url = 'https://api.weixin.qq.com/wxa/modify_domain?access_token=' . $this->authorizerAccessToken($appid);
$token = $this->authorizerAccessToken($appid);
if ($token) {
$url = "https://api.weixin.qq.com/wxa/modify_domain?access_token=$token";
$data['action'] = 'set';
$data['requestdomain'] = [$domain];
$data['wsrequestdomain'] = [];
@ -486,6 +488,8 @@ class Server
}
return false;
}
return [];
}
public function apiText($authorization_code, $touser)
{

Loading…
Cancel
Save