|
|
|
@ -466,12 +466,11 @@ class Server |
|
|
|
|
* @notes:设置域名 |
|
|
|
|
* @param $appid |
|
|
|
|
* @param $domain |
|
|
|
|
* @return bool |
|
|
|
|
* @author: wanghousheng |
|
|
|
|
*/ |
|
|
|
|
public function setDomain($appid, $domain): bool |
|
|
|
|
public function setDomain($appid, $domain) |
|
|
|
|
{ |
|
|
|
|
$url = 'https://api.weixin.qq.com/wxa/modify_domain_directly?access_token=' . $this->authorizerAccessToken($appid); |
|
|
|
|
$url = 'https://api.weixin.qq.com/wxa/modify_domain?access_token=' . $this->authorizerAccessToken($appid); |
|
|
|
|
$data['action'] = 'set'; |
|
|
|
|
$data['requestdomain'] = [$domain]; |
|
|
|
|
$data['wsrequestdomain'] = []; |
|
|
|
@ -481,6 +480,7 @@ class Server |
|
|
|
|
$data['tcpdomain'] = []; |
|
|
|
|
$result = $this->curlPost($url, json_encode($data)); |
|
|
|
|
$result = json_decode($result, true); |
|
|
|
|
return $result; |
|
|
|
|
if ($result && !empty($result['errmsg']) && $result['errmsg'] == 'ok') { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|