//=== viewid:dh_style_01_1494484475277,dh_style_03_1495005118673 ===// /*pc,手机显示隐藏*/ function is_mobile(){ return window.screen.width<767 || ($('body').width() > 0 && $('body').width() < 767); } var is_mobile_boolean = is_mobile(); $(function(){ /*pc,手机显示隐藏*/ }) //=== viewid:searchbox_style_01_1495004448258 ===// function goUrl(formname){ var url = "http://www.baidu.com/baidu"; if (formname.si.value!=""){ formname.ct.value = "2097152"; } else { formname.ct.value = "0"; } formname.action = url; return true; } //=== viewid:qqol_style_01_1577418166707 ===// /* * *************************************************************** * 片段列表类 */ function FragmentList(config) { this._default = { 'prefix':'fragment-', 'css':{} }; config = $.extend(true, this._default, config); this.config = config; this.list = []; this.object = $('
'); // 执行配置 this.init(config); } /* * 初始化 */ FragmentList.prototype.init = function(config) { config.css && this.object.css(config.css); }; /* * 添加 */ FragmentList.prototype.append = function (fragment) { this.list.push(fragment); }; /* * 获取jquery对象 */ FragmentList.prototype.get = function () { this.object.addClass(this.config.prefix + 'list').children().remove(); for(var i = 0, len = this.list.length, html = ''; i < len; ++i) { html += this.list[i].html(); } return this.object.html(html); }; /* * 输出 */ FragmentList.prototype.html = function () { return this.get().prop('outerHTML'); }; /* * *************************************************************** * 片段类 */ Fragment.prototype.prefix = 'fragment-'; function Fragment(config) { (!config.init || Util.prototype.type(config.init) != 'function') && (config.init = function () {}); !config.html && (config.html = '
'); this._default = { 'name':'item' }; config = $.extend(true, this._default, config); // 创建jquery对象 config.data && (config.html = Util.prototype.replace(config.html, Util.prototype.toArray(config.data))); this.object = $(config.html).addClass((config.name != 'item' ? this.prefix + 'item': '') + ' ' + this.prefix + config.name); config.init(this.object); delete config.html; // jquery对象创建后, config.html 不再使用 this.config = config; // 执行配置 this.init(config); } /* * 复制 */ Fragment.prototype.clone = function () { return new Fragment($.extend(true, {}, this.config)); }; /* * 初始化 */ Fragment.prototype.init = function(config) { config.css && this.object.css(config.css); }; /* * 修改样式 */ Fragment.prototype.css = function(css) { css && this.object.css(css); return this; }; /* * 输出 */ Fragment.prototype.html = function () { return this.object.prop('outerHTML'); }; /* * 使用指定数据更新自己 */ Fragment.prototype.data = function (data) { this.object.html(Util.prototype.replace(this.html(), Util.prototype.toArray(data))); return this; }; /* * *************************************************************** * 边栏类 */ function Sidebar(config) { this._default = { // 默认配置, 常量, 不应该修改, 对象初始化时可覆盖 'template':'sidebar', 'expand':true, // 默认展开还是隐藏 'css':undefined, 'main':{'width':'120px', 'position':'right'}, 'border':{'width':'1px', 'color':'#ccc', 'radius':'2px'}, 'button':{'width':'26px', 'color':'#333', 'font-size':'12px', 'background-color':'#ececec', 'radius':'5px'}, 'close':{'hide':false, 'height':'25px', 'font-size':'12px', 'padding':'0 .6em 0 .3em'}, 'show':{'start':undefined, 'end':undefined}, // 显示开始和结束时要执行的函数 'end':{'start':undefined, 'end':undefined} // 隐藏开始和结束时要执行的函数 }; config = $.extend(true, this._default, config); this.config = config; // dom 结构 var temp = $('.'+config.template+':first'); temp.hide(); this.main = temp.clone().removeClass(config.template).show(); this.main.data('instance', this); // dom 结构的 data 中保存类对象 config.css && this.main.addClass(config.css); // 主要属性 this.width = config.main.width; this.position = config.main.position; this.main.addClass(this.position); this.position_rev = this.position == 'right' ? 'left' : 'right'; this.wrapper = this.main.children('.wrapper'); this._close = this.wrapper.children('.close'); this.button = this.main.children('.button'); // 子元素的 dom 结构的 data 中保存类对象 this._close.data('parent', this); this.button.data('parent', this); // 执行配置 this.init(config); } /* * 初始化 */ Sidebar.prototype.init = function(config) { this.initMain(); this.initWrapper(config); this.initButton(config); // 垂直居中后, 移动到body最后 this.verticalCenter().appendTo('body'); config.expand ? this.show(false) : this.hide(false); this.main.show(); // 存储所有的对象到window中 (后期会使用) !window.online_service_list && (window.online_service_list = []); window.online_service_list.push(this); $(window).resize(this.onWindowResize); }; /* * 初始化 - main */ Sidebar.prototype.initMain = function() { this.main.hide().css({ 'height':'auto', 'position':'fixed', 'z-index':'100000000', 'top':'0px', 'width':this.width }); this.main.css(this.position, '0px'); // 移入移出时 this.main.hover( function () { $(this).data('instance').show(); }, function () { if(!$(this).hasClass('animate-showing')) { $(this).data('instance').hide(); } } ); }; /* * 初始化 - wrapper */ Sidebar.prototype.initWrapper = function(config) { this.wrapper.css({ 'border': config.border.width +' solid ' + config.border.color, 'border-radius':config.border.radius, '-moz-border-radius':config.border.radius }); this._close.css({ 'display':config.close.hide ? 'none' : 'block', 'position':'absolute', 'top':'0px', 'right':'0px', 'height':config.close.height, 'line-height':config.close.height, 'font-size':config.close['font-size'], 'padding':config.close.padding, 'cursor':'pointer' }).click(function () { var instance = $(this).data('parent'); Sidebar.prototype.hide.call(instance); if(typeof($("img").lazyload)=="function"){ //异步加载图片 setTimeout(function(){ $("img").lazyload({effect: "fadeIn",threshold:0,failure_limit:20,skip_invisible:false}); },500); } }).attr({'onselectstart':'return false', 'unselectable':'on'}); // [兼容]禁止选择文本 }; /* * 隐藏Sidebar * animate: 是否带动画 */ Sidebar.prototype.hide = function (animate) { animate === undefined && (animate = true); var instance = this, width = '-'+this.width, end = this.position == 'right' ? {right :width} : {left :width}, btn_width = '-'+instance.config.button.width, btn_end = instance.position == 'right' ? {left :btn_width} : {right :btn_width}; instance.onHide('start'); if(animate) { instance.main.animate(end, 'fast', function() { instance.button.show().animate(btn_end, 'fast'); instance.onHide('end'); }); } else { instance.main.css(end); instance.button.show().css(btn_end); instance.onHide('end'); } }; /* * 隐藏Sidebar开始和结束时 */ Sidebar.prototype.onHide = function (status) { var func; if(this.config.hide) { switch(status) { case 'start': Util.prototype.type(func = this.config.hide.start) == 'function' && func(); // 执行自定义函数 break; case 'end': Util.prototype.type(func = this.config.hide.end) == 'function' && func(); // 执行自定义函数 break; } } }; /* * 初始化 - button */ Sidebar.prototype.initButton = function(config) { var width = config.button.width; this.button.hide().css({ 'position':'absolute', 'top':'0%', 'width':width, 'line-height':'1.35em', 'padding':'.5em 0', 'font-size':config.close['font-size'], 'color':config.button.color, 'background-color':config.button['background-color'], 'cursor':'pointer', 'word-wrap':'break-word', 'word-break':'break-all' }); var radius = config.button.radius; if(this.position == 'right') { this.button.css({ 'border-top-left-radius':radius, 'border-bottom-left-radius':radius }); } else { this.button.css({ 'border-top-right-radius':radius, 'border-bottom-right-radius':radius }); } this.button.css(this.position_rev, '0px'); // 点击时 this.button.click(function () { var instance = $(this).data('parent'); Sidebar.prototype.show.call(instance); }).attr({'onselectstart':'return false', 'unselectable':'on'}); // [兼容]禁止选择文本 }; /* * 显示Sidebar * animate: 是否带动画 */ Sidebar.prototype.show = function (animate) { animate === undefined && (animate = true); var instance = this, end = instance.position == 'right' ? {right :0} : {left :0}; instance.onShow('start'); if(animate) { instance.onAnimate('showing'); instance.main.animate(end, 'fast', function() { instance.onAnimate(); instance.button.hide(); // Bug修复: 额外隐藏一次 instance.onShow('end'); }); } else { instance.main.css(end); instance.onShow('end'); } // 显示开始后, 不管是否有动画, 按钮应该马上隐藏 instance.button.hide(); instance.button.css(instance.position_rev,'0px'); }; /* * 显示Sidebar开始和结束时 */ Sidebar.prototype.onShow = function (status) { var func; if(this.config.show) { switch (status) { case 'start': Util.prototype.type(func = this.config.show.start) == 'function' && func(); // 执行自定义函数 break; case 'end': Util.prototype.type(func = this.config.show.end) == 'function' && func(); // 执行自定义函数 break; } } }; /* * 设置实时动画状态 * status: 为空时表示动画结束 */ Sidebar.prototype.onAnimate = function(status) { Util.prototype.removeClass(this.main, 'animate-'); status && this.main.addClass('animate-'+status); }; /* * 窗口大小改变时 */ Sidebar.prototype.onWindowResize = function() { for(var i = 0, len = window.online_service_list.length; i < len; ++i) { window.online_service_list[i].verticalCenter(); } }; /* * 在窗口垂直居中 */ Sidebar.prototype.verticalCenter = function() { var h1 = this.main.height(), h2 =$(window).height(); if(h1 && h2) { this.main.css('top', ((h2 - h1) / 2) + 'px'); } return this.main; }; /* * 添加内容 */ Sidebar.prototype.append = function(obj) { this.wrapper.append(obj); this.verticalCenter(); }; /* * *************************************************************** * 工具类 */ function Util() { } /* * 返回对象类型 */ Util.prototype.type = function(obj) { var type = obj === undefined ? 'undefined' : (obj === null ? 'null' : undefined); // 兼容旧版js解析器 return type ? type : Object.prototype.toString.call(obj).slice(8, -1).toLowerCase(); }; /* * 检测对象类型 */ Util.prototype.is = function(obj, type) { var cls = this.type(obj); return obj !== undefined && obj !== null && cls.toLowerCase() === type.toLowerCase(); }; /* * 属性扩展( 增强版 ) * 注意: 一般深度复制, 可直接使用 $.extend(true, target, source) */ Util.prototype.extend = function(target, source, is_deep, is_add) { is_deep === undefined && (is_deep = true); // 如果值也是对象, 是否对值也调用extend is_add === undefined && (is_add = true); // 如果目标对象中没有源对象的键, 是否允许新增键值 for (var p in source) { if (source.hasOwnProperty(p) && (is_add || target.hasOwnProperty(p))) { // 执行extend if(is_deep && this.is(target[p], 'object') && this.is(source[p], 'object')) { this.extend(target[p], source[p]); } else { target[p] = source[p]; } } } return target; }; /* * 删除class( 删除指定名称的class和所有以指定名称开头的class ) */ Util.prototype.removeClass = function(obj, rm) { obj.attr('class', function () { var regExp = new RegExp(rm + '\\S*', 'g'); return Util.prototype.clear($(this).attr('class').replace(regExp, '')); }); return obj; }; /* * 删除前后空白 */ Util.prototype.trim = function(s){ return s.replace(/(^\s*)|(\s*$)/g,''); }; /* * 合并中间多个空白为一个 */ Util.prototype.clear = function(s){ return s.replace(/(^\s*)|(\s*$)|(\s{2,})/g,''); }; /* * 对象转数组 */ Util.prototype.toArray = function(obj) { var array = [], p, item; for (p in obj) { if (obj.hasOwnProperty(p)) { item = [p]; item.push(this.is(obj[p], 'object') ? this.toArray(obj[p]) : obj[p]); array.push(item); } } return array; }; /* * 使用指定的键值数组替换一个字符串 * 备注: 字符串中键以{{}}标记 * 备注: data: 二维数组, 一维数组的每一项是一个长度为二的内层数组, 内层数组的第一项为键, 第二项为值 */ Util.prototype.replace = function(s, data) { var i, len, reg_str = [], reg; for(i = 0, len = data.length; i < len; ++i) { reg_str.push('({{' + data[i][0] + '}})'); } // 正则替换 reg = new RegExp(reg_str.join('|'), 'g'); return s.replace(reg, replace); // 执行替换的函数 function replace(){ // arguments 中包含的是: 字符串中当前位置匹配到的字符串, 第0个()匹配到的字符串, ..., 第n-1个()匹配到的字符串, 当前匹配的位置, 整个字符串 // 从索引为1开始, 第一个不为undefined的项的索引值减一即为匹配到的键的索引 for(var i = 1, len = arguments.length; i < len; ++i) { if(arguments[i] !== undefined) { return data[--i][1]; } } } }; //=== viewid:qqol_style_01_1577418166707 ===// //购物车 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 = "//manage.91zhuji.cn/exusers/u_cart.php?idweb=38439&act=show&lang="+langid+"&ismobile=1"; }else{ document.getElementById("boxName").innerHTML="查看购物车"; if(document.getElementById("boxClose")) document.getElementById("boxClose").innerHTML="×"; document.getElementById("showiframe").src="//manage.91zhuji.cn/exusers/u_cart.php?idweb=38439&act=show&lang="+langid+"&v=9"; box.Show({width:'1000px', height:'600px'}); } } } //判断是否是手机,用于处理QQ电脑端及手机端链接不一致问题 var mobile_flag = isMobile(); if(mobile_flag){ $('#qqol_style_01_1577418166707 .qq-btn-pc').hide(); $('#qqol_style_01_1577418166707 .qq-btn-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_01_1577418166707 ===// function remove_qqol_qqol_style_01_1577418166707(){ $('body > .online-service.qqol-qqol_style_01_1577418166707').remove(); } // 创建在线客服 $(function () { // 清理旧的 remove_qqol_qqol_style_01_1577418166707(); // 创建边栏 var sidebar = new Sidebar({ 'template': 'online-template', 'css': 'qqol-qqol_style_01_1577418166707', 'expand': true, 'main': {'width':'219px', 'position': 'right'}, 'border': {'color': '#009fe9', 'width': '1px', 'radius': '10px'}, 'button': {'color': '#fff', 'background-color': '#009fe9', 'radius': '5px'}, 'close': {'hide': false} }); // 片段模板 var qqOnlineStr = '
' + '' + '{{title}}' + '{{text}}' + '' + '{{title}}' + '{{text}}' + '
'; // 图标不能显示时, 更换QQ号码让其显示 // 创建片段 Fragment.prototype.prefix = 'ol-'; // 创建片段列表 var fragmentList = new FragmentList({ 'prefix':'ol-', 'css':{'padding':'0 12px'} }); fragmentList.append(new Fragment({ 'name':'qq-online', 'html':qqOnlineStr, 'data':{'qq':' 3536323013', 'style':3, 'title':'在线客服', 'text':''}, 'css':{'margin':'.5em 0'} })); fragmentList.append(new Fragment({ 'name':'separator', 'css':{'height':'2px', 'background-color':'#a0a0a0'} })); fragmentList.append(new Fragment({ 'name': 'text', 'html': '
工作时间
', 'css':{'margin':'.5em 0'} })); fragmentList.append(new Fragment({ 'name': 'text', 'html': '
周一至周六 :8:30-17:30
', 'css':{'margin':'.5em 0'} })); fragmentList.append(new Fragment({ 'name':'separator', 'css':{'height':'2px', 'background-color':'#a0a0a0'} })); fragmentList.append(new Fragment({ 'name': 'text', 'html': '
联系方式
', 'css':{'margin':'.5em 0'} })); fragmentList.append(new Fragment({ 'name': 'text', 'html': '
手机: 15308086751
', 'css':{'margin':'.5em 0'} })); fragmentList.append(new Fragment({ 'name': 'text', 'html': '
电话:028-82553443
', 'css':{'margin':'.5em 0'} })); fragmentList.append(new Fragment({ 'name': 'text', 'html': '
微信: 15308086751
', 'css':{'margin':'.5em 0'} })); fragmentList.append(new Fragment({ 'name': 'text', 'html': '
QQ:3536323013
', 'css':{'margin':'.5em 0'} })); fragmentList.append(new Fragment({ 'name': 'text', 'html': '
邮箱:cdtfhb@163.com
', 'css':{'margin':'.5em 0'} })); fragmentList.append(new Fragment({ 'name': 'text', 'html': '
扫二维码,加微信
', 'css':{'margin':'.5em 0'} })); fragmentList.append(new Fragment({ 'name': 'image', 'html': '
图片
', 'css':{'margin':'.5em 0', 'text-align':'center'} })); // 添加到边栏 var list = fragmentList.get(); !list.children().length && list.html('

