//=== 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:banner_style_01_1494485101249,banner_style_01_1577356029829,banner_style_01_1490251356490,banner_style_02_1490233478458,banner_style_01_1495015157845 ===// //=== viewid:banner_style_01_1495015157845 ===// $(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_1495015157845 .bannerStyle_1 .awesome-font").show().siblings().hide(); }else{ $("#banner_style_01_1495015157845 .bannerStyle_1 .awesome-font").hide().siblings().show(); } } }); //=== viewid:banner_style_01_1495015157845 ===// /* * 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 = 1; $url_html[0] = ""; $('#banner_style_01_1495015157845 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_1495015157845 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_1495015157845 = []; list_banner_style_01_1495015157845.push('/userimg/38439/qrcodeimg/banner2.jpg'); var banner_banner_style_01_1495015157845; // 轮播图对象 $(function(){ // 创建轮播图 $arrHref = new Array(); banner_banner_style_01_1495015157845 = new Banner({ 'list':list_banner_style_01_1495015157845, 'view':$('#banner_style_01_1495015157845'), 'duration':parseFloat('3') * 1000, 'animation':parseFloat('0.5') * 1000 }); banner_banner_style_01_1495015157845.animateStyle = 'normal'; banner_banner_style_01_1495015157845.imgs = banner_banner_style_01_1495015157845.view.find(".bannerStyle_1 .main_image .img-list").children(".img-item"); banner_banner_style_01_1495015157845.view.find('a').each(function (i) { $(this).click(function () { if(!$(this).attr('href')) { return false; } }); }); banner_banner_style_01_1495015157845.view.find('a.picSet').each(function(i){ $arrHref[i] = $(this).attr('href'); }); // 显示指定索引的图片 banner_banner_style_01_1495015157845.showIndex(banner_banner_style_01_1495015157845.config.current); // 监听 点击圆点 banner_banner_style_01_1495015157845.config.flick.click(function(){ banner_banner_style_01_1495015157845.animateIndex($(this).index()); $('#banner_style_01_1495015157845 a.img_url').attr('href',$url_html[$(this).index()]); $i = $(this).index(); return false; }); // 监听 鼠标悬浮时 banner_banner_style_01_1495015157845.view.hover( function(){ banner_banner_style_01_1495015157845.hoverEndAnimate(); banner_banner_style_01_1495015157845.view.find(".bannerStyle_1 .btn_prev, .bannerStyle_1 .btn_next").fadeIn(); }, function(){ clearInterval(intervaltimer); banner_banner_style_01_1495015157845.config.timer = setTimeout(function(){ banner_banner_style_01_1495015157845.startAnimateRight(); },banner_banner_style_01_1495015157845.config.duration); banner_banner_style_01_1495015157845.view.find(".bannerStyle_1 .btn_prev, .bannerStyle_1 .btn_next").fadeOut() } ); // 监听 点击左右按钮 banner_banner_style_01_1495015157845.view.find(".btn_prev").click(function() { banner_banner_style_01_1495015157845.startAnimateLeft(); }); banner_banner_style_01_1495015157845.view.find(".btn_next").click(function() { banner_banner_style_01_1495015157845.startAnimateRight(); }); // 监听 触摸事件 var touchVal = null; document.addEventListener("touchstart", function(e){ if($(e.target).is(banner_banner_style_01_1495015157845.view) || $(e.target).closest("#"+banner_banner_style_01_1495015157845.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_1495015157845.startAnimateLeft(); // 触摸生效 if (e.preventDefault) { e.preventDefault(); } else { e.returnvalue = false; } }else if(touchVal.moveX < -30){ banner_banner_style_01_1495015157845.startAnimateRight(); // 触摸生效 if (e.preventDefault) { e.preventDefault(); } else { e.returnvalue = false; } } } touchVal = null; }, false); // 运行 banner_banner_style_01_1495015157845.config.timer = setTimeout(function(){ banner_banner_style_01_1495015157845.startAnimateRight(); }, banner_banner_style_01_1495015157845.config.duration); }); //=== viewid:prodPic_style_02_1482461252881 ===// if (typeof change_prod_spec_img_style_02 != "function") { function change_prod_spec_img_style_02(spec_img) { var view_id2 = $('.style_02.prodPic').attr('id'); window.clearInterval(window.timer); // 电脑端 var first_li = $('.style_02.prodPic .diy_moreImg .diyproImgBox ul'); var proImgBox = $('.style_02.prodPic .diy_moreImg .diyproImgBox'); var img_str = $('.style_02.prodPic .diy_proImg #CurShowProImg'); if (first_li.length > 0) { if (typeof spec_img == "string") spec_img = spec_img.split(','); proImgBox.empty(); var temp_str = ''; proImgBox.append(temp_str); } else { img_str.attr('src',spec_img); img_str.attr('rel',spec_img); } setTimeout(function(){ if($('#'+view_id2+' .diy_qbox li').length>4){ $('#'+view_id2+' #spec-list').jdMarquee({ deriction: 'left', height: 78, step: 1, speed: 4, delay: 5, control: true, _front: '#spec-right', _back: '#spec-left', }); } },50); $('#'+view_id2+' #CurShowProImg').imagezoom({xzoom: $('#'+view_id2+' #diyProBox').width(), yzoom: $('#'+view_id2+' #diyProBox').height()}); // 手机端 var mfirst_li = $('.style_02.prodPic .diyproImgBox_moblie .main_image ul'); if (mfirst_li) { var flicking_con = $('.style_02.prodPic .diyproImgBox_moblie .flicking_con'); if (typeof spec_img == "string")spec_img = spec_img.split(','); mfirst_li.empty(); flicking_con.empty(); $.each(spec_img, function (i) { mfirst_li.append("
  • "); flicking_con.append(''+i+''); }); } var mfirst_main = $('.style_02.prodPic .diyproImgBox_moblie .main_image').clone(); $('.style_02.prodPic .diyproImgBox_moblie .main_image').empty(); $('.style_02.prodPic .diyproImgBox_moblie .main_image').append(mfirst_main.html()); $('.style_02.prodPic').each(function () { var view_id = $(this).attr('id'); var name_str = view_id+'startProdPic();'; eval(name_str); }); } } //=== viewid:prodPic_style_02_1482461252881 ===// //-- $(function(){ var viewid="prodPic_style_02_1482461252881"; var sys_url="viewid=prodPic_style_02_1482461252881&name=prodPic&style=style_02&langid=0&pageid=1829427&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.moreParamsprodPic_style_02_1482461252881; } } RequestURL(viewid,sys_url,moreParams); }); //-- //=== viewid:prodPic_style_02_1482461252881 ===// if (typeof change_prod_spec_img != "function") { function change_prod_spec_img(spec_img) { if (spec_img) { if (typeof change_prod_spec_img_style_01 == "function") { change_prod_spec_img_style_01(spec_img); } if (typeof change_prod_spec_img_style_02 == "function") { change_prod_spec_img_style_02(spec_img); } if (typeof change_prod_spec_img_style_03 == "function") { change_prod_spec_img_style_03(spec_img); } if (typeof change_prod_spec_img_style_04 == "function") { change_prod_spec_img_style_04(spec_img); } } } } //=== viewid:prodInfor_style_01_1482460665817 ===// var SpecDebug = false; /** * @Content:获取某个区域(div id="#spec_{s_Hash}")所选择的各个规格所选中的 * @Author:zhaogh * @Version:10.0.0 * @Param:s_Hash varchar 区域特征 * @Return:[{DataIndex:0,DataVal:'#FFFFF'}] */ $.ajaxSetup({ cache: false }); function SpecCurSelect(s_Hash){ var arrReturn = []; var curArea = $("#spec_"+s_Hash); $(".sys_item_spec .sys_item_specpara",curArea).each(function(){ $("li",$(this)).each(function(){ if($(this).hasClass('selected')){ var curData = { 'DataIndex' : $(this).data('index'), 'DataVal' : $(this).data('aid'), }; arrReturn.push(curData); } }); }); return arrReturn; } function SpecGetAttrPrice(s_Hash,is_int){//是否取整 if(typeof(is_int)=="undefined") var is_int = 0; var curArea = $("#spec_"+s_Hash); var defaultstats=true; var _val=''; var _resp={ mktprice:".sys_item_mktprice", price:".sys_item_price" } $(".sys_item_spec .sys_item_specpara",curArea).each(function(){ var i=$(this); var v=i.attr("data-attrval"); if(!v){ defaultstats=false; }else{ _val+=_val!=""?"_":""; _val+=v; } }); var curResult = {}; if(!!defaultstats){ if (!sys_item.hasOwnProperty('sys_attrprice') || !sys_item['sys_attrprice'].hasOwnProperty(s_Hash) || !sys_item['sys_attrprice'][s_Hash].hasOwnProperty(_val)) { return false; } var curResult = sys_item['sys_attrprice'][s_Hash][_val]; _price = curResult['price']; var backprice = _price; //_price = sys_item['sys_attrprice'][s_Hash][_val]['price']; SpecIDSpecPriceSet(s_Hash,sys_item['sys_attrprice'][s_Hash][_val]['IDSpecPrice']); SpecIDSpecStockSet(s_Hash,sys_item['sys_attrnum'][s_Hash][_val]['num']); if(sys_item['sys_attrnum'][s_Hash][_val]['num']>0){//不是不限库存的 var curNum = parseInt($("#"+s_Hash+"_ProdNum").val()); if(!curNum || curNum<1)curNum = 1; var diffNum = sys_item['sys_attrnum'][s_Hash][_val]['num']-sys_item['sys_attrnum'][s_Hash][_val]['nums']; $("#"+s_Hash+"_ProdNum").attr('data-maxnum',diffNum); CheckStock(s_Hash); } //更改图片 if (typeof change_prod_spec_img == "function") change_prod_spec_img(sys_item['sys_attrprice'][s_Hash][_val]['spec_img']); }else{ var curResult = false; var allNum = 0; $.each(sys_item['sys_attrnum'][s_Hash],function(i,item){ allNum = allNum+parseInt(item.num); }); SpecIDSpecStockSet(s_Hash,allNum); //var curResult = sys_item['price'][s_Hash]; //_price = curResult['price']; //_mktprice = sys_item['mktprice']; _price = sys_item['price'][s_Hash]; var backprice = _price; } _price = price_format(_price); //输出价格 var newPriceObj = $("#"+sys_item['price_id'][s_Hash]['HTMLPriceNewID']); if(newPriceObj){ if(is_int==1){ if(typeof(_price)=='string') _price = _price.replace(/,/g, ""); _price = parseFloat(_price); _price = Math.round(_price); } newPriceObj.text(_price); } if (sys_item['price_id'][s_Hash]['HTMLPriceOldID']) var oldPriceObj = $("#"+sys_item['price_id'][s_Hash]['HTMLPriceOldID']); if(oldPriceObj){ if(is_int==1){ var oldprice = sys_item['price_old'][s_Hash]; if(typeof(oldprice)=='string') sys_item['price_old'][s_Hash] = oldprice.replace(/,/g, ""); sys_item['price_old'][s_Hash] = parseFloat(sys_item['price_old'][s_Hash]); sys_item['price_old'][s_Hash] = Math.round(sys_item['price_old'][s_Hash]); } oldPriceObj.text(sys_item['price_old'][s_Hash]); } var packagePriceObj = $("#"+sys_item['price_id'][s_Hash]['HTMLPricePID']); if(packagePriceObj && curResult){ var resPrice = 0; var resPriceFormat = 0.00; if(curResult['price']) { resPrice = curResult['price']; resPriceFormat = curResult['price_format']; $(".packageTips").css("display","none"); } if (curResult['mprice']){ resPrice = curResult['mprice']; resPriceFormat = curResult['mprice_format']; $(".packageTips").css("display","none"); } if(curResult['PackagePrice']) { resPrice = curResult['PackagePrice']; resPriceFormat = curResult['PackagePrice_format']; $(".packageTips").css("display","block"); } if(resPrice){ if(is_int==1){ if(typeof(resPrice)=='string') resPrice = resPrice.replace(/,/g, ""); resPrice = parseFloat(resPrice); resPrice = Math.round(resPrice);//是否取整 packagePriceObj.text(resPrice); } else{ packagePriceObj.text(resPriceFormat); } }else{ packagePriceObj.text("无"); } } // var memberPriceObj = $("#"+sys_item['price_id'][s_Hash]['HTMLPriceMID']); // if(memberPriceObj && curResult && curResult["mprice"]){ // if(curResult['mprice']){ // if(is_int==1){ // var mprice = curResult['mprice']; // if(typeof(mprice)=='string') curResult['mprice'] = mprice.replace(/,/g, ""); // curResult['mprice'] = parseFloat(curResult['mprice']); // curResult['mprice'] = Math.round(curResult['mprice']);//是否取整 // } // curResult['mprice'] = price_format(curResult['mprice']); // // memberPriceObj.text(curResult['mprice']); // }else{ // memberPriceObj.text("无"); // } // } // // //上面那个mprice有什么用的,俊杰看看,我先重写一个让多规格能够正常使用先 by zhaobin // // var PriceObj = $("#"+sys_item['price_id'][s_Hash]['HTMLPricePID']); // if(PriceObj && curResult && curResult["price"] && !curResult['PackagePrice']){ // if(curResult['price']){ // if(is_int==1) { // var price = curResult['price']; // if(typeof(price)=='string') curResult['price'] = price.replace(/,/g, ""); // // curResult['price'] = parseFloat(curResult['price']); // curResult['price'] = Math.round(curResult['price']);//是否取整 // } // // curResult['price'] = price_format(curResult['price']); // // PriceObj.text(curResult['price']); // }else{ // PriceObj.text("无"); // } // } } function CheckStock(s_Hash){ var prodnumObj = $("#"+s_Hash+"_ProdNum"); var curNum = parseInt(prodnumObj.val()); var maxNum = parseInt(prodnumObj.data('maxnum')); if(!curNum || curNum<1)curNum = 1; var tipStr = ''; if(lang == 2){ tipStr = 'INV:'; }else if(lang == 0 || lang == 1){ tipStr = '剩余库存:'; }else{ tipStr = remaining_inventory+':'; //return; } if(maxNum 0 && $('body').width() < 767); } function Pt_AddCart(Pt_ID){ var s_PtCartUrl = "https://manage.91zhuji.cn//diyTools/?mod=ptCart&idweb=38439&Pt_ID="+Pt_ID+"&lang="; if(is_mobile()) window.location = s_PtCartUrl+"&ismobile=1"; else{ document.getElementById("boxName").innerHTML = "购物车"; if(document.getElementById("boxClose"))document.getElementById("boxClose").innserHTML = "关闭"; document.getElementById("showiframe").src = s_PtCartUrl+"&ismobile=0"; box.Show({width:"900px",height:"500px"}); } } if(typeof ModProdNum ==='undefined'){ function ModProdNum(curHash,i_ActionType){ i_ActionType = i_ActionType==2?2:1; var obj_ProdNum = $("#"+curHash+"_ProdNum"); var obj_ProdNum1 = $("#prodInfor_style_01_1482460665817 .mobile_prodnum"); var i_NewNum = obj_ProdNum.val(); i_NewNum = parseInt(i_NewNum); if(i_ActionType==1){ i_NewNum-= 1; if(i_NewNum<1)i_NewNum = 1; }else{ i_NewNum+= 1; } obj_ProdNum.val(i_NewNum); obj_ProdNum1.val(i_NewNum); // CheckStock(curHash); } } function onAddcart() { addcart('0',38439,0,"manage.91zhuji.cn"); } if(is_mobile()){ $('#prodInfor_style_01_1482460665817 .probuy_1 input:nth-child(2)').attr('onclick','').unbind('click').click(onAddcart); } var dispatching = $("#prodInfor_style_01_1482460665817 .proInfoStyle01 .diy_farebox select").attr("value") var shopCartBaseUrl = "https://manage.91zhuji.cn/exusers/u_cart.php?idweb=38439&idpackage=0"+"&dispatching="+dispatching; if(typeof ProdDetailAddCart === 'undefined'){ function ProdDetailAddCart(s_Hash,i_IDProduct,i_GoBuy,Allspec,view_ID){ if(typeof Allspec=="undefined") Allspec=0; var i_ProdNum = $(view_ID+" input[id $= 'ProdNum']").val(); // alert(i_ProdNum); var pid = i_IDProduct; lang=0; if(lang == '0'){ lang = Default_isFT; if(BodyIsFt == '0'){ lang = BodyIsFt; }else if(BodyIsFt == '1'){ lang = BodyIsFt; } } i_ProdNum = parseInt(i_ProdNum); if(!i_ProdNum || i_ProdNum<1) i_ProdNum = 1; i_GoBuy = parseInt(i_GoBuy); i_GoBuy = i_GoBuy==1?1:0; var i_IDSpecPrice = $(view_ID+" input[id ^= 'IDSpecPrice']").val(); i_IDSpecPrice = parseInt(i_IDSpecPrice); if(i_IDSpecPrice==0){ alert("请选择产品规格"); return; } var shopCartUrl = shopCartBaseUrl; shopCartUrl+= "&lang="+lang; shopCartUrl+= "&act=add"; shopCartUrl+= "&pid="+i_IDProduct; shopCartUrl+= "&num="+i_ProdNum; if(!isNaN(i_IDSpecPrice) && i_IDSpecPrice>0){ shopCartUrl+= "&IDSpecPrice["+i_IDProduct+"]="+i_IDSpecPrice; } shopCartUrl+= "&GoBuy="+i_GoBuy; shopCartUrl+= "&ismobile="+(is_mobile()?1:0); var issafariBrowser = /Safari/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent); if(is_mobile() || issafariBrowser){ var res = "0"; var is_virtual = ""; if(res == '1' && is_virtual == 0){ //不弹出购物车 shopCartUrl+= "&use_ajax=1&callback=?"; $.getJSON(shopCartUrl,function(ret){ if(ret.i_AddFlag){ $.alerts.dialogClass = 'success'; alert(ret.message); } }); }else{ window.location = shopCartUrl;//有很多大客户需求的,不要随意开启这个或者关闭上面那个 2017/5/31 } }else{ document.getElementById("boxName").innerHTML="加入购物车"; if(document.getElementById("boxClose")) document.getElementById("boxClose").innerHTML="×"; document.getElementById("showiframe").src = shopCartUrl; box.Show({width:"880px",height:"500px"}); } } function prodShowIntent(id,pid,lang){ var boxName = ""; var boxTitle = ""; var boxbotton = ""; var notMustUsername = "0"; var notMustContact = "0"; var notMustAbout = "0"; if(typeof lang=='undefined') lang=0; if(lang == '0'){ lang = Default_isFT if(BodyIsFt == '0'){ lang = BodyIsFt; }else if(BodyIsFt == '1'){ lang = BodyIsFt; } } var prodIntentUrl = 'https://manage.91zhuji.cn/product/proshowintent.php?id='+id+'&pid='+pid+'&lang='+lang+'&boxName='+boxName+'&boxTitle='+boxTitle+'&boxbotton='+boxbotton+'¬MustUsername='+notMustUsername+'¬MustContact='+notMustContact+'¬MustAbout='+notMustAbout+'&idweb=38439'; if(is_mobile()){ window.location = prodIntentUrl+'&ismobile=1'; }else{ document.getElementById("boxName").innerHTML="产品意向单"; if(document.getElementById("boxClose")) document.getElementById("boxClose").innerHTML="×"; document.getElementById("showiframe").src = prodIntentUrl; box.Show({width:"450px",height:"350px"}); } } function checkExuser(cb) { $.ajax({ type : "GET", dataType : 'jsonp', jsonp:"jsoncallback", url : "https://manage.91zhuji.cn/exusers/ajax/check_exuser.php?idweb=38439", data : '', success:function(data){ if (data.code == 200) { if (typeof cb == 'function') { cb(data['data']); } }else{ alert("请先登录"); } }, error:function(){ console.log('error'); } }); } } if(typeof Pt_AddCart !== 'function'){ function Pt_AddCart(Pt_ID){ var s_PtCartUrl = "https://manage.91zhuji.cn//diyTools/?mod=ptCart&idweb=38439&Pt_ID="+Pt_ID+"{shareOrd}&lang=0"; if(is_mobile()){ window.location = s_PtCartUrl+"ismobile=1"; }else{ document.getElementById("boxName").innerHTML = "加入购物车"; if(document.getElementById("boxClose"))document.getElementById("boxClose").innserHTML = "×"; document.getElementById("showiframe").src = s_PtCartUrl; box.Show({width:"900px",height:"500px"}); } } } if(typeof Group_AddCart !== 'function'){ function Group_AddCart(i_IDProduct,i_IDPackage,isTrade,i_GoBuy,view_ID){ lang=0; if(lang == '0'){ lang = Default_isFT if(BodyIsFt == '0'){ lang = BodyIsFt; }else if(BodyIsFt == '1'){ lang = BodyIsFt; } } var dispatching = $(view_ID+" .proInfoStyle01 .diy_farebox select").attr("value") var i_ProdNum = $(view_ID+" input[id $= 'ProdNum']").val(); i_ProdNum = parseInt(i_ProdNum); var isTrade = parseInt(isTrade); isTrade = (isNaN(isTrade) || isTrade<1) ? 0:isTrade; i_GoBuy = parseInt(i_GoBuy); i_GoBuy = i_GoBuy==1?1:0; var s_ShopCartUrl = "https://manage.91zhuji.cn/exusers/u_cart.php?idweb=38439&pid="+i_IDProduct+"&num="+i_ProdNum+"&idpackage="+i_IDPackage+"&act=add&lang="+lang+"&dispatching="+dispatching; var i_IDSpecPrice = $(view_ID+" input[id ^= 'IDSpecPrice']").val(); i_IDSpecPrice = parseInt(i_IDSpecPrice); if(i_IDSpecPrice==0){ alert("请选择产品规格"); return; } if(!isNaN(i_IDSpecPrice) && i_IDSpecPrice>0){ s_ShopCartUrl+= "&IDSpecPrice["+i_IDProduct+"]="+i_IDSpecPrice; } s_ShopCartUrl+= "&GoBuy="+i_GoBuy; // console.log(s_ShopCartUrl); //兼容苹果浏览器safaricookie,session问题 var issafariBrowser = /Safari/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent); if(is_mobile() || issafariBrowser){ window.location = s_ShopCartUrl+"&ismobile=1"+"&dispatching="+dispatching; }else{ document.getElementById("boxName").innerHTML = "立即购买"; if(document.getElementById("boxClose"))document.getElementById("boxClose").innserHTML = "×"; if(isTrade==0){ document.getElementById("showiframe").src = s_ShopCartUrl+"&dispatching="+dispatching; box.Show({width:"900px",height:"500px"}); }else{ document.getElementById("showiframe").src = "https://manage.91zhuji.cn/product/iframe_product.php?pid="+i_IDProduct+"&wid=38439&lang="+lang+"&idpackage="+i_IDPackage+"&dispatching="+dispatching; box.Show({width:"800px",height:"420px"}); } } } } if(typeof addcart !== 'function'){ function addcart(pid,idweb,lang,jsbbxserver){ var dispatching = $("#prodInfor_style_01_1482460665817 .proInfoStyle01 .diy_farebox select").attr("value") var i_ProdNum = $("#32bdf6e19b680b75c606d7b79359653b_ProdNum").val(); if(is_mobile()){ var locationUrl = "https://"+jsbbxserver+"/exusers/u_cart.php?idweb="+idweb+"&lang="+lang+"&pid="+pid+"&act=add&ismobile=1&num="+i_ProdNum+"&dispatching="+dispatching ; window.location = locationUrl; }else{ document.getElementById("boxName").innerHTML="加入购物车"; if(document.getElementById("boxClose")) document.getElementById("boxClose").innerHTML="×"; document.getElementById("showiframe").src="https://"+jsbbxserver+"/exusers/u_cart.php?idweb="+idweb+"&pid="+pid+"&act=add&lang="+lang+"&ispc=1"+"&dispatching="+dispatching; box.Show({width:"920px",height:"500px"}); } } } function getThisId(lang,Default_isFT) { if(typeof lang=='undefined') lang=0; if(lang == '0'){ lang = Default_isFT if(BodyIsFt == '0'){ lang = BodyIsFt; }else if(BodyIsFt == '1'){ lang = BodyIsFt; } } return lang; } if(typeof InteScore_AddCart !== 'function'){ function InteScore_AddCart(url){ lang = getThisId(lang,Default_isFT); var s_InteScoreUrl = "https://manage.91zhuji.cn/"+url+""; if(is_mobile()){ window.location = s_InteScoreUrl+"&ismobile=1&lang=" + lang; }else{ document.getElementById("boxName").innerHTML = "积分兑换"; if(document.getElementById("boxClose"))document.getElementById("boxClose").innserHTML = "×"; document.getElementById("showiframe").src = s_InteScoreUrl + "&lang=" + lang; box.Show({width:"900px",height:"500px"}); } } } function BuyPurchase(gid,head_lid) { if (!head_lid) head_lid = 0; var i_IDSpecPrice = $("#IDSpecPrice_32bdf6e19b680b75c606d7b79359653b").val(); if(i_IDSpecPrice == 0){ alert('请选择规格!'); return; } var i_ProdNum = $("#32bdf6e19b680b75c606d7b79359653b_ProdNum").val(); i_ProdNum = parseInt(i_ProdNum); var url = "gid="+gid+"&head_lid="+head_lid+"&spec_id="+i_IDSpecPrice+"&buy_num="+i_ProdNum; if(is_mobile()){ window.location.href="https://manage.91zhuji.cn/exusers/purchase_checkout.php?isCenter=1&"+url; }else{ document.getElementById("boxName").innerHTML="我要开团 - 拼购活动"; if(document.getElementById("boxClose")) document.getElementById("boxClose").innerHTML="×"; document.getElementById("showiframe").src="https://manage.91zhuji.cn/exusers/purchase_checkout.php?isCenter=1&"+url; box.Show({width:"920px",height:"500px"}); } } //=== viewid:customDetail_style_prodDetail_02_1482461270622 ===// //-- $(function(){ var viewid="customDetail_style_prodDetail_02_1482461270622"; var sys_url="viewid=customDetail_style_prodDetail_02_1482461270622&name=customDetail&style=style_prodDetail_03&langid=0&pageid=1829427&viewCtrl=prodDetail&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.moreParamscustomDetail_style_prodDetail_02_1482461270622; } } RequestURL(viewid,sys_url,moreParams); }); //-- //=== viewid:customDetail_style_prodDetail_02_1482461270622 ===// $('#customDetail_style_prodDetail_02_1482461270622 .proListShow .listLi').addClass("modSet"); detailHeightAuto("customDetail_style_prodDetail_02_1482461270622", "详情加载中"); setTimeout(function(){ $("#customDetail_style_prodDetail_02_1482461270622 .proListShow .listUl").css("display","flex"); },800); //=== viewid:customDetail_style_prodDetail_02_1482461270622 ===// loadExtentFile('http://manage.91zhuji.cn/js/jquery.tabs.js','js'); loadExtentFile('http://manage.91zhuji.cn/js/prodinfoV9.js','js'); loadExtentFile('http://manage.91zhuji.cn/js/jquery.commentImg.js','js'); var ajaxServer = 'http://manage.91zhuji.cn'; var upPicServer = 'http://img.nicebox.cn'; var curIDWebSite = 38439; //=== viewid:customDetail_style_prodDetail_02_1482461270622 ===// $(function () { if(isMobile()){ $(".mobileAbout").css("display","block"); $(".pcAbout").remove(); }else{ $(".mobileAbout").remove(); $(".pcAbout").css("display","block"); } function isMobile() { var userAgentInfo = navigator.userAgent; var mobileAgents = [ "Android", "iPhone", "SymbianOS", "Windows Phone", "iPad","iPod"]; var mobile_flag = false; 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:customDetail_style_prodDetail_02_1482461270622 ===// if(typeof is_mobile ==='undefined'){ function is_mobile(){ return window.screen.width<767 || ($('body').width() > 0 && $('body').width() < 767); } } function joinPurchaseTeam(head_lid=0) { if(is_mobile()){ window.location.href="https://manage.91zhuji.cn/exusers/purchase_orderdetail.php?isCenter=1&lid="+head_lid; }else{ document.getElementById("boxName").innerHTML="我要参团 - 拼购活动"; if(document.getElementById("boxClose")) document.getElementById("boxClose").innerHTML="×"; document.getElementById("showiframe").src="https://manage.91zhuji.cn/exusers/purchase_orderdetail.php?isCenter=1&lid="+head_lid; box.Show({width:"920px",height:"500px"}); } } //=== viewid:productList_style_01_1577416073340 ===// //-- $(function(){ var viewid="productList_style_01_1577416073340"; var sys_url="viewid=productList_style_01_1577416073340&name=productList&style=style_01&langid=0&pageid=1829427&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_01_1577416073340; } } 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 ===// var showSub = '0'; //=== 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 ===// //=== viewid:productList_style_01_1577416073340 ===// 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_01_1577416073340 .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:homelink_style_02_1584694103062 ===// //-- $(function(){ var viewid="homelink_style_02_1584694103062"; var sys_url="viewid=homelink_style_02_1584694103062&name=homelink&style=style_02&langid=0&pageid=1829427&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_1584694103062; } } RequestURL(viewid,sys_url,moreParams); }); //-- //=== viewid:productList_style_23_1577410794797 ===// var sys_url_productList_style_23_1577410794797="viewid=productList_style_23_1577410794797&name=productList&style=style_23&langid=0&pageid=1829427&viewCtrl=default"; //=== viewid:productList_style_23_1577410794797 ===// //-- $(function(){ var viewid="productList_style_23_1577410794797"; var sys_url="viewid=productList_style_23_1577410794797&name=productList&style=style_23&langid=0&pageid=1829427&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_1577410794797; } } RequestURL(viewid,sys_url,moreParams); }); //-- //=== viewid:productList_style_23_1577410794797 ===// 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_1577410794797 .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 ===//