diff --git a/js/pages/video/fixed_video.js b/js/pages/video/fixed_video.js index 7f490b1..fd71a64 100644 --- a/js/pages/video/fixed_video.js +++ b/js/pages/video/fixed_video.js @@ -1,6 +1,7 @@ let layer, form, util, dtree, videoTree, flow; let pageNum = 1, pageSize = 10; // 定义分页 let _this = null; +let scheduledTask2 = false; layui.config({ base: "../../plugin/layui-v2.9.7/layui/dtree/", //此处路径请自行处理, 可以使用绝对路径 }).extend({ @@ -33,8 +34,25 @@ layui.config({ }); $("#ID-flow-demo").niceScroll({ cursorborder: "", cursorcolor: "#c0c4cc", boxzoom: true }); $("#video-tree").niceScroll({ cursorborder: "", cursorcolor: "#c0c4cc", boxzoom: true }); + timedRefresh2(); }); +// 刷新数据-十分钟刷新一次 +function timedRefresh2() { + if (scheduledTask2) { + $('#ID-flow-demo').empty(); + layer.msg('刷新了'); + dataFlow({ + pageNum: 1, + pageSize: pageSize, + bidCode: parent.$('#bidPro').val() + }); + } else { + scheduledTask2 = true; + } + setTimeout(timedRefresh2, 1000 * 60 * 10); +} + // 切换播放窗口数量 @@ -159,7 +177,7 @@ function moreData() { } }); */ -window.addEventListener('beforeunload', async function (event) { +/* window.addEventListener('beforeunload', async function (event) { // 阻止默认行为以延迟页面卸载 event.preventDefault(); try { @@ -183,4 +201,4 @@ async function saveImportantData() { destroyPlugin(); resolve(); }); -} \ No newline at end of file +} */ \ No newline at end of file