内容列表为空!

'); sidebar.append(list); if(typeof($("img").lazyload)=="function"){ $("img").lazyload({effect: "fadeIn",threshold:0,failure_limit:20,skip_invisible:false}); } }); //=== viewid:qqol_style_01_1577418166707 ===// // 对输入内容中的尖括号、引号等进行转义 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:newsDetail_style_01_1506318095542,newsDetail_style_01_1484042049466 ===// // var content_div = ''; // var show_div = ''; // var flag=""; // var lang=""; // var show_style=""; // var page_length = ""; var content_length = 0; var page_num = 1; var start_flag = 0; var end_flag = 0; var content_arr = ''; // var total_lenth = 0; // var page_count = 0; function getPage(hideNewsContent) { if(flag == 2){ var content = $(hideNewsContent).html(); content_arr = content.split(/]*>/); page_count = content_arr.length; } else{ total_lenth = $(hideNewsContent).text().trim().length; page_count = Math.ceil(total_lenth / page_length); content_arr = $(hideNewsContent).html(); } $(hideNewsContent).empty(); } function goto(page,newsText,view_id,obj='', showAllText = '') { if(obj && !newsText && !view_id){ view_id = $(obj).parents('.newsDetail').attr("id"); newsText = '#'+view_id+' .newsText.contSet'; } if(page != -1 && !is_login && need_check_login == 1){ checkLogin(); } if(page == -1 || is_login || need_check_login == 0){ content_length = 0; start_flag = 0; end_flag = 0; if(page < 1) page_num = 1; else if(page > page_count) page_num = page_count; else page_num = page; if(flag == 1){ $(newsText).html(content_arr); getChildren(newsText); } else{ $(newsText).html(content_arr[page_num - 1]); } pagebutton(newsText, view_id, showAllText); if(page != -1){ location.href = newsText; } setDivHeight(newsText) } } function getChildren(el) { var child = $(el).children(); if(child.length > 0){ child.each(function () { if(end_flag == 1) return false; content += $(this).contents().filter(function() { return this.nodeType === 3; }).text(); content_length += $(this).contents().filter(function() { return this.nodeType === 3; }).text().length; //获取上一页结尾 if(start_flag == 0 && content_length >= (page_num - 1) * page_length){ var parents = $(this).parentsUntil(el); start_flag = 1; var need_length = content_length - ((page_num - 1) * page_length); //将当前页开头到上一页结尾为止多出来的内容去掉 if(need_length > 0){ var now_html = $(this).html(); var now_text_length = $(this).contents().filter(function() { return this.nodeType === 3; }).text().length; now_html = now_html.substring(now_text_length - need_length, now_html.length); $(this).html(now_html); } parents.each(function () { $(this).prevAll().remove(); }); } //获取当前页结尾 if(content_length >= page_num * page_length){ var parents = $(this).parentsUntil(el); var need_length = content_length - (page_num * page_length); if(need_length == 0){ parents.each(function () { $(this).nextAll().remove(); }); } else{ var now_text = $(this).contents().filter(function() { return this.nodeType === 3; }).text(); var need_text = now_text.substring(0, now_text.length - need_length); $(this).text(need_text); parents.each(function () { $(this).nextAll().remove(); }); } end_flag = 1; return false; } else { var flag = getChildren(this); } }); } } function showAll() { if(need_check_login == 1){ checkLogin(); } if(is_login == true || need_check_login == 0){ $('.news_pagination').remove(); if(flag == 2){ $(show_div).html(content_arr.join('')); } else{ $(show_div).html(content_arr); } location.href = show_div; setDivHeight(show_div) } } function pagebutton(newsText,view_id, showAllText = '') { $('#'+view_id+' .news_pagination').remove(); if (!showAllText) { showAllText = '显示全部'; } var button_html = '
'; if(show_style == 1){ for(var i = 1; i <= page_count; i++){ if(i > page_count) break; if(i != page_num){ button_html += '` + i + ''; } else{ button_html += '' + i + ''; } } } else if(show_style == 2){ button_html += `'; } else { var show_button = page_count > 8 ? 8 : page_count; var button_text = 1; if(page_num > 5){ button_html += '<`; button_text = page_num - 4; } for(var i = 1; i <= show_button; i++){ if(button_text > page_count) break; if(button_text != page_num){ button_html += '` + button_text + ''; } else{ button_html += '' + button_text + ''; } button_text++; } if(page_num < page_count){ button_html += '>`; } } button_html += '' + showAllText + ''; button_html += '
'; $(newsText).after(button_html); } function checkLogin(errorText = '', loginText = '') { var serverUrl = '//' + diy_js_server + '/sysTools.php?mod=viewsConn&act=checkUserLogin&idweb=' + id_web; if (!errorText) { errorText = '亲,您必须登录了才可继续查看该文章'; } if (!loginText) { loginText = '马上登录'; } //获取数据 xhrFields解决传输cookie问题 $.ajax({ type: 'get', cache: false, dataType: 'json', async: false, url: serverUrl, xhrFields: { withCredentials: true }, crossDomain: true, success: function(result){ if(result.is_login == false){ var fun_str = is_mobile() ? 'OnLogin(' + lang +', 0, \'' + location.href + '\')' : 'OnLogin(' + lang +', 0)'; var html = '
' + '
' + '
' + errorText + ',' + '' + '
' + '
'; $('body').css({overflowY:'hidden',height:'100%'}); $('body').append(html); } else { is_login = true } } }); } function hideLogin() { $('.mustlogin').remove(); } //=== viewid:newsDetail_style_01_1484042049466 ===// //-- $(function(){ var viewid="newsDetail_style_01_1484042049466"; var sys_url="viewid=newsDetail_style_01_1484042049466&name=newsDetail&style=style_01&langid=0&pageid=1829429&viewCtrl=newsDetail&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.moreParamsnewsDetail_style_01_1484042049466; } } RequestURL(viewid,sys_url,moreParams); }); //-- //=== viewid:newsDetail_style_01_1506318095542,newsDetail_style_01_1484042049466 ===// $(function(){ $('title').html('新闻标题 - 成都生物除臭废气治理,(四川)生物除臭废气治理设备,污水池除臭,成都废气除臭设备,PP活性炭箱'); $('meta[name=keywords]').attr('content','新闻关键字'); $('meta[name=description]').attr('content','新闻简介'); }); //=== viewid:newsDetail_style_01_1484042049466 ===// detailHeightAuto("newsDetail_style_01_1484042049466", "详情加载中"); //=== viewid:newsList_style_12_1577412527881 ===// // $(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_1577412527881 ===// //-- $(function(){ var viewid="newsList_style_12_1577412527881"; var sys_url="viewid=newsList_style_12_1577412527881&name=newsList&style=style_12&langid=0&pageid=1829429&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_1577412527881; } } RequestURL(viewid,sys_url,moreParams); }); //-- //=== viewid:newsList_style_12_1577412527881 ===// $(function(){ var i=0; var timer; var lastnum = $("#newsList_style_12_1577412527881 .boxNewsListStyle_12 .leftLi").length-1; Carousel(1); $("#newsList_style_12_1577412527881 .boxNewsListStyle_12 .prevNews").click(function(){ //暂停 i退一格 再循环 clearInterval(timer); i = i == 0 ? lastnum : i - 1; Carousel(1); }) $("#newsList_style_12_1577412527881 .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_1577412527881 .boxNewsListStyle_12 .leftLi").eq(i).stop().show(); $("#newsList_style_12_1577412527881 .boxNewsListStyle_12 .newsLi").eq(i).addClass('cur_item').siblings().removeClass('cur_item'); $("#newsList_style_12_1577412527881 .boxNewsListStyle_12 .leftLi").eq(i).siblings("#newsList_style_12_1577412527881 .boxNewsListStyle_12 .leftLi").hide(); $("#newsList_style_12_1577412527881 .boxNewsListStyle_12 .newsLi").eq(i).siblings("#newsList_style_12_1577412527881 .boxNewsListStyle_12 .newsLi").css({background:''}); if(val === 1) setIntervalFun(); } }); //=== viewid:homelink_style_02_1577413185274 ===// //-- $(function(){ var viewid="homelink_style_02_1577413185274"; var sys_url="viewid=homelink_style_02_1577413185274&name=homelink&style=style_02&langid=0&pageid=1829429&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.moreParamshomelink_style_02_1577413185274; } } RequestURL(viewid,sys_url,moreParams); }); //-- //=== viewid:tab_style_03_1494486178529,productList_style_13_1546411355899,homelink_style_01_1494493401085,tab_style_03_1494493366541,productList_style_01_1577416073340,homelink_style_02_1584694103062,productList_style_23_1577410794797,homelink_style_01_1494492662704,homelink_style_02_1577413185274,productList_style_23_1577412833796 ===// //=== viewid:productList_style_23_1577412833796 ===// //-- $(function(){ var viewid="productList_style_23_1577412833796"; var sys_url="viewid=productList_style_23_1577412833796&name=productList&style=style_23&langid=0&pageid=1829429&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.moreParamsproductList_style_23_1577412833796; } } RequestURL(viewid,sys_url,moreParams); }); //-- //=== viewid:tab_style_03_1494486178529,productList_style_13_1546411355899,tab_style_03_1494493366541,productList_style_01_1577416073340,productList_style_23_1577410794797,productList_style_23_1577412833796 ===// var showSub = '0'; //=== viewid:productList_style_23_1577412833796 ===// if(typeof addcart !== 'function'){ function addcart(pid,is_virtual,idspecprice,idpackage){ var lang=0; if(lang == '0'){ lang = Default_isFT; if(BodyIsFt == '0'){ lang = BodyIsFt; }else if(BodyIsFt == '1'){ lang = BodyIsFt; } } var packStr = ''; if(typeof (idpackage) != 'undefined'){ packStr = "&idpackage="+idpackage; } if(is_mobile()){ var locationUrl = "https://manage.91zhuji.cn/exusers/u_cart.php?idweb=38439&lang="+lang+"&pid="+pid+"&act=add&ismobile=1" + packStr; if (idspecprice) locationUrl += "&IDSpecPrice["+pid+"]="+idspecprice; if (isNaN(pid)) {//如果不是数字,表示批量加入购物车 locationUrl = "https://manage.91zhuji.cn/exusers/u_cart.php?idweb=38439&lang="+lang+"&act=add&ismobile=1" + pid + (idspecprice ? idspecprice : ""); } var res = "0"; if(res == '1' && is_virtual == 0){ locationUrl+= "&use_ajax=1&callback=?"; $.getJSON(locationUrl,function(ret){ if(ret.i_AddFlag){ $.alerts.dialogClass = 'success'; alert(ret.message); } }); }else{ window.location = locationUrl; } }else{ var locationUrl = "https://manage.91zhuji.cn/exusers/u_cart.php?idweb=38439&pid="+pid+"&act=add&lang="+lang+"&ispc=1" + packStr; if (idspecprice) locationUrl += "&IDSpecPrice["+pid+"]="+idspecprice; if (isNaN(pid)) {//如果不是数字,表示批量加入购物车 locationUrl = "https://manage.91zhuji.cn/exusers/u_cart.php?idweb=38439&lang="+lang+"&act=add&ispc=1" + pid + (idspecprice ? idspecprice : ""); } document.getElementById("boxName").innerHTML="加入购物车"; if(document.getElementById("boxClose")) document.getElementById("boxClose").innerHTML="×"; document.getElementById("showiframe").src=locationUrl; box.Show({width:"840px",height:"420px"}); } } } function is_mobile(){ return window.screen.width<767 || ($('body').width() > 0 && $('body').width() < 767); } $(function(){ $('#productList_style_23_1577412833796 .prod_infos .end_time').each(function(){ purchase_clock(this);//开启倒计时 }); }); //拼购倒计时 function purchase_clock(obj) { var time = parseInt($(obj).attr('data-time')); if (time > 0) { var str = ''; var num = 0; num = parseInt(time/86400); if(num > 0)str += num.toString() + '天'; time -= num * 86400; num = parseInt(time/3600); if(num > 0)str += num.toString() + '时'; time -= num * 3600; num = parseInt(time/60); if(num > 0)str += num.toString() + '分'; time -= num * 60; if(num > 0)str += time.toString() + '秒'; $(obj).text(str).attr('data-time', parseInt($(obj).attr('data-time')) - 1); setTimeout(function(){ purchase_clock(obj); }, 1000); } else { $(obj).text('0天0时0分0秒'); } } //=== viewid:flink_style_01_1577355019490 ===//