功能:分类&友联排序
This commit is contained in:
@@ -19,6 +19,8 @@ const CatePage = () => {
|
||||
|
||||
const getCateList = async () => {
|
||||
const { data } = await getCateListAPI();
|
||||
data.sort((a, b) => a.order - b.order)
|
||||
|
||||
setList(data as Cate[]);
|
||||
setLoading(false);
|
||||
};
|
||||
|
||||
@@ -24,6 +24,8 @@ const LinkPage = () => {
|
||||
// 获取网站列表
|
||||
const getLinkList = async () => {
|
||||
const { data } = await getLinkListAPI();
|
||||
data.sort((a, b) => a.order - b.order)
|
||||
|
||||
setList(data as Web[]);
|
||||
setListTemp(data as Web[]);
|
||||
setLoading(false);
|
||||
@@ -148,7 +150,7 @@ const LinkPage = () => {
|
||||
}
|
||||
</div>
|
||||
) : (
|
||||
<Empty description="暂无数据" className='my-7'/>
|
||||
<Empty description="暂无数据" className='my-7' />
|
||||
)}
|
||||
</Spin>
|
||||
</>
|
||||
@@ -193,6 +195,10 @@ const LinkPage = () => {
|
||||
</Select>
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item label="顺序" name="order">
|
||||
<Input placeholder="请输入网站顺序(值越小越靠前)" />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item>
|
||||
<Button type="primary" htmlType="submit" loading={btnLoading} className='w-full'>{isMethod === "edit" ? '编辑网站' : '新增网站'}</Button>
|
||||
</Form.Item>
|
||||
|
||||
1
src/types/app/web.d.ts
vendored
1
src/types/app/web.d.ts
vendored
@@ -11,6 +11,7 @@ export interface Web {
|
||||
image: string;
|
||||
url: string;
|
||||
rss: string;
|
||||
order: number;
|
||||
typeId: number;
|
||||
type: LinkType;
|
||||
auditStatus: number;
|
||||
|
||||
Reference in New Issue
Block a user