FtxkPHP = window.Ftxk = { "MID" : "", "UID" : "0", "IMG" : "/Public/Home/new/images", "ROOT" : "", "JS" : "/Public/Home/new/js", "APP" : "", "PUBLIC" : "/Public", 'SITE_URL' : "SITE_URL", "DEEP" : "/", "MODEL" : ["2", "", "html"], "VAR" : ["m", "c", "a"], "searchUrl" :'https://zbqfjx.com/product/search/lists_0_0_0_1_1_1.html', "login":'https://zbqfjx.com/login.html', }; function U(url, params, rewrite){ if (window.Ftxk.MODEL[0] == 2) { var website = window.Ftxk.ROOT + '/'; url = url.split('/'); if (url[0] == '' || url[0] == '@') url[0] = ''; if (!url[1]) url[1] = 'Index'; if (!url[2]) url[2] = 'index'; website = website + url[1] + '/' + url[2]; if (params) { params = params.join('/'); website = website + '/' + params; } if (!rewrite) { website = website + '.html'; } } else { var website = window.Ftxk.ROOT + '/index.php'; url = url.split('/'); if (url[0] == '' || url[0] == '@') url[0] = APPNAME; if (!url[1]) url[1] = 'Index'; if (!url[2]) url[2] = 'index'; website = website + '?s=/' + url[0] + '/' + url[1] + '/' + url[2]; if (params) { params = params.join('/'); website = website + '/' + params; } if (!rewrite) { website = website + '.html'; } } if(typeof (window.Ftxk.MODEL[1])!='undefined'){ website=website.toLowerCase(); } return website; } function search(){ return false; }, error:function (XMLHttpRequest, ajaxOptions, thrownError) { layer.close(index); layer.alert(XMLHttpRequest+thrownError); } }); } }) if($('.pro_taocan').length>1&&$("#i").val()!=-1){ $('.pro_taocan').eq($("#i").val()).click(); }else if($('.pro_taocan').length==1){ $('.pro_taocan').click(); } // 购买数量加减 $('#pro_up,#pro_down').click(function () { var numObj = $("#buy_number"), num = parseInt(numObj.val()), max_buy = numObj.attr('max-buy'), min_buy = numObj.attr('min-buy'), _this = $(this); if (_this.attr('data-operator') == '+') { // 加 if (num < max_buy) { num += 1; } else { return; } } else if (_this.attr('data-operator') == '-') { // 减 if ((num > min_buy && min_buy > 0) || (num > 1 && min_buy == 0)) { num -= 1; } else { return; } } numObj.val(num); $("#num").val(num); }); $("#buy_number").keyup(function () { var max_buy = parseInt($(this).attr("max-buy").toString()); var min_buy = parseInt($(this).attr("min-buy").toString()); var v = $(this).val(); if (min_buy > 0 && v < min_buy) { $(this).val(min_buy); return; } if (max_buy > 0 && v > max_buy) { $(this).val(max_buy); } $("#num").val($(this).val()); }); }); function WFDDURL(){ var WFDDURL=null; WFDDURL=document.referrer; if(WFDDURL.indexOf('shopcart') == -1){ console.log(1); Cookies.set('WFDDURL', WFDDURL); } } WFDDURL(); /*(function(m, ei, q, i, a, j, s) { m[i] = m[i] || function() { (m[i].a = m[i].a || []).push(arguments) }; j = ei.createElement(q), s = ei.getElementsByTagName(q)[0]; j.async = true; j.charset = 'UTF-8'; j.src = 'https://static.meiqia.com/dist/meiqia.js?_=t'; s.parentNode.insertBefore(j, s); })(window, document, 'script', '_MEIQIA'); _MEIQIA('entId', );*/ //点击轮播 jQuery("#good_other_info").slide({trigger:'click',titCell:"#pro_fr_title li",targetCell:"#goodattrinfo .dh"}); // man_info $(document).ready(function(){ $(".goodnav").click(function(){ var index = $(this).parent().index(); $("#pro_fr_title li").eq(index).click(); $("html,body").animate({scrollTop:$("#good_other_info").offset().top},500); }); $(".pro_a_a").slide({ mainCell: ".bd ul", autoPlay: true }); $(window).on('scroll', function() { if (document.documentElement.scrollTop + document.body.scrollTop > $('#pro_fr_title').offset().top && document.documentElement.scrollTop + document.body.scrollTop < $('#pro_fr_comment').offset().top-300) { $('#pro_fr_nav').addClass('pro_fr_nav_fixed'); } else { $('#pro_fr_nav').removeClass('pro_fr_nav_fixed'); } var s1= document.documentElement.scrollTop + document.body.scrollTop ; var s2= document.documentElement.clientHeight + document.body.clientHeight ; var s3= document.documentElement.scrollHeight + document.body.scrollHeight ; var s4= $('#aboutpro').offset().top+$('#aboutpro').height(); var s5= $('#goodattrinfo').offset().top+$('#goodattrinfo').height(); var s6= s4+$('#recommendpro').height(); if ( document.documentElement.scrollTop + document.body.scrollTop-2000 > s4 && s5>s6) { $('#recommendpro').css({"background-color":"#FFFFFF","position": "absolute","bottom":300+"px", "top":"auto","width":"240px"}); } else { $('#recommendpro').css({"position": "relative","bottom":"auto","top":"auto","width":"auto"}); } }); });