|
|
|
@ -108,7 +108,7 @@ const transform: AxiosTransform = {
@@ -108,7 +108,7 @@ const transform: AxiosTransform = {
|
|
|
|
|
requestInterceptors: (config, options) => { |
|
|
|
|
// 请求之前处理config
|
|
|
|
|
const token = getAccessToken(); |
|
|
|
|
const clientId = import.meta.env.VITE_CLIENT_ID, clientSecret = import.meta.env.VITE_CLIENT_SECRET; |
|
|
|
|
const clientId = import.meta.env['VITE_CLIENT_ID'], clientSecret = import.meta.env['VITE_CLIENT_SECRET']; |
|
|
|
|
const { clientId: customClientId , clientSecret: customClientSecret } = options?.requestOptions || {}; |
|
|
|
|
// 使用token进行请求
|
|
|
|
|
if (token && (config as Recordable)?.requestOptions?.withToken !== false) { |
|
|
|
|