diff --git a/androidPrivacy.json b/androidPrivacy.json index 33ad2a0..dc53b4f 100644 --- a/androidPrivacy.json +++ b/androidPrivacy.json @@ -2,14 +2,14 @@ "version": "2", "prompt": "template", "title": "服务协议和隐私政策", - "message": "  请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。
  你可阅读《服务协议》《隐私政策》了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。", + "message": "  请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。
  你可阅读《服务协议》《隐私政策》了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。", "buttonAccept": "同意并接受", "buttonRefuse": "暂不同意", "hrefLoader": "system|default", "backToExit":"false", "second": { "title": "确认提示", - "message": "  进入应用前,你需先同意《用户协议》《隐私政策》,否则将退出应用。", + "message": "  进入应用前,你需先同意《用户协议》《隐私政策》,否则将退出应用。", "buttonAccept": "同意并继续", "buttonRefuse": "退出应用" }, diff --git a/common/js/cacheKey.js b/common/js/cacheKey.js index 2cca079..31fa107 100644 --- a/common/js/cacheKey.js +++ b/common/js/cacheKey.js @@ -5,4 +5,5 @@ export default { access_token: 'access_token', // token refresh_token: 'refresh_token', // 刷新token dictData: 'dictData', // 字典数据 + messageCount: 'messageCount', // 消息数量 } diff --git a/manifest.json b/manifest.json index 1da45ef..07c8553 100644 --- a/manifest.json +++ b/manifest.json @@ -52,7 +52,8 @@ "", "", "" - ] + ], + "abiFilters" : [ "armeabi-v7a", "arm64-v8a" ] }, /* ios打包配置 */ "ios" : { diff --git a/pages.json b/pages.json index 2fbef9f..588deac 100644 --- a/pages.json +++ b/pages.json @@ -222,7 +222,13 @@ { "path": "pages/message/run", "style": { - "navigationBarTitleText": "系统消息" + "navigationBarTitleText": "运行事件" + } + }, + { + "path": "pages/message/runDetail", + "style": { + "navigationBarTitleText": "运行事件详情" } }, { @@ -468,9 +474,8 @@ "navigationBarTextStyle": "black", "navigationBarTitleText": "灿能电力", "navigationBarBackgroundColor": "#ffffff", - "backgroundColor": "#f3f4f5" + "backgroundColor": "#f3f4f5", // #ifdef H5 - , "navigationStyle": "custom" // #endif }, @@ -487,4 +492,4 @@ //当前激活的模式(list 的索引项) "list": [] } -} \ No newline at end of file +} diff --git a/pages/index/index.vue b/pages/index/index.vue index afeb096..f101085 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -71,6 +71,7 @@ export default { }, engineeringList: [], navTabHeight: 0, + timer: null, } }, computed: { @@ -142,6 +143,7 @@ export default { } }, getDevCount() { + if (!this.select.engineeringId) return getDevCount(this.select.engineeringId).then((res) => { // Object.assign(this.devCount, res.data) this.devCount = res.data @@ -152,7 +154,24 @@ export default { item.runStatus = 1 }) this.devCount.engineeringListLength = this.engineeringList.length - console.log(this.devCount) + uni.setStorage({ + key: this.$cacheKey.messageCount, + data: this.devCount, + }) + let messagePage = + this.devCount.runCount + + this.devCount.eventCount + + this.devCount.alarmCount + + this.devCount.harmonicCount + let minePage = this.devCount.harmonicCount + uni.setTabBarBadge({ + index: 1, + text: messagePage ? messagePage + '' : '', + }) + uni.setTabBarBadge({ + index: 2, + text: minePage ? minePage + '' : '', + }) }) }, }, @@ -184,19 +203,13 @@ export default { url: `/pages/user/login`, }) } else { - if ( - this.userInfo.authorities === 'app_vip_user' || - this.userInfo.authorities == 5 || - this.userInfo.authorities === 'tourist' - ) { - // uni.setTabBarBadge({ - // index: 1, - // text: '6', - // }) - } this.init() + this.timer = setInterval(this.getDevCount, 10000) // 定时请求 } }, + onHide() { + clearInterval(this.timer) + } } diff --git a/pages/message/steady.vue b/pages/message/steady.vue index 1c9c3e9..903373b 100644 --- a/pages/message/steady.vue +++ b/pages/message/steady.vue @@ -1,57 +1,27 @@ diff --git a/static/logo_216.png b/static/logo_216.png new file mode 100644 index 0000000..c02fff4 Binary files /dev/null and b/static/logo_216.png differ