From fd127b30cef0f8fa8ac6d98094c569a5c40e5f19 Mon Sep 17 00:00:00 2001 From: yangyin <1850366751@qq.com> Date: 星期四, 13 六月 2024 18:21:47 +0800 Subject: [PATCH] fix: 修改页面弹窗 --- app.js | 7 ++++--- utils/api.js | 2 ++ workDesktop/index/index.js | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app.js b/app.js index 00b5ac7..6a3d8ca 100644 --- a/app.js +++ b/app.js @@ -8,7 +8,7 @@ // console.log(this.globalData.sysInfo); //鑾峰彇褰撳墠璁惧淇℃伅 this.getDeviceInfo(); - this.getAllAlarmList() + // this.getAllAlarmList() //鑾峰彇褰撳墠鐢ㄦ埛淇℃伅 var getUserInfoFromCache = wx.getStorageSync('LoginUserInfo'); // console.log(getUserInfoFromCache); @@ -25,6 +25,7 @@ var that=this if(that.globalData.timer){ clearInterval(that.globalData.timer) + that.globalData.timer = null } Request({ url: Constant.BASE_SERVER_URL + 'Monitor/Value/Alarm/Record/Std/GetFluzzyPageList@V1.0', @@ -50,9 +51,7 @@ }); return } - if(that.globalData.monitorModalName) return that.getMonitorDialog() - that.globalData.monitorModalName=true } }) }, @@ -60,6 +59,7 @@ getMonitorDialog() { var that=this that.globalData.timer = setInterval(() => { + if(that.globalData.monitorModalName) return wx.showModal({ title: '娑堟伅鎶ヨ', content: '鎮ㄦ湁鏂扮殑鎶ヨ娑堟伅闇�瑕佸鐞�,鐐瑰嚮鍓嶅線鎶ヨ澶勭悊鏌ョ湅', @@ -72,6 +72,7 @@ } } }) + that.globalData.monitorModalName=true }, 300000) }, //鎶ヨ娑堟伅閫氱煡璺宠浆鍒版姤璀﹀鐞� diff --git a/utils/api.js b/utils/api.js index c05801e..43f945a 100644 --- a/utils/api.js +++ b/utils/api.js @@ -4,7 +4,9 @@ let app = getApp() let ACCESS_TOKEN_KEY = 'AccessToken' let API = (params) => { + let tokenInfo = wx.getStorageSync(ACCESS_TOKEN_KEY) + let currentDateTime = new Date().getTime() if (!tokenInfo) { wx.reLaunch({ diff --git a/workDesktop/index/index.js b/workDesktop/index/index.js index 030ef63..12a394a 100644 --- a/workDesktop/index/index.js +++ b/workDesktop/index/index.js @@ -58,6 +58,7 @@ return; } this.getAssignDialog() + app.getAllAlarmList() this.setData({ userInfo: app.globalData.userInfo, }); -- Gitblit v1.9.3