wang hou sheng 7 months ago
parent 911a1ca133
commit 2a21131a44
  1. 14
      app/common/library/wxserver/Wholesaler.php

@ -74,6 +74,18 @@ class Wholesaler
return $data; return $data;
} }
public function applySetOrderPathInfo(array $appid, string $path = 'pages/order/index')
{
$token = $this->getComponentAccessToken();
$data['batch_req'] = [
'path' => $path,
'appid_list' => $appid,
];
$url = "https://api.weixin.qq.com/wxa/security/applysetorderpathinfo?component_access_token=$token";
$result = $this->curlPost($url, json_encode($data));
return json_decode($result, true);
}
public function getStableAccessToken() public function getStableAccessToken()
{ {
$url = 'https://api.weixin.qq.com/cgi-bin/stable_token'; $url = 'https://api.weixin.qq.com/cgi-bin/stable_token';
@ -631,6 +643,8 @@ class Wholesaler
if ($this->modifyJumpDomain($appid)) { if ($this->modifyJumpDomain($appid)) {
$up['jump_domain_status'] = 1; $up['jump_domain_status'] = 1;
} }
//设置订单页path信息
$this->applySetOrderPathInfo([$appid]);
if ($up) { if ($up) {
$model = new WxwholesalerAccount(); $model = new WxwholesalerAccount();
$model->update($up, ['appid' => $appid]); $model->update($up, ['appid' => $appid]);

Loading…
Cancel
Save