tianyi 1 month ago
parent
commit
a0a0f56360
  1. 25
      App.vue

25
App.vue

@ -139,7 +139,6 @@
let woopId = result.extras && result.extras.dataType === 'woop' && result.extras.value; let woopId = result.extras && result.extras.dataType === 'woop' && result.extras.value;
// //
if (result.notificationEventType === 'notificationOpened') { if (result.notificationEventType === 'notificationOpened') {
console.log('用户点击了通知消息')
if (this.NB.isAndroidOrIOS() == 'iOS') { if (this.NB.isAndroidOrIOS() == 'iOS') {
this.handlePushClick(result.ios.inAppExtras); this.handlePushClick(result.ios.inAppExtras);
} else { } else {
@ -147,6 +146,7 @@
} }
} }
//
if (result.notificationEventType == 'notificationArrived') { if (result.notificationEventType == 'notificationArrived') {
if (result.content.includes('订单出餐已超时')) { if (result.content.includes('订单出餐已超时')) {
this.onPlayAudio(2) this.onPlayAudio(2)
@ -252,7 +252,6 @@
}, },
// //
handlePushClick(extras) { handlePushClick(extras) {
console.log('消息内容',extras)
if (!extras) return; if (!extras) return;
// AndroidJSONiOSObject // AndroidJSONiOSObject
@ -343,28 +342,6 @@
this.globalData.menuButtonHeight = weixin.height this.globalData.menuButtonHeight = weixin.height
// #endif // #endif
}, },
// TODO:
resetLoginData() {
},
onTIMError() {},
onSDKReady({
name
}) {
const isSDKReady = name === uni.$TUIKitEvent.SDK_READY ? true : false
uni.$emit('isSDKReady', {
isSDKReady: true
});
},
onNetStateChange() {},
onSDKReload() {},
onSdkNotReady() {},
onKickedOut() {
uni.showToast({
title: '您被踢下线',
icon: 'error'
});
},
getRegistrationID() { //registerID getRegistrationID() { //registerID
jpushModule.getRegistrationID(result => { jpushModule.getRegistrationID(result => {
let registerID = result.registerID let registerID = result.registerID

Loading…
Cancel
Save