wang hou sheng 8 months ago
parent 23ff3139d6
commit 8ed04dbf20
  1. 6
      app/common/library/wxserver/Server.php

@ -466,6 +466,7 @@ class Server
* @notes:设置域名 * @notes:设置域名
* @param $appid * @param $appid
* @param $domain * @param $domain
* @return bool|void
* @author: wanghousheng * @author: wanghousheng
*/ */
public function setDomain($appid, $domain) public function setDomain($appid, $domain)
@ -475,20 +476,15 @@ class Server
$url = "https://api.weixin.qq.com/wxa/modify_domain_directly?access_token=$token"; $url = "https://api.weixin.qq.com/wxa/modify_domain_directly?access_token=$token";
$data['action'] = 'set'; $data['action'] = 'set';
$data['requestdomain'] = $domain; $data['requestdomain'] = $domain;
// $data['wsrequestdomain'] = '';
$data['uploaddomain'] = $domain; $data['uploaddomain'] = $domain;
$data['downloaddomain'] = $domain; $data['downloaddomain'] = $domain;
// $data['udpdomain'] = '';
// $data['tcpdomain'] = '';
$result = $this->curlPost($url, json_encode($data)); $result = $this->curlPost($url, json_encode($data));
$result = json_decode($result, true); $result = json_decode($result, true);
return $result;
if ($result && !empty($result['errmsg']) && $result['errmsg'] == 'ok') { if ($result && !empty($result['errmsg']) && $result['errmsg'] == 'ok') {
return true; return true;
} }
return false; return false;
} }
return [];
} }
public function apiText($authorization_code, $touser) public function apiText($authorization_code, $touser)

Loading…
Cancel
Save