Browse Source

uas手机版
应用菜单item封装红点获取逻辑

RaoMeng 5 years ago
parent
commit
050d500a54

+ 1 - 1
uas-office-web/uas-mobile/src/components/common/func/FuncItem.jsx

@@ -24,7 +24,7 @@ export default class FuncItem extends Component {
     let { funcObj } = this.props
     if (!isObjEmpty(funcObj.countUrl)) {
       fetchGet(funcObj.countUrl).then(response => {
-        funcObj.sup = response.data
+        funcObj.sup = response.data || 11
         this.props.onFuncDataChange && this.props.onFuncDataChange(funcObj)
         if (funcObj.funcType === FUNC_TYPE_DOC) {
           GlobalEvent.emit(EVENT_DOC_FUNC_COUNT, this, funcObj)

+ 4 - 4
uas-office-web/uas-mobile/src/components/common/mainHeader/MainHeader.jsx

@@ -62,12 +62,12 @@ class MainHeader extends Component {
 
   onFuncClick = (funcObj) => {
     //点击图标触发
-    if (funcObj.name === '我的订阅') {
-      this.props.history.push('/subscribeList')
-    } else if (funcObj.name === '我的日程') {
+    if (funcObj.name === '我的日程') {
       this.props.history.push('/schedulePage')
     } else if (funcObj.name === '我的待办') {
       this.props.history.push('/taskTodo')
+    } else if (funcObj.name === '我的订阅') {
+      this.props.history.push('/subscribeList')
     }
   }
 
@@ -81,7 +81,7 @@ class MainHeader extends Component {
       refreshMainState({
         processCount: count,
       })
-    } else if (funcObj.name === '待办任务') {
+    } else if (funcObj.name === '我的待办') {
       refreshMainState({
         taskCount: count,
       })

+ 2 - 2
uas-office-web/uas-mobile/src/redux/actions/mainState.js

@@ -15,7 +15,7 @@ import { GlobalEvent } from '../../utils/common/eventbus/eventbus.util'
  */
 export const refreshMainState = (data) => {
   return store.dispatch({
-    type: CLEAR_MAIN_STATE,
+    type: FRESH_MAIN_STATE,
     ...data,
   })
 }
@@ -26,7 +26,7 @@ export const refreshMainState = (data) => {
  */
 export const clearMainState = () => {
   return store.dispatch({
-    type: FRESH_MAIN_STATE,
+    type: CLEAR_MAIN_STATE,
   })
 }