|
|
@@ -41,10 +41,14 @@ class WxTemplateMessageService extends WeixinService
|
|
|
if ($jumpType === 'h5') {
|
|
|
$payload['url'] = $options['url'] ?? '';
|
|
|
} elseif ($jumpType === 'mp') {
|
|
|
- $payload['miniprogram'] = [
|
|
|
- 'appid' => config('wx_msg.appid'),
|
|
|
- 'pagepath' => $options['pagepath'] ?? '',
|
|
|
- ];
|
|
|
+ if(empty($options['pagepath'])){
|
|
|
+ $payload['url'] = '';
|
|
|
+ }else{
|
|
|
+ $payload['miniprogram'] = [
|
|
|
+ 'appid' => config('wx_msg.appid'),
|
|
|
+ 'pagepath' => $options['pagepath'] ?? '',
|
|
|
+ ];
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
$url = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token={$token}";
|