Browse Source

uas手机版
解决常用应用数据混乱

RaoMeng 5 years ago
parent
commit
b87a3fd71a

+ 4 - 4
uas-office-web/uas-mobile/src/pages/private/homePage/HomePage.jsx

@@ -63,7 +63,7 @@ class HomePage extends Component {
         icon={<UasIcon type="uas-main-normal"/>}
         selectedIcon={<UasIcon type="uas-main-select"/>}
         selected={this.props.homeState.selectedTab === 0}
-        badge={'新'}
+        badge={100}
         dot={false}
         onPress={this.onMainTabSelected}
       >
@@ -80,8 +80,8 @@ class HomePage extends Component {
         icon={<UasIcon type="uas-report-normal"/>}
         selectedIcon={<UasIcon type="uas-report-select"/>}
         selected={this.props.homeState.selectedTab === 1}
-        badge={100}
-        dot={true}
+        badge={''}
+        dot={false}
         onPress={this.onReportTabSelected}
       >
         {this.renderReportTab()}
@@ -98,7 +98,7 @@ class HomePage extends Component {
         selectedIcon={<UasIcon type="uas-doc-select"/>}
         selected={this.props.homeState.selectedTab === 2}
         badge={''}
-        dot={true}
+        dot={false}
         onPress={this.onDocTabSelected}
       >
         {this.renderDocTab()}

+ 6 - 8
uas-office-web/uas-mobile/src/pages/private/oftenFunc/OftenFuncManage.jsx

@@ -30,10 +30,10 @@ class OftenFuncManage extends Component {
     document.title = '常用管理'
 
     const { docState } = this.props
-    console.log(docState)
     if (!isObjEmpty(docState, docState.docFuncGroupList)) {
       this.setState({
-        docFuncGroupStateList: docState.docFuncGroupList,
+        docFuncGroupStateList: JSON.parse(
+          JSON.stringify(docState.docFuncGroupList)),
       })
     }
   }
@@ -95,14 +95,12 @@ class OftenFuncManage extends Component {
 
   onOperationClick = (funcObj) => {
     let { docFuncGroupStateList } = this.state
-    if (!isObjNull(docFuncGroupStateList[funcObj.groupIndex])
-      && !isObjNull(
-        docFuncGroupStateList[funcObj.groupIndex].funcList[funcObj.childIndex])) {
-      if (!docFuncGroupStateList[funcObj.groupIndex].funcList[funcObj.childIndex].often &&
-        this.oftenSize >= 12) {
+
+    if (!isObjNull(funcObj)) {
+      if (!funcObj.often && this.oftenSize >= 12) {
         Toast.fail('最多添加 12 个常用应用')
       } else {
-        docFuncGroupStateList[funcObj.groupIndex].funcList[funcObj.childIndex].often = !docFuncGroupStateList[funcObj.groupIndex].funcList[funcObj.childIndex].often
+        funcObj.often = !funcObj.often
         this.setState({ docFuncGroupStateList })
       }
     }