移除推送代码
This commit is contained in:
52
App.vue
52
App.vue
@@ -30,41 +30,33 @@ export default {
|
||||
console.error(`暂时不支持运行到小程序端`);
|
||||
// #endif
|
||||
// 集成cid全局获取和存储
|
||||
uni.getPushClientId({
|
||||
success: (res) => {
|
||||
console.log(res, 'app-Push-ID');
|
||||
if (res && res.cid) {
|
||||
uni.setStorageSync('cid', res.cid);
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log(err)
|
||||
}
|
||||
})
|
||||
// uni.getPushClientId({
|
||||
// success: (res) => {
|
||||
// console.log(res, 'app-Push-ID');
|
||||
// if (res && res.cid) {
|
||||
// uni.setStorageSync('cid', res.cid);
|
||||
// }
|
||||
// },
|
||||
// fail: (err) => {
|
||||
// console.log(err)
|
||||
// }
|
||||
// })
|
||||
},
|
||||
onShow: function () {
|
||||
console.log("App Show");
|
||||
IMSDK.asyncApi(IMSDK.IMMethods.SetAppBackgroundStatus, IMSDK.uuid(), false);
|
||||
uni.getPushClientId({
|
||||
success(res) {
|
||||
console.log(res, 'app-Push-ID');
|
||||
},
|
||||
fail(err) {
|
||||
console.log(err)
|
||||
}
|
||||
})
|
||||
//#ifdef APP-PLUS
|
||||
var info = plus.push.getClientInfo()
|
||||
plus.push.addEventListener("click", function(msg) {
|
||||
console.log("click:" + JSON.stringify(msg));
|
||||
console.log(msg.payload);
|
||||
console.log(JSON.stringify(msg));
|
||||
}, false);
|
||||
// 监听在线消息事件
|
||||
plus.push.addEventListener("receive", function(msg) {
|
||||
//业务代码
|
||||
console.log("recevice:" + JSON.stringify(msg))
|
||||
}, false);
|
||||
// var info = plus.push.getClientInfo()
|
||||
// plus.push.addEventListener("click", function(msg) {
|
||||
// console.log("click:" + JSON.stringify(msg));
|
||||
// console.log(msg.payload);
|
||||
// console.log(JSON.stringify(msg));
|
||||
// }, false);
|
||||
// // 监听在线消息事件
|
||||
// plus.push.addEventListener("receive", function(msg) {
|
||||
// //业务代码
|
||||
// console.log("recevice:" + JSON.stringify(msg))
|
||||
// }, false);
|
||||
//#endif
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user