zhouwenxuan
2023-07-19 6f89c68df4326cb8b4e28859c426b764a666426d
App.vue
@@ -12,36 +12,27 @@
            });
            //消息回调——点击通知栏消息 跳转指定页面
            jpushModule.addNotificationListener(result=>{
               console.log(result)
               if (result.notificationEventType == "notificationOpened") {
                  //判断是否登录
                  if (uni.getStorageSync('tk')) {
                     //工作通知——工作人员工作通知页
                     if (result.title.includes('工作通知')){
                        uni.navigateTo({
                        uni.switchTab({
                           url: '/pages/tabBar/notice/notice',
                           complete(res) {
                              console.log(res);
                           }
                        })   
                     //信息审核——领导审核页
                     }else if(result.title == '您有新的信息需要审批'){
                        uni.navigateTo({
                        uni.switchTab({
                           url: '/pages/tabBar/examine/examine',
                           complete(res) {
                              console.log(res);
                           }
                        })
                     //审核结果——首页(后续加pc端信息发布页)
                     }else if(result.title.includes('信息审核')){
                        uni.navigateTo({
                        uni.switchTab({
                           url: '/pages/tabBar/information/information',
                           complete(res) {
                              console.log(res);
                           }
                        })
                     }   
                  }else {
                     console.log("未登录")
                     //未登录跳转首页
                     uni.navigateTo({
                        url: '/pages/index/index',
@@ -80,6 +71,8 @@
            })
            
            
            // jpushModule.addGeofenceListener(result => {
            //    let code = result.code
            //    let type = result.type
@@ -115,7 +108,7 @@
            console.log('App Show')
         },
         onHide: function() {
            jpushModule.initJPushService();
            // jpushModule.initJPushService();
            console.log('App Hide')
         }
      }