You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
38 KiB

5 years ago
function checkType(a,b){return!!a&&a.nodeType==b}function isObject(a){return"object"==typeof a}function isWindow(a){return null!=a&&a==a.window}function isPlainObject(a){return isObject(a)&&!isWindow(a)&&"isPrototypeOf"in a&&"[object Object]"===Object.prototype.toString.call(a)}function hasClass(a,b){if(!checkType(a,nodeType)||!a.className||!b)return!1;var c,d=a.className.split(" ");for(c=0;c<d.length;c++)if(d[c]===b)return!0;return!1}function isArray(a){return"[object Array]"===Object.prototype.toString.call(a)}function extend(a,b,c){for(key in b)c&&(isPlainObject(b[key])||isArray(b[key]))?(isPlainObject(b[key])&&!isPlainObject(a[key])&&(a[key]={}),isArray(b[key])&&!isArray(a[key])&&(a[key]=[]),extend(a[key],b[key],c)):void 0!==b[key]&&(a[key]=b[key]);return a}function setAttribute(a,b,c){null==c?a.removeAttribute(b):a.setAttribute(b,c)}function IEContentLoaded(a,b){var c=a.document,d=!1,e=function(){d||(d=!0,b())};!function(){try{c.documentElement.doScroll("left")}catch(a){return void setTimeout(arguments.callee,500)}e()}(),c.onreadystatechange=function(){"complete"==c.readyState&&(c.onreadystatechange=null,e())}}var idExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,classTagExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,version="2.0.1";$=window._J=function(a,b){return new _J.fn.init(a,b)},_J.fn=_J.prototype={getElementsByClassName:function(a,b,c){var d=[],e=(b||document).getElementsByTagName(c||"*"),f=e.length,g=new RegExp("(\\s+|^)"+a+"(\\s+|$)");for(i=0,j=0;i<f;i++)g.test(e[i].className)&&(this[j]=d[j]=e[i],j++);return d},find:function(a,b){var c=this.getElementsByClassName(a,this[0],b),d=c.length;for(i=0;i<d;i++)this[i]=c[i],this.length=i+1;return this},addClass:function(a){for(var b=this.length,c=0;c<b;c++){var d=this[c];if(!checkType(d,nodeType)||!a)return;if(!d.className)return void(d.className=t);hasClass(d,a)||(d.className+=" "+a)}return this},remove:function(){for(var a=this.length,b=0;b<a;b++){var c=this[b];if(!checkType(c,nodeType))return;c&&c.parentNode&&c.parentNode.removeChild(c)}},removeClass:function(a){for(var b=this.length,c=0;c<b;c++){var d=this[c];if(!checkType(d,nodeType)||!d.className||!a)return;var e=d.className.split(/\s+/g),f=0;for(f=0;f<e.length&&a!==e[f];f++);e.splice(f,1),d.className=e.join(" ")}return this},hasClass:function(a){return this.length>0&&hasClass(this[0],a)},each:function(a){for(var b=0;b<this.length;b++)a(this[b],b);return this},on:function(a,b){for(var c=0;c<this.length;c++){var d=this[c];d.addEventListener?d.addEventListener(a,b,!1):d.attachEvent&&d.attachEvent("on"+a,b)}return this},off:function(a,b){for(var c=0;c<this.length;c++){var d=this[c];d.removeEventListener?d.removeEventListener(a,b,!1):d.detachEvent&&d.detachEvent("on"+a,b)}return this},attr:function(a,b){var c;return"string"!=typeof a||1 in arguments?this.each(function(c){if(1===this.nodeType)if(isObject(a))for(key in a)setAttribute(this,key,a[key]);else setAttribute(this,a,funcArg(this,b,c,this.getAttribute(a)))}):this.length&&1===this[0].nodeType?!(c=this[0].getAttribute(a))&&a in this[0]?this[0][a]:c:void 0},width:function(){if(0!=this.length)return this[0].offsetWidth},style:function(){if(0!=this.length)return this[0].style},html:function(){return 0==this.length?this:arguments&&arguments.length>0?(this[0].innerHTML=arguments[0],this):this[0].innerHTML},animate:function(a,b,c,d,e,f){function g(a,b,c,d){return c*((a=a/d-1)*a*a+1)+b}for(var h=(new Date).getTime(),i=0;i<this.length;i++){var j=this[i];setTimeout(function(){var i=parseInt(((new Date).getTime()+d-h)/d);j.style[a]=Math.floor(g(i,b,c,20))+e,i>=20?(j.style[a]=b+c+e,f&&f()):setTimeout(arguments.callee,d)},d)}return this}},_J.fn.init=function(a,b){b&&(b=b.length>0?b[0]:b);var c=b||window.document;if("string"==typeof a){if("<"===a[0]&&">"===a[a.length-1]&&a.length>=3?match=[null,a,null]:match=idExpr.exec(a),match&&match[1]){var d=document.createElement("div");return d.innerHTML=a,this[0]=d.childNodes[0],this.length=1,this.context=c,this.selector=a,this}if(match&&match[2]){var d=document.getElementById(match[2]);return d&&d.parentNode&&(this.length=1,this[0]=d),this.c
/*! jdtpl last edit: 2017-12-12|14:54:20 */
$.extend({getNowTime:function(){var a=new Date,b=a.getFullYear(),c=a.getMonth()+1,d=a.getDate(),e=a.getHours(),f=a.getMinutes(),g=a.getSeconds();return b+"-"+c+"-"+d+" "+e+":"+f+":"+g},enabled:function(a){var b=!1;return"string"==typeof this.get(a)?b=!0:b},set:function(a,b,c){var c=c||{};if(c.domain=c.domain||"",c.path=c.path||"/",c.expires=c.expires||31536e6,"number"==typeof c.expires){var d=new Date;d.setTime(d.getTime()+c.expires)}document.cookie=a+"="+b+";expires="+d.toGMTString()+(c.domain?";domain="+c.domain:"")+";path="+c.path},get:function(a){var b,c=encodeURIComponent(a)+"=",d=document.cookie.indexOf(c),e=null;return d>-1&&(b=document.cookie.indexOf(";",d),-1==b&&(b=document.cookie.length),e=decodeURIComponent(document.cookie.substring(d+c.length,b))),e},remove:function(a){this.set(a,"",{expires:-3600})},uuid:function(){return(new Date).getTime()+""+parseInt(2147483647*Math.random())},initjda:function(){var a=this;if(!a.enabled("__jda")){var b,c;c=Date.parse(new Date).toString().substring(0,10),b="."+a.uuid()+"."+c+"."+c+"."+c+".0",a.set("__jda",b,{expires:15552e6,domain:".jd.com"})}}});
/*! jdtpl last edit: 2017-12-12|14:54:20 */
var _Jconf={priceInterface:"//px.3.cn/prices/mgets?skuids={skuids}&type=1",promoload:"//pf.3.cn/flags/mgets?skuids={skuids}&type=1",imagePrefix:"//img1.360buyimg.com/imgb/",picImgPrefix:"//img1.360buyimg.com/pop/",logo:{width:100,height:20,src:"logoCir40.gif"},imageSize:500,width:500,height:500,needNum:0,layoutNeedNum:0,layoutColNum:0,layoutRowNum:0,styleCss:{borderColor:"#e31d1a",borderWidth:1},data:{},protocol:"http:",exposes:{}};
/*! jdtpl last edit: 2017-12-12|14:54:20 */
!function(a){a.fn.turns=function(a){for(var b=0;b<this.length;b++)this.turns=new c(a,this[b]);return this};var b={interval:3e3,start:0,gsize:1,contName:".item",navigation:{active:!0,effect:"slide"},pagination:{active:!0,effect:"fade",interact:"hover"},effect:{slide:{speed:500},fade:{speed:1e3}}},c=function(c,d){var c=a.extend(b,c,!0);this.conts=a(c.contName,d),this.tags=a(c.tagName,d),this.options=c,this.interval=c.interval,this.gsize=c.gsize,this.pos=0,this.timer=null,this.size=this.conts.length,this.start(c.start),this.eventBind(a(d),this.tags,this.conts),this.eventBindForTouch(a(d),this.tags,this.conts)},d=_Jconf.exposes;c.prototype={start:function(a){this.auto=!0;var b=this;this.play(a,"next"),this.timer=setInterval(function(){b.next()},b.interval)},play:function(a,b,c){"slide"==this.options.navigation.effect?this.slide(a,b):this.fade(a,b)},show:function(b){this.turnsReset(),this.turnsInnerReset(),a(this.conts[b]).addClass("current"),a(this.tags[b]).addClass("select");for(var c=0;c<this.gsize;c++)this.exposal(this.conts[b])},slide:function(b,c){var d=this.tags[b];this.turnsReset(),this.turnsInnerReset();for(var e=this.conts[b],f=this.conts[(b-1+this.size)%this.size],g=this.conts[(b+1)%this.size],h=0;h<this.gsize;h++)this.exposal(this.conts[b]);a(e).addClass("current"),a(g).addClass("current"),a(f).addClass("current"),a(d).addClass("select");var i=this,j=0,k=e.offsetWidth;e.style.opacity=1,g.style.opacity=1,f.style.opacity=1,"prev"==c?(change=k,j=-k,e.style.left=-k+"px",g.style.left=0,f.style.left=-2*k+"px"):(change=-k,j=k,e.style.left=k+"px",g.style.left=2*k+"px",f.style.left=0);var l=this.options.effect.slide.speed/20;a(e).animate("left",j,change,l,"px",function(){e.style.left=j+change+"px"}),a(g).animate("left",j+k,change,l,"px",function(){g.style.left=j+k+change+"px"}),a(f).animate("left",j-k,change,l,"px",function(){f.style.left=j-k+change+"px",a(".jdAdPrevious").off("mousedown",i.levt).on("mousedown",i.levt),a(".jdAdNext").off("mousedown",i.revt).on("mousedown",i.revt)}),a(".page").html(b+1),a(a(".priceItem")[b]).removeClass("disNone")},fade:function(b,c){var d=this.conts[b],e=this.tags[b];this.options.effect.fade.speed;this.turnsReset(),this.turnsInnerReset(),a(e).addClass("select"),a(d).addClass("current").addClass("jdAdShow"),d.style.left=0;for(var f=0;f<this.gsize;f++)this.exposal(this.conts[b])},next:function(){this.pos++,this.pos%=this.size;this.play(this.pos,"next")},prev:function(){this.pos--,this.pos=(this.pos+this.size)%this.size;this.play(this.pos,"prev")},stop:function(){clearInterval(this.timer)},turnsReset:function(){this.conts.removeClass("current").removeClass("jdAdShow"),this.conts.each(function(a){a.style.left=0,a.style.opacity=1}),this.tags.removeClass("select"),a(".priceItem").addClass("disNone")},turnsInnerReset:function(){a(".jdAdInfo",this.conts[this.pos]).removeClass(".jdAdInfoShow")},exposal:function(b){this.skuImgItem=a(".skuImg"),a(b).each(function(b,c){for(var e=a(b).find("skuImg"),f=0,g=e.length;f<g;f++)if(!e[f].getAttribute("data-done")&&(e[f].src=e[f].getAttribute("data-src"),e[f].setAttribute("data-done","1"),!_Jconf.exposal_urls||""==_Jconf.exposal_urls)){var h=e[f].getAttribute("data-exposal");void 0===d[h]&&(a.sendExposals(h),d[h]=1)}})},eventBind:function(b,c,d){var e=this;b.on("mouseover",function(a){e.stop()}),b.on("mouseout",function(a){e.stop(),e.timer=setTimeout(function(){e.start(++e.pos%e.size)},1e3)}),this.levt=function(b){a(".jdAdPrevious").off("mousedown",e.levt);var c=b||window.event;c.preventDefault&&c.preventDefault(),e.stop(),e.prev()},this.revt=function(b){a(".jdAdNext").off("mousedown",e.revt);var c=b||window.event;c.preventDefault&&c.preventDefault(),e.stop(),e.next()},!0===this.options.navigation.active&&(this.auto=!1,a(".jdAdPrevious").on("mousedown",this.levt),a(".jdAdNext").on("mousedown",this.revt));var f=function(a){var b=this.getAttribute("index");return e.pos!=b&&(e.pos=b,e.turnsReset(),e.stop(),"slide"==e.options.pagination.effect?e.slide(b):e.fade(b),!1)},g=function(a){e.stop(),e.turnsReset(),e.pos=this.index,e.fade(this.index)};if(!0===this.options
/*! jdtpl last edit: 2017-12-12|14:54:20 */
!function(a,b){function c(){b.width=document.documentElement.clientWidth||t.width,b.height=document.documentElement.clientHeight||t.height,b.imageSize=b.width>b.height?b.height:b.width}function d(){b.data=t.Query[t.adid],b.protocol=a.getProtocol(),b.exposal_urls=t.Query.exposal_urls,b=a.extend(t,b)}function e(){var a=b.width,c=b.height,d=a/c,e=c/a,f=1,g=function(d){if(1==d||c>a){if(a<=200&&(b.logo.src="logoLsmall.jpg"),b.logo.style="height:20px;",b.logo.imgStyle="#logo img{height:100%}",a<200&&(b.logo.imgStyle+="#logo img{margin-left:"+(a-200)/2+"px;}"),b.logo.imgStyle+=".skuName{display:none}",b.logo.imgStyle+=".skuAdContent{display:none}",b.logo.imgStyle+=".skuPriceInner{display:none}",e>1.4&&e<2)b.logo.imgStyle+=".inner .item{ margin-top:22px;}.skuLink{ height:"+(c-22)+"px;}",b.logo.imgStyle+=".skuLink{ height:"+(c-22)+"px;display:block}",b.logo.imgStyle+=".skuAdContent{display:block; height:22px; padding:0 5px; overflow:hidden; text-align:center;color:#e4393c; font-size:14px}",b.logo.imgStyle+=".item .skuInfo{bottom:36px!important}";else if(e>2){var g=Math.ceil(b.data.length/f),h=(a-40)/g,i=(a-30-g*g)/g;b.logo.imgStyle+=".inner .item{ margin-top:22px;}",b.logo.imgStyle+=".left, .right{ display:none}",b.logo.imgStyle+=".skuLink{display:block;position:relative}",b.logo.imgStyle+=".jdPrice{display:none}",b.logo.imgStyle+=".jdAdIndex{display:none}",b.logo.imgStyle+=".skuPriceInner{display:block;text-indent:5px}",b.logo.imgStyle+=".inner .numTag{display:block; position:absolute; bottom:0; left:0}",b.logo.imgStyle+=".inner .numTag li{float:left; width:"+h+"px;height:5px; font-size:0; overflow:hidden; background:#ccc; margin-left:"+i+"px; cursor:pointer}",b.logo.imgStyle+=".item .skuInfo{height:22px!important}",b.logo.imgStyle+=".inner .numTag .select{background:#DF3939}"}}else{b.logo.src="logoSm.jpg",b.logo.style="background-color:#e31d1a;display:block;height:"+c+"px;";var j=(a-92)/f;b.logo.imgStyle="#logo img{margin-top:"+(c-90)/2+"px} .inner{margin-left:90px;}.skuLink{overflow:hidden;width:"+(j-1)+"px;_width:"+(Math.floor(j)-1)+"px;border-left:1px solid #fff;}#tpl .item .bg-shadow{display:block; position:absolute;height:22px;background-color:#000;filter:alpha(opacity=30); /*IE */-moz-opacity:0.3; /* 老版Mozilla */-khtml-opacity:0.3; /* 老版Safari */opacity: 0.3; /* 支持opacity的浏览器*/} #tpl .item .skuInfo{ z-index:1; height:22px;line-height:22px;text-indent:5px;}#tpl .skuPriceInner{color:#fff}",b.logo.imgStyle+=".jdPrice{display:none}",b.logo.imgStyle+=".jdAdIndex{display:none}",b.logo.imgStyle+=".skuName{display:none}",b.logo.imgStyle+=".skuAdContent{display:none}",b.layoutType="longLine"}};return a>c?(b.showLayoutType="row",f=d>1.9&&d<5?Math.floor((a-92)/c):d>=5?Math.floor((a-92)/c):1):(b.showLayoutType="col",f=e>1.9?Math.floor(e):1),g(f,e),b.colShowSkuNum=f,f}function f(a,b){var c=b.length,d=c,e=b;return a>1&&(mod=c%a,quotients=Math.ceil(c/a),quotients=quotients>1?quotients:quotients+1,0!==mod&&(d=quotients*a,e=g(b,d))),e}function g(a,b){var c=[],d=a.length;if(c=a.slice(0,b),d<b)for(;b-d>0;)for(var e=0;e<d&&!(b-d<=0);e++)c.push(a[e]),b--;return c}function h(c){var d=[],g=[],h=[],i=[],j="",k="",l=b.colShowSkuNum=e();c=f(l,c),template=' <a class="skuLink" href="{click_url}" target="_blank" title="{ad_title}"> <img class="skuImg" data-exposal="{exposal_url}" data-src="{protocol}{imagePrefix}s{imageSize}x{imageSize}_{image_url}" src="{protocol}{imagePrefix}s{imageSize}x{imageSize}_jfs/t3559/298/2228558089/4340/981090cd/58451898N1928067c.png" /> <div class="skuInfo"> <p class="skuName ">{ad_title}</p> <p class="skuAdContent ">{adcontent}</p> <p class="skuPrice{sku_id} skuPriceInner">{cpsprice}</p> </div> <div class="bg-shadow"></div> </a> ';for(var m=0,n=c.length;m<n;m++){var o={};m%l==0&&(i.push('<li class="subNum">'+(m+1)+"</li>"),0==m?d.push(' <div class="item" >'):d.push('</div><div class="item" >')),o=a.extend(c[m],b),d.push(a.nan
/*! jdtpl last edit: 2017-12-12|14:54:20 */