//=== 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,video_style_02_1699926344214 ===// $(document).ready(function(){ }); //=== viewid:prodPic_style_01_1484293009450 ===// if (typeof change_prod_spec_img_style_01 != "function") { function change_prod_spec_img_style_01(spec_img) { $('.style_01.prodPic').each(function () { var first_li = $(this).find('.main_visual .main_image ul'); if (first_li) { if (typeof spec_img == "string") spec_img = spec_img.split(','); first_li.empty(); $.each(spec_img, function (i) { first_li.append("
  • "); }); } $(this).find(".bannerStyle_1 .main_image ul").children("li").eq(0).css({"display":"block","float":"none","left":"0%","top":"0px","position":"absolute"}).siblings("li").css({"display":"block","float":"none","left":"100%","top":"0px","position":"absolute"}); var view_id = $(this).attr('id'); console.log('view_id::',view_id); var name_str = view_id+'newAnimiIn();'; eval(name_str); }); } } //=== viewid:prodPic_style_01_1484293009450 ===// //-- $(function(){ var viewid="prodPic_style_01_1484293009450"; var sys_url="viewid=prodPic_style_01_1484293009450&name=prodPic&style=style_01&langid=0&pageid=556853&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_01_1484293009450; } } RequestURL(viewid,sys_url,moreParams); }); //-- //=== viewid:prodPic_style_01_1484293009450 ===// 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:prodPic_style_01_1484293009450 ===// var timeoutObjprodPic_style_01_1484293009450=null;/*定义计时器*/ var nowItemprodPic_style_01_1484293009450=0;/*当前的*/ var timeSetprodPic_style_01_1484293009450=parseFloat('3')*1000; var timeAnimiprodPic_style_01_1484293009450=parseFloat('0.5')*1000; var objprodPic_style_01_1484293009450=$("#prodPic_style_01_1484293009450"); var hasVideoprodPic_style_01_1484293009450 = false; var FileExtend0prodPic_style_01_1484293009450 = getFileExtend('/sysTools/Model/views/prodPic/style_01/v9Res/img.jpg'); FileExtend0prodPic_style_01_1484293009450 = FileExtend0prodPic_style_01_1484293009450.split('?')[0]; hasVideoprodPic_style_01_1484293009450 = (['mp4','m4v','mov','webmv','ogv','flv'].indexOf(FileExtend0prodPic_style_01_1484293009450)>-1); var fatherprodPic_style_01_1484293009450=objprodPic_style_01_1484293009450.find(".bannerStyle_1 .main_image ul"); var UlenprodPic_style_01_1484293009450 = fatherprodPic_style_01_1484293009450.children("li").length; // 默认开始轮播 setTimeout(function(){ prodPic_style_01_1484293009450startProdPic(); timeoutObjprodPic_style_01_1484293009450=setTimeout(function(){ animiInprodPic_style_01_1484293009450(animiInprodPic_style_01_1484293009450); },timeSetprodPic_style_01_1484293009450); },50); // 多规格切换轮播 function prodPic_style_01_1484293009450newAnimiIn(){ clearTimeout(timeoutObjprodPic_style_01_1484293009450); nowItemprodPic_style_01_1484293009450=0; timeoutObjprodPic_style_01_1484293009450=setTimeout(function(){ animiInprodPic_style_01_1484293009450(animiInprodPic_style_01_1484293009450); },timeSetprodPic_style_01_1484293009450); } function prodPic_style_01_1484293009450startProdPic(){ nowItemprodPic_style_01_1484293009450=0;/*当前的*/ timeSetprodPic_style_01_1484293009450=parseFloat('3')*1000; timeAnimiprodPic_style_01_1484293009450=parseFloat('0.5')*1000; objprodPic_style_01_1484293009450=$("#prodPic_style_01_1484293009450"); hasVideoprodPic_style_01_1484293009450 = false; FileExtend0prodPic_style_01_1484293009450 = getFileExtend('/sysTools/Model/views/prodPic/style_01/v9Res/img.jpg'); FileExtend0prodPic_style_01_1484293009450 = FileExtend0prodPic_style_01_1484293009450.split('?')[0]; hasVideoprodPic_style_01_1484293009450 = (['mp4','m4v','mov','webmv','ogv','flv'].indexOf(FileExtend0prodPic_style_01_1484293009450)>-1); if(objprodPic_style_01_1484293009450&&objprodPic_style_01_1484293009450.length>0){ /*初始化参数*/ fatherprodPic_style_01_1484293009450=objprodPic_style_01_1484293009450.find(".bannerStyle_1 .main_image ul"); UlenprodPic_style_01_1484293009450 = fatherprodPic_style_01_1484293009450.children("li").length; /*初始化视图*/ fatherprodPic_style_01_1484293009450.children("li").eq(nowItemprodPic_style_01_1484293009450).css({"display":"block","float":"none","left":"0%","top":"0px","position":"absolute"}).siblings("li").css({"display":"block","float":"none","left":"100%","top":"0px","position":"absolute"}); objprodPic_style_01_1484293009450.find(".bannerStyle_1 .flicking_con").children("a").eq(0).addClass("on").siblings().removeClass("on"); objprodPic_style_01_1484293009450.find(".bannerStyle_1 .flicking_con").children("a").click(function(){ UlenprodPic_style_01_1484293009450 = fatherprodPic_style_01_1484293009450.children("li").length; if(UlenprodPic_style_01_1484293009450>1 && $(this).index() != nowItemprodPic_style_01_1484293009450){ var now=nowItemprodPic_style_01_1484293009450; var next=$(this).index(); objprodPic_style_01_1484293009450.find(".bannerStyle_1 .flicking_con").children("a").eq(next).addClass("on").siblings().removeClass("on"); fatherprodPic_style_01_1484293009450.children("li").eq(now).stop().animate({"left":"-100%"},timeAnimiprodPic_style_01_1484293009450,function(){ if(timeoutObjprodPic_style_01_1484293009450){ clearTimeout(timeoutObjprodPic_style_01_1484293009450); } if(typeof(callback)=="function"){ timeoutObjprodPic_style_01_1484293009450=setTimeout(function(){ if(!hasVideoprodPic_style_01_1484293009450){ callback(callback); } },timeSetprodPic_style_01_1484293009450); } }); fatherprodPic_style_01_1484293009450.children("li").eq(next).css({"left":"100%"}).stop().animate({"left":"0%"},timeAnimiprodPic_style_01_1484293009450); nowItemprodPic_style_01_1484293009450=next; } }); objprodPic_style_01_1484293009450.hover(function(){ if(timeoutObjprodPic_style_01_1484293009450){ if(!hasVideoprodPic_style_01_1484293009450){ window.clearTimeout(timeoutObjprodPic_style_01_1484293009450); } } objprodPic_style_01_1484293009450.find(".bannerStyle_1 #btn_prev, .bannerStyle_1 #btn_next").fadeIn() },function(){ timeoutObjprodPic_style_01_1484293009450=setTimeout(function(){ if(!hasVideoprodPic_style_01_1484293009450){ animiInprodPic_style_01_1484293009450(animiInprodPic_style_01_1484293009450); } },timeSetprodPic_style_01_1484293009450); objprodPic_style_01_1484293009450.find(".bannerStyle_1 #btn_prev, .bannerStyle_1 #btn_next").fadeOut() }); $("#prodPic_style_01_1484293009450 #btn_prev").click(function(){ animiOutprodPic_style_01_1484293009450(); }); $("#prodPic_style_01_1484293009450 #btn_next").click(function(){ animiInprodPic_style_01_1484293009450(); }); let touchVal=null; document.addEventListener("touchstart", function(e){ if($(e.target).is(objprodPic_style_01_1484293009450)||$(e.target).parents("#"+objprodPic_style_01_1484293009450.attr("id")).length>0){ touchVal={}; touchVal.downX=e.touches[0].clientX; if (e.preventDefault) { // e.preventDefault();//禁止默认事件,就不能上下滑动了 } else { e.returnvalue = false; } } }, false); document.addEventListener("touchmove", function(e){ if(touchVal&&touchVal.downX){ touchVal.moveX=e.touches[0].clientX-touchVal.downX; if (e.preventDefault) { // e.preventDefault(); } else { e.returnvalue = false; } } }, false); document.addEventListener("touchend", function(e){ if(touchVal&&touchVal.moveX){ if(touchVal.moveX>30){ animiOutprodPic_style_01_1484293009450(animiInprodPic_style_01_1484293009450); }else if(touchVal.moveX<-30){ animiInprodPic_style_01_1484293009450(animiInprodPic_style_01_1484293009450); } if (e.preventDefault) { //e.preventDefault(); } else { e.returnvalue = false; } } touchVal=null; }, false); /*运行*/ } } /*定义进入事件*/ function animiInprodPic_style_01_1484293009450(callback){ if(timeoutObjprodPic_style_01_1484293009450){ window.clearTimeout(timeoutObjprodPic_style_01_1484293009450); } UlenprodPic_style_01_1484293009450 = fatherprodPic_style_01_1484293009450.children("li").length; if(UlenprodPic_style_01_1484293009450>1){ /*当个数大于1个的时候才会切换*/ let now=nowItemprodPic_style_01_1484293009450; let next=now+1; if(next>=UlenprodPic_style_01_1484293009450){ next=0; } objprodPic_style_01_1484293009450.find(".bannerStyle_1 .flicking_con").children("a").eq(next).addClass("on").siblings().removeClass("on"); fatherprodPic_style_01_1484293009450.children("li").eq(now).stop().animate({"left":"-100%"},timeAnimiprodPic_style_01_1484293009450,function(){ if(typeof(callback)=="function"){ timeoutObjprodPic_style_01_1484293009450=setTimeout(function(){ if(!hasVideoprodPic_style_01_1484293009450){ callback(callback); } },timeSetprodPic_style_01_1484293009450); } }); fatherprodPic_style_01_1484293009450.children("li").eq(next).css({"left":"100%"}).stop().animate({"left":"0%"},timeAnimiprodPic_style_01_1484293009450); nowItemprodPic_style_01_1484293009450=next; } } /*定义离开事件*/ function animiOutprodPic_style_01_1484293009450(){ if(timeoutObjprodPic_style_01_1484293009450){ window.clearTimeout(timeoutObjprodPic_style_01_1484293009450); } UlenprodPic_style_01_1484293009450 = fatherprodPic_style_01_1484293009450.children("li").length; if(UlenprodPic_style_01_1484293009450>1){ /*当个数大于1个的时候才会切换*/ let now=nowItemprodPic_style_01_1484293009450; let next=now-1; if(next<0){ next=UlenprodPic_style_01_1484293009450-1; } objprodPic_style_01_1484293009450.find(".bannerStyle_1 .flicking_con").children("a").eq(next).addClass("on").siblings().removeClass("on"); fatherprodPic_style_01_1484293009450.children("li").eq(now).stop().animate({"left":"100%"},timeAnimiprodPic_style_01_1484293009450,function(){ if(typeof(callback)=="function"){ timeoutObjprodPic_style_01_1484293009450=setTimeout(function(){ if(!hasVideoprodPic_style_01_1484293009450){ callback(callback); } },timeSetprodPic_style_01_1484293009450); } }); fatherprodPic_style_01_1484293009450.children("li").eq(next).css({"left":"-100%"}).stop().animate({"left":"0%"},timeAnimiprodPic_style_01_1484293009450); nowItemprodPic_style_01_1484293009450=next; } } function getFileExtend(fileName) { if (fileName) { return fileName.replace(/.+\./,"");; } else { return ''; } } //=== viewid:prodInfor_style_04_1484292534264 ===// 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://s143js.nicebox.cn//diyTools/?mod=ptCart&idweb=43749&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_04_1484292534264 .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',43749,0,"s143js.nicebox.cn"); } if(is_mobile()){ $('#prodInfor_style_04_1484292534264 .probuy_1 input:nth-child(2)').attr('onclick','').unbind('click').click(onAddcart); } var dispatching = $("#prodInfor_style_04_1484292534264 .proInfoStyle01 .diy_farebox select").attr("value") var shopCartBaseUrl = "https://s143js.nicebox.cn/exusers/u_cart.php?idweb=43749&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://s143js.nicebox.cn/product/proshowintent.php?id='+id+'&pid='+pid+'&lang='+lang+'&boxName='+boxName+'&boxTitle='+boxTitle+'&boxbotton='+boxbotton+'¬MustUsername='+notMustUsername+'¬MustContact='+notMustContact+'¬MustAbout='+notMustAbout+'&idweb=43749'; 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://s143js.nicebox.cn/exusers/ajax/check_exuser.php?idweb=43749", 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://s143js.nicebox.cn//diyTools/?mod=ptCart&idweb=43749&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://s143js.nicebox.cn/exusers/u_cart.php?idweb=43749&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://s143js.nicebox.cn/product/iframe_product.php?pid="+i_IDProduct+"&wid=43749&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_04_1484292534264 .proInfoStyle01 .diy_farebox select").attr("value") var i_ProdNum = $("#7874b0403cd35b39a178c1b333406d5c_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://s143js.nicebox.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_7874b0403cd35b39a178c1b333406d5c").val(); if(i_IDSpecPrice == 0){ alert('请选择规格!'); return; } var i_ProdNum = $("#7874b0403cd35b39a178c1b333406d5c_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://s143js.nicebox.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://s143js.nicebox.cn/exusers/purchase_checkout.php?isCenter=1&"+url; box.Show({width:"920px",height:"500px"}); } } //=== viewid:customDetail_style_prodDetail_01_1484292547276 ===// //-- $(function(){ var viewid="customDetail_style_prodDetail_01_1484292547276"; var sys_url="viewid=customDetail_style_prodDetail_01_1484292547276&name=customDetail&style=style_prodDetail_01&langid=0&pageid=556853&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_01_1484292547276; } } RequestURL(viewid,sys_url,moreParams); }); //-- //=== viewid:customDetail_style_prodDetail_01_1484292547276 ===// $('#customDetail_style_prodDetail_01_1484292547276 .proListShow .listLi').addClass("modSet"); detailHeightAuto("customDetail_style_prodDetail_01_1484292547276", "详情加载中"); setTimeout(function(){ $("#customDetail_style_prodDetail_01_1484292547276 .proListShow .listUl").css("display","flex"); },800); //=== viewid:customDetail_style_prodDetail_01_1484292547276 ===// loadExtentFile('http://s143js.nicebox.cn/js/jquery.tabs.js','js'); loadExtentFile('http://s143js.nicebox.cn/js/prodinfoV9.js','js'); loadExtentFile('http://s143js.nicebox.cn/js/jquery.commentImg.js','js'); var ajaxServer = 'http://s143js.nicebox.cn'; var upPicServer = 'http://img.nicebox.cn'; var curIDWebSite = 43749; //=== viewid:customDetail_style_prodDetail_01_1484292547276 ===// if(is_mobile()){ $(".mobileAbout").css("display","block"); $(".pcAbout").remove(); }else{ $(".mobileAbout").remove(); $(".pcAbout").css("display","block"); } function is_mobile(){ return window.screen.width<767 || ($('body').width() > 0 && $('body').width() < 767); } //=== viewid:customDetail_style_prodDetail_01_1484292547276 ===// 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://s143js.nicebox.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://s143js.nicebox.cn/exusers/purchase_orderdetail.php?isCenter=1&lid="+head_lid; box.Show({width:"920px",height:"500px"}); } } //=== viewid:copyright_style_01_1660990229104,text_style_15_1700450000693,text_style_15_1700450000711,text_style_15_1700450000724,text_style_15_1700450000735 ===// //=== viewid:footerCustom_textlist_01_1702434921951,footerCustom_textlist_01_1702434980976,footerCustom_textlist_01_1700038503014,footerCustom_textlist_01_1700101421014 ===// 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'}); } } }