|
@@ -1,7 +1,7 @@
|
|
|
/*
|
|
|
* @Author: your name
|
|
|
* @Date: 2022-01-06 09:45:17
|
|
|
- * @LastEditTime: 2022-04-14 15:01:34
|
|
|
+ * @LastEditTime: 2022-04-14 16:15:03
|
|
|
* @LastEditors: your name
|
|
|
* @Description: axios封装
|
|
|
*/
|
|
@@ -46,7 +46,7 @@ service.interceptors.request.use(
|
|
|
text: '数据加载中'
|
|
|
})
|
|
|
}
|
|
|
- if (config.url.includes('/api/fs4a/sendLog') && config.data.Data[0]?.OperateResult.Token) {
|
|
|
+ if (config.url.includes('/api/fs4a/sendLog') && config.data.Data[0]?.OperateResult?.Token) {
|
|
|
config.headers['token'] = config.data.Data[0].OperateResult.Token
|
|
|
}
|
|
|
config.metaData = {
|
|
@@ -85,6 +85,7 @@ service.interceptors.response.use(
|
|
|
OperateResult: res.returnData,
|
|
|
Ident: Ident ?? ''
|
|
|
})
|
|
|
+ const { BeginTime, EndTime, OperateResult } = metaData
|
|
|
const config = {
|
|
|
url: '/api/fs4a/sendLog',
|
|
|
method: 'post',
|
|
@@ -93,11 +94,16 @@ service.interceptors.response.use(
|
|
|
BrowserTag: navigator.userAgent,
|
|
|
OperateIP: returnCitySN.cip,
|
|
|
Msg: msg,
|
|
|
- Type: '2'
|
|
|
+ Type: '2',
|
|
|
+ BeginTime,
|
|
|
+ EndTime,
|
|
|
+ OperateResult
|
|
|
}
|
|
|
}
|
|
|
if (islogin) {
|
|
|
- config.data.OperatorId = config.data.Operator = res.returnData.UserId.toString()
|
|
|
+ if (res.returnData) {
|
|
|
+ config.data.OperatorId = config.data.Operator = res.returnData.UserId.toString()
|
|
|
+ }
|
|
|
} else {
|
|
|
config.data.OperatorId = config.data.Operator = getUserId()
|
|
|
}
|