|
@@ -1,7 +1,6 @@
|
|
|
import type { CustomRequestOptions } from '@/http/types'
|
|
import type { CustomRequestOptions } from '@/http/types'
|
|
|
import { useTokenStore } from '@/store'
|
|
import { useTokenStore } from '@/store'
|
|
|
import { getEnvBaseUrl } from '@/utils'
|
|
import { getEnvBaseUrl } from '@/utils'
|
|
|
-import { platform } from '@/utils/platform'
|
|
|
|
|
import { stringifyQuery } from './tools/queryString'
|
|
import { stringifyQuery } from './tools/queryString'
|
|
|
|
|
|
|
|
// 请求基准地址
|
|
// 请求基准地址
|
|
@@ -44,7 +43,6 @@ const httpInterceptor = {
|
|
|
options.header = {
|
|
options.header = {
|
|
|
...options.header,
|
|
...options.header,
|
|
|
'Content-Type': 'application/json; charset=utf-8',
|
|
'Content-Type': 'application/json; charset=utf-8',
|
|
|
- platform, // 可选,与 uniapp 定义的平台一致,告诉后台来源
|
|
|
|
|
}
|
|
}
|
|
|
// 3. 添加 token 请求头标识
|
|
// 3. 添加 token 请求头标识
|
|
|
const tokenStore = useTokenStore()
|
|
const tokenStore = useTokenStore()
|