|
|
|
@ -139,7 +139,6 @@ |
|
|
|
let woopId = result.extras && result.extras.dataType === 'woop' && result.extras.value; |
|
|
|
//用户点击了通知消息 |
|
|
|
if (result.notificationEventType === 'notificationOpened') { |
|
|
|
console.log('用户点击了通知消息') |
|
|
|
if (this.NB.isAndroidOrIOS() == 'iOS') { |
|
|
|
this.handlePushClick(result.ios.inAppExtras); |
|
|
|
} else { |
|
|
|
@ -147,6 +146,7 @@ |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
//用户收到了通知消息 |
|
|
|
if (result.notificationEventType == 'notificationArrived') { |
|
|
|
if (result.content.includes('订单出餐已超时')) { |
|
|
|
this.onPlayAudio(2) |
|
|
|
@ -252,7 +252,6 @@ |
|
|
|
}, |
|
|
|
// 统一处理推送点击逻辑 |
|
|
|
handlePushClick(extras) { |
|
|
|
console.log('消息内容',extras) |
|
|
|
if (!extras) return; |
|
|
|
|
|
|
|
// 兼容处理:Android有时返回JSON字符串,iOS返回Object |
|
|
|
@ -343,28 +342,6 @@ |
|
|
|
this.globalData.menuButtonHeight = weixin.height |
|
|
|
// #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 |
|
|
|
jpushModule.getRegistrationID(result => { |
|
|
|
let registerID = result.registerID |
|
|
|
|