功能:根据友联类型排序
This commit is contained in:
@@ -25,6 +25,7 @@ const LinkPage = () => {
|
|||||||
const getLinkList = async () => {
|
const getLinkList = async () => {
|
||||||
const { data } = await getLinkListAPI();
|
const { data } = await getLinkListAPI();
|
||||||
data.sort((a, b) => a.order - b.order)
|
data.sort((a, b) => a.order - b.order)
|
||||||
|
data.sort((a, b) => a.type.order - b.type.order)
|
||||||
|
|
||||||
setList(data as Web[]);
|
setList(data as Web[]);
|
||||||
setListTemp(data as Web[]);
|
setListTemp(data as Web[]);
|
||||||
|
|||||||
27
src/types/app/web.d.ts
vendored
27
src/types/app/web.d.ts
vendored
@@ -1,19 +1,20 @@
|
|||||||
export interface LinkType {
|
export interface LinkType {
|
||||||
id: number,
|
id: number,
|
||||||
name: string
|
name: string,
|
||||||
|
order: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Web {
|
export interface Web {
|
||||||
id: number;
|
id: number,
|
||||||
title: string;
|
title: string,
|
||||||
description: string;
|
description: string,
|
||||||
email: string;
|
email: string,
|
||||||
image: string;
|
image: string,
|
||||||
url: string;
|
url: string,
|
||||||
rss: string;
|
rss: string,
|
||||||
order: number;
|
order: number,
|
||||||
typeId: number;
|
typeId: number,
|
||||||
type: LinkType;
|
type: LinkType,
|
||||||
auditStatus: number;
|
auditStatus: number,
|
||||||
createTime?: string;
|
createTime?: string
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user