! function (win) {
    var fontConfig = {
        pcSise: 15, //PC字体大小
        mobileScale: 50, //手机屏幕缩放大小
        maxMobileWidth: 750 //手机屏幕最大尺寸
    }

    window.addEventListener("resize", function () {
        throttle(function () {
            resetFontSize();
        }, 1000);
    });

    resetFontSize();

    function resetFontSize() {
        var widthWidth = document.documentElement.clientWidth;
        var fontSize = widthWidth >= fontConfig.maxMobileWidth ? fontConfig.pcSise : (widthWidth / fontConfig.mobileScale)
            .toFixed(4);
        fontSize = fontSize >= 10 ? fontSize : 10;
        document.documentElement.style.fontSize = fontSize + 'px'
    }

    // 节流函数
    var throttle = (function () {
        let timeout = null;
        return function (func, wait) {
            let context = this;
            let args = arguments;
            if (!timeout) {
                timeout = setTimeout(() => {
                    timeout = null;
                    func.apply(context, args)
                }, wait)
            }
        }
    })();
}(window);

function toTime(n) {
            return n > 9 ? n : '0' + n;
        }
        
$(document).ready(function () {
    setInterval(() => {
        var today = new Date()
        $('.date').html(today.getFullYear() + '-' + toTime(today.getMonth()+1) + '-' + toTime(today.getDate()) + ' '+ toTime(today.getHours()) + ':' + toTime(today.getMinutes()) + ':' + toTime(today.getSeconds()))
    }, 1000);

    

    $('.video-button').on('click',function () {
        console.log($(this).data('item'))
        $('.video-trace__wrapper').show()
    })

    $('.repeat-item').on('click', function () {
        console.log($(this).data('item'))
        $('.video-trace__wrapper').show()
    })
    
})



// document.writeln('<style>.tzBtn{z-index:99;display: block;width: 100px !important;height: 100px !important;position: fixed !important;top: 370px !important;right: 0px !important;bottom: 0 !important;left: auto !important;margin: auto !important;border-radius: 50% !important;} @media only screen and (min-width: 700px) {.tzBtn{width: 170px !important;height: 170px !important;right: 30px !important;}}} </style>')


// document.writeln('<a target="_blank" href="https://320189.com" class="tzBtn"><img src="https://884695.com/assets/img/touzhu.gif" style="width:100%" /></a><span style="position: fixed; bottom: 245px; right: 10px; text-align: center; border-radius: 50%; background: rgb(255, 2, 2); color: rgb(255, 255, 255); width: 22px; font-weight: normal; height: 23px; line-height: 20px; z-index:999" onclick="$(\'.tzBtn\').hide();$(this).hide()">x</span>');