|
@@ -5,13 +5,16 @@
|
|
|
|
|
|
|
|
import React, { Component } from 'react'
|
|
import React, { Component } from 'react'
|
|
|
import { connect } from 'react-redux'
|
|
import { connect } from 'react-redux'
|
|
|
-import { isObjEmpty } from '../../../utils/common.util'
|
|
|
|
|
|
|
+import { isObjEmpty } from '../../../utils/common/common.util'
|
|
|
import FuncGroup from '../../../components/common/func/FuncGroup'
|
|
import FuncGroup from '../../../components/common/func/FuncGroup'
|
|
|
-import { fetchPostObj } from '../../../utils/fetchRequest'
|
|
|
|
|
|
|
+import { fetchPostObj } from '../../../utils/common/fetchRequest'
|
|
|
import { API } from '../../../configs/api.config'
|
|
import { API } from '../../../configs/api.config'
|
|
|
import { Toast } from 'antd-mobile'
|
|
import { Toast } from 'antd-mobile'
|
|
|
import { message } from 'antd'
|
|
import { message } from 'antd'
|
|
|
-import { refreshDocList } from '../../../redux/actions/docState'
|
|
|
|
|
|
|
+import {
|
|
|
|
|
+ analysisDocList,
|
|
|
|
|
+ refreshDocList,
|
|
|
|
|
+} from '../../../redux/actions/docState'
|
|
|
|
|
|
|
|
class DocRoot extends Component {
|
|
class DocRoot extends Component {
|
|
|
|
|
|
|
@@ -58,43 +61,7 @@ class DocRoot extends Component {
|
|
|
kind: 'uasapp',
|
|
kind: 'uasapp',
|
|
|
}).then(response => {
|
|
}).then(response => {
|
|
|
Toast.hide()
|
|
Toast.hide()
|
|
|
- const data = response.data
|
|
|
|
|
- const docFuncGroupList = []
|
|
|
|
|
- if (!isObjEmpty(data)) {
|
|
|
|
|
- const responseList = data.list
|
|
|
|
|
- if (!isObjEmpty(responseList)) {
|
|
|
|
|
- responseList.forEach((groupItem, groupIndex) => {
|
|
|
|
|
- let docFuncGroup = {
|
|
|
|
|
- groupTitle: groupItem.groupTitle,
|
|
|
|
|
- groupIndex: groupIndex,
|
|
|
|
|
- }
|
|
|
|
|
- const funcList = groupItem.funcList
|
|
|
|
|
- if (!isObjEmpty(funcList)) {
|
|
|
|
|
- let docFuncList = []
|
|
|
|
|
- funcList.forEach((childItem, childIndex) => {
|
|
|
|
|
- const docFunc = {
|
|
|
|
|
- id: childIndex.fid,
|
|
|
|
|
- name: childItem.name,
|
|
|
|
|
- caller: childItem.caller,
|
|
|
|
|
- img: childItem.icon && childItem.icon.exticon,
|
|
|
|
|
- often: childItem.often,
|
|
|
|
|
- url: childItem.url && childItem.url.skipurl,
|
|
|
|
|
- countUrl: childItem.url && childItem.url.counturl,
|
|
|
|
|
- groupIndex: groupIndex,
|
|
|
|
|
- childIndex: childIndex,
|
|
|
|
|
- }
|
|
|
|
|
- docFuncList.push(docFunc)
|
|
|
|
|
- })
|
|
|
|
|
- docFuncGroup.funcList = docFuncList
|
|
|
|
|
- }
|
|
|
|
|
- docFuncGroupList.push(docFuncGroup)
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- refreshDocList({
|
|
|
|
|
- docFuncGroupList,
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ analysisDocList(response)
|
|
|
}).catch(error => {
|
|
}).catch(error => {
|
|
|
Toast.hide()
|
|
Toast.hide()
|
|
|
refreshDocList({
|
|
refreshDocList({
|