瀏覽代碼

fix: 练习评测practiceSource传参修改

TIANYONG 1 年之前
父節點
當前提交
750c76db09
共有 2 個文件被更改,包括 4 次插入4 次删除
  1. 1 1
      src/helpers/native-message.ts
  2. 3 3
      src/subpages/colexiu/buttons/evaluating.tsx

+ 1 - 1
src/helpers/native-message.ts

@@ -65,7 +65,7 @@ const browserInfo = browser()
 
 if (browserInfo.isApp) {
   window.addEventListener('message', (evt) => {
-    console.log('app回调', evt?.data)
+    // console.log('app回调', evt?.data)
     try {
       const data = evt.data ? (typeof evt.data === 'object' ? evt.data : JSON.parse(evt.data)) : {}
       const uuid = data.content?.uuid || data.uuid

+ 3 - 3
src/subpages/colexiu/buttons/evaluating.tsx

@@ -196,7 +196,7 @@ const connect = async () => {
     clientId: 'STUDENT',
     hertz: SettingState.sett.hertz,
     feature: 'EVALUATION',
-    practiceSource: search.unitId ? 'UNIT_TEST' : 'PRACTICE',
+    practiceSource: (search.resourceType && search.resourceType === 'practice') ? 'UNIT_TEST_PRACTICE' : search.unitId ? 'UNIT_TEST' : 'PRACTICE',
     // 这里定义的是数字但是因为是通过input输入所以强制转化一次
     reactionTimeMs: parseFloat('' + SettingState.eva.reactionTimeMs) || 0,
     speed: runtime.speed,
@@ -264,7 +264,7 @@ const cancelTheEvaluation = () => {
     RuntimeUtils.clearIntervalTimeline()
     RuntimeUtils.setCurrentTime(0)
     Toast.clear()
-  }, 200);
+  }, 500);
 }
 
 const stopPlay = () => {
@@ -391,7 +391,7 @@ const playerStop = () => {
       }
     )
     RuntimeUtils.endCapture()
-  },200)
+  },500)
 }
 export const evaluatPlayerStop = playerStop