浏览代码

Update index.tsx

lex 1 年之前
父节点
当前提交
71f0929f24
共有 1 个文件被更改,包括 3 次插入1 次删除
  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') {
           if (forms.joinType === 'tradition') {
             joinType = 'NOT_BUY_INSTRUMENT';
             joinType = 'NOT_BUY_INSTRUMENT';
           }
           }
+          // 单独存入时间,为了解决视频播放统计不全的问题
+          await updateStat(pageTimer.counter.value);
           // 更新时间
           // 更新时间
           const id = await updateStat(
           const id = await updateStat(
             pageTimer.counter.value,
             pageTimer.counter.value,
@@ -1203,7 +1205,7 @@ export default defineComponent({
           schoolId
           schoolId
         };
         };
         let otherParams = {};
         let otherParams = {};
-        if (userId) {
+        if (!userId) {
           otherParams = {
           otherParams = {
             videoBrowseData: JSON.stringify(videoBrowseData), // 视屏播放数据
             videoBrowseData: JSON.stringify(videoBrowseData), // 视屏播放数据
             videoBrowseDataTime: time || 0, // 有效的视频观看时长
             videoBrowseDataTime: time || 0, // 有效的视频观看时长