//=== viewid:qqol_style_08_1683636143490 ===// $(function(){ if($('body').width() < 640){ // 是否苹果safari浏览器 var ua = navigator.userAgent.toLowerCase(); if (ua.indexOf('applewebkit') > -1 && ua.indexOf('mobile') > -1 && ua.indexOf('safari') > -1 && ua.indexOf('linux') == -1 && ua.indexOf('android') == -1) { $('#qqol_style_08_1683636143490 .qq_view>a').each(function(){ let mobileHref = $(this).attr('mobilehref'); $(this).attr('href',mobileHref); }); }else if(ua.indexOf('baidu') > -1){ // PS:百度浏览器无法跳转qq的,因为百度内部屏蔽了跳转协议,为的是不让百度自己的流量窜到敌站。除非百度自己开放接口,否则无法解决。 $('#qqol_style_08_1683636143490 .qq_view>a').each(function(){ $(this).attr('href','javascript:;'); }); } // 选择颜色 $('#qqol_style_08_1683636143490 .info_view').each(function(){ $(this).click(function(){ $(this).find('.menu_con').toggle(); $(this).siblings().find('.menu_con').hide(); if($(this).find('.menu_ico').hasClass('mobile_ico_cur')){ $(this).find('.menu_ico').addClass('mobile_ico_notcur').removeClass('mobile_ico_cur'); }else{ $(this).find('.menu_ico').addClass('mobile_ico_cur').removeClass('mobile_ico_notcur'); } $(this).siblings().find('.menu_ico').addClass('mobile_ico_notcur').removeClass('mobile_ico_cur'); }); }); // 选择颜色 $('#qqol_style_08_1683636143490 .link_view').each(function(){ $(this).on('touchstart',function(){ $(this).siblings().find('.menu_con').hide(); $(this).find('.menu_ico').addClass('mobile_ico_cur').removeClass('mobile_ico_notcur'); $(this).siblings().find('.menu_ico').addClass('mobile_ico_notcur').removeClass('mobile_ico_cur'); }); $(this).on('touchend',function(){ $(this).find('.menu_ico').addClass('mobile_ico_notcur').removeClass('mobile_ico_cur'); }); }); }else{ $('#qqol_style_08_1683636143490 .main_li').hover(function(){ $(this).find('.menu_con').show(); $(this).siblings().find('.menu_con').hide(); },function(){}); $('#qqol_style_08_1683636143490 .main_li .menu_con').hover(function(){ $(this).show(); },function(){ $(this).hide(); }); } }) //=== viewid:qqol_style_08_1683636143490 ===// //购物车 if(typeof showcart !== 'function'){ function showcart(){ var langid = 0; if (langid==0 && BodyIsFt) langid = 1; if(window.screen.width<767 || ($('body').width() > 0 && $('body').width() < 767)){ location.href = "//s143js.nicebox.cn/exusers/u_cart.php?idweb=43749&act=show&lang="+langid+"&ismobile=1"; }else{ document.getElementById("boxName").innerHTML="查看购物车"; if(document.getElementById("boxClose")) document.getElementById("boxClose").innerHTML="×"; document.getElementById("showiframe").src="//s143js.nicebox.cn/exusers/u_cart.php?idweb=43749&act=show&lang="+langid+"&v=9"; box.Show({width:'1000px', height:'600px'}); } } } //判断是否是手机,用于处理QQ电脑端及手机端链接不一致问题 var mobile_flag = isMobile(); if(mobile_flag){ $('#qqol_style_08_1683636143490 .qq_pc').hide(); $('#qqol_style_08_1683636143490 .qq_mobile').show(); } function isMobile() { var userAgentInfo = navigator.userAgent; var mobileAgents = [ "Android", "iPhone", "SymbianOS", "Windows Phone", "iPad","iPod"]; var mobile_flag = false; //根据userAgent判断是否是手机 for (var v = 0; v < mobileAgents.length; v++) { if (userAgentInfo.indexOf(mobileAgents[v]) > 0) { mobile_flag = true; break; } } var screen_width = window.screen.width; var screen_height = window.screen.height; //根据屏幕分辨率判断是否是手机 if(screen_width < 500 && screen_height < 800){ mobile_flag = true; } return mobile_flag; } //=== viewid:qqol_style_08_1683636143490 ===// // 对输入内容中的尖括号、引号等进行转义 function html_encode(str) { var s = ""; if (str.length == 0) return ""; s = str.replace(/&/g, "&"); s = s.replace(//g, ">"); s = s.replace(/ /g, " "); s = s.replace(/\'/g, "'"); s = s.replace(/\"/g, """); s = s.replace(/\n/g, "
"); return s; } function html_decode(str) { var s = ""; if (str.length == 0) return ""; s = str.replace(/&/g, "&"); s = s.replace(//g, ">"); s = s.replace(/ /g, " "); s = s.replace(/'/g, "\'"); s = s.replace(/"/g, "\""); s = s.replace(/
/g, "\n"); return s; } //=== viewid:dh_style_39_1700202391517 ===// /*pc,手机显示隐藏*/ function is_mobile(){ return window.screen.width<767 || ($('body').width() > 0 && $('body').width() < 767); } var is_mobile_boolean = is_mobile(); $(function(){ /*pc,手机显示隐藏*/ }) //=== viewid:dh_style_39_1700202391517 ===// function navSwtich(obj) { $(obj).siblings(".menuUlCopy").slideToggle(200); $(obj).toggleClass('ontoggle'); $(obj).parent().siblings().find(".menuUlCopy").slideUp(200); $(obj).parent().siblings().find(".fa-angle-down").removeClass('ontoggle'); } function subLeft_dh_style_39_1700202391517(){ $("#dh_style_39_1700202391517 .menuUl>li").each(function(){ $(this).find(".menuUl03").css("left",'100%'); }) } $(window).resize(function() { subLeft_dh_style_39_1700202391517(); }) $(function(){ $("#dh_style_39_1700202391517 .fa-navicon").click(function(){ $("#dh_style_39_1700202391517").addClass('clearTransform'); $("#dh_style_39_1700202391517 .menuUlCopy").each(function(){ $(this).siblings(".fa").show(); }) }) subLeft_dh_style_39_1700202391517(); $("#dh_style_39_1700202391517 .subBox").css("top",$("#dh_style_39_1700202391517 .menuUl_box").height()); if($("#dh_style_39_1700202391517 .menuUl").hasClass("noHover")){ var tabNum = 0; $("#dh_style_39_1700202391517 .menuUl>li").find(".Onsub").each(function(){ tabNum += 1; $(this).parent().attr("tabNum",tabNum) }) $("#dh_style_39_1700202391517 .menuUl>li .Onsub").mouseover(function(){ $("#dh_style_39_1700202391517 .subBox").show(); var index = $(this).parent().attr("tabNum"); $("#dh_style_39_1700202391517 .subBox .subItems").eq(index-1).fadeIn(100).siblings().hide(); $("#dh_style_39_1700202391517 .subBox .subMenuImgArea .subMenuImgCon").eq(0).fadeIn(100).siblings().hide(); }) $("#dh_style_39_1700202391517 .subBox").mouseleave(function(){ $(this).hide(); }); $("#dh_style_39_1700202391517 .menuUl>li .Nosub").mouseover(function(){ $("#dh_style_39_1700202391517 .subBox").hide(); }) //风格41 42 } }) //=== viewid:lang_style_1_1709694073480,lang_style_14_1709694344920 ===// $(document).ready(function(){ }); //=== viewid:banner_style_01_1699343052821 ===// //=== viewid:banner_style_01_1699343052821 ===// $(document).ready(function(){ arrowShow(); $(window).resize(function(){ arrowShow(); }); // 箭头显示 function arrowShow(){ if(window.screen.width<767 || ($('body').width() > 0 && $('body').width() < 767) || navigator.userAgent.indexOf('Mac OS X') != -1){ $("#banner_style_01_1699343052821 .bannerStyle_1 .awesome-font").show().siblings().hide(); }else{ $("#banner_style_01_1699343052821 .bannerStyle_1 .awesome-font").hide().siblings().show(); } } }); //=== viewid:banner_style_01_1699343052821 ===// /* * Banner 轮播图类 */ var intervaltimer; function Banner(config) { this._default = { 'list':[], 'length':0, 'current':0, 'timer':undefined, // 计时器 'view':undefined, // 视图 'flick':undefined, // 圆点选择器 'duration':3, // 切换时间间隔 'animation':0.5 // 动画时间 }; config = $.extend(true, this._default, config); this.config = config; this.init(config); } Banner.prototype.init = function(config) { this.animateStyle = 'normal'; // 动画效果 ( 根据动画效果, 不同的方法有不同的实现 ) this.direction = 'right'; // 当前滚动方向 this.view = this.config.view; this.config.length = this.config.list.length; this.config.flick = this.view ? this.view.find(".bannerStyle_1 .flicking_con > a") : undefined; }; // 计算下一个要显示的图片的索引 // by: 如果没有传入参数, 则使用配置中的数据this.config.current, 否则使用传入的参数 Banner.prototype.nextIndex = function(by) { by === undefined && (by = this.config.current); var next = this.direction == 'right' ? by + 1 : by - 1; next >= this.config.length && (next = 0); next < 0 && (next = this.config.length - 1); return next; }; //图片链接 $url_html = new Array(); $i = 0; $url_len = 4; $url_html[0] = ""; $url_html[1] = ""; $url_html[2] = ""; $url_html[3] = ""; $('#banner_style_01_1699343052821 a.img_url').attr('href',$url_html[$i]); // 跳到指定图片 Banner.prototype.animateIndex = function(index) { this.endAnimate(); if(index >= 0 && index < this.config.length && this.config.current != index) { if(this.config.current < index) { this.direction = 'right'; this.config.current = index - 1; } else { this.direction = 'left'; this.config.current = index + 1; } this.showIndex(this.config.current); this.startAnimate(); } }; // 向右动画 Banner.prototype.startAnimateRight = function() { this.direction = 'right'; this.startAnimate(); }; // 向左动画 Banner.prototype.startAnimateLeft = function() { this.direction = 'left'; this.startAnimate(); }; // 结束动画 Banner.prototype.endAnimate = function() { clearTimeout(this.config.timer); }; // 结束动画 Banner.prototype.hoverEndAnimate = function() { var that = this; intervaltimer = setInterval(function(){ clearTimeout(that.config.timer); },100); }; Banner.prototype.startAnimate = function() { switch(this.animateStyle) { case 'normal': // 默认效果 this.endAnimate(); if(this.config.length > 1) { var prev = this.config.current, next = this.nextIndex(), end = this.direction == 'right' ? {prev:"-100%", current:"100%"} : {prev:"100%", current:"-100%"}; // 前一个图片和当前图片的最后停留位置 this.config.flick.eq(next).addClass("on").siblings().removeClass("on"); // 执行动画 var banner = this; this.imgs.eq(prev).stop().animate({"left":end.prev}, this.config.animation, function(){ banner.config.timer = setTimeout(function(){ banner.startAnimate(); },banner.config.duration); }); this.imgs.eq(next).css({"left":end.current}).stop().animate({"left":"0%"}, this.config.animation); this.config.current = next; } break; case 'rotate-3d': // 3D旋转效果 this.endAnimate(); this.updateBgImg(); if(this.config.length > 1) { var prev = this.config.current, next = this.nextIndex(); this.config.flick.eq(next).addClass("on").siblings().removeClass("on"); this.config.current = next; this.parts.css("transform", "rotateX(" + ((this.direction == 'right' ? ++this.rotate : --this.rotate) * 90) + "deg)"); var banner = this; this.config.timer = setTimeout(function(){ banner.startAnimate(); },banner.config.duration); } $('#banner_style_01_1699343052821 a.img_url').attr('href',$url_html[this.config.current]); break; } }; // 指定显示的图片 Banner.prototype.showIndex = function(index) { switch(this.animateStyle) { case 'normal': // 默认效果 this.imgs.eq(index).css("left","0%").siblings(".img-item").css("left","100%"); this.config.flick.eq(index).addClass("on").siblings().removeClass("on"); break; case 'rotate-3d': // 3D旋转效果 this.updateFaceBottonTopImg(index); this.config.flick.eq(index).addClass("on").siblings().removeClass("on"); break; } }; /* * ******************************************** * 3D旋转效果 特有函数 begin */ // 每次旋转前都需要更新背部的图片 Banner.prototype.updateBgImg = function() { // 计算背部要显示的图片 var bg_image_index = this.nextIndex(this.nextIndex()); // index: 计算背景图片当前显示在哪个img中( 总共有4个图片, 分别位于正面/底部/背部/顶部, 索引分别为0, 1, 2, 3 ) var c, index = (c = (this.rotate + 2) % 4) >= 0 ? c : c + 4; var banner = this; // console.log('第',index,'个面-使用更新为第',bg_image_index,'张图'); this.parts && this.parts.each(function () { $(this).find('.img:eq('+index+')').css({'background-image': 'url("'+banner.config.list[bg_image_index]+'")'}); }); }; // 更新正面/顶部/底部的图片 // index: 要显示哪张图片 // 备注: 因为总共有四个面的图片需要更新, 初始化时, 正面/顶部/底部的图片只需更新一次即可 (背部的图片在每次旋转前都需要更新) Banner.prototype.updateFaceBottonTopImg = function(index) { // face, bottom, top: 计算正面/顶部/底部图片当前显示在哪个img中( 总共有4个图片, 分别位于正面/底部/背部/顶部, 索引分别为0, 1, 2, 3 ) var c, face = (c = this.rotate % 4) >= 0 ? c : c + 4, bottom, top; bottom = face + 1; bottom >= this.config.length && (bottom = 0); top = face - 1; top < 0 && (top = this.config.length - 1); var banner = this; this.parts && this.parts.each(function () { // console.log('第',face,'个面-使用更新为第',index,'张图'); $(this).find('.img:eq('+face+')').css({'background-image': 'url("'+banner.config.list[index]+'")'}); // console.log('第',bottom,'个面-使用更新为第',index < banner.config.length - 1 ? index + 1 : 0,'张图'); $(this).find('.img:eq('+bottom+')').css({'background-image': 'url("'+banner.config.list[index < banner.config.length - 1 ? index + 1 : 0]+'")'}); // console.log('第',top,'个面-使用更新为第',index > 0 ? index - 1 : banner.config.length - 1,'张图'); $(this).find('.img:eq('+top+')').css({'background-image': 'url("'+banner.config.list[index > 0 ? index - 1 : banner.config.length - 1]+'")'}); }); }; // 初始化旋转部分: 设置3d旋转的四个面的图片, index表示默认显示哪张图片 Banner.prototype.initImgPart = function(index) { var banner = this; this.parts && this.parts.each(function () { $(this).find('.img').each(function (i) { var j = 0; switch (i) { case 0: j = index; break; // 正面 case 1: j = index + 1; break; // 底部 case 2: break; // 背部 case 3: j = index - 1; break; // 顶部 } j >= banner.config.length && (j = 0); j < 0 && (j = banner.config.length - 1); $(this).css({'background-image': 'url("'+banner.config.list[j]+'")', 'background-repeat':'no-repeat', 'background-color':'#fff'}); }); }); }; // 更新旋转部分: 之所以使用定时器, 是因为无法实时获取模块宽度 Banner.prototype.updateImgPart = function() { this.parts && this.parts.each(function(index) { $(this).css({ "left":$(this).width() * index + "px" }); $(this).find(".img").css({ "background-position": -$(this).width() * index + "px" }); }); var banner = this; setTimeout(function () { banner.updateImgPart(); }, 800); }; /* * 3D旋转效果 特有函数 end * ******************************************** */ // 图片数据 var list_banner_style_01_1699343052821 = []; list_banner_style_01_1699343052821.push('https://cdn.yun.sooce.cn/6/43749/jpg/16990671087444651b1f3313ddc647a89526d61e8a66b.jpg?version=1699067110');list_banner_style_01_1699343052821.push('https://cdn.yun.sooce.cn/6/43749/jpg/1699067108557b07369322aba009fc8583e14afd222b2.jpg?version=1699067110');list_banner_style_01_1699343052821.push('https://cdn.yun.sooce.cn/6/43749/jpg/17027114501118ac31a27931507fea6fc995543b9bebe.jpg?version=0');list_banner_style_01_1699343052821.push('https://cdn.yun.sooce.cn/6/43749/jpg/1702711450112f2860b8cda19e03e428b3dd6238cfadb.jpg?version=0'); var banner_banner_style_01_1699343052821; // 轮播图对象 $(function(){ // 创建轮播图 $arrHref = new Array(); banner_banner_style_01_1699343052821 = new Banner({ 'list':list_banner_style_01_1699343052821, 'view':$('#banner_style_01_1699343052821'), 'duration':parseFloat('5') * 1000, 'animation':parseFloat('1') * 1000 }); banner_banner_style_01_1699343052821.animateStyle = 'normal'; banner_banner_style_01_1699343052821.imgs = banner_banner_style_01_1699343052821.view.find(".bannerStyle_1 .main_image .img-list").children(".img-item"); banner_banner_style_01_1699343052821.view.find('a').each(function (i) { $(this).click(function () { if(!$(this).attr('href')) { return false; } }); }); banner_banner_style_01_1699343052821.view.find('a.picSet').each(function(i){ $arrHref[i] = $(this).attr('href'); }); // 显示指定索引的图片 banner_banner_style_01_1699343052821.showIndex(banner_banner_style_01_1699343052821.config.current); // 监听 点击圆点 banner_banner_style_01_1699343052821.config.flick.click(function(){ banner_banner_style_01_1699343052821.animateIndex($(this).index()); $('#banner_style_01_1699343052821 a.img_url').attr('href',$url_html[$(this).index()]); $i = $(this).index(); return false; }); // 监听 鼠标悬浮时 banner_banner_style_01_1699343052821.view.hover( function(){ banner_banner_style_01_1699343052821.hoverEndAnimate(); banner_banner_style_01_1699343052821.view.find(".bannerStyle_1 .btn_prev, .bannerStyle_1 .btn_next").fadeIn(); }, function(){ clearInterval(intervaltimer); banner_banner_style_01_1699343052821.config.timer = setTimeout(function(){ banner_banner_style_01_1699343052821.startAnimateRight(); },banner_banner_style_01_1699343052821.config.duration); banner_banner_style_01_1699343052821.view.find(".bannerStyle_1 .btn_prev, .bannerStyle_1 .btn_next").fadeOut() } ); // 监听 点击左右按钮 banner_banner_style_01_1699343052821.view.find(".btn_prev").click(function() { banner_banner_style_01_1699343052821.startAnimateLeft(); }); banner_banner_style_01_1699343052821.view.find(".btn_next").click(function() { banner_banner_style_01_1699343052821.startAnimateRight(); }); // 监听 触摸事件 var touchVal = null; document.addEventListener("touchstart", function(e){ if($(e.target).is(banner_banner_style_01_1699343052821.view) || $(e.target).closest("#"+banner_banner_style_01_1699343052821.view.attr("id")).length > 0) { touchVal = {}; touchVal.downX = e.touches[0].clientX; // 记录触摸起始位置 } }, false); document.addEventListener("touchmove", function(e){ if(touchVal && touchVal.downX) { touchVal.moveX = e.touches[0].clientX - touchVal.downX; // 计算触摸中的偏移位置 } }, false); document.addEventListener("touchend", function(e){ if(touchVal && touchVal.moveX){ if(touchVal.moveX > 30){ banner_banner_style_01_1699343052821.startAnimateLeft(); // 触摸生效 if (e.preventDefault) { e.preventDefault(); } else { e.returnvalue = false; } }else if(touchVal.moveX < -30){ banner_banner_style_01_1699343052821.startAnimateRight(); // 触摸生效 if (e.preventDefault) { e.preventDefault(); } else { e.returnvalue = false; } } } touchVal = null; }, false); // 运行 banner_banner_style_01_1699343052821.config.timer = setTimeout(function(){ banner_banner_style_01_1699343052821.startAnimateRight(); }, banner_banner_style_01_1699343052821.config.duration); }); //=== viewid:image_style_20_1703558197531 ===// if(typeof showcart !== 'function'){ function showcart(){ var langid = 0; if (langid==0 && BodyIsFt) langid = 1; if(window.screen.width<767 || ($('body').width() > 0 && $('body').width() < 767)){ location.href = "https://s143js.nicebox.cn/exusers/u_cart.php?idweb=43749&act=show&lang="+langid+"&ismobile=1"; }else{ document.getElementById("boxName").innerHTML=""; if(document.getElementById("boxClose")) document.getElementById("boxClose").innerHTML="×"; document.getElementById("showiframe").src="https://s143js.nicebox.cn/exusers/u_cart.php?idweb=43749&act=show&lang="+langid+"&v=9"; box.Show({width:'1000px', height:'600px'}); } } } $('#image_style_20_1703558197531 .imgTextLi').eq(0).find('.imgBt').addClass('showBtBorder'); $('#image_style_20_1703558197531 .imgTextLi').eq(0).find('.imgDetail').addClass('showDetail'); if(isMobile()){ //移动端 $('#image_style_20_1703558197531 .imgTextLi').click(function(){ var obj = $(this); let check = obj.is('.showImg'); if (!check) { animation(obj); } else { let url = obj.find('.noMobile').attr('href'); if (url) { window.open(url); } } }) }else { //pc端 $('#image_style_20_1703558197531 .imgTextLi').hover(function(){ var obj = $(this); animation(obj); }) // 主要用于预览的时候 $('#image_style_20_1703558197531 .imgTextLi').click(function(){ var obj = $(this); let check = obj.is('.showImg'); if (!($('body').width() > 0 && $('body').width() < 767)) { check = false; } if (!check) { return true; } let url = obj.find('.noMobile').attr('href'); let target = obj.find('.noMobile').attr('target'); if (url) { if (target == '_blank') { window.open(url); } else { window.location.href = url; } } }) } // 风格20的动画效果 function animation(obj){ obj.addClass('showImg').removeClass('hideImg').siblings().addClass('hideImg').removeClass('showImg'); obj.find('.imgBt').addClass('showBtBorder'); obj.siblings().find('.imgBt').removeClass('showBtBorder'); obj.siblings().find('.imgDetail').removeClass('showDetail'); obj.find('.imgDetail').addClass('showDetail'); } // 判断PC还是手机 function isMobile() { var userAgentInfo = navigator.userAgent; var mobileAgents = [ "Android", "iPhone", "SymbianOS", "Windows Phone", "iPad","iPod"]; var mobile_flag = false; //根据userAgent判断是否是手机 for (var v = 0; v < mobileAgents.length; v++) { if (userAgentInfo.indexOf(mobileAgents[v]) > 0) { mobile_flag = true; break; } } var screen_width = window.screen.width; var screen_height = window.screen.height; //根据屏幕分辨率判断是否是手机 if(screen_width < 500 && screen_height < 800){ mobile_flag = true; } return mobile_flag; } //=== viewid:newsList_style_09_1699434667313 ===// //-- $(function(){ var viewid="newsList_style_09_1699434667313"; var sys_url="viewid=newsList_style_09_1699434667313&name=newsList&style=style_09&langid=0&pageid=555129&viewCtrl=newsList&isfb=1"; var moreParams=''; if(typeof(history.pushState) != 'undefined'){ var hstate=JSON.stringify(history.state); if(hstate!='null'&& hstate!=null){ eval('var hjson = ' + hstate); moreParams=hjson.moreParamsnewsList_style_09_1699434667313; } } RequestURL(viewid,sys_url,moreParams); }); //-- //=== viewid:newsList_style_12_1699435641431 ===// // $(function(){ // // 样式控制 // ; // // $('.boxNewsListStyle_12 .newLeft').css("height",""+(parseInt($('.boxNewsListStyle_12 .newLeft').css("width"))*2/3)+"px"); // // 分割线 // $('.boxNewsListStyle_12 .modSet').first().show(); // $('.boxNewsListStyle_12 .modSet').first().siblings('.boxNewsListStyle_12 .modSet').hide(); // var i=0; // $('.boxNewsListStyle_12 .newsLi').eq(i).css({background:'#eee'}); // var timer = setInterval(function(){ // $('.boxNewsListStyle_12 .modSet').eq(i).stop().show(); // $('.boxNewsListStyle_12 .newsLi').eq(i).css({background:'#eee'}); // $('.boxNewsListStyle_12 .modSet').eq(i).siblings('.boxNewsListStyle_12 .modSet').hide(); // $('.boxNewsListStyle_12 .newsLi').eq(i).siblings('.boxNewsListStyle_12 .newsLi').css({background:''}); // if( i >= $('.boxNewsListStyle_12 .modSet').length-1){ // i = 0; // }else{ // i++; // } // },3000); // }); //=== viewid:newsList_style_12_1699435641431 ===// //-- $(function(){ var viewid="newsList_style_12_1699435641431"; var sys_url="viewid=newsList_style_12_1699435641431&name=newsList&style=style_12&langid=0&pageid=555129&viewCtrl=newsList&isfb=1"; var moreParams=''; if(typeof(history.pushState) != 'undefined'){ var hstate=JSON.stringify(history.state); if(hstate!='null'&& hstate!=null){ eval('var hjson = ' + hstate); moreParams=hjson.moreParamsnewsList_style_12_1699435641431; } } RequestURL(viewid,sys_url,moreParams); }); //-- //=== viewid:newsList_style_12_1699435641431 ===// $(function(){ var i=0; var timer; var lastnum = $("#newsList_style_12_1699435641431 .boxNewsListStyle_12 .leftLi").length-1; Carousel(1); $("#newsList_style_12_1699435641431 .boxNewsListStyle_12 .prevNews").click(function(){ //暂停 i退一格 再循环 clearInterval(timer); i = i == 0 ? lastnum : i - 1; Carousel(1); }) $("#newsList_style_12_1699435641431 .boxNewsListStyle_12 .nextNews").click(function(){ //暂停 i进一格 再循环 clearInterval(timer); i = i >= lastnum ? 0 : i + 1; Carousel(1); }) function setIntervalFun(){ timer = setInterval(function(){ i = i >= lastnum ? 0 : i + 1; Carousel(0); },3000); } function Carousel(val){ $("#newsList_style_12_1699435641431 .boxNewsListStyle_12 .leftLi").eq(i).stop().show(); $("#newsList_style_12_1699435641431 .boxNewsListStyle_12 .newsLi").eq(i).addClass('cur_item').siblings().removeClass('cur_item'); $("#newsList_style_12_1699435641431 .boxNewsListStyle_12 .leftLi").eq(i).siblings("#newsList_style_12_1699435641431 .boxNewsListStyle_12 .leftLi").hide(); $("#newsList_style_12_1699435641431 .boxNewsListStyle_12 .newsLi").eq(i).siblings("#newsList_style_12_1699435641431 .boxNewsListStyle_12 .newsLi").css({background:''}); if(val === 1) setIntervalFun(); } }); //=== viewid:counter_style_3_1699238396846 ===// //-- $(function(){ var viewid="counter_style_3_1699238396846"; var sys_url="viewid=counter_style_3_1699238396846&name=counter&style=style_3&langid=0&pageid=555129&viewCtrl=default&isfb=1"; var moreParams=''; if(typeof(history.pushState) != 'undefined'){ var hstate=JSON.stringify(history.state); if(hstate!='null'&& hstate!=null){ eval('var hjson = ' + hstate); moreParams=hjson.moreParamscounter_style_3_1699238396846; } } RequestURL(viewid,sys_url,moreParams); }); //-- //=== viewid:counter_style_3_1699238396846 ===// $(function(){ if(!false){ function Timeing(config) { this._default = { 'arrayObj':[], //总数字 'arrayTimeObj':[], //每0.1秒递增数字 'arrayIndexObj':[], //初始值0 'arrayLockObj':[], //是否计算完成,完成后为true 'timeNum':30, //计算所需时间,默认为3秒 'begin':new Date(), //开始时间,用来计算耗时多少 'timer':undefined, //定时器 'id':'', //视图id 'start':false //避免滚屏时重复触发生成计数器 }; config = $.extend(true, this._default, config); this.config = config; this.init(config); } //初始化各数组 Timeing.prototype.init = function(config) { var _this = this; $('#'+_this.config.id+' .numberLi').each(function(i){ _this.config.arrayObj.push($(this).find('.num').html()); _this.config.arrayTimeObj.push($(this).find('.num').html()/_this.config.timeNum); _this.config.arrayIndexObj.push(0); _this.config.arrayLockObj.push(false); $(this).find('.num').html(0); }); } //规定时间计算完数字 Timeing.prototype.getNumFun = function(config){ var _this = this; let time_in = new Date().getTime(); let time_in_id = new Date().getTime()+'counter_style_3_1699238396846'; let setIntervalTime = 0; if (!_this.config.arrayLockObj.every(item => {return item})) { window.counterTimer[time_in_id] = setInterval(function () { for(let key in window.counterTimer){ let keyArr = key.split('counter'); let modelId = 'counter'+keyArr[1]; if(modelId == 'counter_style_3_1699238396846' && keyArr[0] > time_in){ clearInterval(window.counterTimer[key]); } } for (var i = 0; i < _this.config.arrayObj.length; i++) { if(_this.config.arrayLockObj[i]){ continue } _this.config.arrayIndexObj[i] += _this.config.arrayTimeObj[i]; if (Math.abs(_this.config.arrayIndexObj[i]) < Math.abs(_this.config.arrayObj[i])) { $('#'+_this.config.id+' .numberLi').eq(i).find('.num').html(Math.ceil(_this.config.arrayIndexObj[i])); } if (Math.abs(_this.config.arrayIndexObj[i]) - Math.abs(_this.config.arrayObj[i]) >= 0) { //console.info(_this.config.arrayIndexObj[i],_this.config.arrayTimeObj[i],new Date()-_this.config.begin);//计算时间 $('#'+_this.config.id+' .numberLi').eq(i).find('.num').html(_this.config.arrayObj[i]); _this.config.arrayLockObj[i] = true; } } if (_this.config.arrayLockObj.every(item => {return item}) && window.counterTimer) { clearInterval(window.counterTimer[time_in_id]); } }, 100); } } //绑定滚动事件触发,进入可视范围后开始计数功能 Timeing.prototype.bindLoad = function(config){ var _this = this; if(($(window).height() + $(window).scrollTop()) > $("#"+_this.config.id).offset().top) { _this.getNumFun(); } $("#"+_this.config.id).one("appear", function() { _this.getNumFun(); }); let fullpageObj = $("#"+_this.config.id).parents('.fullpage_div'); if(fullpageObj &&fullpageObj.length>0 && !fullpageObj.hasClass('active')){ //存在于滚屏页面并且不是第一屏 if(!_this.config.start){ //没开始过 // 滚屏--鼠标滚动时 $(window).on("mousewheel DOMMouseScroll", function (e) { var delta = (e.originalEvent.wheelDelta && (e.originalEvent.wheelDelta > 0 ? 1 : -1)) || // chrome & ie (e.originalEvent.detail && (e.originalEvent.detail > 0 ? -1 : 1)); // firefox if(fullpageObj.hasClass('active')){ _this.triggerScroll(); } }) // 滚屏--鼠标点击切换时 $("#fp-nav>ul>li").click(function(){ console.log('点击点击'); setTimeout(function(){ if(fullpageObj.hasClass('active')){ _this.triggerScroll(); } },50); }); // 滚屏--手机滑动 $('body').on('touchmove',function(){ if(fullpageObj.hasClass('active')){ _this.triggerScroll(); } }); } } $(window).bind("scroll", function(event) { var fold; if(!_this.config.start){ fold = $(window).height() + $(window).scrollTop(); if(fold >= $("#"+_this.config.id).offset().top) { _this.triggerScroll(); } } }); } //滚屏触发事件 Timeing.prototype.triggerScroll = function(config){ var _this = this; _this.config.begin = new Date(); _this.config.start = true; _this.getNumFun(); } var timeingcounter_style_3_1699238396846 = new Timeing({ 'timeNum':30, 'id':'counter_style_3_1699238396846'}); timeingcounter_style_3_1699238396846.init(); timeingcounter_style_3_1699238396846.bindLoad(); } }); //=== viewid:newsList_style_05_1699239979788 ===// //-- $(function(){ var viewid="newsList_style_05_1699239979788"; var sys_url="viewid=newsList_style_05_1699239979788&name=newsList&style=style_05&langid=0&pageid=555129&viewCtrl=newsList&isfb=1"; var moreParams=''; if(typeof(history.pushState) != 'undefined'){ var hstate=JSON.stringify(history.state); if(hstate!='null'&& hstate!=null){ eval('var hjson = ' + hstate); moreParams=hjson.moreParamsnewsList_style_05_1699239979788; } } RequestURL(viewid,sys_url,moreParams); }); //-- //=== viewid:copyright_style_01_1660990229104 ===// //=== viewid:footerCustom_textlist_01_1702434921951,footerCustom_textlist_01_1702434980976 ===// if(typeof showcart !== 'function'){ function showcart(){ var langid = 0; if (langid==0 && BodyIsFt) langid = 1; if(window.screen.width<767 || ($('body').width() > 0 && $('body').width() < 767)){ location.href = "https://s143js.nicebox.cn/exusers/u_cart.php?idweb=43749&act=show&lang="+langid+"&ismobile=1"; }else{ document.getElementById("boxName").innerHTML=""; if(document.getElementById("boxClose")) document.getElementById("boxClose").innerHTML="×"; document.getElementById("showiframe").src="https://s143js.nicebox.cn/exusers/u_cart.php?idweb=43749&act=show&lang="+langid+"&v=9"; box.Show({width:'1000px', height:'600px'}); } } }