Browse Source

openid为空时不发送tempmsg

master
weigang 5 years ago
parent
commit
3ea7418a8a
  1. 4
      app/Service/MiniprogramService.php

4
app/Service/MiniprogramService.php

@ -155,6 +155,10 @@ class MiniprogramService implements MiniprogramServiceInterface
*/ */
public function sendTempMsg($openid, $template_id, $data, $redirect_url = '', $applet_config = ['appid' => '', 'pagepath' => '']) public function sendTempMsg($openid, $template_id, $data, $redirect_url = '', $applet_config = ['appid' => '', 'pagepath' => ''])
{ {
if (empty($openid) || empty($template_id) || empty($data)) {
return ;
}
// 先拼个基础的 // 先拼个基础的
$template = [ $template = [
'touser' => $openid, 'touser' => $openid,

Loading…
Cancel
Save