修复二维码库存与过期时间编辑
This commit is contained in:
@@ -36,9 +36,11 @@ export interface CreateQrCodePayload {
|
||||
}
|
||||
|
||||
export interface UpdateQrCodePayload {
|
||||
image_url?: string
|
||||
note?: string
|
||||
status?: QrCodeStatus
|
||||
expires_at?: string | null
|
||||
clear_expires_at?: boolean
|
||||
}
|
||||
|
||||
export async function fetchQrCodes(query: QrCodeListQuery = {}) {
|
||||
@@ -49,17 +51,7 @@ export async function fetchQrCodes(query: QrCodeListQuery = {}) {
|
||||
silent: true,
|
||||
}
|
||||
)
|
||||
// 后端返回 { data: [...], pagination: { total, page, limit } },适配为 PaginatedResult
|
||||
const resp = data.data as unknown as {
|
||||
data: ChatQrCode[]
|
||||
pagination: { total: number; page: number; limit: number }
|
||||
}
|
||||
return {
|
||||
items: resp.data,
|
||||
total: resp.pagination.total,
|
||||
page: resp.pagination.page,
|
||||
page_size: resp.pagination.limit,
|
||||
} as PaginatedResult<ChatQrCode>
|
||||
return data.data
|
||||
}
|
||||
|
||||
export async function fetchQrCodeStats() {
|
||||
|
||||
Reference in New Issue
Block a user