打通接口请求
This commit is contained in:
@@ -7,6 +7,7 @@ import { useGlobalInfoStore } from '@/stores/Global';
|
||||
import { cutParamsInUrl, getSignUtmSource } from './index';
|
||||
import { Message } from 'vue-devui/message';
|
||||
import degradeInterceptor from './degradeInterceptor';
|
||||
import { useAccountStore } from '@/stores/user';
|
||||
|
||||
const handleError = dealWarning();
|
||||
|
||||
@@ -67,9 +68,14 @@ const refreshToken = async () => axios.request({
|
||||
});
|
||||
|
||||
const proxyService = (params: any, customConfigs?: CustomConfigs) => {
|
||||
const account = useAccountStore();
|
||||
const service = axios.create({
|
||||
baseURL: params.apiType === 'devApi' ? baseDevURL : baseURL,
|
||||
timeout: 15000,
|
||||
headers: {
|
||||
'DP_TOKEN': account.accountInfo.access_token,
|
||||
'DP_REFRESH_TOKEN': account.accountInfo.refresh_token,
|
||||
},
|
||||
withCredentials: true
|
||||
});
|
||||
/** user api相关请求白名单 */
|
||||
|
||||
Reference in New Issue
Block a user