|
@@ -1192,17 +1192,6 @@ export default defineComponent({
|
|
|
schoolId?: string
|
|
|
) => {
|
|
|
try {
|
|
|
- const videoBrowseData =
|
|
|
- moreTime.value.length > 0 ? formatEffectiveTime(moreTime.value) : [];
|
|
|
- const time =
|
|
|
- videoBrowseData.length > 0 ? formatTimer(videoBrowseData) : 0;
|
|
|
- // console.log(moreTime.value, videoBrowseData, 'video', time);
|
|
|
- // const videoCountTime = videoIntervalRef?.counter.value
|
|
|
- // 判断 视屏播放时间大于视屏播放有效时间则说明数据有问题,进行重置数据
|
|
|
- const rate = Math.floor(
|
|
|
- (time / Math.floor(videoForms.player.duration())) * 100
|
|
|
- );
|
|
|
-
|
|
|
const params = {
|
|
|
id: forms.saveId,
|
|
|
useTime: pageBrowseTime, // 固定5秒
|
|
@@ -1211,7 +1200,19 @@ export default defineComponent({
|
|
|
schoolId
|
|
|
};
|
|
|
let otherParams = {};
|
|
|
- if (!userId && videoForms.player.currentTime() > 0) {
|
|
|
+ if (!userId && videoForms.player.duration() > 0) {
|
|
|
+ const videoBrowseData =
|
|
|
+ moreTime.value.length > 0
|
|
|
+ ? formatEffectiveTime(moreTime.value)
|
|
|
+ : [];
|
|
|
+ const time =
|
|
|
+ videoBrowseData.length > 0 ? formatTimer(videoBrowseData) : 0;
|
|
|
+ // console.log(moreTime.value, videoBrowseData, 'video', time);
|
|
|
+ // const videoCountTime = videoIntervalRef?.counter.value
|
|
|
+ // 判断 视屏播放时间大于视屏播放有效时间则说明数据有问题,进行重置数据
|
|
|
+ const rate = Math.floor(
|
|
|
+ (time / Math.floor(videoForms.player.duration())) * 100
|
|
|
+ );
|
|
|
otherParams = {
|
|
|
videoBrowseData: JSON.stringify(videoBrowseData), // 视屏播放数据
|
|
|
videoBrowseDataTime: time || 0, // 有效的视频观看时长
|