Эх сурвалжийг харах

Merge branch 'dev/v1.0.28_yf' of jianyu/web into feature/v1.0.28

yangfeng 1 жил өмнө
parent
commit
c52fb617e7

+ 2 - 1
apps/work-bench/src/store/modules/work-bench.js

@@ -184,10 +184,11 @@ export default {
       size: 20
     }) {
       try {
-        const { code, data = [], unread = 0 } = await ajaxGetMessages(payload)
+        const { code, data = [], unread = 0, toDoUnread = 0 } = await ajaxGetMessages(payload)
         if (code === 0) {
           commit('navbar/setMessages', data || [])
           commit('navbar/changeCount', unread)
+          commit('navbar/changeTodoCount', toDoUnread)
         }
       } catch (error) {
         console.log(error)

+ 15 - 1
packages/work-bench-frame/packages/components/Navbar/index.vue

@@ -119,6 +119,11 @@ export default {
           icon: 'icon-nav-message',
           badge: 0
         },
+        {
+          label: '待办',
+          icon: 'icon-daiban',
+          badge: 0
+        },
         {
           label: '客服',
           icon: 'icon-kefu_xian',
@@ -164,8 +169,9 @@ export default {
       'customerUrl'
     ]),
     computedNaves () {
+      console.log(this.todoCount)
       return this.navs.filter(item => {
-        return this.todoCount ? item : item.label!== '待办'
+        return this.todoCount ? item : item.label !== '待办'
       })
     }
   },
@@ -324,6 +330,14 @@ export default {
           break
         }
       }
+    },
+    goSiteTodo () {
+      this.$BRACE.$emit({
+        fKey: 'goSiteTodo',
+        spareFn: (link) => this.$BRACE.methods.open({
+          route: { link }
+        })
+      }, '/swordfish/frontPage/messageCenter/sess/index?type=11')
     }
   }
 }

+ 5 - 1
packages/work-bench-frame/packages/store/modules/navbar.js

@@ -18,7 +18,8 @@ export default {
       }
     },
     list: [],
-    messageCount: 0
+    messageCount: 0,
+    todoCount: 0
   }),
   mutations: {
     changeCount (state, data) {
@@ -29,6 +30,9 @@ export default {
     },
     setMessages (state, list = []) {
       state.list = list
+    },
+    changeTodoCount (state, data) {
+      state.todoCount = data
     }
   },
   actions: {},