Browse Source

提交mark

zhengnaiwen_citu 4 months ago
parent
commit
ff48e828fc
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/config/axios/service.js

+ 3 - 1
src/config/axios/service.js

@@ -13,6 +13,7 @@ import { rewardEventTrackClick } from '@/api/integral'
 import errorCode from './errorCode'
 import { useI18n } from '@/hooks/web/useI18n'
 import { sendError } from '@/api/Verifition'
+import { generateUUID } from "@/utils" 
 
 // import { resetRouter } from '@/router'
 // import { deleteUserCache } from '@/hooks/web/useCache'
@@ -128,6 +129,7 @@ service.interceptors.request.use(
       errorData.push({
         time: header.timestamp,
         url: config.url,
+        mark: generateUUID(),
         content
       })
       Object.assign(config.headers, header)
@@ -255,7 +257,7 @@ service.interceptors.response.use(
       } else {
         if (_index > -1) {
           // 保存错误信息
-          sendError({ content: JSON.stringify(errorData[_index].content) })
+          sendError({ content: JSON.stringify(errorData[_index].content), mark: errorData[_index].mark })
           // 移除
           errorData.splice(_index, 1)
         }