import {useEffect, useState} from "react"; import Taro from '@tarojs/taro'; import {pageCmsArticle} from "@/api/cms/cmsArticle"; import {CmsArticle} from "@/api/cms/cmsArticle/model"; import {NavBar} from '@nutui/nutui-react-taro' import './find.scss' /** * 文章终极列表 * @constructor */ const Find = () => { const [statusBarHeight, setStatusBarHeight] = useState() const [loading, setLoading] = useState(false) const [list, setList] = useState() const reload = async () => { setLoading(true) const article = await pageCmsArticle({categoryId: 4289, status: 0}) if(article){ setList(article?.list) setLoading(false) } } useEffect(() => { Taro.getSystemInfo({ success: (res) => { setStatusBarHeight(res.statusBarHeight) }, }) reload().then(() => { console.log('初始化完成') }) }, []) return ( <> {loading && (
暂无数据
)} { }} left={ <>
{/**/} {/*
*/} {/* */} {/*
筛选
*/} {/*
*/} } > 发现
{list && ( <> )} ) } export default Find