|
@@ -14,6 +14,7 @@ service.interceptors.request.use(
|
|
(request: AxiosReqTy) => {
|
|
(request: AxiosReqTy) => {
|
|
const authMap = useUserStore().authMap
|
|
const authMap = useUserStore().authMap
|
|
const data = request.data!
|
|
const data = request.data!
|
|
|
|
+ console.log(data)
|
|
if (data.btnAuth) {
|
|
if (data.btnAuth) {
|
|
if (authMap[data.btnAuth]) {
|
|
if (authMap[data.btnAuth]) {
|
|
request.headers['auth-id'] = authMap[data.btnAuth]
|
|
request.headers['auth-id'] = authMap[data.btnAuth]
|
|
@@ -32,6 +33,8 @@ service.interceptors.request.use(
|
|
// token setting
|
|
// token setting
|
|
request.headers['token'] = getToken()
|
|
request.headers['token'] = getToken()
|
|
request.headers['event'] = data.event || '0'
|
|
request.headers['event'] = data.event || '0'
|
|
|
|
+ request.headers['id'] = data.id || '-1'
|
|
|
|
+ request.headers['serviceId'] = data.serviceId || '-1'
|
|
/* download file*/
|
|
/* download file*/
|
|
if (request.isDownLoadFile) {
|
|
if (request.isDownLoadFile) {
|
|
request.responseType = 'blob'
|
|
request.responseType = 'blob'
|