From dceaa2c2aee82144fcf2f12cf788e09d643115b0 Mon Sep 17 00:00:00 2001 From: douzhuo <17611323298@163.com> Date: Thu, 14 Jul 2022 11:57:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=97=A5=E6=8A=A5=E5=91=A8?= =?UTF-8?q?=E6=8A=A5=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 23 ++ config.js | 2 + pages/index/consumer/index.vue | 33 ++- pages/index/customer.vue | 82 ++++--- pages/index/index.vue | 383 ++++++++++++++++++++------------- pages/index/learning.vue | 24 +++ pages/index/personal.vue | 98 +++++++-- 7 files changed, 436 insertions(+), 209 deletions(-) diff --git a/App.vue b/App.vue index 0a54a75..bb97bb3 100644 --- a/App.vue +++ b/App.vue @@ -172,6 +172,29 @@ } } }) + + + this.$u.get(config.service.notReadNum, { + id: uni.getStorageSync('weapp_session_userInfo_data').accountId, + projectId: uni.getStorageSync('buildingID').id + }).then(res => { + console.log(res) + if (res > 0) { + uni.setTabBarBadge({ //显示数字 + index: 4, //tabbar下标 + text: res || 0 //数字 + }) + } else { + uni.removeTabBarBadge({ + index: 4 + }) + } + }).catch(e => { + uni.removeTabBarBadge({ + index: 4 + }) + }) + // this.$u.get("/user/getUser") // .then(data => { // if (data.user.total==0) { diff --git a/config.js b/config.js index 80ee131..c6d5858 100644 --- a/config.js +++ b/config.js @@ -77,6 +77,8 @@ var config = { // 升级公告更新阅读 updateRead: `${host}/zkMessage/updateFlag`, + //消息未读数 + notReadNum: `${host}/zkMessage/findFlagCount`, // 隐私协议 privacyAgr: `${host}/zkPrivate/findById`, } diff --git a/pages/index/consumer/index.vue b/pages/index/consumer/index.vue index 1b8b42d..883bb19 100644 --- a/pages/index/consumer/index.vue +++ b/pages/index/consumer/index.vue @@ -255,11 +255,6 @@ - - - - @@ -267,14 +262,13 @@