Browse Source

feat: 异常上报修改

TIANYONG 2 weeks ago
parent
commit
f60d0118b9
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/hooks/errorLog/index.ts

+ 3 - 2
src/hooks/errorLog/index.ts

@@ -25,14 +25,15 @@ export default function useErrorLog() {
     // 错误信息
     const contentError = `Error message: ${event.target.tagName || ''};${
       event.target.src || event.target.href || ''
-    };lineno: ${event.lineno || ''};message: ${
+    };lineno: ${event.lineno || ''};colno: ${event.colno || ''};message: ${
       event.message || ''
     };filename: ${event.filename || ''};fileUrl: ${
       window.location.href
     };reason: ${event.reason?.message || ''};
     stack: ${event.reason?.stack || ''};
     bizId: ${state.examSongId || query.id || ''};
-    partIndex: ${query["part-index"] || state.partIndex || 0}`;
+    partIndex: ${query["part-index"] || state.partIndex || 0}
+    partName: ${decodeURIComponent(query["part-name"] || '') || ''};`;
     uploadErrorLog(contentError)
   };
   /**