|
|
@@ -166,7 +166,7 @@ class wxUtil
|
|
|
$response = $curl->setOption(CURLOPT_POSTFIELDS, $jsonData)->post($url);
|
|
|
return $response;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 上传图片多媒体文件
|
|
|
*/
|
|
|
@@ -1211,6 +1211,11 @@ class wxUtil
|
|
|
$url = "https://api.weixin.qq.com/wxa/modify_domain?access_token=" . $accessToken;
|
|
|
$curl = new curl\Curl();
|
|
|
$mHost = Yii::$app->params['mHost'];
|
|
|
+ $has = strpos($mHost, 'https');
|
|
|
+ //如果不是https则换成https
|
|
|
+ if (isset($has) == false) {
|
|
|
+ $mHost = str_replace('http', 'https', $mHost);
|
|
|
+ }
|
|
|
$data = [
|
|
|
"action" => "set",
|
|
|
"requestdomain" => [$mHost],
|
|
|
@@ -1223,7 +1228,7 @@ class wxUtil
|
|
|
$respond = Json::decode($result);
|
|
|
print_r($respond);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//设置业务域名
|
|
|
public static function setWebViewDomain($merchant)
|
|
|
{
|