From 9b05c95972fa11c7a96d12ff83a86a6d50b54780 Mon Sep 17 00:00:00 2001 From: wangli Date: Thu, 5 Feb 2026 00:30:15 +0800 Subject: [PATCH] init --- src/api/items.ts | 2 +- vite.config.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/items.ts b/src/api/items.ts index 9b265d3..881a392 100644 --- a/src/api/items.ts +++ b/src/api/items.ts @@ -27,7 +27,7 @@ export const fetchItemsFromAccount = (cookieId: string, page?: number): Promise< // 获取账号所有页商品 export const fetchAllItemsFromAccount = (cookieId: string): Promise => { - return post('/items/get-all-from-account', { cookie_id: cookieId }) + return post('/products/get-all-from-account', { goofish_id: cookieId }) } // 更新商品 diff --git a/vite.config.ts b/vite.config.ts index e6b8827..bf2cf93 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -190,7 +190,7 @@ export default defineConfig(({ command }) => ({ bypass: (req) => { // 只有浏览器直接访问 /items 路径时才返回前端页面 // API 请求通常是 /items/xxx 或带有 application/json - const isApiRequest = req.url !== '/items' || + const isApiRequest = req.url !== '/products' || req.headers.accept?.includes('application/json') || req.headers['content-type']?.includes('application/json') if (!isApiRequest && req.headers.accept?.includes('text/html')) {