app接收到报警记录后处理方法
This commit is contained in:
parent
05664feb52
commit
52f83b39e0
22
App.vue
22
App.vue
@ -1,13 +1,31 @@
|
||||
<script>
|
||||
import config from './config'
|
||||
import store from '@/store'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import {
|
||||
getToken
|
||||
} from '@/utils/auth'
|
||||
|
||||
export default {
|
||||
onLaunch: function() {
|
||||
this.initApp()
|
||||
this.initApp();
|
||||
this.listenMessage();
|
||||
},
|
||||
methods: {
|
||||
listenMessage() {
|
||||
// #ifdef APP-PLUS
|
||||
const _self = this;
|
||||
const _handlePush = function(message) {
|
||||
// TODO
|
||||
console.log(message);
|
||||
if (message.payload.type === "alarm") {
|
||||
uni.navigateTo({
|
||||
url: '/pages/work/alarm/detailsAlarm?id=' + message.payload.id
|
||||
});
|
||||
}
|
||||
};
|
||||
plus.push.addEventListener('click', _handlePush);
|
||||
// #endif
|
||||
},
|
||||
// 初始化应用
|
||||
initApp() {
|
||||
// 初始化应用配置
|
||||
|
Loading…
Reference in New Issue
Block a user