|
|
|
@ -114,14 +114,14 @@ |
|
|
|
|
|
|
|
jpushModule.setLoggerEnable(true); |
|
|
|
plus.screen.lockOrientation("portrait-primary"); |
|
|
|
|
|
|
|
//监听 极光推送连接状态 |
|
|
|
this.getNotificationEnabled(); |
|
|
|
jpushModule.addConnectEventListener(result => { |
|
|
|
let connectEnable = result.connectEnable |
|
|
|
if (connectEnable == true) { |
|
|
|
|
|
|
|
this.getRegistrationID() |
|
|
|
setTimeout(() => { |
|
|
|
this.getRegistrationID(); |
|
|
|
}, 1000); |
|
|
|
} else { |
|
|
|
|
|
|
|
} |
|
|
|
@ -325,19 +325,15 @@ |
|
|
|
this.globalData.pageHeight = this.globalData.windowHeight |
|
|
|
this.globalData.safeAreaBottom = res.screenHeight - res.safeArea.bottom |
|
|
|
this.globalData.pageHeight = this.globalData.windowHeight + 44 + this.globalData.top |
|
|
|
// #ifdef MP-WEIXIN |
|
|
|
var weixin = uni.getMenuButtonBoundingClientRect(); |
|
|
|
this.globalData.top = weixin.top |
|
|
|
this.globalData.menuButtonWidth = weixin.width |
|
|
|
this.globalData.menuButtonLeft = weixin.left |
|
|
|
this.globalData.menuButtonHeight = weixin.height |
|
|
|
// #endif |
|
|
|
|
|
|
|
}, |
|
|
|
getRegistrationID() { //获取registerID |
|
|
|
jpushModule.getRegistrationID(result => { |
|
|
|
let registerID = result.registerID |
|
|
|
this.globalData.registrationID = registerID |
|
|
|
uni.setStorageSync("registerID", registerID) |
|
|
|
if (result && result.registerID) { |
|
|
|
this.globalData.registrationID = registerID |
|
|
|
uni.setStorageSync("registerID", registerID) |
|
|
|
} |
|
|
|
// uni.setStorageSync("signPerson", result.signPerson) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|