|
@@ -1,4 +1,6 @@
|
|
|
import { uploadErrorLog } from "./uploadLog";
|
|
|
+import state from "/src/state";
|
|
|
+import { getQuery } from "/src/utils/queryString";
|
|
|
|
|
|
type uploadType = {
|
|
|
clientType?: string;
|
|
@@ -12,6 +14,8 @@ type uploadType = {
|
|
|
deviceVersion?: string | null
|
|
|
}
|
|
|
|
|
|
+const query: any = getQuery();
|
|
|
+
|
|
|
/**
|
|
|
* 页面有报错时上传错误日志
|
|
|
* @params
|
|
@@ -26,7 +30,9 @@ export default function useErrorLog() {
|
|
|
};filename: ${event.filename || ''};fileUrl: ${
|
|
|
window.location.href
|
|
|
};reason: ${event.reason?.message || ''};
|
|
|
- stack: ${event.reason?.stack || ''};`;
|
|
|
+ stack: ${event.reason?.stack || ''};
|
|
|
+ bizId: ${state.examSongId || query.id || ''};
|
|
|
+ partIndex: ${query["part-index"] || state.partIndex || 0}`;
|
|
|
uploadErrorLog(contentError)
|
|
|
};
|
|
|
/**
|