|
@@ -1,7 +1,7 @@
|
|
|
/*
|
|
|
* @Author: your name
|
|
|
* @Date: 2022-01-06 09:45:17
|
|
|
- * @LastEditTime: 2022-04-15 11:39:57
|
|
|
+ * @LastEditTime: 2022-04-16 21:32:51
|
|
|
* @LastEditors: your name
|
|
|
* @Description: axios封装
|
|
|
*/
|
|
@@ -82,7 +82,7 @@ service.interceptors.response.use(
|
|
|
LogInfo: typeof data === 'string' ? JSON.parse(data) : data,
|
|
|
EndTime: parseTime(new Date(), '{y}-{m}-{d} {h}:{i}:{s}'),
|
|
|
LogType: msg ?? '未定义操作',
|
|
|
- OperateResult: res.returnData,
|
|
|
+ OperateResult: res.code === 0 ? res.returnData : res.message,
|
|
|
Ident: Ident ?? ''
|
|
|
})
|
|
|
const { BeginTime, EndTime, OperateResult } = metaData
|
|
@@ -102,8 +102,8 @@ service.interceptors.response.use(
|
|
|
}
|
|
|
}
|
|
|
if (islogin) {
|
|
|
- if (res.returnData) {
|
|
|
- config.data.OperatorId = res.returnData.UserId.toString()
|
|
|
+ if (res.code === 0) {
|
|
|
+ config.data.OperatorId = res.returnData.UserId?.toString() ?? ''
|
|
|
config.data.LogId = res.returnData.LogId?.toString() ?? ''
|
|
|
}
|
|
|
} else {
|