当前位置:网站首页>uni-app消息推送
uni-app消息推送
2022-04-23 14:09:00 【瑞瑞小同学】
1.首先登录注册:https://dev.dcloud.net.cn/app/index?type=0
2.接下来这一步很重要,哎,找了好久,对后面的cid的获取很有用。记住有这些东西。
3.创建一个uni-app项目,配置manifest.json,这里就用到上面的东西了哈
4.CID的获取,注意是让cid在客户端里显示,然后将获取的值保存下来哈,后面有用
代码展示:
<script>
export default {
data() {
return {
title: 'Hello'
}
},
onLoad() {
this.getcid()
},
methods: {
getcid(){
setInterval(function(){
uni.showToast({
icon:"success",
position:"center",
title:plus.push.getClientInfo().clientid
})
},2000)
}
}
}
</script>
5。
6.
7,云打包,选第一个,原生app云打包,里面的包名和在后台配置的保持一致,可以选用dcloud公用证书。
8,打包成功后,注意控制台,等会就有可以下载apk的地址,安装到手机上,因为客户端代码已经写了cid的获取,所以在手机上可以查看到cid了,注意哈,是在手机上获取,当然模拟器也可以,浏览器就不行了哈,把这个cid记下来哈,在发送消息预览时会用到
9可以发送消息了,手机通知栏可以看到了,哈哈
版权声明
本文为[瑞瑞小同学]所创,转载请带上原文链接,感谢
https://blog.csdn.net/yr123456654321/article/details/109182930
边栏推荐
- 金融行业云迁移实践 平安金融云整合HyperMotion云迁移解决方案,为金融行业客户提供迁移服务
- Operation instructions of star boundary automatic text translator (advanced version)
- Wechat applet communicates with esp8266 based on UDP protocol
- JDBC和servlet写CRUD的接口总结
- 差分隐私(背景介绍)
- Win10 comes with groove music, which can't play cue and ape files. It's a curvilinear way to save the country. It creates its own aimpack plug-in package, and aimp installs DSP plug-in
- 拨开云雾synchronized使用五种方式介绍
- Research on recyclerview details - Discussion and repair of recyclerview click dislocation
- 使用Executors类快速创建线程池
- sql中出现一个变态问题
猜你喜欢
差分隐私(背景介绍)
帆软中根据分类进行汇总
容灾有疑问?点这里
On the multi-level certificate based on OpenSSL, the issuance and management of multi-level Ca, and two-way authentication
金融行业云迁移实践 平安金融云整合HyperMotion云迁移解决方案,为金融行业客户提供迁移服务
Visio installation error 1:1935 2: {XXXXXXXX
RecyclerView高级使用(一)-侧滑删除的简单实现
Installation and use of postman pit
Operation instructions of star boundary text automatic translator
关于NodeJS中JSON5的相关配置和使用
随机推荐
进入新公司,运维工程师从下面这几项了解系统的部署
redis数据库讲解(四)主从复制、哨兵、Cluster群集
返回数组排序后下标
GFS分布式文件系统(理论)
MySQL-InnoDB-事务
postman批量生产body信息(实现批量修改数据)
帆软中需要设置合计值为0时,一整行都不显示的解决办法
多云数据流转?云上容灾?年前最后的价值内容分享
OpenStack命令操作
关于云容灾,你需要知道这些
Storage path of mod subscribed by starbound Creative Workshop at Star boundary
容灾有疑问?点这里
剑指offer刷题(1)--面向华为
void*是怎样的存在?
VMware installation 64 bit XP Chinese tutorial
mysql 5.1升级到5.66
DP energy Necklace
VMware 15pro mounts the hard disk of the real computer in the deepin system
Multiple inheritance virtual base exercises
HyperMotion云迁移完成阿里云专有云产品生态集成认证