diff --git a/app/common/library/wxserver/Wholesaler.php b/app/common/library/wxserver/Wholesaler.php index beab49fd..ae975a19 100644 --- a/app/common/library/wxserver/Wholesaler.php +++ b/app/common/library/wxserver/Wholesaler.php @@ -74,6 +74,18 @@ class Wholesaler 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() { $url = 'https://api.weixin.qq.com/cgi-bin/stable_token'; @@ -631,6 +643,8 @@ class Wholesaler if ($this->modifyJumpDomain($appid)) { $up['jump_domain_status'] = 1; } + //设置订单页path信息 + $this->applySetOrderPathInfo([$appid]); if ($up) { $model = new WxwholesalerAccount(); $model->update($up, ['appid' => $appid]);