Explorar o código

Update index.tsx

lex hai 1 ano
pai
achega
71f0929f24
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      src/views/student-register/index.tsx

+ 3 - 1
src/views/student-register/index.tsx

@@ -666,6 +666,8 @@ export default defineComponent({
           if (forms.joinType === 'tradition') {
             joinType = 'NOT_BUY_INSTRUMENT';
           }
+          // 单独存入时间,为了解决视频播放统计不全的问题
+          await updateStat(pageTimer.counter.value);
           // 更新时间
           const id = await updateStat(
             pageTimer.counter.value,
@@ -1203,7 +1205,7 @@ export default defineComponent({
           schoolId
         };
         let otherParams = {};
-        if (userId) {
+        if (!userId) {
           otherParams = {
             videoBrowseData: JSON.stringify(videoBrowseData), // 视屏播放数据
             videoBrowseDataTime: time || 0, // 有效的视频观看时长