lijintao1025

上一篇文章介绍了如何生成带参数的二维码 ,https://www.cnblogs.com/lijintao1025/p/13930441.html

本次介绍下公众号不同的二维码返回不同的值

 

带参数的二维码扫码时微信回调时会返回 EventKey的值,用来判断来源于哪个渠道,可以根据渠道推送不同的内容

 if(!empty($params[\'EventKey\']) && in_array($params[\'EventKey\'],[$keyword,$keyword1])){
            \Log::info(\'WeChatChannelResponseJob:handle\',$params);
            $app       = Factory::officialAccount(config(\'wechat.official_account.default\'));
            $message = new Text(\'如果已关注服务号,则弹出该二维码对应的固定文案\');
            $app->customer_service->message($message)->to($params[\'FromUserName\'])->send();
            $message = new Text(\'如果之前未关注服务号,则弹出关注服务号引导语+此二维码对应文案\');
            $app->customer_service->message($message)->to($params[\'FromUserName\'])->send();
        }

 

分类:

技术点:

相关文章:

  • 2021-05-03
  • 2021-12-23
  • 2021-06-01
  • 2021-10-30
  • 2021-08-31
  • 2022-02-07
  • 2021-07-02
猜你喜欢
  • 2021-12-23
  • 2021-12-23
  • 2021-08-31
  • 2021-11-27
相关资源
相似解决方案