| | |
| | | //推送仅支持Android ios原生平台
|
| | | // #ifdef APP-PLUS
|
| | | // 此处为unipush1.0的推送方法
|
| | | plus.push.getClientInfoAsync((info) => {
|
| | | let cid = info["clientid"];
|
| | | console.log('客户端推送标识:', cid)
|
| | | this.$store.dispatch('setClientPushId', cid); // 使用 action 更新 cid
|
| | | // plus.push.getClientInfoAsync((info) => {
|
| | | // let cid = info["clientid"];
|
| | | // console.log('客户端推送标识:', cid)
|
| | | // this.$store.dispatch('setClientPushId', cid); // 使用 action 更新 cid
|
| | |
|
| | | });
|
| | | // });
|
| | | // #endif
|
| | | uni.onPushMessage((res) => {
|
| | | console.log("收到推送消息:", res) //监听推送消息
|
| | | })
|
| | | // uni.onPushMessage((res) => {
|
| | | // console.log("收到推送消息:", res) //监听推送消息
|
| | | // })
|
| | |
|
| | | uni.getSystemInfo({
|
| | | success: function(e) {
|