- wx.requestSubscribeMessage 增加新的订阅模版id,不弹出订阅选择的弹窗
用户勾选 “总是保持以上选择,不再询问” 之后,下次订阅调用 wx.requestSubscribeMessage 不会弹窗,保持之前的选择,修改选择需要打开小程序设置进行修改。 如果需要增加增加新的订阅模版id,wx.requestSubscribeMessage 再次调用不弹出订阅选择的弹窗,怎么处理?
2023-07-20 - 小程序订阅消息-subscribe_msg_change_event事件推送
{ "ToUserName": "gh_123456789abc", "FromUserName": "o7esq5OI1Uej6Xixw1lA2H7XDVbc", "CreateTime": "1610968440", "MsgType": "event", "Event": "subscribe_msg_change_event", "SubscribeMsgChangeEvent": [ { "TemplateId":"BEwX0BOT3MqK3Uc5oTU3CGBqzjpndk2jzUf7VfExd8", "SubscribeStatusString": "reject" }] } 经过测试单条设置返回的不是集合,没有上面的红色中括号,如下 { "ToUserName": "gh_123456789abc", "FromUserName": "o7esq5OI1Uej6Xixw1lA2H7XDVbc", "CreateTime": "1610968440", "MsgType": "event", "Event": "subscribe_msg_change_event", "List": { "TemplateId":"BEwX0BOT3MqK3Uc5oTU3CGBqzjpndk2jzUf7VfExd8", "SubscribeStatusString": "reject" } }
2021-07-06 - 小程序订阅消息-subscribe_msg_change_event事件推送
https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/subscribe-message.html 当用户在手机端服务通知里消息卡片右上角“...”管理消息时,或者在小程序设置管理中的订阅消息管理页面内管理消息时,相应的行为事件会推送至开发者所配置的服务器地址。(目前只推送取消订阅的事件,即对消息设置“拒收”) 上面这个推送事件时,如果设置一个订阅消息传回的json中list字段不是集合形式,跟设置多个返回不统一,处理不方便 例如设置一个时返回json: {"ToUserName":"xxxxx","FromUserName":"xxxxx","CreateTime":1625575518,"MsgType":"event","Event":"subscribe_msg_change_event","List":{"SubscribeStatusString":"reject","TemplateId":"NQezXFstp4zZV2q7u5aSprQZEx061ODkFJGLdungfoI"}} 正常设置一个订阅消息拒绝时也应该是集合形式: {"ToUserName":"xxxxx","FromUserName":"xxxxx","CreateTime":1625575518,"MsgType":"event","Event":"subscribe_msg_change_event","List":[ {"SubscribeStatusString":"reject","TemplateId":"NQezXFstp4zZV2q7u5aSprQZEx061ODkFJGLdungfoI"} ] } 设置多个时返回json: {"ToUserName":"xxxxx","FromUserName":"xxxxx","CreateTime":1625575681,"MsgType":"event","Event":"subscribe_msg_change_event","List":[{"SubscribeStatusString":"reject","TemplateId":"savKN0g_My3T-Hb6t5yUJ2HfG6Wj56HRJzxGOyU2z_Y"},{"SubscribeStatusString":"reject","TemplateId":"gIg6LaccfJuD1IAKzSdodAT7U3Z4ZEHZbPcLo1Q-VUo"}]}
2021-07-06