From 31dda2f7cf85b46ff23248c408a8fb5c1a053521 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=B4=E6=99=96?= <2689991790@qq.com> Date: Mon, 24 Jun 2024 18:39:16 +0800 Subject: [PATCH] fix(obd web):remove duplicate entries --- web/src/app.ts | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 web/src/app.ts diff --git a/web/src/app.ts b/web/src/app.ts deleted file mode 100644 index f90fcdf..0000000 --- a/web/src/app.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { getLocale } from 'umi'; -import type { RequestConfig } from 'umi'; - -const locale = getLocale() || 'zh-CN'; -export const request: RequestConfig = { - errorConfig: { - adaptor: (resData) => { - return { - ...resData, - success: resData.success, - showType: 0, - }; - }, - }, - requestInterceptors: [ - (url, options) => { - return { - url: url, - options: { - ...options, - timeout: 180000, - errorHandler: (e) => { - console.log('---------------------------------------------'); - console.log('error.name:', e.name); - console.log('error.response:', e.response); - console.log('error.request:', e.request); - console.log('error.type:', e.type); - console.log('============================================='); - throw e; - }, - }, - }; - }, - ], - headers: { - 'Accept-Language': locale, - }, -};