|
|
@ -5,6 +5,7 @@ import signGenerator from './sign'; |
|
|
|
import qs from 'qs'; |
|
|
|
import store from '../store'; |
|
|
|
import { notification } from 'antd'; |
|
|
|
import { TRADER_LANGUAGE } from '../language'; |
|
|
|
|
|
|
|
const service = axios.create(axiosConfig); |
|
|
|
|
|
|
@ -23,9 +24,10 @@ service.interceptors.request.use( |
|
|
|
(config.headers as any).sign = sign; |
|
|
|
(config.headers as any).timestamp = timestamp; |
|
|
|
(config.headers as any).Token = store.state.token; |
|
|
|
(config.headers as any).Lang = window.localStorage.getItem(TRADER_LANGUAGE) || "zh"; |
|
|
|
|
|
|
|
if (config.data instanceof FormData) return config; |
|
|
|
|
|
|
|
|
|
|
|
if (config.data) { |
|
|
|
config.data = JSON.stringify(config.data); |
|
|
|
} |
|
|
|