lex-xin 10 månader sedan
förälder
incheckning
68a520f527
3 ändrade filer med 9 tillägg och 4 borttagningar
  1. 2 1
      src/hooks/useErrorLog/index.ts
  2. 5 3
      src/student/main.ts
  3. 2 0
      src/views/coursewarePlay/index.tsx

+ 2 - 1
src/hooks/useErrorLog/index.ts

@@ -59,6 +59,7 @@ export default function useErrorLog() {
   }
 
   const _uploadErrorLog = async (event: any) => {
+    console.log('onerror message -----------------')
     try {
       /*
         日志上报:1.手机号、应用端 iOS|安卓 App类型(老师端|学生端|web)、App版本、系统信息(系统版本|web userAgent)、错误信息(什么位置出现,错误内容) 错误时间 上报类型(错误、埋点)
@@ -72,7 +73,7 @@ export default function useErrorLog() {
       );
 
       const whiteIp = ['online.lexiaoya.cn', 'test.lexiaoya.cn', 'dev.lexiaoya.cn']
-      console.log(window.location.hash, index, 'errorLog')
+      console.log(window.location.host, index, 'errorLog')
       if (!whiteIp.includes(window.location.host)) {
         return
       }

+ 5 - 3
src/student/main.ts

@@ -19,6 +19,11 @@ if (window.ResizeObserver === undefined) {
   window.ResizeObserver = ResizeObserver;
 }
 
+// 监听错误信息
+const errorLog = useErrorLog();
+errorLog.startListenErrorLog();
+
+
 // 获取token
 promisefiyPostMessage({ api: 'getToken' }).then((res: any) => {
   console.log(res, 'res')
@@ -66,8 +71,5 @@ if (state.platformType === 'TEACHER') {
 const app = createApp(App).use(Vue3Lottie)
 app.use(router)
 
-// 监听错误信息
-const errorLog = useErrorLog();
-errorLog.startListenErrorLog();
 
 app.mount('#app')

+ 2 - 0
src/views/coursewarePlay/index.tsx

@@ -1298,7 +1298,9 @@ export default defineComponent({
                         //   handlePreAndNext('down')
                         // }, 300)
                         // onChangeSwiper('down')
+                        console.log(notdefined);
                         handlePreAndNext('down')
+                        
                       }}
                     >
                       <span style={{ textAlign: 'center' }}>下一个</span>