setTimeout(function() { const countDown = (second) => { const s = second % 60; const m = Math.floor(second / 60); return m + ":" + (s < 10 ? '0' + s : s); }; // let time = 5 * 60; let time = 10; const timer = setInterval(() => { const show = countDown(time--); $('div[widgetname=LABEL0]').find('.fr-label').html(show) if (time < 0) { console.log('倒计时结束!重新开始'); // time = 5 * 60; time = 10; _g().getWidgetByName("report25").gotoPage(2,"{month:12, name:'FR'}","lazy"); _g().getWidgetByName("report24").gotoPage(2,"{month:12, name:'FR'}","lazy"); _g().getWidgetByName("report23").gotoPage(2,"{month:12, name:'FR'}","lazy"); } }, 1000); }, 0) |