feat(qaops): 增加个人自然月用量与零记录人员明细
This commit is contained in:
+6
-2
@@ -231,8 +231,12 @@ export function parseQARecordPage(value: unknown): QARecordPage {
|
||||
}
|
||||
}
|
||||
|
||||
export async function getPayload(path: string, signal?: AbortSignal): Promise<unknown> {
|
||||
const response = await fetch(path, { credentials: 'same-origin', cache: 'no-store', signal })
|
||||
export async function getPayload(
|
||||
path: string,
|
||||
signal?: AbortSignal,
|
||||
request: Pick<RequestInit, 'method' | 'headers' | 'body'> = {}
|
||||
): Promise<unknown> {
|
||||
const response = await fetch(path, { ...request, credentials: 'same-origin', cache: 'no-store', signal })
|
||||
const raw: unknown = await response.json().catch(() => null)
|
||||
if (!response.ok) {
|
||||
const payload = raw && typeof raw === 'object' ? (raw as Record<string, unknown>) : null
|
||||
|
||||
Reference in New Issue
Block a user