|
@@ -1,3 +1,4 @@
|
|
|
+import i18n from '@/locale'
|
|
|
import { getEnvBaseUrl } from '@/utils'
|
|
|
import { platform } from '@/utils/platform'
|
|
|
import { stringifyQuery } from '@/utils/queryString'
|
|
@@ -50,6 +51,7 @@ const httpInterceptor = {
|
|
|
platform, // 可选,与 uniapp 定义的平台一致,告诉后台来源
|
|
|
...options.header,
|
|
|
}
|
|
|
+ options.header['Accept-Language'] = i18n.global.locale
|
|
|
// 判断是否为登录接口
|
|
|
const isLoginApi = options.url?.includes('/login') || options.url?.includes('/register')
|
|
|
|