wangfukang 2 weeks ago
parent
commit
35c9020e93
  1. 18
      App.vue

18
App.vue

@ -103,13 +103,15 @@
this.getAreaSize()
// this.getRegistrationID()
// #ifdef APP-PLUS
jpushModule.initJPushService();
jpushModule.setLoggerEnable(true);
plus.screen.lockOrientation("portrait-primary");
if (jpushModule.setLoggerEnable) {
jpushModule.setLoggerEnable(true);
}
if (plus && plus.screen && plus.screen.lockOrientation) {
plus.screen.lockOrientation("portrait-primary");
}
//
this.getNotificationEnabled();
jpushModule.addConnectEventListener(result => {
console.log('JPush connect event:', JSON.stringify(result));
let connectEnable = result.connectEnable
if (connectEnable == true) {
setTimeout(() => {
@ -120,6 +122,7 @@
}
});
jpushModule.addNotificationListener(result => { //
console.log('JPush notification event:', JSON.stringify(result));
if (jpushModule.setBadge) {
jpushModule.setBadge(0);
}
@ -182,6 +185,11 @@
}
});
if (jpushModule.initJPushService) {
console.log('JPush init service');
jpushModule.initJPushService();
}
this.getNotificationEnabled();
if (jpushModule.isPushStopped) {
jpushModule.isPushStopped(res => {
// code 0 1

Loading…
Cancel
Save