diff --git a/src/route/index/Index.tsx b/src/route/index/Index.tsx index 965fbe0..0e20704 100644 --- a/src/route/index/Index.tsx +++ b/src/route/index/Index.tsx @@ -23,7 +23,7 @@ import MenuWithBottomButtom from '../../components/menu/MenuWithBottomButton.tsx // import MenuTreeWithTopButton from "../../components/menu/MenuTreeWithTopButton.tsx"; // import ListProj from "../../components/list/ListProj.tsx"; // import ListProjAgent from "../../components/list/ListProjAgent.tsx"; -// import { getMenuActive } from '../../util/cache.ts' +import { getMenuActive } from '../../util/cache.ts' import { @@ -57,7 +57,7 @@ import { } from '../../util/AjaxUtils.ts' import { // getLanguageList, getSoftTypeList - // appGoodsList, + appGoodsList, buyAppGoods, appOrderList } from '../../request/api' import { @@ -87,13 +87,13 @@ interface DataType { } -// import app from '../../static/left/app.png' -// import appnew from '../../static/left/appnew.png' -// import tra from '../../static/left/tra.png' -// import tranew from '../../static/left/tranew.png' +import app from '../../static/left/app.png' +import appnew from '../../static/left/appnew.png' +import tra from '../../static/left/tra.png' +import tranew from '../../static/left/tranew.png' -// import topblack from '../../static/appimgs/topblack.png' -// import topblue from '../../static/appimgs/topblue.png' +import topblack from '../../static/appimgs/topblack.png' +import topblue from '../../static/appimgs/topblue.png' import right from '../../static/trademark/right.png' import yes from '../../static/trademark/yes.png' @@ -984,7 +984,7 @@ export default function Index() { const [showAppkeyWords, setShowAppkeyWords] = useState('') // 电子软著搜索关键字显示 const [appModal, setAppModal] = useState(false) // 申请电子软著弹窗 const [toEditsModal, setToEditsModal] = useState(false) // 电子软著编辑弹窗 - // const [appGoodsArray, setAppGoodsArray] = useState([]) // 电子软著可选商品列表 + const [appGoodsArray, setAppGoodsArray] = useState([]) // 电子软著可选商品列表 const [buyLoading, setBuyLoading] = useState(false) // 购买loading const [appOrderId, setAppOrderId] = useState() // 电子软著订单id const [appExamineStatus, setAppExamineStatus] = useState(null) // 电子软著审核状态 @@ -1051,24 +1051,24 @@ export default function Index() { }, [appKeyWords, appExamineStatus, appApplyStatus]) // 获取电子软著可选商品列表 - // const getAppGoodsList = async () => { - // try { - // const res = await appGoodsList() - // // console.log('电子软著可选商品列表', res); - // setAppGoodsArray(res) - // } catch (error: any) { + const getAppGoodsList = async () => { + try { + const res = await appGoodsList() + // console.log('电子软著可选商品列表', res); + setAppGoodsArray(res) + } catch (error: any) { - // if (error.response) { - // const data = error.response.data; - // messageApi.open({ - // type: 'error', - // content: data.msg ? data.msg : `${data.path}(${data.status})`, - // }); - // } else { - // console.error(error) - // } - // } - // } + if (error.response) { + const data = error.response.data; + messageApi.open({ + type: 'error', + content: data.msg ? data.msg : `${data.path}(${data.status})`, + }); + } else { + console.error(error) + } + } + } // ----------------------------------------------------------------------------------------------- @@ -1801,7 +1801,7 @@ export default function Index() { // getLanguageListDate() // getSoftTypeListDate() - // getAppGoodsList() + getAppGoodsList() }, []); useEffect(() => { // loactionStorage里的activeMenu @@ -2070,7 +2070,7 @@ export default function Index() { list={agentMenu.list} handleListItem={agentMenu.handleListItem} /> */} - {/* {THEME == 'mzw' ? ( + {THEME == 'mzw' ? ( <>
) : ( <> - )} */} + )} {THEME == 'mzw' ? ( - {/* {appGoodsArray.map((item: any, index: number) => { + {appGoodsArray.map((item: any, index: number) => { return (
) - })} */} + })}