|
- import Request from './request'
- import { BASE_URL } from '../config.js'
-
- const http = new Request();
-
- http.setConfig((config) => {
- config.baseUrl = BASE_URL;
- return config
- })
-
- http.interceptor.request((config, cancel) => {
- config.header = {
- ...config.header,
- 'access_token': null || '',
- }
- return config;
- })
-
- http.interceptor.response((response) => {
- return response.data;
- })
-
- export {
- http
- };
|