feat: batch update - gift card breakdown spec, backend APIs, miniprogram pages, ETL finance recharge, docs & migrations
This commit is contained in:
@@ -65,7 +65,15 @@ function processPendingQueue(token: string | null, error: unknown) {
|
||||
}
|
||||
|
||||
apiClient.interceptors.response.use(
|
||||
(response) => response,
|
||||
(response) => {
|
||||
// 后端 ResponseWrapperMiddleware 将成功响应包装为 { code: 0, data: <原始body> }
|
||||
// 此处统一解包,使上层代码无需感知包装层
|
||||
const body = response.data;
|
||||
if (body && typeof body === "object" && "code" in body && "data" in body) {
|
||||
response.data = body.data;
|
||||
}
|
||||
return response;
|
||||
},
|
||||
async (error: AxiosError) => {
|
||||
const originalRequest = error.config as AxiosRequestConfig & {
|
||||
_retried?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user