调整列表字段和枚举值转换

This commit is contained in:
Eamon
2026-01-05 09:14:41 +08:00
parent a27e856f07
commit 054b8954c4
23 changed files with 571 additions and 222 deletions

View File

@@ -1,7 +1,7 @@
import type { PageRecord } from "@/lib/api"
import type { User } from "@/models/user"
import type { Batch } from "@/models/batch"
import { callByUser } from "./base"
export async function getPageBatch(params: { page: number; size: number }) {
return callByUser<PageRecord<User>>("/api/admin/batch/page", params)
return callByUser<PageRecord<Batch>>("/api/admin/batch/page", params)
}

View File

@@ -1,7 +1,7 @@
import type { PageRecord } from "@/lib/api"
import type { User } from "@/models/user"
import type { Billing } from "@/models/billing"
import { callByUser } from "./base"
export async function getPageBill(params: { page: number; size: number }) {
return callByUser<PageRecord<User>>("/api/admin/bill/page", params)
return callByUser<PageRecord<Billing>>("/api/admin/bill/page", params)
}

View File

@@ -1,7 +1,7 @@
import type { PageRecord } from "@/lib/api"
import type { User } from "@/models/user"
import type { Channel } from "@/models/channel"
import { callByUser } from "./base"
export async function getPageChannel(params: { page: number; size: number }) {
return callByUser<PageRecord<User>>("/api/admin/channel/page", params)
return callByUser<PageRecord<Channel>>("/api/admin/channel/page", params)
}

View File

@@ -1,14 +1,20 @@
import type { PageRecord } from "@/lib/api"
import type { User } from "@/models/user"
import type { Resources } from "@/models/resources"
import { callByUser } from "./base"
export async function listResourceLong(params: { page: number; size: number }) {
return callByUser<PageRecord<User>>("/api/admin/resource/long/page", params)
return callByUser<PageRecord<Resources>>(
"/api/admin/resource/long/page",
params,
)
}
export async function listResourceShort(params: {
page: number
size: number
}) {
return callByUser<PageRecord<User>>("/api/admin/resource/short/page", params)
return callByUser<PageRecord<Resources>>(
"/api/admin/resource/short/page",
params,
)
}

View File

@@ -1,7 +1,7 @@
import type { PageRecord } from "@/lib/api"
import type { User } from "@/models/user"
import type { Trade } from "@/models/trade"
import { callByUser } from "./base"
export async function getPageTrade(params: { page: number; size: number }) {
return callByUser<PageRecord<User>>("/api/admin/trade/page", params)
return callByUser<PageRecord<Trade>>("/api/admin/trade/page", params)
}