瀏覽代碼

修改日志内容

zhongxiaoyu 3 年之前
父節點
當前提交
4b7c5adc72
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      src/utils/request.js

+ 4 - 4
src/utils/request.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2022-01-06 09:45:17
- * @LastEditTime: 2022-04-16 21:32:51
+ * @LastEditTime: 2022-04-16 21:51:46
  * @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.code === 0 ? res.returnData : res.message,
+        OperateResult: res.message,
         Ident: Ident ?? ''
       })
       const { BeginTime, EndTime, OperateResult } = metaData
@@ -103,8 +103,8 @@ service.interceptors.response.use(
       }
       if (islogin) {
         if (res.code === 0) {
-          config.data.OperatorId = res.returnData.UserId?.toString() ?? ''
-          config.data.LogId = res.returnData.LogId?.toString() ?? ''
+          config.data.OperatorId = (res.returnData.UserId ?? '').toString()
+          config.data.LogId = (res.returnData.LogId ?? '').toString()
         }
       } else {
         config.data.OperatorId = getUserId()