|
|
|
@ -108,23 +108,26 @@ |
|
|
|
let notificationEventType = result.notificationEventType |
|
|
|
let woopId = result.extras && result.extras.dataType === 'woop' && result.extras.value; |
|
|
|
console.log("通知", result) |
|
|
|
if (result.content.includes('订单出餐已超时')) { |
|
|
|
this.onPlayAudio(2) |
|
|
|
} else { |
|
|
|
if (result.content.includes('您有一笔新的订单')) { |
|
|
|
this.onPlayAudio(4) |
|
|
|
} else if (result.content.includes('您有一笔新的到店订单')) { |
|
|
|
this.onPlayAudio(3) |
|
|
|
} else if (result.content.includes('您有一笔订单申请退款')) { |
|
|
|
this.onPlayAudio(1) |
|
|
|
} |
|
|
|
// 将消息数据推入打印队列 |
|
|
|
this.globalData.printData.push(JSON.parse(result.android.inAppExtras)) |
|
|
|
// 若当前未在打印,则启动队列处理 |
|
|
|
if (!this.globalData.isPrinting) { |
|
|
|
this.processPrintQueue() |
|
|
|
if(result.notificationEventType == 'notificationArrived'){ |
|
|
|
if (result.content.includes('订单出餐已超时')) { |
|
|
|
this.onPlayAudio(2) |
|
|
|
} else { |
|
|
|
if (result.content.includes('您有一笔新的订单')) { |
|
|
|
this.onPlayAudio(4) |
|
|
|
} else if (result.content.includes('您有一笔新的到店订单')) { |
|
|
|
this.onPlayAudio(3) |
|
|
|
} else if (result.content.includes('您有一笔订单申请退款')) { |
|
|
|
this.onPlayAudio(1) |
|
|
|
} |
|
|
|
// 将消息数据推入打印队列 |
|
|
|
this.globalData.printData.push(JSON.parse(result.android.inAppExtras)) |
|
|
|
// 若当前未在打印,则启动队列处理 |
|
|
|
if (!this.globalData.isPrinting) { |
|
|
|
this.processPrintQueue() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
jpushModule.isPushStopped(res => { |
|
|
|
|