更新记录
1.0.1(2022-10-11)
1.代码优化
1.0.0(2022-10-11)
1.微信小程序订阅消息
平台兼容性
云端兼容性
阿里云 | 腾讯云 | 支付宝云 |
---|---|---|
√ | × | × |
uni-app
Vue2 | Vue3 | Chrome | Safari | app-vue | app-nvue | Android | iOS | 鸿蒙 |
---|---|---|---|---|---|---|---|---|
√ | - | - | - | × | × | - | - | - |
微信小程序 | 支付宝小程序 | 抖音小程序 | 百度小程序 | 快手小程序 | 京东小程序 | 鸿蒙元服务 | QQ小程序 | 飞书小程序 | 快应用-华为 | 快应用-联盟 |
---|---|---|---|---|---|---|---|---|---|---|
√ | × | × | × | - | - | - | × | - | × | × |
云函数类插件通用教程
使用云函数类插件的前提是:使用HBuilderX 2.9+
创作不易,请先试用,再进行购买,请勿以差评的方式提问!
简介:
订阅消息(模版消息)在实际的业务应用中有很多的使用场景,例如 我们下了顺丰快后,会收到接收快递的实时状态通知提醒;在餐饮行业,我们下了订单后,订阅了取餐提醒后,之后会收到取餐的消息提醒... 类似这样的微信小程序的使用场景,就是通过微信的订阅消息(模版消息)来实现的。
操作指引:
展示页面

用户订阅消息

服务通知

扫描欢迎预览:
...
程序配置:
使用uni-id插件进行用户的管理,需要对uni-id进行配置:
1.uni-id
配置uni-id参数文件,路径:<项目根目录>/uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-id/config.json
复制代码{
...
"mp-weixin": {
"oauth" : {
"weixin" : {
"appid" : "appid", //配置微信小程序appid
"appsecret" : "appsecret" //配置微信小程序appsecret
}
}
}`
`...
}`
配置msg参数文件,路径:<项目根目录>/uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/msg/config.json
复制代码{
...
{
"mpWeixin": {
"appid": "", //配置微信小程序appid
"appsecret": "" //配置微信小程序appsecret
}
}
`...
}`