删除无用代码
This commit is contained in:
@@ -2,9 +2,7 @@ import {useEffect, useState} from "react";
|
||||
import Taro from '@tarojs/taro';
|
||||
import {pageCmsArticle} from "@/api/cms/cmsArticle";
|
||||
import {CmsArticle} from "@/api/cms/cmsArticle/model";
|
||||
import {checkMonthTaskCompleted} from "@/api/hjm/hjmExamLog";
|
||||
import {NavBar, Space} from '@nutui/nutui-react-taro'
|
||||
import {getWebsiteField} from "@/api/system/website/field";
|
||||
import {NavBar} from '@nutui/nutui-react-taro'
|
||||
import './find.scss'
|
||||
|
||||
/**
|
||||
@@ -13,26 +11,15 @@ import './find.scss'
|
||||
*/
|
||||
const Find = () => {
|
||||
const [statusBarHeight, setStatusBarHeight] = useState<number>()
|
||||
const [isAdmin, setIsAdmin] = useState<boolean>(false)
|
||||
const [loading, setLoading] = useState<boolean>(false)
|
||||
const [list, setList] = useState<CmsArticle[]>()
|
||||
const [monthTaskCompleted, setMonthTaskCompleted] = useState<boolean>(false)
|
||||
|
||||
const reload = async () => {
|
||||
setLoading(true)
|
||||
const field = await getWebsiteField(15524);
|
||||
if (field.value == '0') {
|
||||
setIsAdmin(true)
|
||||
}else {
|
||||
setIsAdmin(false)
|
||||
}
|
||||
const article = await pageCmsArticle({categoryId: 4289, status: 0})
|
||||
if(article){
|
||||
setList(article?.list)
|
||||
}
|
||||
const promise = await checkMonthTaskCompleted();
|
||||
if(promise){
|
||||
setMonthTaskCompleted(true)
|
||||
setLoading(false)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,6 +36,7 @@ const Find = () => {
|
||||
|
||||
return (
|
||||
<>
|
||||
{loading && (<div>暂无数据</div>)}
|
||||
<NavBar
|
||||
fixed={true}
|
||||
style={{marginTop: `${statusBarHeight}px`, backgroundColor: 'transparent'}}
|
||||
@@ -69,6 +57,10 @@ const Find = () => {
|
||||
>
|
||||
<span>发现</span>
|
||||
</NavBar>
|
||||
{list && (
|
||||
<>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user