优化细节
This commit is contained in:
4
src/user/help/index.config.ts
Normal file
4
src/user/help/index.config.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: '常见问题',
|
||||
navigationBarTextStyle: 'black'
|
||||
})
|
||||
3
src/user/help/index.scss
Normal file
3
src/user/help/index.scss
Normal file
@@ -0,0 +1,3 @@
|
||||
:root {
|
||||
|
||||
}
|
||||
40
src/user/help/index.tsx
Normal file
40
src/user/help/index.tsx
Normal file
@@ -0,0 +1,40 @@
|
||||
import {useEffect, useState} from "react";
|
||||
import {CmsArticle} from "@/api/cms/cmsArticle/model";
|
||||
import {listCmsArticle} from "@/api/cms/cmsArticle";
|
||||
import {Collapse} from '@nutui/nutui-react-taro'
|
||||
import {ArrowDown} from '@nutui/icons-react-taro'
|
||||
|
||||
const Helper = () => {
|
||||
const [list, setList] = useState<CmsArticle[]>([])
|
||||
|
||||
const [category, setCategory] = useState();
|
||||
const getData = () => {
|
||||
fetch("https://storage.360buyimg.com/nutui/3x/new-categoryData.js")
|
||||
.then((response) => response.json())
|
||||
.then((res) => {
|
||||
setCategory(res.categoryInfo.category)
|
||||
})
|
||||
.catch((err) => console.log("Oh, error", err));
|
||||
};
|
||||
|
||||
const reload = () => {
|
||||
listCmsArticle({model: 'help'}).then(res => {
|
||||
setList(res)
|
||||
}).catch(error => {
|
||||
console.error("Failed to fetch goods detail:", error);
|
||||
})
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
reload()
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<>
|
||||
{/*<Category category={category} showSecondLevelQuickNav={true}></Category>*/}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default Helper;
|
||||
Reference in New Issue
Block a user