|
|
@ -283,16 +283,19 @@ class Server |
|
|
|
/** |
|
|
|
/** |
|
|
|
* @notes:获取版本信息 |
|
|
|
* @notes:获取版本信息 |
|
|
|
* @param $appid |
|
|
|
* @param $appid |
|
|
|
* @return bool |
|
|
|
* @return mixed|string |
|
|
|
* @author: wanghousheng |
|
|
|
* @author: wanghousheng |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public function getVersioninfo($appid): bool |
|
|
|
public function getVersioninfo($appid) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
$msg = '未知错误'; |
|
|
|
$access_token = $this->authorizerAccessToken($appid); |
|
|
|
$access_token = $this->authorizerAccessToken($appid); |
|
|
|
$url = 'https://api.weixin.qq.com/wxa/getversioninfo?access_token=' . $access_token; |
|
|
|
$url = 'https://api.weixin.qq.com/wxa/getversioninfo?access_token=' . $access_token; |
|
|
|
$result = $this->curlPost($url, '{}'); |
|
|
|
$result = $this->curlPost($url, '{}'); |
|
|
|
$result = json_decode($result, true); |
|
|
|
$result = json_decode($result, true); |
|
|
|
if ($result && !empty($result['errmsg']) && $result['errmsg'] == 'ok') { |
|
|
|
if ($result && !empty($result['errmsg'])) { |
|
|
|
|
|
|
|
$msg = $result['errmsg']; |
|
|
|
|
|
|
|
if ($msg == 'ok') { |
|
|
|
$up = []; |
|
|
|
$up = []; |
|
|
|
if (!empty($result['exp_info'])) { |
|
|
|
if (!empty($result['exp_info'])) { |
|
|
|
$up['exp_info'] = json_encode($result['exp_info']); |
|
|
|
$up['exp_info'] = json_encode($result['exp_info']); |
|
|
@ -304,9 +307,9 @@ class Server |
|
|
|
$model = new WxserverAccount(); |
|
|
|
$model = new WxserverAccount(); |
|
|
|
$model->update($up, ['appid' => $appid]); |
|
|
|
$model->update($up, ['appid' => $appid]); |
|
|
|
} |
|
|
|
} |
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
return $msg; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -514,9 +517,9 @@ class Server |
|
|
|
if ($token) { |
|
|
|
if ($token) { |
|
|
|
$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, 'https://apis.map.gg.com','https://qiniu.shop.royaum.com.cn']; |
|
|
|
$data['requestdomain'] = [$domain, 'https://apis.map.gg.com', 'https://qiniu.shop.royaum.com.cn']; |
|
|
|
$data['uploaddomain'] = [$domain,'https://qiniu.shop.royaum.com.cn']; |
|
|
|
$data['uploaddomain'] = [$domain, 'https://qiniu.shop.royaum.com.cn']; |
|
|
|
$data['downloaddomain'] = [$domain,'https://qiniu.shop.royaum.com.cn']; |
|
|
|
$data['downloaddomain'] = [$domain, 'https://qiniu.shop.royaum.com.cn']; |
|
|
|
$result = $this->curlPost($url, json_encode($data)); |
|
|
|
$result = $this->curlPost($url, json_encode($data)); |
|
|
|
$result = json_decode($result, true); |
|
|
|
$result = json_decode($result, true); |
|
|
|
if ($result && !empty($result['errmsg']) && $result['errmsg'] == 'ok') { |
|
|
|
if ($result && !empty($result['errmsg']) && $result['errmsg'] == 'ok') { |
|
|
|