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 @@