设为首页 收藏本站
查看: 14131|回复: 1

[经验分享] 淘宝评论数据抓取简记

[复制链接]

尚未签到

发表于 2015-11-24 07:57:42 | 显示全部楼层 |阅读模式
刚才趴在床上搞清楚了淘宝评论数据的抓取方法,在此记录,以备后用。
  淘宝商品详情页面下方有如下script:
  


  

<script>
window.App = (window.App || {});
window.App.data = {
images: [
&quot;http://q.i02.wimg.taobao.com/bao/uploaded/i3/T1O2eYXjdsXXXQBm.Y_030602.jpg&quot;
,                            &quot;http://q.i01.wimg.taobao.com/bao/uploaded/i1/T1QMCxXi0fXXcyDbPb_093241.jpg&quot;
,                            &quot;http://q.i02.wimg.taobao.com/bao/uploaded/i2/670343779/T29dyXXchbXXXXXXXX_!!670343779.png&quot;
,                            &quot;http://q.i02.wimg.taobao.com/bao/uploaded/i3/670343779/T2419rXdXbXXXXXXXX_!!670343779.png&quot;
,                            &quot;http://q.i03.wimg.taobao.com/bao/uploaded/i2/T1eYO0XXhkXXaJ60na_120515.jpg&quot;
],
link:  &quot;http://a.m.tmall.com/i9642784141.htm&quot;,
price: &quot;¥202.00&quot;,
tmall: true,
itemId: 9642784141,
hasProps: false,
taoPlus: true,
imgScale: 1,
reAddCart:  false ,
reAddFav:  false ,
prevSkuId: &quot;&quot;,
logAjaxUrl: &quot;ajax/pds.do&quot;,
descAjaxUrl:   &quot;http://a.m.tmall.com/ajax/desc_list.do?item_id=xxx&ps=800&sid=6c4d94e0e89bca18&quot;,
propsAjaxUrl:  &quot;http://a.m.tmall.com/ajax/sku.do?item_id=xxx&sid=6c4d94e0e89bca18&quot;,
reviewAjaxUrl: &quot;http://a.m.tmall.com/ajax/rate_list.do?item_id=xxx&sid=6c4d94e0e89bca18&quot;,
loginUrl: &quot;http://login.m.taobao.com/login.htm?tpl_redirect_url=http%3A%2F%2Fa.m.tmall.com%2Fi9642784141.htm%3Fsid%3D6c4d94e0e89bca18%26pds%3Dfromauc%2523h%2523shop&sid=6c4d94e0e89bca18&quot;,
addFavUrl:  &quot;http://fav.m.taobao.com/favorite/to_collection.htm?itemNumId=xxx&xid=0db2&pds=addfav%23h%23detail&sid=6c4d94e0e89bca18&quot;,
addCartUrl: &quot;http://cart.m.taobao.com/ajax.do?fun=add&item_id=xxx&ticket=6c4d94e0e89bca18&pds=addcart%23h%23detail&sid=6c4d94e0e89bca18&quot;,
cleannowUrl: &quot;http://cart.m.taobao.com/my_cart.htm?pds=cleannow%23h%23cart&sid=6c4d94e0e89bca18&quot;,
myCartUrl: &quot;http://cart.m.taobao.com/my_cart.htm?sid=6c4d94e0e89bca18&quot;,
recommendAjaxUrl: &quot;http://a.m.tmall.com/ajax/get_related.do?item_id=xxx&sid=6c4d94e0e89bca18&quot;
}
</script><script src=&quot;http://a.tbcdn.cn/mw/app/detail/h5/detail.min.js&quot;></script>

reviewAjaxUrl: &quot;http://a.m.tmall.com/ajax/rate_list.do?item_id=xxx这个即为获取评论数据的Ajax链接,item_id为商品的编号。但是,直接输入上述网址只能获取少量评论数据。于是,问题就转到了如何获取链接后的其他参数。  
  打开http://a.tbcdn.cn/mw/app/detail/h5/detail.min.js,里面乱糟糟一片,啥也看不明白。找个js整理工具吧。
  通过Google搜索,找到这个在线工具:http://jsbeautifier.org
  经过&#26684;式整理后,脚本内容如下:
  


  

/* Zepto v1.0rc1 - polyfill zepto event detect fx ajax form touch - zeptojs.com/license */
(function (a) {
String.prototype.trim === a && (String.prototype.trim = function () {
return this.replace(/^\s+/, &quot;&quot;).replace(/\s+$/, &quot;&quot;)
}), Array.prototype.reduce === a && (Array.prototype.reduce = function (b) {
if (this === void 0 || this === null) throw new TypeError;
var c = Object(this),
d = c.length >>> 0,
e = 0,
f;
if (typeof b != &quot;function&quot;) throw new TypeError;
if (d == 0 && arguments.length == 1) throw new TypeError;
if (arguments.length >= 2) f = arguments[1];
else do {
if (e in c) {
f = c[e++];
break
}
if (++e >= d) throw new TypeError
} while (!0);
while (e < d) e in c && (f = b.call(a, f, c[e], e, c)), e++;
return f
})
})();
var Zepto = function () {
function A(a) {
return v.call(a) == &quot;[object Function]&quot;
}
function B(a) {
return a instanceof Object
}
function C(b) {
var c, d;
if (v.call(b) !== &quot;[object Object]&quot;) return !1;
d = A(b.constructor) && b.constructor.prototype;
if (!d || !hasOwnProperty.call(d, &quot;isPrototypeOf&quot;)) return !1;
for (c in b);
return c === a || hasOwnProperty.call(b, c)
}
function D(a) {
return a instanceof Array
}
function E(a) {
return typeof a.length == &quot;number&quot;
}
function F(b) {
return b.filter(function (b) {
return b !== a && b !== null
})
}
function G(a) {
return a.length > 0 ? [].concat.apply([], a) : a
}
function H(a) {
return a.replace(/::/g, &quot;/&quot;).replace(/([A-Z]+)([A-Z][a-z])/g, &quot;$1_$2&quot;).replace(/([a-z\d])([A-Z])/g, &quot;$1_$2&quot;).replace(/_/g, &quot;-&quot;).toLowerCase()
}
function I(a) {
return a in i ? i[a] : i[a] = new RegExp(&quot;(^|\\s)&quot; + a + &quot;(\\s|$)&quot;)
}
function J(a, b) {
return typeof b == &quot;number&quot; && !k[H(a)] ? b + &quot;px&quot; : b
}
function K(a) {
var b, c;
return h[a] || (b = g.createElement(a), g.body.appendChild(b), c = j(b, &quot;&quot;).getPropertyValue(&quot;display&quot;), b.parentNode.removeChild(b), c == &quot;none&quot; && (c = &quot;block&quot;), h[a] = c), h[a]
}
function L(b, d) {
return d === a ? c(b) : c(b).filter(d)
}
function M(a, b, c, d) {
return A(b) ? b.call(a, c, d) : b
}
function N(a, b, d) {
var e = a % 2 ? b : b.parentNode;
e ? e.insertBefore(d, a ? a == 1 ? e.firstChild : a == 2 ? b : null : b.nextSibling) : c(d).remove()
}
function O(a, b) {
b(a);
for (var c in a.childNodes) O(a.childNodes[c], b)
}
var a, b, c, d, e = [],
f = e.slice,
g = window.document,
h = {}, i = {}, j = g.defaultView.getComputedStyle,
k = {
&quot;column-count&quot;: 1,
columns: 1,
&quot;font-weight&quot;: 1,
&quot;line-height&quot;: 1,
opacity: 1,
&quot;z-index&quot;: 1,
zoom: 1
}, l = /^\s*<(\w+|!)[^>]*>/,
m = [1, 3, 8, 9, 11],
n = [&quot;after&quot;, &quot;prepend&quot;, &quot;before&quot;, &quot;append&quot;],
o = g.createElement(&quot;table&quot;),
p = g.createElement(&quot;tr&quot;),
q = {
tr: g.createElement(&quot;tbody&quot;),
tbody: o,
thead: o,
tfoot: o,
td: p,
th: p,
&quot;*&quot;: g.createElement(&quot;div&quot;)
}, r = /complete|loaded|interactive/,
s = /^\.([\w-]+)$/,
t = /^#([\w-]+)$/,
u = /^[\w-]+$/,
v = {}.toString,
w = {}, x, y, z = g.createElement(&quot;div&quot;);
return w.matches = function (a, b) {
if (!a || a.nodeType !== 1) return !1;
var c = a.webkitMatchesSelector || a.mozMatchesSelector || a.oMatchesSelector || a.matchesSelector;
if (c) return c.call(a, b);
var d, e = a.parentNode,
f = !e;
return f && (e = z).appendChild(a), d = ~w.qsa(e, b).indexOf(a), f && z.removeChild(a), d
}, x = function (a) {
return a.replace(/-+(.)?/g, function (a, b) {
return b ? b.toUpperCase() : &quot;&quot;
})
}, y = function (a) {
return a.filter(function (b, c) {
return a.indexOf(b) == c
})
}, w.fragment = function (b, d) {
d === a && (d = l.test(b) && RegExp.$1), d in q || (d = &quot;*&quot;);
var e = q[d];
return e.innerHTML = &quot;&quot; + b, c.each(f.call(e.childNodes), function () {
e.removeChild(this)
})
}, w.Z = function (a, b) {
return a = a || [], a.__proto__ = arguments.callee.prototype, a.selector = b || &quot;&quot;, a
}, w.isZ = function (a) {
return a instanceof w.Z
}, w.init = function (b, d) {
if (!b) return w.Z();
if (A(b)) return c(g).ready(b);
if (w.isZ(b)) return b;
var e;
if (D(b)) e = F(b);
else if (C(b)) e = [c.extend({}, b)], b = null;
else if (m.indexOf(b.nodeType) >= 0 || b === window) e = , b = null;
else if (l.test(b)) e = w.fragment(b.trim(), RegExp.$1), b = null;
else {
if (d !== a) return c(d).find(b);
e = w.qsa(g, b)
}
return w.Z(e, b)
}, c = function (a, b) {
return w.init(a, b)
}, c.extend = function (c) {
return f.call(arguments, 1).forEach(function (d) {
for (b in d) d !== a && (c = d)
}), c
}, w.qsa = function (a, b) {
var c;
return a === g && t.test(b) ? (c = a.getElementById(RegExp.$1)) ? [c] : e : a.nodeType !== 1 && a.nodeType !== 9 ? e : f.call(s.test(b) ? a.getElementsByClassName(RegExp.$1) : u.test(b) ? a.getElementsByTagName(b) : a.querySelectorAll(b))
}, c.isFunction = A, c.isObject = B, c.isArray = D, c.isPlainObject = C, c.inArray = function (a, b, c) {
return e.indexOf.call(b, a, c)
}, c.trim = function (a) {
return a.trim()
}, c.uuid = 0, c.map = function (a, b) {
var c, d = [],
e, f;
if (E(a)) for (e = 0; e < a.length; e++) c = b(a[e], e), c != null && d.push(c);
else for (f in a) c = b(a[f], f), c != null && d.push(c);
return G(d)
}, c.each = function (a, b) {
var c, d;
if (E(a)) {
for (c = 0; c < a.length; c++) if (b.call(a[c], c, a[c]) === !1) return a
} else for (d in a) if (b.call(a[d], d, a[d]) === !1) return a;
return a
}, c.fn = {
forEach: e.forEach,
reduce: e.reduce,
push: e.push,
indexOf: e.indexOf,
concat: e.concat,
map: function (a) {
return c.map(this, function (b, c) {
return a.call(b, c, b)
})
},
slice: function () {
return c(f.apply(this, arguments))
},
ready: function (a) {
return r.test(g.readyState) ? a(c) : g.addEventListener(&quot;DOMContentLoaded&quot;, function () {
a(c)
}, !1), this
},
get: function (b) {
return b === a ? f.call(this) : this
},
toArray: function () {
return this.get()
},
size: function () {
return this.length
},
remove: function () {
return this.each(function () {
this.parentNode != null && this.parentNode.removeChild(this)
})
},
each: function (a) {
return this.forEach(function (b, c) {
a.call(b, c, b)
}), this
},
filter: function (a) {
return c([].filter.call(this, function (b) {
return w.matches(b, a)
}))
},
add: function (a, b) {
return c(y(this.concat(c(a, b))))
},
is: function (a) {
return this.length > 0 && w.matches(this[0], a)
},
not: function (b) {
var d = [];
if (A(b) && b.call !== a) this.each(function (a) {
b.call(this, a) || d.push(this)
});
else {
var e = typeof b == &quot;string&quot; ? this.filter(b) : E(b) && A(b.item) ? f.call(b) : c(b);
this.forEach(function (a) {
e.indexOf(a) < 0 && d.push(a)
})
}
return c(d)
},
eq: function (a) {
return a === -1 ? this.slice(a) : this.slice(a, + a + 1)
},
first: function () {
var a = this[0];
return a && !B(a) ? a : c(a)
},
last: function () {
var a = this[this.length - 1];
return a && !B(a) ? a : c(a)
},
find: function (a) {
var b;
return this.length == 1 ? b = w.qsa(this[0], a) : b = this.map(function () {
return w.qsa(this, a)
}), c(b)
},
closest: function (a, b) {
var d = this[0];
while (d && !w.matches(d, a)) d = d !== b && d !== g && d.parentNode;
return c(d)
},
parents: function (a) {
var b = [],
d = this;
while (d.length > 0) d = c.map(d, function (a) {
if ((a = a.parentNode) && a !== g && b.indexOf(a) < 0) return b.push(a), a
});
return L(b, a)
},
parent: function (a) {
return L(y(this.pluck(&quot;parentNode&quot;)), a)
},
children: function (a) {
return L(this.map(function () {
return f.call(this.children)
}), a)
},
siblings: function (a) {
return L(this.map(function (a, b) {
return f.call(b.parentNode.children).filter(function (a) {
return a !== b
})
}), a)
},
empty: function () {
return this.each(function () {
this.innerHTML = &quot;&quot;
})
},
pluck: function (a) {
return this.map(function () {
return this[a]
})
},
show: function () {
return this.each(function () {
this.style.display == &quot;none&quot; && (this.style.display = null), j(this, &quot;&quot;).getPropertyValue(&quot;display&quot;) == &quot;none&quot; && (this.style.display = K(this.nodeName))
})
},
replaceWith: function (a) {
return this.before(a).remove()
},
wrap: function (a) {
return this.each(function () {
c(this).wrapAll(c(a)[0].cloneNode(!1))
})
},
wrapAll: function (a) {
return this[0] && (c(this[0]).before(a = c(a)), a.append(this)), this
},
unwrap: function () {
return this.parent().each(function () {
c(this).replaceWith(c(this).children())
}), this
},
clone: function () {
return c(this.map(function () {
return this.cloneNode(!0)
}))
},
hide: function () {
return this.css(&quot;display&quot;, &quot;none&quot;)
},
toggle: function (b) {
return (b === a ? this.css(&quot;display&quot;) == &quot;none&quot; : b) ? this.show() : this.hide()
},
prev: function () {
return c(this.pluck(&quot;previousElementSibling&quot;))
},
next: function () {
return c(this.pluck(&quot;nextElementSibling&quot;))
},
html: function (b) {
return b === a ? this.length > 0 ? this[0].innerHTML : null : this.each(function (a) {
var d = this.innerHTML;
c(this).empty().append(M(this, b, a, d))
})
},
text: function (b) {
return b === a ? this.length > 0 ? this[0].textContent : null : this.each(function () {
this.textContent = b
})
},
attr: function (c, d) {
var e;
return typeof c == &quot;string&quot; && d === a ? this.length == 0 || this[0].nodeType !== 1 ? a : c == &quot;value&quot; && this[0].nodeName == &quot;INPUT&quot; ? this.val() : !(e = this[0].getAttribute(c)) && c in this[0] ? this[0][c] : e : this.each(function (a) {
if (this.nodeType !== 1) return;
if (B(c)) for (b in c) this.setAttribute(b, c);
else this.setAttribute(c, M(this, d, a, this.getAttribute(c)))
})
},
removeAttr: function (a) {
return this.each(function () {
this.nodeType === 1 && this.removeAttribute(a)
})
},
prop: function (b, c) {
return c === a ? this[0] ? this[0] : a : this.each(function (a) {
this = M(this, c, a, this)
})
},
data: function (b, c) {
var d = this.attr(&quot;data-&quot; + H(b), c);
return d !== null ? d : a
},
val: function (b) {
return b === a ? this.length > 0 ? this[0].value : a : this.each(function (a) {
this.value = M(this, b, a, this.value)
})
},
offset: function () {
if (this.length == 0) return null;
var a = this[0].getBoundingClientRect();
return {
left: a.left + window.pageXOffset,
top: a.top + window.pageYOffset,
width: a.width,
height: a.height
}
},
css: function (c, d) {
if (d === a && typeof c == &quot;string&quot;) return this.length == 0 ? a : this[0].style[x(c)] || j(this[0], &quot;&quot;).getPropertyValue(c);
var e = &quot;&quot;;
for (b in c) typeof c == &quot;string&quot; && c == &quot;&quot; ? this.each(function () {
this.style.removeProperty(H(b))
}) : e += H(b) + &quot;:&quot; + J(b, c) + &quot;;&quot;;
return typeof c == &quot;string&quot; && (d == &quot;&quot; ? this.each(function () {
this.style.removeProperty(H(c))
}) : e = H(c) + &quot;:&quot; + J(c, d)), this.each(function () {
this.style.cssText += &quot;;&quot; + e
})
},
index: function (a) {
return a ? this.indexOf(c(a)[0]) : this.parent().children().indexOf(this[0])
},
hasClass: function (a) {
return this.length < 1 ? !1 : I(a).test(this[0].className)
},
addClass: function (a) {
return this.each(function (b) {
d = [];
var e = this.className,
f = M(this, a, b, e);
f.split(/\s+/g).forEach(function (a) {
c(this).hasClass(a) || d.push(a)
}, this), d.length && (this.className += (e ? &quot; &quot; : &quot;&quot;) + d.join(&quot; &quot;))
})
},
removeClass: function (b) {
return this.each(function (c) {
if (b === a) return this.className = &quot;&quot;;
d = this.className, M(this, b, c, d).split(/\s+/g).forEach(function (a) {
d = d.replace(I(a), &quot; &quot;)
}), this.className = d.trim()
})
},
toggleClass: function (b, d) {
return this.each(function (e) {
var f = M(this, b, e, this.className);
(d === a ? !c(this).hasClass(f) : d) ? c(this).addClass(f) : c(this).removeClass(f)
})
}
}, [&quot;width&quot;, &quot;height&quot;].forEach(function (b) {
c.fn = function (d) {
var e, f = b.replace(/./, function (a) {
return a[0].toUpperCase()
});
return d === a ? this[0] == window ? window[&quot;inner&quot; + f] : this[0] == g ? g.documentElement[&quot;offset&quot; + f] : (e = this.offset()) && e : this.each(function (a) {
var e = c(this);
e.css(b, M(this, d, a, e()))
})
}
}), n.forEach(function (a, b) {
c.fn[a] = function () {
var a = c.map(arguments, function (a) {
return B(a) ? a : w.fragment(a)
});
if (a.length < 1) return this;
var d = this.length,
e = d > 1,
f = b < 2;
return this.each(function (c, g) {
for (var h = 0; h < a.length; h++) {
var i = a[f ? a.length - h - 1 : h];
O(i, function (a) {
a.nodeName != null && a.nodeName.toUpperCase() === &quot;SCRIPT&quot; && (!a.type || a.type === &quot;text/javascript&quot;) && window.eval.call(window, a.innerHTML)
}), e && c < d - 1 && (i = i.cloneNode(!0)), N(b, g, i)
}
})
}, c.fn[b % 2 ? a + &quot;To&quot; : &quot;insert&quot; + (b ? &quot;Before&quot; : &quot;After&quot;)] = function (b) {
return c(b)[a](this), this
}
}), w.Z.prototype = c.fn, w.camelize = x, w.uniq = y, c.zepto = w, c
}();
window.Zepto = Zepto, &quot;$&quot; in window || (window.$ = Zepto),
function (a) {
function f(a) {
return a._zid || (a._zid = d++)
}
function g(a, b, d, e) {
b = h(b);
if (b.ns) var g = i(b.ns);
return (c[f(a)] || []).filter(function (a) {
return a && (!b.e || a.e == b.e) && (!b.ns || g.test(a.ns)) && (!d || f(a.fn) === f(d)) && (!e || a.sel == e)
})
}
function h(a) {
var b = (&quot;&quot; + a).split(&quot;.&quot;);
return {
e: b[0],
ns: b.slice(1).sort().join(&quot; &quot;)
}
}
function i(a) {
return new RegExp(&quot;(?:^| )&quot; + a.replace(&quot; &quot;, &quot; .* ?&quot;) + &quot;(?: |$)&quot;)
}
function j(b, c, d) {
a.isObject(b) ? a.each(b, d) : b.split(/\s/).forEach(function (a) {
d(a, c)
})
}
function k(b, d, e, g, i, k) {
k = !! k;
var l = f(b),
m = c[l] || (c[l] = []);
j(d, e, function (c, d) {
var e = i && i(d, c),
f = e || d,
j = function (a) {
var c = f.apply(b, [a].concat(a.data));
return c === !1 && a.preventDefault(), c
}, l = a.extend(h(c), {
fn: d,
proxy: j,
sel: g,
del: e,
i: m.length
});
m.push(l), b.addEventListener(l.e, j, k)
})
}
function l(a, b, d, e) {
var h = f(a);
j(b || &quot;&quot;, d, function (b, d) {
g(a, b, d, e).forEach(function (b) {
delete c[h][b.i], a.removeEventListener(b.e, b.proxy, !1)
})
})
}
function p(b) {
var c = a.extend({
originalEvent: b
}, b);
return a.each(o, function (a, d) {
c[a] = function () {
return this[d] = m, b[a].apply(b, arguments)
}, c[d] = n
}), c
}
function q(a) {
if (!(&quot;defaultPrevented&quot; in a)) {
a.defaultPrevented = !1;
var b = a.preventDefault;
a.preventDefault = function () {
this.defaultPrevented = !0, b.call(this)
}
}
}
var b = a.zepto.qsa,
c = {}, d = 1,
e = {};
e.click = e.mousedown = e.mouseup = e.mousemove = &quot;MouseEvents&quot;, a.event = {
add: k,
remove: l
}, a.proxy = function (b, c) {
if (a.isFunction(b)) {
var d = function () {
return b.apply(c, arguments)
};
return d._zid = f(b), d
}
if (typeof c == &quot;string&quot;) return a.proxy(b[c], b);
throw new TypeError(&quot;expected function&quot;)
}, a.fn.bind = function (a, b) {
return this.each(function () {
k(this, a, b)
})
}, a.fn.unbind = function (a, b) {
return this.each(function () {
l(this, a, b)
})
}, a.fn.one = function (a, b) {
return this.each(function (c, d) {
k(this, a, b, null, function (a, b) {
return function () {
var c = a.apply(d, arguments);
return l(d, b, a), c
}
})
})
};
var m = function () {
return !0
}, n = function () {
return !1
}, o = {
preventDefault: &quot;isDefaultPrevented&quot;,
stopImmediatePropagation: &quot;isImmediatePropagationStopped&quot;,
stopPropagation: &quot;isPropagationStopped&quot;
};
a.fn.delegate = function (b, c, d) {
var e = !1;
if (c == &quot;blur&quot; || c == &quot;focus&quot;) a.iswebkit ? c = c == &quot;blur&quot; ? &quot;focusout&quot; : c == &quot;focus&quot; ? &quot;focusin&quot; : c : e = !0;
return this.each(function (f, g) {
k(g, c, d, b, function (c) {
return function (d) {
var e, f = a(d.target).closest(b, g).get(0);
if (f) return e = a.extend(p(d), {
currentTarget: f,
liveFired: g
}), c.apply(f, [e].concat([].slice.call(arguments, 1)))
}
}, e)
})
}, a.fn.undelegate = function (a, b, c) {
return this.each(function () {
l(this, b, c, a)
})
}, a.fn.live = function (b, c) {
return a(document.body).delegate(this.selector, b, c), this
}, a.fn.die = function (b, c) {
return a(document.body).undelegate(this.selector, b, c), this
}, a.fn.on = function (b, c, d) {
return c == undefined || a.isFunction(c) ? this.bind(b, c) : this.delegate(c, b, d)
}, a.fn.off = function (b, c, d) {
return c == undefined || a.isFunction(c) ? this.unbind(b, c) : this.undelegate(c, b, d)
}, a.fn.trigger = function (b, c) {
return typeof b == &quot;string&quot; && (b = a.Event(b)), q(b), b.data = c, this.each(function () {
&quot;dispatchEvent&quot; in this && this.dispatchEvent(b)
})
}, a.fn.triggerHandler = function (b, c) {
var d, e;
return this.each(function (f, h) {
d = p(typeof b == &quot;string&quot; ? a.Event(b) : b), d.data = c, d.target = h, a.each(g(h, b.type || b), function (a, b) {
e = b.proxy(d);
if (d.isImmediatePropagationStopped()) return !1
})
}), e
}, &quot;focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout change select keydown keypress keyup error&quot;.split(&quot; &quot;).forEach(function (b) {
a.fn = function (a) {
return this.bind(b, a)
}
}), [&quot;focus&quot;, &quot;blur&quot;].forEach(function (b) {
a.fn = function (a) {
if (a) this.bind(b, a);
else if (this.length) try {
this.get(0)()
} catch (c) {}
return this
}
}), a.Event = function (a, b) {
var c = document.createEvent(e[a] || &quot;Events&quot;),
d = !0;
if (b) for (var f in b) f == &quot;bubbles&quot; ? d = !! b[f] : c[f] = b[f];
return c.initEvent(a, d, !0, null, null, null, null, null, null, null, null, null, null, null, null), c
}
}(Zepto),
function (a) {
function b(a) {
var b = this.os = {}, c = this.browser = {}, d = a.match(/WebKit\/([\d.]+)/),
e = a.match(/(Android)\s+([\d.]+)/),
f = a.match(/(iPad).*OS\s([\d_]+)/),
g = !f && a.match(/(iPhone\sOS)\s([\d_]+)/),
h = a.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),
i = h && a.match(/TouchPad/),
j = a.match(/Kindle\/([\d.]+)/),
k = a.match(/Silk\/([\d._]+)/),
l = a.match(/(BlackBerry).*Version\/([\d.]+)/);
if (c.webkit = !! d) c.version = d[1];
e && (b.android = !0, b.version = e[2]), g && (b.ios = b.iphone = !0, b.version = g[2].replace(/_/g, &quot;.&quot;)), f && (b.ios = b.ipad = !0, b.version = f[2].replace(/_/g, &quot;.&quot;)), h && (b.webos = !0, b.version = h[2]), i && (b.touchpad = !0), l && (b.blackberry = !0, b.version = l[2]), j && (b.kindle = !0, b.version = j[1]), k && (c.silk = !0, c.version = k[1]), !k && b.android && a.match(/Kindle Fire/) && (c.silk = !0)
}
b.call(a, navigator.userAgent), a.__detect = b
}(Zepto),
function (a, b) {
function l(a) {
return a.toLowerCase()
}
function m(a) {
return d ? d + a : l(a)
}
var c = &quot;&quot;,
d, e, f, g = {
Webkit: &quot;webkit&quot;,
Moz: &quot;&quot;,
O: &quot;o&quot;,
ms: &quot;MS&quot;
}, h = window.document,
i = h.createElement(&quot;div&quot;),
j = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i,
k = {};
a.each(g, function (a, e) {
if (i.style[a + &quot;TransitionProperty&quot;] !== b) return c = &quot;-&quot; + l(a) + &quot;-&quot;, d = e, !1
}), k[c + &quot;transition-property&quot;] = k[c + &quot;transition-duration&quot;] = k[c + &quot;transition-timing-function&quot;] = k[c + &quot;animation-name&quot;] = k[c + &quot;animation-duration&quot;] = &quot;&quot;, a.fx = {
off: d === b && i.style.transitionProperty === b,
cssPrefix: c,
transitionEnd: m(&quot;TransitionEnd&quot;),
animationEnd: m(&quot;AnimationEnd&quot;)
}, a.fn.animate = function (b, c, d, e) {
return a.isObject(c) && (d = c.easing, e = c.complete, c = c.duration), c && (c /= 1e3), this.anim(b, c, d, e)
}, a.fn.anim = function (d, e, f, g) {
var h, i = {}, l, m = this,
n, o = a.fx.transitionEnd;
e === b && (e = .4), a.fx.off && (e = 0);
if (typeof d == &quot;string&quot;) i[c + &quot;animation-name&quot;] = d, i[c + &quot;animation-duration&quot;] = e + &quot;s&quot;, o = a.fx.animationEnd;
else {
for (l in d) j.test(l) ? (h || (h = []), h.push(l + &quot;(&quot; + d[l] + &quot;)&quot;)) : i[l] = d[l];
h && (i[c + &quot;transform&quot;] = h.join(&quot; &quot;)), !a.fx.off && typeof d == &quot;object&quot; && (i[c + &quot;transition-property&quot;] = Object.keys(d).join(&quot;, &quot;), i[c + &quot;transition-duration&quot;] = e + &quot;s&quot;, i[c + &quot;transition-timing-function&quot;] = f || &quot;linear&quot;)
}
return n = function (b) {
if (typeof b != &quot;undefined&quot;) {
if (b.target !== b.currentTarget) return;
a(b.target).unbind(o, arguments.callee)
}
a(this).css(k), g && g.call(this)
}, e > 0 && this.bind(o, n), setTimeout(function () {
m.css(i), e <= 0 && setTimeout(function () {
m.each(function () {
n.call(this)
})
}, 0)
}, 0), this
}, i = null
}(Zepto),
function ($) {
function triggerAndReturn(a, b, c) {
var d = $.Event(b);
return $(a).trigger(d, c), !d.defaultPrevented
}
function triggerGlobal(a, b, c, d) {
if (a.global) return triggerAndReturn(b || document, c, d)
}
function ajaxStart(a) {
a.global && $.active++ === 0 && triggerGlobal(a, null, &quot;ajaxStart&quot;)
}
function ajaxStop(a) {
a.global && !--$.active && triggerGlobal(a, null, &quot;ajaxStop&quot;)
}
function ajaxBeforeSend(a, b) {
var c = b.context;
if (b.beforeSend.call(c, a, b) === !1 || triggerGlobal(b, c, &quot;ajaxBeforeSend&quot;, [a, b]) === !1) return !1;
triggerGlobal(b, c, &quot;ajaxSend&quot;, [a, b])
}
function ajaxSuccess(a, b, c) {
var d = c.context,
e = &quot;success&quot;;
c.success.call(d, a, e, b), triggerGlobal(c, d, &quot;ajaxSuccess&quot;, [b, c, a]), ajaxComplete(e, b, c)
}
function ajaxError(a, b, c, d) {
var e = d.context;
d.error.call(e, c, b, a), triggerGlobal(d, e, &quot;ajaxError&quot;, [c, d, a]), ajaxComplete(b, c, d)
}
function ajaxComplete(a, b, c) {
var d = c.context;
c.complete.call(d, b, a), triggerGlobal(c, d, &quot;ajaxComplete&quot;, [b, c]), ajaxStop(c)
}
function empty() {}
function mimeToDataType(a) {
return a && (a == htmlType ? &quot;html&quot; : a == jsonType ? &quot;json&quot; : scriptTypeRE.test(a) ? &quot;script&quot; : xmlTypeRE.test(a) && &quot;xml&quot;) || &quot;text&quot;
}
function appendQuery(a, b) {
return (a + &quot;&&quot; + b).replace(/[&?]{1,2}/, &quot;?&quot;)
}
function serializeData(a) {
isObject(a.data) && (a.data = $.param(a.data)), a.data && (!a.type || a.type.toUpperCase() == &quot;GET&quot;) && (a.url = appendQuery(a.url, a.data))
}
function serialize(a, b, c, d) {
var e = $.isArray(b);
$.each(b, function (b, f) {
d && (b = c ? d : d + &quot;[&quot; + (e ? &quot;&quot; : b) + &quot;]&quot;), !d && e ? a.add(f.name, f.value) : (c ? $.isArray(f) : isObject(f)) ? serialize(a, f, c, b) : a.add(b, f)
})
}
var jsonpID = 0,
isObject = $.isObject,
document = window.document,
key, name, rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
scriptTypeRE = /^(?:text|application)\/javascript/i,
xmlTypeRE = /^(?:text|application)\/xml/i,
jsonType = &quot;application/json&quot;,
htmlType = &quot;text/html&quot;,
blankRE = /^\s*$/;
$.active = 0, $.ajaxJSONP = function (a) {
var b = &quot;jsonp&quot; + ++jsonpID,
c = document.createElement(&quot;script&quot;),
d = function () {
$(c).remove(), b in window && (window = empty), ajaxComplete(&quot;abort&quot;, e, a)
}, e = {
abort: d
}, f;
return a.error && (c.onerror = function () {
e.abort(), a.error()
}), window = function (d) {
clearTimeout(f), $(c).remove(), delete window, ajaxSuccess(d, e, a)
}, serializeData(a), c.src = a.url.replace(/=\?/, &quot;=&quot; + b), $(&quot;head&quot;).append(c), a.timeout > 0 && (f = setTimeout(function () {
e.abort(), ajaxComplete(&quot;timeout&quot;, e, a)
}, a.timeout)), e
}, $.ajaxSettings = {
type: &quot;GET&quot;,
beforeSend: empty,
success: empty,
error: empty,
complete: empty,
context: null,
global: !0,
xhr: function () {
return new window.XMLHttpRequest
},
accepts: {
script: &quot;text/javascript, application/javascript&quot;,
json: jsonType,
xml: &quot;application/xml, text/xml&quot;,
html: htmlType,
text: &quot;text/plain&quot;
},
crossDomain: !1,
timeout: 0
}, $.ajax = function (options) {
var settings = $.extend({}, options || {});
for (key in $.ajaxSettings) settings[key] === undefined && (settings[key] = $.ajaxSettings[key]);
ajaxStart(settings), settings.crossDomain || (settings.crossDomain = /^([\w-]+:)?\/\/([^\/]+)/.test(settings.url) && RegExp.$2 != window.location.host);
var dataType = settings.dataType,
hasPlaceholder = /=\?/.test(settings.url);
if (dataType == &quot;jsonp&quot; || hasPlaceholder) return hasPlaceholder || (settings.url = appendQuery(settings.url, &quot;callback=?&quot;)), $.ajaxJSONP(settings);
settings.url || (settings.url = window.location.toString()), serializeData(settings);
var mime = settings.accepts[dataType],
baseHeaders = {}, protocol = /^([\w-]+:)\/\//.test(settings.url) ? RegExp.$1 : window.location.protocol,
xhr = $.ajaxSettings.xhr(),
abortTimeout;
settings.crossDomain || (baseHeaders[&quot;X-Requested-With&quot;] = &quot;XMLHttpRequest&quot;), mime && (baseHeaders.Accept = mime, mime.indexOf(&quot;,&quot;) > -1 && (mime = mime.split(&quot;,&quot;, 2)[0]), xhr.overrideMimeType && xhr.overrideMimeType(mime));
if (settings.contentType || settings.data && settings.type.toUpperCase() != &quot;GET&quot;) baseHeaders[&quot;Content-Type&quot;] = settings.contentType || &quot;application/x-www-form-urlencoded&quot;;
settings.headers = $.extend(baseHeaders, settings.headers || {}), xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
clearTimeout(abortTimeout);
var result, error = !1;
if (xhr.status >= 200 && xhr.status < 300 || xhr.status == 304 || xhr.status == 0 && protocol == &quot;file:&quot;) {
dataType = dataType || mimeToDataType(xhr.getResponseHeader(&quot;content-type&quot;)), result = xhr.responseText;
try {
dataType == &quot;script&quot; ? (1, eval)(result) : dataType == &quot;xml&quot; ? result = xhr.responseXML : dataType == &quot;json&quot; && (result = blankRE.test(result) ? null : JSON.parse(result))
} catch (e) {
error = e
}
error ? ajaxError(error, &quot;parsererror&quot;, xhr, settings) : ajaxSuccess(result, xhr, settings)
} else ajaxError(null, &quot;error&quot;, xhr, settings)
}
};
var async = &quot;async&quot; in settings ? settings.async : !0;
xhr.open(settings.type, settings.url, async);
for (name in settings.headers) xhr.setRequestHeader(name, settings.headers[name]);
return ajaxBeforeSend(xhr, settings) === !1 ? (xhr.abort(), !1) : (settings.timeout > 0 && (abortTimeout = setTimeout(function () {
xhr.onreadystatechange = empty, xhr.abort(), ajaxError(null, &quot;timeout&quot;, xhr, settings)
}, settings.timeout)), xhr.send(settings.data ? settings.data : null), xhr)
}, $.get = function (a, b) {
return $.ajax({
url: a,
success: b
})
}, $.post = function (a, b, c, d) {
return $.isFunction(b) && (d = d || c, c = b, b = null), $.ajax({
type: &quot;POST&quot;,
url: a,
data: b,
success: c,
dataType: d
})
}, $.getJSON = function (a, b) {
return $.ajax({
url: a,
success: b,
dataType: &quot;json&quot;
})
}, $.fn.load = function (a, b) {
if (!this.length) return this;
var c = this,
d = a.split(/\s/),
e;
return d.length > 1 && (a = d[0], e = d[1]), $.get(a, function (a) {
c.html(e ? $(document.createElement(&quot;div&quot;)).html(a.replace(rscript, &quot;&quot;)).find(e).html() : a), b && b.call(c)
}), this
};
var escape = encodeURIComponent;
$.param = function (a, b) {
var c = [];
return c.add = function (a, b) {
this.push(escape(a) + &quot;=&quot; + escape(b))
}, serialize(c, a, b), c.join(&quot;&&quot;).replace(&quot;%20&quot;, &quot;+&quot;)
}
}(Zepto),
function (a) {
a.fn.serializeArray = function () {
var b = [],
c;
return a(Array.prototype.slice.call(this.get(0).elements)).each(function () {
c = a(this);
var d = c.attr(&quot;type&quot;);
this.nodeName.toLowerCase() != &quot;fieldset&quot; && !this.disabled && d != &quot;submit&quot; && d != &quot;reset&quot; && d != &quot;button&quot; && (d != &quot;radio&quot; && d != &quot;checkbox&quot; || this.checked) && b.push({
name: c.attr(&quot;name&quot;),
value: c.val()
})
}), b
}, a.fn.serialize = function () {
var a = [];
return this.serializeArray().forEach(function (b) {
a.push(encodeURIComponent(b.name) + &quot;=&quot; + encodeURIComponent(b.value))
}), a.join(&quot;&&quot;)
}, a.fn.submit = function (b) {
if (b) this.bind(&quot;submit&quot;, b);
else if (this.length) {
var c = a.Event(&quot;submit&quot;);
this.eq(0).trigger(c), c.defaultPrevented || this.get(0).submit()
}
return this
}
}(Zepto),
function (a) {
function d(a) {
return &quot;tagName&quot; in a ? a : a.parentNode
}
function e(a, b, c, d) {
var e = Math.abs(a - b),
f = Math.abs(c - d);
return e >= f ? a - b > 0 ? &quot;Left&quot; : &quot;Right&quot; : c - d > 0 ? &quot;Up&quot; : &quot;Down&quot;
}
function h() {
g = null, b.last && (b.el.trigger(&quot;longTap&quot;), b = {})
}
function i() {
g && clearTimeout(g), g = null
}
var b = {}, c, f = 750,
g;
a(document).ready(function () {
var j, k;
a(document.body).bind(&quot;touchstart&quot;, function (e) {
j = Date.now(), k = j - (b.last || j), b.el = a(d(e.touches[0].target)), c && clearTimeout(c), b.x1 = e.touches[0].pageX, b.y1 = e.touches[0].pageY, k > 0 && k <= 250 && (b.isDoubleTap = !0), b.last = j, g = setTimeout(h, f)
}).bind(&quot;touchmove&quot;, function (a) {
i(), b.x2 = a.touches[0].pageX, b.y2 = a.touches[0].pageY
}).bind(&quot;touchend&quot;, function (a) {
i(), b.isDoubleTap ? (b.el.trigger(&quot;doubleTap&quot;), b = {}) : b.x2 && Math.abs(b.x1 - b.x2) > 30 || b.y2 && Math.abs(b.y1 - b.y2) > 30 ? (b.el.trigger(&quot;swipe&quot;) && b.el.trigger(&quot;swipe&quot; + e(b.x1, b.x2, b.y1, b.y2)), b = {}) : &quot;last&quot; in b && (b.el.trigger(&quot;tap&quot;), c = setTimeout(function () {
c = null, b.el.trigger(&quot;singleTap&quot;), b = {}
}, 250))
}).bind(&quot;touchcancel&quot;, function () {
c && clearTimeout(c), g && clearTimeout(g), g = c = null, b = {}
})
}), [&quot;swipe&quot;, &quot;swipeLeft&quot;, &quot;swipeRight&quot;, &quot;swipeUp&quot;, &quot;swipeDown&quot;, &quot;doubleTap&quot;, &quot;tap&quot;, &quot;singleTap&quot;, &quot;longTap&quot;].forEach(function (b) {
a.fn = function (a) {
return this.bind(b, a)
}
})
}(Zepto),
function () {
function A(a, b, c) {
if (a === b) return a !== 0 || 1 / a == 1 / b;
if (a == null || b == null) return a === b;
a._chain && (a = a._wrapped), b._chain && (b = b._wrapped);
if (a.isEqual && w.isFunction(a.isEqual)) return a.isEqual(b);
if (b.isEqual && w.isFunction(b.isEqual)) return b.isEqual(a);
var d = i.call(a);
if (d != i.call(b)) return !1;
switch (d) {
case &quot;[object String]&quot;:
return a == String(b);
case &quot;[object Number]&quot;:
return a != +a ? b != +b : a == 0 ? 1 / a == 1 / b : a == +b;
case &quot;[object Date]&quot;:
case &quot;[object Boolean]&quot;:
return +a == +b;
case &quot;[object RegExp]&quot;:
return a.source == b.source && a.global == b.global && a.multiline == b.multiline && a.ignoreCase == b.ignoreCase
}
if (typeof a != &quot;object&quot; || typeof b != &quot;object&quot;) return !1;
var e = c.length;
while (e--) if (c[e] == a) return !0;
c.push(a);
var f = 0,
g = !0;
if (d == &quot;[object Array]&quot;) {
f = a.length, g = f == b.length;
if (g) while (f--) if (!(g = f in a == f in b && A(a[f], b[f], c))) break
} else {
if (&quot;constructor&quot; in a != &quot;constructor&quot; in b || a.constructor != b.constructor) return !1;
for (var h in a) if (w.has(a, h)) {
f++;
if (!(g = w.has(b, h) && A(a[h], b[h], c))) break
}
if (g) {
for (h in b) if (w.has(b, h) && !(f--)) break;
g = !f
}
}
return c.pop(), g
}
var a = this,
b = a._,
c = {}, d = Array.prototype,
e = Object.prototype,
f = Function.prototype,
g = d.slice,
h = d.unshift,
i = e.toString,
j = e.hasOwnProperty,
k = d.forEach,
l = d.map,
m = d.reduce,
n = d.reduceRight,
o = d.filter,
p = d.every,
q = d.some,
r = d.indexOf,
s = d.lastIndexOf,
t = Array.isArray,
u = Object.keys,
v = f.bind,
w = function (a) {
return new I(a)
};
typeof exports != &quot;undefined&quot; ? (typeof module != &quot;undefined&quot; && module.exports && (exports = module.exports = w), exports._ = w) : a._ = w, w.VERSION = &quot;1.3.3&quot;;
var x = w.each = w.forEach = function (a, b, d) {
if (a == null) return;
if (k && a.forEach === k) a.forEach(b, d);
else if (a.length === +a.length) {
for (var e = 0, f = a.length; e < f; e++) if (e in a && b.call(d, a[e], e, a) === c) return
} else for (var g in a) if (w.has(a, g) && b.call(d, a[g], g, a) === c) return
};
w.map = w.collect = function (a, b, c) {
var d = [];
return a == null ? d : l && a.map === l ? a.map(b, c) : (x(a, function (a, e, f) {
d[d.length] = b.call(c, a, e, f)
}), a.length === +a.length && (d.length = a.length), d)
}, w.reduce = w.foldl = w.inject = function (a, b, c, d) {
var e = arguments.length > 2;
a == null && (a = []);
if (m && a.reduce === m) return d && (b = w.bind(b, d)), e ? a.reduce(b, c) : a.reduce(b);
x(a, function (a, f, g) {
e ? c = b.call(d, c, a, f, g) : (c = a, e = !0)
});
if (!e) throw new TypeError(&quot;Reduce of empty array with no initial value&quot;);
return c
}, w.reduceRight = w.foldr = function (a, b, c, d) {
var e = arguments.length > 2;
a == null && (a = []);
if (n && a.reduceRight === n) return d && (b = w.bind(b, d)), e ? a.reduceRight(b, c) : a.reduceRight(b);
var f = w.toArray(a).reverse();
return d && !e && (b = w.bind(b, d)), e ? w.reduce(f, b, c, d) : w.reduce(f, b)
}, w.find = w.detect = function (a, b, c) {
var d;
return y(a, function (a, e, f) {
if (b.call(c, a, e, f)) return d = a, !0
}), d
}, w.filter = w.select = function (a, b, c) {
var d = [];
return a == null ? d : o && a.filter === o ? a.filter(b, c) : (x(a, function (a, e, f) {
b.call(c, a, e, f) && (d[d.length] = a)
}), d)
}, w.reject = function (a, b, c) {
var d = [];
return a == null ? d : (x(a, function (a, e, f) {
b.call(c, a, e, f) || (d[d.length] = a)
}), d)
}, w.every = w.all = function (a, b, d) {
var e = !0;
return a == null ? e : p && a.every === p ? a.every(b, d) : (x(a, function (a, f, g) {
if (!(e = e && b.call(d, a, f, g))) return c
}), !! e)
};
var y = w.some = w.any = function (a, b, d) {
b || (b = w.identity);
var e = !1;
return a == null ? e : q && a.some === q ? a.some(b, d) : (x(a, function (a, f, g) {
if (e || (e = b.call(d, a, f, g))) return c
}), !! e)
};
w.include = w.contains = function (a, b) {
var c = !1;
return a == null ? c : r && a.indexOf === r ? a.indexOf(b) != -1 : (c = y(a, function (a) {
return a === b
}), c)
}, w.invoke = function (a, b) {
var c = g.call(arguments, 2);
return w.map(a, function (a) {
return (w.isFunction(b) ? b || a : a).apply(a, c)
})
}, w.pluck = function (a, b) {
return w.map(a, function (a) {
return a
})
}, w.max = function (a, b, c) {
if (!b && w.isArray(a) && a[0] === +a[0]) return Math.max.apply(Math, a);
if (!b && w.isEmpty(a)) return -Infinity;
var d = {
computed: -Infinity
};
return x(a, function (a, e, f) {
var g = b ? b.call(c, a, e, f) : a;
g >= d.computed && (d = {
value: a,
computed: g
})
}), d.value
}, w.min = function (a, b, c) {
if (!b && w.isArray(a) && a[0] === +a[0]) return Math.min.apply(Math, a);
if (!b && w.isEmpty(a)) return Infinity;
var d = {
computed: Infinity
};
return x(a, function (a, e, f) {
var g = b ? b.call(c, a, e, f) : a;
g < d.computed && (d = {
value: a,
computed: g
})
}), d.value
}, w.shuffle = function (a) {
var b = [],
c;
return x(a, function (a, d, e) {
c = Math.floor(Math.random() * (d + 1)), b[d] = b[c], b[c] = a
}), b
}, w.sortBy = function (a, b, c) {
var d = w.isFunction(b) ? b : function (a) {
return a
};
return w.pluck(w.map(a, function (a, b, e) {
return {
value: a,
criteria: d.call(c, a, b, e)
}
}).sort(function (a, b) {
var c = a.criteria,
d = b.criteria;
return c === void 0 ? 1 : d === void 0 ? -1 : c < d ? -1 : c > d ? 1 : 0
}), &quot;value&quot;)
}, w.groupBy = function (a, b) {
var c = {}, d = w.isFunction(b) ? b : function (a) {
return a
};
return x(a, function (a, b) {
var e = d(a, b);
(c[e] || (c[e] = [])).push(a)
}), c
}, w.sortedIndex = function (a, b, c) {
c || (c = w.identity);
var d = 0,
e = a.length;
while (d < e) {
var f = d + e >> 1;
c(a[f]) < c(b) ? d = f + 1 : e = f
}
return d
}, w.toArray = function (a) {
return a ? w.isArray(a) ? g.call(a) : w.isArguments(a) ? g.call(a) : a.toArray && w.isFunction(a.toArray) ? a.toArray() : w.values(a) : []
}, w.size = function (a) {
return w.isArray(a) ? a.length : w.keys(a).length
}, w.first = w.head = w.take = function (a, b, c) {
return b != null && !c ? g.call(a, 0, b) : a[0]
}, w.initial = function (a, b, c) {
return g.call(a, 0, a.length - (b == null || c ? 1 : b))
}, w.last = function (a, b, c) {
return b != null && !c ? g.call(a, Math.max(a.length - b, 0)) : a[a.length - 1]
}, w.rest = w.tail = function (a, b, c) {
return g.call(a, b == null || c ? 1 : b)
}, w.compact = function (a) {
return w.filter(a, function (a) {
return !!a
})
}, w.flatten = function (a, b) {
return w.reduce(a, function (a, c) {
return w.isArray(c) ? a.concat(b ? c : w.flatten(c)) : (a[a.length] = c, a)
}, [])
}, w.without = function (a) {
return w.difference(a, g.call(arguments, 1))
}, w.uniq = w.unique = function (a, b, c) {
var d = c ? w.map(a, c) : a,
e = [];
return a.length < 3 && (b = !0), w.reduce(d, function (c, d, f) {
if (b ? w.last(c) !== d || !c.length : !w.include(c, d)) c.push(d), e.push(a[f]);
return c
}, []), e
}, w.union = function () {
return w.uniq(w.flatten(arguments, !0))
}, w.intersection = w.intersect = function (a) {
var b = g.call(arguments, 1);
return w.filter(w.uniq(a), function (a) {
return w.every(b, function (b) {
return w.indexOf(b, a) >= 0
})
})
}, w.difference = function (a) {
var b = w.flatten(g.call(arguments, 1), !0);
return w.filter(a, function (a) {
return !w.include(b, a)
})
}, w.zip = function () {
var a = g.call(arguments),
b = w.max(w.pluck(a, &quot;length&quot;)),
c = new Array(b);
for (var d = 0; d < b; d++) c[d] = w.pluck(a, &quot;&quot; + d);
return c
}, w.indexOf = function (a, b, c) {
if (a == null) return -1;
var d, e;
if (c) return d = w.sortedIndex(a, b), a[d] === b ? d : -1;
if (r && a.indexOf === r) return a.indexOf(b);
for (d = 0, e = a.length; d < e; d++) if (d in a && a[d] === b) return d;
return -1
}, w.lastIndexOf = function (a, b) {
if (a == null) return -1;
if (s && a.lastIndexOf === s) return a.lastIndexOf(b);
var c = a.length;
while (c--) if (c in a && a[c] === b) return c;
return -1
}, w.range = function (a, b, c) {
arguments.length <= 1 && (b = a || 0, a = 0), c = arguments[2] || 1;
var d = Math.max(Math.ceil((b - a) / c), 0),
e = 0,
f = new Array(d);
while (e < d) f[e++] = a, a += c;
return f
};
var z = function () {};
w.bind = function (b, c) {
var d, e;
if (b.bind === v && v) return v.apply(b, g.call(arguments, 1));
if (!w.isFunction(b)) throw new TypeError;
return e = g.call(arguments, 2), d = function () {
if (this instanceof d) {
z.prototype = b.prototype;
var a = new z,
f = b.apply(a, e.concat(g.call(arguments)));
return Object(f) === f ? f : a
}
return b.apply(c, e.concat(g.call(arguments)))
}
}, w.bindAll = function (a) {
var b = g.call(arguments, 1);
return b.length == 0 && (b = w.functions(a)), x(b, function (b) {
a = w.bind(a, a)
}), a
}, w.memoize = function (a, b) {
var c = {};
return b || (b = w.identity),
function () {
var d = b.apply(this, arguments);
return w.has(c, d) ? c[d] : c[d] = a.apply(this, arguments)
}
}, w.delay = function (a, b) {
var c = g.call(arguments, 2);
return setTimeout(function () {
return a.apply(null, c)
}, b)
}, w.defer = function (a) {
return w.delay.apply(w, [a, 1].concat(g.call(arguments, 1)))
}, w.throttle = function (a, b) {
var c, d, e, f, g, h, i = w.debounce(function () {
g = f = !1
}, b);
return function () {
c = this, d = arguments;
var j = function () {
e = null, g && a.apply(c, d), i()
};
return e || (e = setTimeout(j, b)), f ? g = !0 : h = a.apply(c, d), i(), f = !0, h
}
}, w.debounce = function (a, b, c) {
var d;
return function () {
var e = this,
f = arguments,
g = function () {
d = null, c || a.apply(e, f)
};
c && !d && a.apply(e, f), clearTimeout(d), d = setTimeout(g, b)
}
}, w.once = function (a) {
var b = !1,
c;
return function () {
return b ? c : (b = !0, c = a.apply(this, arguments))
}
}, w.wrap = function (a, b) {
return function () {
var c = [a].concat(g.call(arguments, 0));
return b.apply(this, c)
}
}, w.compose = function () {
var a = arguments;
return function () {
var b = arguments;
for (var c = a.length - 1; c >= 0; c--) b = [a[c].apply(this, b)];
return b[0]
}
}, w.after = function (a, b) {
return a <= 0 ? b() : function () {
if (--a < 1) return b.apply(this, arguments)
}
}, w.keys = u || function (a) {
if (a !== Object(a)) throw new TypeError(&quot;Invalid object&quot;);
var b = [];
for (var c in a) w.has(a, c) && (b[b.length] = c);
return b
}, w.values = function (a) {
return w.map(a, w.identity)
}, w.functions = w.methods = function (a) {
var b = [];
for (var c in a) w.isFunction(a[c]) && b.push(c);
return b.sort()
}, w.extend = function (a) {
return x(g.call(arguments, 1), function (b) {
for (var c in b) a[c] = b[c]
}), a
}, w.pick = function (a) {
var b = {};
return x(w.flatten(g.call(arguments, 1)), function (c) {
c in a && (b[c] = a[c])
}), b
},
w.defaults = function (a) {
return x(g.call(arguments, 1), function (b) {
for (var c in b) a[c] == null && (a[c] = b[c])
}), a
}, w.clone = function (a) {
return w.isObject(a) ? w.isArray(a) ? a.slice() : w.extend({}, a) : a
}, w.tap = function (a, b) {
return b(a), a
}, w.isEqual = function (a, b) {
return A(a, b, [])
}, w.isEmpty = function (a) {
if (a == null) return !0;
if (w.isArray(a) || w.isString(a)) return a.length === 0;
for (var b in a) if (w.has(a, b)) return !1;
return !0
}, w.isElement = function (a) {
return !!a && a.nodeType == 1
}, w.isArray = t || function (a) {
return i.call(a) == &quot;[object Array]&quot;
}, w.isObject = function (a) {
return a === Object(a)
}, w.isArguments = function (a) {
return i.call(a) == &quot;[object Arguments]&quot;
}, w.isArguments(arguments) || (w.isArguments = function (a) {
return !!a && !! w.has(a, &quot;callee&quot;)
}), w.isFunction = function (a) {
return i.call(a) == &quot;[object Function]&quot;
}, w.isString = function (a) {
return i.call(a) == &quot;[object String]&quot;
}, w.isNumber = function (a) {
return i.call(a) == &quot;[object Number]&quot;
}, w.isFinite = function (a) {
return w.isNumber(a) && isFinite(a)
}, w.isNaN = function (a) {
return a !== a
}, w.isBoolean = function (a) {
return a === !0 || a === !1 || i.call(a) == &quot;[object Boolean]&quot;
}, w.isDate = function (a) {
return i.call(a) == &quot;[object Date]&quot;
}, w.isRegExp = function (a) {
return i.call(a) == &quot;[object RegExp]&quot;
}, w.isNull = function (a) {
return a === null
}, w.isUndefined = function (a) {
return a === void 0
}, w.has = function (a, b) {
return j.call(a, b)
}, w.noConflict = function () {
return a._ = b, this
}, w.identity = function (a) {
return a
}, w.times = function (a, b, c) {
for (var d = 0; d < a; d++) b.call(c, d)
}, w.escape = function (a) {
return (&quot;&quot; + a).replace(/&/g, &quot;&&quot;).replace(/</g, &quot;<&quot;).replace(/>/g, &quot;>&quot;).replace(/&quot;/g, &quot;&quot;&quot;).replace(/'/g, &quot;'&quot;).replace(/\//g, &quot;/&quot;)
}, w.result = function (a, b) {
if (a == null) return null;
var c = a;
return w.isFunction(c) ? c.call(a) : c
}, w.mixin = function (a) {
x(w.functions(a), function (b) {
K(b, w = a)
})
};
var B = 0;
w.uniqueId = function (a) {
var b = B++;
return a ? a + b : b
}, w.templateSettings = {
evaluate: /<%([\s\S]+?)%>/g,
interpolate: /<%=([\s\S]+?)%>/g,
escape: /<%-([\s\S]+?)%>/g
};
var C = /.^/,
D = {
&quot;\\&quot;: &quot;\\&quot;,
&quot;'&quot;: &quot;'&quot;,
r: &quot;\r&quot;,
n: &quot;\n&quot;,
t: &quot;&quot;,
u2028: &quot;\u2028&quot;,
u2029: &quot;\u2029&quot;
};
for (var E in D) D[D[E]] = E;
var F = /\\|'|\r|\n|\t|\u2028|\u2029/g,
G = /\\(\\|'|r|n|t|u2028|u2029)/g,
H = function (a) {
return a.replace(G, function (a, b) {
return D
})
};
w.template = function (a, b, c) {
c = w.defaults(c || {}, w.templateSettings);
var d = &quot;__p+='&quot; + a.replace(F, function (a) {
return &quot;\\&quot; + D[a]
}).replace(c.escape || C, function (a, b) {
return &quot;'+\n_.escape(&quot; + H(b) + &quot;)+\n'&quot;
}).replace(c.interpolate || C, function (a, b) {
return &quot;'+\n(&quot; + H(b) + &quot;)+\n'&quot;
}).replace(c.evaluate || C, function (a, b) {
return &quot;';\n&quot; + H(b) + &quot;\n;__p+='&quot;
}) + &quot;';\n&quot;;
c.variable || (d = &quot;with(obj||{}){\n&quot; + d + &quot;}\n&quot;), d = &quot;var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')};\n&quot; + d + &quot;return __p;\n&quot;;
var e = new Function(c.variable || &quot;obj&quot;, &quot;_&quot;, d);
if (b) return e(b, w);
var f = function (a) {
return e.call(this, a, w)
};
return f.source = &quot;function(&quot; + (c.variable || &quot;obj&quot;) + &quot;){\n&quot; + d + &quot;}&quot;, f
}, w.chain = function (a) {
return w(a).chain()
};
var I = function (a) {
this._wrapped = a
};
w.prototype = I.prototype;
var J = function (a, b) {
return b ? w(a).chain() : a
}, K = function (a, b) {
I.prototype[a] = function () {
var a = g.call(arguments);
return h.call(a, this._wrapped), J(b.apply(w, a), this._chain)
}
};
w.mixin(w), x([&quot;pop&quot;, &quot;push&quot;, &quot;reverse&quot;, &quot;shift&quot;, &quot;sort&quot;, &quot;splice&quot;, &quot;unshift&quot;], function (a) {
var b = d[a];
I.prototype[a] = function () {
var c = this._wrapped;
b.apply(c, arguments);
var d = c.length;
return (a == &quot;shift&quot; || a == &quot;splice&quot;) && d === 0 && delete c[0], J(c, this._chain)
}
}), x([&quot;concat&quot;, &quot;join&quot;, &quot;slice&quot;], function (a) {
var b = d[a];
I.prototype[a] = function () {
return J(b.apply(this._wrapped, arguments), this._chain)
}
}), I.prototype.chain = function () {
return this._chain = !0, this
}, I.prototype.value = function () {
return this._wrapped
}
}.call(this),
function () {
var a = this,
b = a.Backbone,
c = Array.prototype.slice,
d = Array.prototype.splice,
e;
typeof exports != &quot;undefined&quot; ? e = exports : e = a.Backbone = {}, e.VERSION = &quot;0.9.2&quot;;
var f = a._;
!f && typeof require != &quot;undefined&quot; && (f = require(&quot;underscore&quot;));
var g = a.jQuery || a.Zepto || a.ender;
e.setDomLibrary = function (a) {
g = a
}, e.noConflict = function () {
return a.Backbone = b, this
}, e.emulateHTTP = !1, e.emulateJSON = !1;
var h = /\s+/,
i = e.Events = {
on: function (a, b, c) {
var d, e, f, g, i;
if (!b) return this;
a = a.split(h), d = this._callbacks || (this._callbacks = {});
while (e = a.shift()) i = d[e], f = i ? i.tail : {}, f.next = g = {}, f.context = c, f.callback = b, d[e] = {
tail: g,
next: i ? i.next : f
};
return this
},
off: function (a, b, c) {
var d, e, g, i, j, k;
if (!(e = this._callbacks)) return;
if (!(a || b || c)) return delete this._callbacks, this;
a = a ? a.split(h) : f.keys(e);
while (d = a.shift()) {
g = e[d], delete e[d];
if (!g || !b && !c) continue;
i = g.tail;
while ((g = g.next) !== i) j = g.callback, k = g.context, (b && j !== b || c && k !== c) && this.on(d, j, k)
}
return this
},
trigger: function (a) {
var b, d, e, f, g, i, j;
if (!(e = this._callbacks)) return this;
i = e.all, a = a.split(h), j = c.call(arguments, 1);
while (b = a.shift()) {
if (d = e) {
f = d.tail;
while ((d = d.next) !== f) d.callback.apply(d.context || this, j)
}
if (d = i) {
f = d.tail, g = .concat(j);
while ((d = d.next) !== f) d.callback.apply(d.context || this, g)
}
}
return this
}
};
i.bind = i.on, i.unbind = i.off;
var j = e.Model = function (a, b) {
var c;
a || (a = {}), b && b.parse && (a = this.parse(a));
if (c = A(this, &quot;defaults&quot;)) a = f.extend({}, c, a);
b && b.collection && (this.collection = b.collection), this.attributes = {}, this._escapedAttributes = {}, this.cid = f.uniqueId(&quot;c&quot;), this.changed = {}, this._silent = {}, this._pending = {}, this.set(a, {
silent: !0
}), this.changed = {}, this._silent = {}, this._pending = {}, this._previousAttributes = f.clone(this.attributes), this.initialize.apply(this, arguments)
};
f.extend(j.prototype, i, {
changed: null,
_silent: null,
_pending: null,
idAttribute: &quot;id&quot;,
initialize: function () {},
toJSON: function (a) {
return f.clone(this.attributes)
},
get: function (a) {
return this.attributes[a]
},
escape: function (a) {
var b;
if (b = this._escapedAttributes[a]) return b;
var c = this.get(a);
return this._escapedAttributes[a] = f.escape(c == null ? &quot;&quot; : &quot;&quot; + c)
},
has: function (a) {
return this.get(a) != null
},
set: function (a, b, c) {
var d, e, g;
f.isObject(a) || a == null ? (d = a, c = b) : (d = {}, d[a] = b), c || (c = {});
if (!d) return this;
d instanceof j && (d = d.attributes);
if (c.unset) for (e in d) d[e] = void 0;
if (!this._validate(d, c)) return !1;
this.idAttribute in d && (this.id = d[this.idAttribute]);
var h = c.changes = {}, i = this.attributes,
k = this._escapedAttributes,
l = this._previousAttributes || {};
for (e in d) {
g = d[e];
if (!f.isEqual(i[e], g) || c.unset && f.has(i, e)) delete k[e], (c.silent ? this._silent : h)[e] = !0;
c.unset ? delete i[e] : i[e] = g, !f.isEqual(l[e], g) || f.has(i, e) != f.has(l, e) ? (this.changed[e] = g, c.silent || (this._pending[e] = !0)) : (delete this.changed[e], delete this._pending[e])
}
return c.silent || this.change(c), this
},
unset: function (a, b) {
return (b || (b = {})).unset = !0, this.set(a, null, b)
},
clear: function (a) {
return (a || (a = {})).unset = !0, this.set(f.clone(this.attributes), a)
},
fetch: function (a) {
a = a ? f.clone(a) : {};
var b = this,
c = a.success;
return a.success = function (d, e, f) {
if (!b.set(b.parse(d, f), a)) return !1;
c && c(b, d)
}, a.error = e.wrapError(a.error, b, a), (this.sync || e.sync).call(this, &quot;read&quot;, this, a)
},
save: function (a, b, c) {
var d, g;
f.isObject(a) || a == null ? (d = a, c = b) : (d = {}, d[a] = b), c = c ? f.clone(c) : {};
if (c.wait) {
if (!this._validate(d, c)) return !1;
g = f.clone(this.attributes)
}
var h = f.extend({}, c, {
silent: !0
});
if (d && !this.set(d, c.wait ? h : c)) return !1;
var i = this,
j = c.success;
c.success = function (a, b, e) {
var g = i.parse(a, e);
c.wait && (delete c.wait, g = f.extend(d || {}, g));
if (!i.set(g, c)) return !1;
j ? j(i, a) : i.trigger(&quot;sync&quot;, i, a, c)
}, c.error = e.wrapError(c.error, i, c);
var k = this.isNew() ? &quot;create&quot; : &quot;update&quot;,
l = (this.sync || e.sync).call(this, k, this, c);
return c.wait && this.set(g, h), l
},
destroy: function (a) {
a = a ? f.clone(a) : {};
var b = this,
c = a.success,
d = function () {
b.trigger(&quot;destroy&quot;, b, b.collection, a)
};
if (this.isNew()) return d(), !1;
a.success = function (e) {
a.wait && d(), c ? c(b, e) : b.trigger(&quot;sync&quot;, b, e, a)
}, a.error = e.wrapError(a.error, b, a);
var g = (this.sync || e.sync).call(this, &quot;delete&quot;, this, a);
return a.wait || d(), g
},
url: function () {
var a = A(this, &quot;urlRoot&quot;) || A(this.collection, &quot;url&quot;) || B();
return this.isNew() ? a : a + (a.charAt(a.length - 1) == &quot;/&quot; ? &quot;&quot; : &quot;/&quot;) + encodeURIComponent(this.id)
},
parse: function (a, b) {
return a
},
clone: function () {
return new this.constructor(this.attributes)
},
isNew: function () {
return this.id == null
},
change: function (a) {
a || (a = {});
var b = this._changing;
this._changing = !0;
for (var c in this._silent) this._pending[c] = !0;
var d = f.extend({}, a.changes, this._silent);
this._silent = {};
for (var c in d) this.trigger(&quot;change:&quot; + c, this, this.get(c), a);
if (b) return this;
while (!f.isEmpty(this._pending)) {
this._pending = {}, this.trigger(&quot;change&quot;, this, a);
for (var c in this.changed) {
if (this._pending[c] || this._silent[c]) continue;
delete this.changed[c]
}
this._previousAttributes = f.clone(this.attributes)
}
return this._changing = !1, this
},
hasChanged: function (a) {
return arguments.length ? f.has(this.changed, a) : !f.isEmpty(this.changed)
},
changedAttributes: function (a) {
if (!a) return this.hasChanged() ? f.clone(this.changed) : !1;
var b, c = !1,
d = this._previousAttributes;
for (var e in a) {
if (f.isEqual(d[e], b = a[e])) continue;
(c || (c = {}))[e] = b
}
return c
},
previous: function (a) {
return !arguments.length || !this._previousAttributes ? null : this._previousAttributes[a]
},
previousAttributes: function () {
return f.clone(this._previousAttributes)
},
isValid: function () {
return !this.validate(this.attributes)
},
_validate: function (a, b) {
if (b.silent || !this.validate) return !0;
a = f.extend({}, this.attributes, a);
var c = this.validate(a, b);
return c ? (b && b.error ? b.error(this, c, b) : this.trigger(&quot;error&quot;, this, c, b), !1) : !0
}
});
var k = e.Collection = function (a, b) {
b || (b = {}), b.model && (this.model = b.model), b.comparator && (this.comparator = b.comparator), this._reset(), this.initialize.apply(this, arguments), a && this.reset(a, {
silent: !0,
parse: b.parse
})
};
f.extend(k.prototype, i, {
model: j,
initialize: function () {},
toJSON: function (a) {
return this.map(function (b) {
return b.toJSON(a)
})
},
add: function (a, b) {
var c, e, g, h, i, j, k = {}, l = {}, m = [];
b || (b = {}), a = f.isArray(a) ? a.slice() : [a];
for (c = 0, g = a.length; c < g; c++) {
if (!(h = a[c] = this._prepareModel(a[c], b))) throw new Error(&quot;Can't add an invalid model to a collection&quot;);
i = h.cid, j = h.id;
if (k || this._byCid || j != null && (l[j] || this._byId[j])) {
m.push(c);
continue
}
k = l[j] = h
}
c = m.length;
while (c--) a.splice(m[c], 1);
for (c = 0, g = a.length; c < g; c++)(h = a[c]).on(&quot;all&quot;, this._onModelEvent, this), this._byCid[h.cid] = h, h.id != null && (this._byId[h.id] = h);
this.length += g, e = b.at != null ? b.at : this.models.length, d.apply(this.models, [e, 0].concat(a)), this.comparator && this.sort({
silent: !0
});
if (b.silent) return this;
for (c = 0, g = this.models.length; c < g; c++) {
if (!k[(h = this.models[c]).cid]) continue;
b.index = c, h.trigger(&quot;add&quot;, h, this, b)
}
return this
},
remove: function (a, b) {
var c, d, e, g;
b || (b = {}), a = f.isArray(a) ? a.slice() : [a];
for (c = 0, d = a.length; c < d; c++) {
g = this.getByCid(a[c]) || this.get(a[c]);
if (!g) continue;
delete this._byId[g.id], delete this._byCid[g.cid], e = this.indexOf(g), this.models.splice(e, 1), this.length--, b.silent || (b.index = e, g.trigger(&quot;remove&quot;, g, this, b)), this._removeReference(g)
}
return this
},
push: function (a, b) {
return a = this._prepareModel(a, b), this.add(a, b), a
},
pop: function (a) {
var b = this.at(this.length - 1);
return this.remove(b, a), b
},
unshift: function (a, b) {
return a = this._prepareModel(a, b), this.add(a, f.extend({
at: 0
}, b)), a
},
shift: function (a) {
var b = this.at(0);
return this.remove(b, a), b
},
get: function (a) {
return a == null ? void 0 : this._byId[a.id != null ? a.id : a]
},
getByCid: function (a) {
return a && this._byCid[a.cid || a]
},
at: function (a) {
return this.models[a]
},
where: function (a) {
return f.isEmpty(a) ? [] : this.filter(function (b) {
for (var c in a) if (a[c] !== b.get(c)) return !1;
return !0
})
},
sort: function (a) {
a || (a = {});
if (!this.comparator) throw new Error(&quot;Cannot sort a set without a comparator&quot;);
var b = f.bind(this.comparator, this);
return this.comparator.length == 1 ? this.models = this.sortBy(b) : this.models.sort(b), a.silent || this.trigger(&quot;reset&quot;, this, a), this
},
pluck: function (a) {
return f.map(this.models, function (b) {
return b.get(a)
})
},
reset: function (a, b) {
a || (a = []), b || (b = {});
for (var c = 0, d = this.models.length; c < d; c++) this._removeReference(this.models[c]);
return this._reset(), this.add(a, f.extend({
silent: !0
}, b)), b.silent || this.trigger(&quot;reset&quot;, this, b), this
},
fetch: function (a) {
a = a ? f.clone(a) : {}, a.parse === undefined && (a.parse = !0);
var b = this,
c = a.success;
return a.success = function (d, e, f) {
b[a.add ? &quot;add&quot; : &quot;reset&quot;](b.parse(d, f), a), c && c(b, d)
}, a.error = e.wrapError(a.error, b, a), (this.sync || e.sync).call(this, &quot;read&quot;, this, a)
},
create: function (a, b) {
var c = this;
b = b ? f.clone(b) : {}, a = this._prepareModel(a, b);
if (!a) return !1;
b.wait || c.add(a, b);
var d = b.success;
return b.success = function (e, f, g) {
b.wait && c.add(e, b), d ? d(e, f) : e.trigger(&quot;sync&quot;, a, f, b)
}, a.save(null, b), a
},
parse: function (a, b) {
return a
},
chain: function () {
return f(this.models).chain()
},
_reset: function (a) {
this.length = 0, this.models = [], this._byId = {}, this._byCid = {}
},
_prepareModel: function (a, b) {
b || (b = {});
if (a instanceof j) a.collection || (a.collection = this);
else {
var c = a;
b.collection = this, a = new this.model(c, b), a._validate(a.attributes, b) || (a = !1)
}
return a
},
_removeReference: function (a) {
this == a.collection && delete a.collection, a.off(&quot;all&quot;, this._onModelEvent, this)
},
_onModelEvent: function (a, b, c, d) {
if ((a == &quot;add&quot; || a == &quot;remove&quot;) && c != this) return;
a == &quot;destroy&quot; && this.remove(b, d), b && a === &quot;change:&quot; + b.idAttribute && (delete this._byId[b.previous(b.idAttribute)], this._byId[b.id] = b), this.trigger.apply(this, arguments)
}
});
var l = [&quot;forEach&quot;, &quot;each&quot;, &quot;map&quot;, &quot;reduce&quot;, &quot;reduceRight&quot;, &quot;find&quot;, &quot;detect&quot;, &quot;filter&quot;, &quot;select&quot;, &quot;reject&quot;, &quot;every&quot;, &quot;all&quot;, &quot;some&quot;, &quot;any&quot;, &quot;include&quot;, &quot;contains&quot;, &quot;invoke&quot;, &quot;max&quot;, &quot;min&quot;, &quot;sortBy&quot;, &quot;sortedIndex&quot;, &quot;toArray&quot;, &quot;size&quot;, &quot;first&quot;, &quot;initial&quot;, &quot;rest&quot;, &quot;last&quot;, &quot;without&quot;, &quot;indexOf&quot;, &quot;shuffle&quot;, &quot;lastIndexOf&quot;, &quot;isEmpty&quot;, &quot;groupBy&quot;];
f.each(l, function (a) {
k.prototype[a] = function () {
return f[a].apply(f, [this.models].concat(f.toArray(arguments)))
}
});
var m = e.Router = function (a) {
a || (a = {}), a.routes && (this.routes = a.routes), this._bindRoutes(), this.initialize.apply(this, arguments)
}, n = /:\w+/g,
o = /\*\w+/g,
p = /[-[\]{}()+?.,\\^$|#\s]/g;
f.extend(m.prototype, i, {
initialize: function () {},
route: function (a, b, c) {
return e.history || (e.history = new q), f.isRegExp(a) || (a = this._routeToRegExp(a)), c || (c = this), e.history.route(a, f.bind(function (d) {
var f = this._extractParameters(a, d);
c && c.apply(this, f), this.trigger.apply(this, [&quot;route:&quot; + b].concat(f)), e.history.trigger(&quot;route&quot;, this, b, f)
}, this)), this
},
navigate: function (a, b) {
e.history.navigate(a, b)
},
_bindRoutes: function () {
if (!this.routes) return;
var a = [];
for (var b in this.routes) a.unshift([b, this.routes]);
for (var c = 0, d = a.length; c < d; c++) this.route(a[c][0], a[c][1], this[a[c][1]])
},
_routeToRegExp: function (a) {
return a = a.replace(p, &quot;\\$&&quot;).replace(n, &quot;([^/]+)&quot;).replace(o, &quot;(.*?)&quot;), new RegExp(&quot;^&quot; + a + &quot;$&quot;)
},
_extractParameters: function (a, b) {
return a.exec(b).slice(1)
}
});
var q = e.History = function () {
this.handlers = [], f.bindAll(this, &quot;checkUrl&quot;)
}, r = /^[#\/]/,
s = /msie [\w.]+/;
q.started = !1, f.extend(q.prototype, i, {
interval: 50,
getHash: function (a) {
var b = a ? a.location : window.location,
c = b.href.match(/#(.*)$/);
return c ? c[1] : &quot;&quot;
},
getFragment: function (a, b) {
if (a == null) if (this._hasPushState || b) {
a = window.location.pathname;
var c = window.location.search;
c && (a += c)
} else a = this.getHash();
return a.indexOf(this.options.root) || (a = a.substr(this.options.root.length)), a.replace(r, &quot;&quot;)
},
start: function (a) {
if (q.started) throw new Error(&quot;Backbone.history has already been started&quot;);
q.started = !0, this.options = f.extend({}, {
root: &quot;/&quot;
}, this.options, a), this._wantsHashChange = this.options.hashChange !== !1, this._wantsPushState = !! this.options.pushState, this._hasPushState = !! (this.options.pushState && window.history && window.history.pushState);
var b = this.getFragment(),
c = document.documentMode,
d = s.exec(navigator.userAgent.toLowerCase()) && (!c || c <= 7);
d && (this.iframe = g('<iframe src=&quot;javascript:0&quot; tabindex=&quot;-1&quot; />').hide().appendTo(&quot;body&quot;)[0].contentWindow, this.navigate(b)), this._hasPushState ? g(window).bind(&quot;popstate&quot;, this.checkUrl) : this._wantsHashChange && &quot;onhashchange&quot; in window && !d ? g(window).bind(&quot;hashchange&quot;, this.checkUrl) : this._wantsHashChange && (this._checkUrlInterval = setInterval(this.checkUrl, this.interval)), this.fragment = b;
var e = window.location,
h = e.pathname == this.options.root;
if (this._wantsHashChange && this._wantsPushState && !this._hasPushState && !h) return this.fragment = this.getFragment(null, !0), window.location.replace(this.options.root + &quot;#&quot; + this.fragment), !0;
this._wantsPushState && this._hasPushState && h && e.hash && (this.fragment = this.getHash().replace(r, &quot;&quot;), window.history.replaceState({}, document.title, e.protocol + &quot;//&quot; + e.host + this.options.root + this.fragment));
if (!this.options.silent) return this.loadUrl()
},
stop: function () {
g(window).unbind(&quot;popstate&quot;, this.checkUrl).unbind(&quot;hashchange&quot;, this.checkUrl), clearInterval(this._checkUrlInterval), q.started = !1
},
route: function (a, b) {
this.handlers.unshift({
route: a,
callback: b
})
},
checkUrl: function (a) {
var b = this.getFragment();
b == this.fragment && this.iframe && (b = this.getFragment(this.getHash(this.iframe)));
if (b == this.fragment) return !1;
this.iframe && this.navigate(b), this.loadUrl() || this.loadUrl(this.getHash())
},
loadUrl: function (a) {
var b = this.fragment = this.getFragment(a),
c = f.any(this.handlers, function (a) {
if (a.route.test(b)) return a.callback(b), !0
});
return c
},
navigate: function (a, b) {
if (!q.started) return !1;
if (!b || b === !0) b = {
trigger: b
};
var c = (a || &quot;&quot;).replace(r, &quot;&quot;);
if (this.fragment == c) return;
this._hasPushState ? (c.indexOf(this.options.root) != 0 && (c = this.options.root + c), this.fragment = c, window.history[b.replace ? &quot;replaceState&quot; : &quot;pushState&quot;]({}, document.title, c)) : this._wantsHashChange ? (this.fragment = c, this._updateHash(window.location, c, b.replace), this.iframe && c != this.getFragment(this.getHash(this.iframe)) && (b.replace || this.iframe.document.open().close(), this._updateHash(this.iframe.location, c, b.replace))) : window.location.assign(this.options.root + a), b.trigger && this.loadUrl(a)
},
_updateHash: function (a, b, c) {
c ? a.replace(a.toString().replace(/(javascript:|#).*$/, &quot;&quot;) + &quot;#&quot; + b) : a.hash = b
}
});
var t = e.View = function (a) {
this.cid = f.uniqueId(&quot;view&quot;), this._configure(a || {}), this._ensureElement(), this.initialize.apply(this, arguments), this.delegateEvents()
}, u = /^(\S+)\s*(.*)$/,
v = [&quot;model&quot;, &quot;collection&quot;, &quot;el&quot;, &quot;id&quot;, &quot;attributes&quot;, &quot;className&quot;, &quot;tagName&quot;];
f.extend(t.prototype, i, {
tagName: &quot;div&quot;,
$: function (a) {
return this.$el.find(a)
},
initialize: function () {},
render: function () {
return this
},
remove: function () {
return this.$el.remove(), this
},
make: function (a, b, c) {
var d = document.createElement(a);
return b && g(d).attr(b), c && g(d).html(c), d
},
setElement: function (a, b) {
return this.$el && this.undelegateEvents(), this.$el = a instanceof g ? a : g(a), this.el = this.$el[0], b !== !1 && this.delegateEvents(), this
},
delegateEvents: function (a) {
if (!a && !(a = A(this, &quot;events&quot;))) return;
this.undelegateEvents();
for (var b in a) {
var c = a;
f.isFunction(c) || (c = this[a]);
if (!c) throw new Error('Method &quot;' + a + '&quot; does not exist');
var d = b.match(u),
e = d[1],
g = d[2];
c = f.bind(c, this), e += &quot;.delegateEvents&quot; + this.cid, g === &quot;&quot; ? this.$el.bind(e, c) : this.$el.delegate(g, e, c)
}
},
undelegateEvents: function () {
this.$el.unbind(&quot;.delegateEvents&quot; + this.cid)
},
_configure: function (a) {
this.options && (a = f.extend({}, this.options, a));
for (var b = 0, c = v.length; b < c; b++) {
var d = v;
a[d] && (this[d] = a[d])
}
this.options = a
},
_ensureElement: function () {
if (!this.el) {
var a = A(this, &quot;attributes&quot;) || {};
this.id && (a.id = this.id), this.className && (a[&quot;class&quot;] = this.className), this.setElement(this.make(this.tagName, a), !1)
} else this.setElement(this.el, !1)
}
});
var w = function (a, b) {
var c = z(this, a, b);
return c.extend = this.extend, c
};
j.extend = k.extend = m.extend = t.extend = w;
var x = {
create: &quot;POST&quot;,
update: &quot;PUT&quot;,
&quot;delete&quot;: &quot;DELETE&quot;,
read: &quot;GET&quot;
};
e.sync = function (a, b, c) {
var d = x[a];
c || (c = {});
var h = {
type: d,
dataType: &quot;json&quot;
};
return c.url || (h.url = A(b, &quot;url&quot;) || B()), !c.data && b && (a == &quot;create&quot; || a == &quot;update&quot;) && (h.contentType = &quot;application/json&quot;, h.data = JSON.stringify(b.toJSON())), e.emulateJSON && (h.contentType = &quot;application/x-www-form-urlencoded&quot;, h.data = h.data ? {
model: h.data
} : {}), e.emulateHTTP && (d === &quot;PUT&quot; || d === &quot;DELETE&quot;) && (e.emulateJSON && (h.data._method = d), h.type = &quot;POST&quot;, h.beforeSend = function (a) {
a.setRequestHeader(&quot;X-HTTP-Method-Override&quot;, d)
}), h.type !== &quot;GET&quot; && !e.emulateJSON && (h.processData = !1), g.ajax(f.extend(h, c))
}, e.wrapError = function (a, b, c) {
return function (d, e) {
e = d === b ? e : d, a ? a(b, e, c) : b.trigger(&quot;error&quot;, b, e, c)
}
};
var y = function () {}, z = function (a, b, c) {
var d;
return b && b.hasOwnProperty(&quot;constructor&quot;) ? d = b.constructor : d = function () {
a.apply(this, arguments)
}, f.extend(d, a), y.prototype = a.prototype, d.prototype = new y, b && f.extend(d.prototype, b), c && f.extend(d, c), d.prototype.constructor = d, d.__super__ = a.prototype, d
}, A = function (a, b) {
return !a || !a ? null : f.isFunction(a) ? a() : a
}, B = function () {
throw new Error('A &quot;url&quot; property or function must be specified')
}
}.call(this), window.Swipe = function (a, b) {
if (!a) return null;
var c = this;
this.options = b || {}, this.index = this.options.startSlide || 0, this.speed = this.options.speed || 300, this.callback = this.options.callback || function () {}, this.delay = this.options.auto || 0, this.preload = this.options.preload, this.lazyloadClass = this.options.lazyloadClass || &quot;lazy&quot;, this.lazyloadDataAttr = this.options.lazyloadDataAttr || &quot;original&quot;, this.verticalAlign = this.options.verticalAlign || &quot;middle&quot;, this.container = a, this.element = this.container.children[0], this.container.style.overflow = &quot;hidden&quot;, this.element.style.position = &quot;relative&quot;, this.element.style.listStyle = &quot;none&quot;, this.setup(), this.begin(), this.element.addEventListener && (this.element.addEventListener(&quot;touchstart&quot;, this, !1), this.element.addEventListener(&quot;touchmove&quot;, this, !1), this.element.addEventListener(&quot;touchend&quot;, this, !1), this.element.addEventListener(&quot;webkitTransitionEnd&quot;, this, !1), this.element.addEventListener(&quot;msTransitionEnd&quot;, this, !1), this.element.addEventListener(&quot;oTransitionEnd&quot;, this, !1), this.element.addEventListener(&quot;transitionend&quot;, this, !1), window.addEventListener(&quot;resize&quot;, this, !1))
}, Swipe.prototype = {
setup: function () {
this.slides = this.element.children, this.length = this.slides.length;
if (this.length < 2) return null;
this.width = this.container.getBoundingClientRect().width;
if (!this.width) return null;
this.container.style.visibility = &quot;hidden&quot;, this.element.style.width = this.slides.length * this.width + &quot;px&quot;;
var a = this.slides.length;
while (a--) {
var b = this.slides[a];
b.style.width = this.width + &quot;px&quot;, b.style.display = &quot;table-cell&quot;, b.style.verticalAlign = this.verticalAlign
}
this.slide(this.index, 0), this.container.style.visibility = &quot;visible&quot;
},
slide: function (a, b) {
var c = this.element.style;
b == undefined && (b = this.speed), c.webkitTransitionDuration = c.MozTransitionDuration = c.msTransitionDuration = c.OTransitionDuration = c.transitionDuration = b + &quot;ms&quot;, c.left = -(a * this.width) + &quot;px&quot;, this.index = a
},
getPos: function () {
return this.index
},
prev: function (a) {
this.delay = a || 0, clearTimeout(this.interval), this.index && this.slide(this.index - 1, this.speed)
},
next: function (a) {
this.delay = a || 0, clearTimeout(this.interval), this.index < this.length - 1 ? this.slide(this.index + 1, this.speed) : this.slide(0, this.speed)
},
begin: function () {
var a = this;
this.interval = this.delay ? setTimeout(function () {
a.next(a.delay)
}, this.delay) : 0
},
stop: function () {
this.delay = 0, clearTimeout(this.interval)
},
resume: function () {
this.delay = this.options.auto || 0, this.begin()
},
load: function () {
if (!this.preload) return;
var a = this.slides[this.index];
a.getAttribute(&quot;loaded&quot;) || this._loadImages(a), this.index < this.length - 1 && (a = this.slides[this.index + 1], a.getAttribute(&quot;loaded&quot;) || this._loadImages(a))
},
_loadImages: function (a) {
var b = a.querySelectorAll(&quot;img.&quot; + this.lazyloadClass);
for (var c = 0; c < b.length; c++)(function () {
var a = c,
d = new Image;
d.onload = function () {
b[a].parentNode.replaceChild(this, b[a])
}, d.src = b[c].getAttribute(&quot;data-&quot; + this.lazyloadDataAttr)
}).call(this);
a.setAttribute(&quot;loaded&quot;, !0)
},
handleEvent: function (a) {
switch (a.type) {
case &quot;touchstart&quot;:
this.onTouchStart(a);
break;
case &quot;touchmove&quot;:
this.onTouchMove(a);
break;
case &quot;touchend&quot;:
this.onTouchEnd(a);
break;
case &quot;webkitTransitionEnd&quot;:
case &quot;msTransitionEnd&quot;:
case &quot;oTransitionEnd&quot;:
case &quot;transitionend&quot;:
this.transitionEnd(a);
break;
case &quot;resize&quot;:
this.setup()
}
},
transitionEnd: function (a) {
this.preload && this.load(), this.delay && this.begin(), this.callback(a, this.index, this.slides[this.index])
},
onTouchStart: function (a) {
this.start = {
pageX: a.touches[0].pageX,
pageY: a.touches[0].pageY,
time: Number(new Date)
}, this.isScrolling = undefined, this.deltaX = 0, this.element.style.MozTransitionDuration = this.element.style.webkitTransitionDuration = 0
},
onTouchMove: function (a) {
if (a.touches.length > 1 || a.scale && a.scale !== 1) return;
this.deltaX = a.touches[0].pageX - this.start.pageX, typeof this.isScrolling == &quot;undefined&quot; && (this.isScrolling = !! (this.isScrolling || Math.abs(this.deltaX) < Math.abs(a.touches[0].pageY - this.start.pageY))), this.isScrolling || (a.preventDefault(), clearTimeout(this.interval), this.deltaX = this.deltaX / (!this.index && this.deltaX > 0 || this.index == this.length - 1 && this.deltaX < 0 ? Math.abs(this.deltaX) / this.width + 1 : 1), this.element.style.left = this.deltaX - this.index * this.width + &quot;px&quot;)
},
onTouchEnd: function (a) {
var b = Number(new Date) - this.start.time < 250 && Math.abs(this.deltaX) > 20 || Math.abs(this.deltaX) > this.width / 2,
c = !this.index && this.deltaX > 0 || this.index == this.length - 1 && this.deltaX < 0;
this.isScrolling || this.slide(this.index + (b && !c ? this.deltaX < 0 ? 1 : -1 : 0), this.speed)
}
}, window.App = window.App || {}, App.version = &quot;0.9.0&quot;, App.fadeInTime = 180, App.errorMessage = &quot;网络连接失败,请稍后重试&quot;, App.cartIsFullMsg = &quot;购物车已满,请进行删除整理&quot;, App.addCartSuccMsg = &quot;加入购物车成功!&quot;, App.addFavSuccMsg = &quot;加入收藏夹成功!&quot;, App.defaultImage = &quot;http://img02.taobaocdn.com/tps/i2/T1BJ9WXl4eXXXXXXXX-200-200.jpg&quot;, App.run = function (a) {
if (a == null) throw &quot;App#run -- no command error&quot;;
if (!/\w+:\w+/.test(a)) throw &quot;App#run -- invalid command: &quot; + a;
var b = a.split(&quot;:&quot;)[0],
c = App,
d = a.split(&quot;:&quot;)[1];
if (c == null) throw &quot;App#run -- App.&quot; + b + &quot; not defined&quot;;
if (c[d] == null) throw &quot;App#run -- App.&quot; + b + &quot; has no such method: &quot; + d;
c[d].apply(c, [].slice.call(arguments, 1))
}, App.convertImages = function (a, b) {
function c(a, b) {
return a.search(/\d+x\d+\.jpg/) > -1 || a.match(/jpg$/) && a.match(/jpg/g).length > 1 ? a : a.search(/taobao\.com/) > -1 && a.search(/jpg$/) > -1 ? a + &quot;_&quot; + b + &quot;.jpg&quot; : a
}
if ({}.toString.call(a) == &quot;[object String]&quot;) return c(a, b);
if ({}.toString.call(a) == &quot;[object Array]&quot;) {
var d, e = [];
for (var f = 0; f < a.length; f++) e.push(c(a[f], b));
return e
}
throw &quot;Invalid arguments&quot;
}, App.logUserAction = function (a) {
$.ajax({
url: App.data.logAjaxUrl,
data: {
pds: a,
t: +(new Date)
}
})
}, App.tabsFocus = function () {
window.scroll(0, $(&quot;#tabs&quot;).offset().top)
},
function (a) {
a.ajaxSettings.timeout = 8e3
}(Zepto), window.H5 || (window.H5 = {}), H5.creditToRank = function (a) {
var b = 0;
return a >= 4 && a <= 10 ? b = 1 : a >= 11 && a <= 40 ? b = 2 : a >= 41 && a <= 90 ? b = 3 : a >= 91 && a <= 150 ? b = 4 : a >= 151 && a <= 250 ? b = 5 : a >= 251 && a <= 500 ? b = 6 : a >= 501 && a <= 1e3 ? b = 7 : a >= 1001 && a <= 2e3 ? b = 8 : a >= 2001 && a <= 5e3 ? b = 9 : a >= 5001 && a <= 1e4 ? b = 10 : a >= 10001 && a <= 2e4 ? b = 11 : a >= 20001 && a <= 5e4 ? b = 12 : a >= 50001 && a <= 1e5 ? b = 13 : a >= 100001 && a <= 2e5 ? b = 14 : a >= 200001 && a <= 5e5 ? b = 15 : a >= 500001 && a <= 1e6 ? b = 16 : a >= 1000001 && a <= 2e6 ? b = 17 : a >= 2000001 && a <= 5e6 ? b = 18 : a >= 5000001 && a <= 1e7 ? b = 19 : a >= 10000001 && (b = 20), b
},
function (a) {
a.swipeTopTouch = function (b) {
var c = {
el: null,
direction: &quot;y&quot;,
limitDirection: &quot;&quot;,
limitLen: 20,
noTouchFun: null,
touchmove: null,
touchend: null
};
a.extend(c, b);
if (!c.el) return;
this.el = a(c.el)[0], this.op = c, this.isAndroid = /android/gi.test(navigator.appVersion), this._isTouch = &quot;ontouchstart&quot; in window, this._touchstart = &quot;ontouchstart&quot;, this._touchmove = &quot;ontouchmove&quot;, this._touchend = &quot;ontouchend&quot;, this._isTouch || (this._touchstart = &quot;onmousedown&quot;, this._touchmove = &quot;onmousemove&quot;, this._touchend = &quot;onmouseup&quot;), this.init()
}, a.extend(a.swipeTopTouch.prototype, {
init: function () {
var a = this;
a.el[a._touchstart] = function (b) {
a.start.call(a, b)
}
},
getXY: function (a) {
var b = this._isTouch ? a.touches[0] : a;
return {
x: b.pageX,
y: b.pageY
}
},
start: function (a) {
var b = this;
b._coord = b.getXY(a), b.el[b._touchmove] = function (a) {
b.move.call(b, a)
}, b.el[b._touchend] = function (a) {
b.end.call(b, a)
}
},
move: function (a) {
var b = this,
c = b.op,
d = c.direction.toLowerCase();
b._moveCoord = b.getXY(a);
var e = b._moveCoord.x - b._coord.x,
f = b._moveCoord.y - b._coord.y;
d == &quot;x&quot; ? Math.abs(e) - Math.abs(f) > 10 && (a.preventDefault(), b._movestart = !0) : d == &quot;y&quot; && Math.abs(f) - Math.abs(e) > 10 && (a.preventDefault(), b._movestart = !0, c.touchmove && c.touchmove())
},
end: function (a) {
var b = this,
c = b.op,
d = c.direction.toLowerCase(),
e = c.limitDirection.toLowerCase(),
f = c.limitLen,
g, h = !1;
if (b._movestart) {
a.preventDefault(), g = d == &quot;x&quot; ? b._moveCoord.x - b._coord.x : b._moveCoord.y - b._coord.y;
switch (e) {
case &quot;down&quot;:
case &quot;left&quot;:
g > f && (h = !0);
break;
case &quot;up&quot;:
case &quot;right&quot;:
g < -f && (h = !0);
break;
default:
Math.abs(g) > f && (h = !0)
}
h && c.touchend && c.touchend(a), b._movestart = !1, g = null, h = null
} else c.noTouchFun && (a.preventDefault(), setTimeout(c.noTouchFun, b.isAndroid ? 500 : 0));
b.el[b._touchmove] = null, b.el[b._touchend] = null, b._coord = {}, b._moveCoord = {}
}
}), a.swipeTop = function (b, c) {
var d = document,
e = {
isInit: !0,
wrap: &quot;&quot;,
topEl: &quot;ttype&quot;,
header: &quot;header&quot;,
shade: &quot;J_shade&quot;,
hShade: &quot;h-Shade&quot;,
scrollArr: null,
favScroll: null,
swipeTopGap: 60,
ease: &quot;ease&quot;,
easetime: 500,
opacity: .1,
isSwipeDown: !1,
toptabHeight: 50,
headerHeight: 50,
surplusHeight: 80
};
b && a.extend(e, b), c && a.extend(this, c), this.op = e, this.wrap = d.getElementById(e.wrap);
var f = d.getElementById(e.topEl);
this.swipeTop = f ? a(f) : null, this.header = d.getElementById(e.header), this.shade = a(d.getElementById(e.shade)), this.hShade = a(d.getElementById(e.hShade)), this.wrap.style.cssText = &quot;position:relative&quot;;
var g = a(this.header);
divt = a(document.createElement(&quot;div&quot;)), divt.css({
height: e.headerHeight
}), g.after(divt), this.notop = !1, this.swipeTop ? (g.addClass(&quot;header&quot;), g.appendTo(this.swipeTop)) : (this.swipeTop = g, this.swipeTop.css({
position: &quot;absolute&quot;,
&quot;z-index&quot;: 118
}), this.notop = !0), this.topCache = {
isSlip: 0,
isShow: !1,
shadeShow: !1,
isScroll: !1
}, e.isInit && this.init()
}, a.extend(a.swipeTop.prototype, {
setOp: function (a, b) {
if (typeof a == &quot;string&quot;) this.op[a] = b;
else for (var c in a) this.op[c] = a[c]
},
createShade: function () {
var b = this,
c = b.op,
d = b.swipeTop,
e = b.header,
f, g, h = document;
h.getElementById(c.shade) || (f = a(h.createElement(&quot;div&quot;)), f.attr(&quot;id&quot;, &quot;J_shade&quot;), f.addClass(&quot;J_shade&quot;), f.appendTo(d.parent()), b.shade = f, b.shadeTouch(f)), !h.getElementById(c.hShade) && !b.notop && (g = a(h.createElement(&quot;div&quot;)), g.attr(&quot;id&quot;, &quot;h-Shade&quot;), g.addClass(&quot;h_shade&quot;), g.appendTo(e), g.css(&quot;height&quot;, c.headerHeight), b.hShade = g, b.shadeTouch(g))
},
init: function (b) {
var c = this,
d = c.op;
d.favScroll = b || null, c.initHeight(1), c.triggerEvent();
var e = &quot;onorientationchange&quot; in window ? &quot;orientationchange&quot; : &quot;resize&quot;,
f = /android/gi.test(navigator.appVersion);
d.scrollArr && window.addEventListener(e, function () {
setTimeout(function () {
c.initHeight();
if (d.scrollArr.length > 0) {
var b = null;
a(d.scrollArr).each(function (d, e) {
b = a(&quot;#&quot; + e), b.hasClass(&quot;none&quot;) ? b.parent().prev().find(&quot;li:not(.sel)&quot;).removeAttr(&quot;ajax&quot;) : c[&quot;tab&quot; + d] && c[&quot;tab&quot; + d].refresh()
})
}
}, f ? 500 : 0)
}, !1), document.addEventListener(&quot;touchmove&quot;, function (a) {
var b = document.body.getAttribute(&quot;bounce&quot;);
if (b) {
a.preventDefault();
return
}
}, !1)
},
initHeight: function (b) {
var c = this,
d = c.op,
e = c.swipeTop,
f = a(window),
g = c.getScroll(),
h = c.topCache,
i = h.isShow,
j = d.toptabHeight,
k = d.headerHeight,
l = d.surplusHeight,
m = f.height();
m = m > 380 ? 380 : m;
var n = m - l + k,
o = this.ntop = -n,
p = this.nstep = n;
c.notop && (n = k, o = this.ntop = -50, this.op.isSwipeDown = !1);
var q = {
height: n,
width: &quot;100%&quot;
}, r = o,
s = k,
t = Math.min(k, g);
b || (g > 0 && h.isSlip == 1 && (s += t, g > k && (r += g - k)), i && (s = p + t)), q.top = r, q[&quot;-webkit-transform&quot;] = &quot;translate(0,&quot; + s + &quot;px)&quot;, e.css(q)
},
showShade: function () {
var a = this,
b = a.hShade;
a.topCache.shadeShow || a.showSingleShade(), b[0].style.cssText = &quot;opacity:&quot; + a.op.opacity + &quot;;display:block&quot;
},
showSingleShade: function () {
var a = this,
b = this.shade;
b[0].style.cssText = &quot;opacity:&quot; + a.op.opacity + &quot;;display:block&quot;
},
editCategory: function (b) {
var c = this,
d = a(c.header.firstElementChild);
if (d.length == 0) return;
b == &quot;remove&quot; ? d.removeClass(&quot;c-inav-down&quot;) : b == &quot;add&quot; && d.addClass(&quot;c-inav-down&quot;)
},
editScroll: function (a) {
var b = this,
c = b.op.favScroll;
if (!c) {
var d = document.body;
a ? d.removeAttribute(&quot;bounce&quot;) : d.setAttribute(&quot;bounce&quot;, 1);
return
}
c.enabled = a
},
getScroll: function (a) {
var b = this,
c = b.op.favScroll,
d = 0;
return c ? d = c.y : d = document.body.scrollTop, d = a || d, Math.abs(d)
},
swipeAni: function (a, b) {
var c = this,
d = c.op,
e = c.swipeTop,
f = a || 0;
f += &quot;px&quot;, e.animate({
translateY: f
}, d.easetime, d.ease, function () {
b && b.call(this)
})
},
hidetab: function (b) {
var c = this,
d = c.op;
if (c.tab0 && c.tabBody && d.scrollArr) {
var e = c.tabBody.index,
f = a(&quot;#&quot; + d.scrollArr[e]);
if (b) f.removeClass(&quot;none&quot;);
else {
var g = setTimeout(function () {
f.addClass(&quot;none&quot;)
}, 0);
clearTimeout(g)
}
}
},
hideTop: function (a) {
var b = this,
c = b.op,
d = b.wrap,
e = b.swipeTop,
f = b.shade,
g = b.hShade,
h = b.ntop,
i = c.headerHeight,
j = parseInt(e.css(&quot;top&quot;), 10) - h + i,
k = b.topCache;
a && a == &quot;noAnimate&quot; ? (e.css({
&quot;-webkit-transform&quot;: &quot;translate(0,&quot; + i + &quot;px)&quot;,
top: h
}), b.hidetab()) : j > i ? e.width() == 0 ? e.css({
&quot;-webkit-transform&quot;: &quot;translate(0,&quot; + i + &quot;px)&quot;,
top: h
}) : b.swipeAni(i, function () {
this.style.top = h + &quot;px&quot;, b.hidetab()
}) : b.swipeAni(i, function () {
b.hidetab()
}), f[0].style.display = &quot;none&quot;, b.editScroll(!0), k.isSlip = 2, k.shadeShow || (g[0].style.display = &quot;none&quot;, k.isShow = !1, b.editCategory(&quot;remove&quot;)), k.shadeShow = !1;
if (a && a == &quot;taojia&quot;) return;
var l = c.taojia;
l && (l.st() == 2 ? l.circlHide() : l.taojiaShow())
},
showTop: function (a, b) {
var c = document,
d = this,
e = d.op,
f = d.wrap,
g = d.swipeTop,
h = d.ntop,
i = d.topCache,
j = i.isShow,
k = a && typeof a == &quot;number&quot; ? !0 : !1,
l = d.nstep;
d.createShade();
if (!j) {
d.editScroll(!1);
var m = d.getScroll(a),
n = e.headerHeight,
o = Math.min(e.headerHeight, m);
k && (l -= n), d.swipeAni(l + o), i.isShow = !0, d.editCategory(&quot;add&quot;), d.showShade(), d.swipeDown && d.swipeDown(b), e.taojia && e.taojia.taojiaHide(), i.shadeShow && (i.shadeShow = !1), d.hidetab(!0)
} else d.hideTop()
},
tapDown: function () {
var a = this,
b = a.swipeTop,
c = a.topCache,
d = a.op,
e = a.ntop,
f = d.headerHeight,
g = a.header;
if (c.isScroll) return;
var h = a.getScroll(),
i = h + e,
j = i - f,
k = f + Math.min(f, h);
if (c.isSlip == 1) {
a.hideTop(&quot;taojia&quot;);
return
}
i > e && h > f && b.css(&quot;top&quot;, j), i > e && a.swipeAni(k), a.createShade(), a.showSingleShade(), c.isSlip = 1, c.shadeShow = !0, a.editScroll(!1)
},
shadeTouch: function (b) {
if (!b) return;
var c = this;
new a.swipeTopTouch({
el: b,
limitDirection: &quot;up&quot;,
noTouchFun: function () {
c.hideTop()
},
touchend: function () {
c.hideTop()
}
})
},
triggerEvent: function () {
var a = this;
a.tiggerFunc && a.tiggerFunc()
}
})
}(Zepto),
function (a) {
window.H5 = window.H5 || {}, H5.TaoPlus = {
initialize: function (b) {
var c = this;
c._opt = b || {};
var d = {
init: function () {
var a = &quot;m&quot;,
b = location.host;
return b.match(&quot;m.(taobao|tmall|etao|alibaba|alipay|aliyun)&quot;) || (b == &quot;localhost&quot; || b.match(&quot;(?:.*\\.)?waptest\\.(taobao|tmall|etao|alibaba|alipay|aliyun)\\.com.*&quot;) ? a = &quot;waptest&quot; : b.match(&quot;(?:.*\\.)?wapa\\.(taobao|tmall|etao|alibaba|alipay|aliyun)\\.com.*&quot;) && (a = &quot;wapa&quot;)), a
}
};
window.navigator.userAgent.indexOf(&quot;Chrome&quot;) != -1 && a(&quot;body > div&quot;).addClass(&quot;chrome&quot;);
var e = function () {
var a = location.search,
b = &quot;ttid=&quot;,
c, d = /ttid=(\w*)(?: |&|$)/;
d.test(a) && (c = RegExp.$1);
var e = c && &quot;&&quot; + b + c || &quot;&quot;;
return e
}, f = {
_css: function () {
window.navigator.userAgent.indexOf(&quot;UC&quot;) != -1 ? a(&quot;head&quot;).append('<link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://a.tbcdn.cn/mw/base/styles/component/taoplus/css/taoplus_uc.css&quot; />') : a(&quot;head&quot;).append('<link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://a.tbcdn.cn/mw/base/styles/component/taoplus/css/taoplus.css&quot; />')
},
_generate: function () {
var b = d.init(),
c = {};
c.s = &quot;http://&quot; + b + &quot;.taobao.com/channel/act/sale/searchlist.html?pds=search%23h%23taojia&quot; + e(), c.cart = &quot;http://cart.&quot; + b + &quot;.taobao.com/my_cart.htm?pds=cart%23h%23taojia&quot; + e(), c.my = &quot;http://my.&quot; + b + &quot;.taobao.com/my_taobao.htm?pds=mytaobao%23h%23taojia&quot; + e(), c.im = &quot;http://im.&quot; + b + &quot;.taobao.com/ww/ad_ww_lately_contacts.htm?pds=ww%23h%23taojia&quot; + e(), c.logis = &quot;http://tm.&quot; + b + &quot;.taobao.com/order_list.htm?statusId=5&pds=wuliu%23h%23taojia&quot; + e(), c.more = &quot;http://&quot; + b + &quot;.taobao.com/channel/chn/mobile/application.html?pds=apply%23h%23taojia&quot; + e();
var f = '<div class=&quot;taoplus&quot; id=&quot;J_Taojia&quot;><div class=&quot;taoplus-btn on&quot; data-time=&quot;0&quot;><div class=&quot;taoplus-btn-iconbox&quot;><ul><li>t</li><li id=&quot;J_btnmsg&quot;>w</li><li>t</li></ul></div></div><div class=&quot;taoplus-main&quot; data-total=&quot;&quot; data-totalNew=&quot;&quot; ><div class=&quot;circlbg&quot;><span>o</span></div><ul class=&quot;icons&quot;><li class=&quot;search&quot;><a data-url=&quot;' + c.s + '&quot;>s</a><span class=&quot;bg&quot;><span>p</span></span></li><li class=&quot;car&quot;><a data-url=&quot;' + c.cart + '&quot;>u</a><span class=&quot;bg&quot;><span>p</span></span></li><li class=&quot;individ&quot;><a data-url=&quot;' + c.my + '&quot;>r</a><span class=&quot;bg&quot;>p</span></li><li class=&quot;ww&quot;><a data-url=&quot;' + c.im + '&quot;>w</a><span class=&quot;bg&quot;>p</span></li><li class=&quot;logis&quot;><a data-url=&quot;' + c.logis + '&quot;>q</a><span class=&quot;bg&quot;>p</span></li><li class=&quot;more&quot;><a data-url=&quot;' + c.more + '&quot;>ooo</a><span class=&quot;bg&quot;>p</span></li></ul><div class=&quot;biglogo&quot;><a data-url=&quot;http://' + b + &quot;.taobao.com?pds=home%23h%23taojia&quot; + e() + '&quot;>x</a><span class=&quot;biglogobg&quot;></span></div></div></div>';
a(&quot;body > div&quot;).append(f)
}
};
f._css(), f._generate();
var g = {
btn: a(&quot;#J_Taojia .taoplus-btn&quot;),
main: a(&quot;#J_Taojia .taoplus-main&quot;),
_browser: function () {
var a = navigator.userAgent,
b = [&quot;iPhone OS &quot;, &quot;Android &quot;],
c = {
iphone: !1,
adnroid: !1
}, d = &quot;&quot;,
e = [];
for (var f = 0; f < b.length; f++) {
var g = a.indexOf(b[f]);
if (g > -1) {
switch (f) {
case 0:
c.iphone = !0;
break;
case 1:
c.adnroid = !0
}
var h = b[f].length;
d = a.substr(g + h, 6), e = d.split(/_|\./)
}
}
return {
iphone: c.iphone,
android: c.adnroid,
version: e
}
}(),
_slide: function () {
function b(a) {
g.btn.css({
opacity: &quot;1&quot;,
&quot;-webkit-transition&quot;: &quot;opacity 3s linear &quot;
})
}
function c(a) {
g.btn.css({
opacity: &quot;0&quot;,
top: window.innerHeight + window.scrollY - 80 + &quot;px&quot;,
&quot;-webkit-transition&quot;: &quot;none&quot;
})
}
g._browser.iphone && a(&quot;body > div&quot;).addClass(&quot;ios&quot;);
if (g._browser.iphone && Number(g._browser.version[0] + &quot;.&quot; + g._browser.version[1]) < 5 || g._browser.android && Number(g._browser.version[0] + &quot;.&quot; + g._browser.version[1]) <= 2.1) window.addEventListener(&quot;scroll&quot;, b, !1), document.addEventListener(&quot;touchmove&quot;, c, !1)
},
_maintop: function () {
function b() {
g.main.css({
top: window.innerHeight + window.scrollY - 230
})
}
b(), a(window).bind(&quot;scroll touchend resize&quot;, function () {
b()
})
},
_msg: function () {
function f() {
a(&quot;#J_btnmsg&quot;).removeClass(&quot;logisaction&quot;).addClass(&quot;wwaction&quot;), a(&quot;#J_btnmsg&quot;).html(&quot;w&quot;), a(&quot;#J_Taojia&quot;).find(&quot;.taoplus-btn-iconbox ul&quot;).addClass(&quot;btnact&quot;)
}
function g() {
a(&quot;#J_btnmsg&quot;).removeClass(&quot;wwaction&quot;).addClass(&quot;wwaction&quot;), a(&quot;#J_btnmsg&quot;).html(&quot;q&quot;), a(&quot;#J_Taojia&quot;).find(&quot;.taoplus-btn-iconbox ul&quot;).addClass(&quot;btnact&quot;)
}
var b = d.init(),
e = &quot;http://&quot; + b + &quot;.taobao.com/indexHeaderAjax.htm?callback=?&quot;;
a.ajax({
url: e,
type: &quot;post&quot;,
dataType: &quot;json&quot;,
success: function (b) {
var d = b.result,
e = b.totalMsgCount,
h = b.taobaoRadioMsgCount,
i = b.wwMsgCout,
j = b.logisticsMsgCount;
if (d) {
var k = a(&quot;#J_Taojia&quot;),
l = k.find(&quot;.ww a&quot;),
m = k.find(&quot;.logis a&quot;);
i > 0 && (i >= 10 ? l.append('<strong class=&quot;num&quot;>N</strong>') : l.append('<strong class=&quot;num&quot;>' + i + &quot;</strong>&quot;)), j && (j >= 10 ? m.append('<strong class=&quot;num&quot;>N</strong>') : m.append('<strong class=&quot;num&quot;>' + j + &quot;</strong>&quot;));
var n = document.cookie;
if (!n || n.match(/wwmsg=\d+/) == null) document.cookie = &quot;wwmsg=0&&quot;, document.cookie = &quot;logismsg=0&&quot;, n = document.cookie;
var o = Number(n.match(/wwmsg=\d+/)[0].split(&quot;=&quot;)[1]),
p = Number(n.match(/logismsg=\d+/)[0].split(&quot;=&quot;)[1]);
o != i && p == j && (document.cookie = &quot;wwmsg=&quot; + i + &quot;&&quot;, f(), c.getmsg()), p != j && o == i && (document.cookie = &quot;logismsg=&quot; + j + &quot;&&quot;, g(), c.getmsg());
if (p != j && o != i) {
var q = null;
document.cookie = &quot;logismsg=&quot; + j + &quot;&&quot;, g(), c.getmsg(), q = setTimeout(function () {
document.cookie = &quot;wwmsg=&quot; + i + &quot;&&quot;, f(), c.getmsg()
}, 6e3)
}
}
},
error: function (a, b) {}
})
}
};
g._slide(), g._maintop(), g._msg(), c._switched()
},
getmsg: function () {
var b = a(&quot;#J_Taojia&quot;).find(&quot;.taoplus-btn-iconbox ul&quot;),
c = a(&quot;#J_btnmsg&quot;),
d = null;
d = setInterval(function () {
var a = b[0].offsetLeft;
b.addClass(&quot;btnact&quot;), a <= -96 ? (clearInterval(d), b.removeClass(&quot;btnact&quot;), b.css(&quot;left&quot;, 0)) : b.css(&quot;left&quot;, a - 48)
}, 2e3)
},
shopcar: function (b) {
var c = b,
b = '<div class=&quot;taoplus-goimg&quot;><img src=&quot;' + c + '&quot;/></div>',
d = a(&quot;#J_Taojia&quot;),
e = '<div class=&quot;taoplus-gocar&quot;>u</div>',
f = null;
a(&quot;#J_btnmsg&quot;).html(&quot;u&quot;), that.getmsg(), d.append(b, e), f = setTimeout(function () {
a(&quot;.taoplus-gocar&quot;).css({
right: &quot;250px&quot;,
opacity: &quot;0&quot;
})
}, 1800)
},
_switched: function () {
var b = this,
c = {
taojiaTouch: a(&quot;#J_Taojia&quot;).find(&quot;.taoplus-btn&quot;),
taojiaLogo: a(&quot;#J_Taojia&quot;).find(&quot;.biglogo&quot;).find(&quot;a&quot;),
taojiaIcons: a(&quot;#J_Taojia&quot;).find(&quot;.icons&quot;).find(&quot;a&quot;),
btn: function () {
c.taojiaTouch.click(function () {
var c = (new Date).getTime(),
d = Number(a(this).attr(&quot;data-time&quot;));
c - d >= 600 && (a(this).attr(&quot;data-time&quot;, c), b.st() == 1 ? (b.circlBg(1), b._opt.onShow && b._opt.onShow()) : b.st() == 2 && (b.circlBg(0), b._opt.onHide && b._opt.onHide()))
}), c.taojiaIcons.click(function (c) {
var d = a(this),
e = d.attr(&quot;data-url&quot;),
f = d.attr(&quot;name&quot;);
timer = setTimeout(function () {
b.circlHide2(), b._opt.onIconClick && b._opt.onIconClick(f), window.location.href = e
}, 500)
}), c.taojiaLogo.click(function (c) {
var d = a(this).attr(&quot;data-url&quot;);
timer = setTimeout(function () {
b.circlHide2(), TaoJia._opt.onLogoClick && TaoJia._opt.onLogoClick(), window.location.href = d
}, 500)
})
}
};
c.btn()
},
circlBg: function (b) {
var c = this,
d = {
taojiaDiv: a(&quot;#J_Taojia&quot;),
taojiaTouch: a(&quot;#J_Taojia&quot;).find(&quot;.taoplus-btn&quot;),
taojiaCircle: a(&quot;#J_Taojia&quot;).find(&quot;.taoplus-main&quot;),
circlBg: a(&quot;#J_Taojia&quot;).find(&quot;.circlbg&quot;),
circlLogo: a(&quot;#J_Taojia&quot;).find(&quot;.biglogo&quot;),
taojiaLogo: a(&quot;#J_Taojia&quot;).find(&quot;.biglogo&quot;).find(&quot;a&quot;),
taojiaIcons: a(&quot;#J_Taojia&quot;).find(&quot;.icons&quot;).find(&quot;a&quot;),
taojiaIconBg: a(&quot;#J_Taojia&quot;).find(&quot;.backgrounds&quot;).find(&quot;li&quot;),
timer: null,
num: 0,
taojiaIconShow: function () {
d.taojiaTouch.removeClass(&quot;hide&quot;).addClass(&quot;on&quot;)
},
taojiaIconHide: function () {
d.taojiaTouch.removeClass(&quot;on&quot;).addClass(&quot;hide&quot;)
},
circlShow: function () {
timer = setTimeout(d.circlAllShow, 0), timer = setTimeout(d.circlBgShow, 0), timer = setTimeout(d.circlIconShow, 100), timer = setTimeout(d.circlLogoShow, 200)
},
circlHide: function () {
timer = setTimeout(d.circlIconHide, 0), timer = setTimeout(d.circlLogoHide, 0), timer = setTimeout(d.circlBgHide, 300), timer = setTimeout(d.circlAllHide, 400)
},
circlAllShow: function () {
d.taojiaCircle.addClass(&quot;show&quot;)
},
circlAllHide: function () {
d.taojiaCircle.removeClass(&quot;show&quot;)
},
circlBgShow: function () {
d.circlBg.addClass(&quot;show&quot;)
},
circlBgHide: function () {
d.circlBg.removeClass(&quot;show&quot;)
},
circlLogoShow: function () {
d.circlLogo.addClass(&quot;show&quot;)
},
circlLogoHide: function () {
d.circlLogo.removeClass(&quot;show&quot;)
},
circlIconShow: function () {
var b = null,
c = 25,
b = setInterval(function () {
var c = a(&quot;#J_Taojia .icons&quot;).find(&quot;.show&quot;),
d = a(&quot;#J_Taojia .icons li&quot;),
e = a(&quot;#J_Taojia .icons&quot;).find(&quot;a&quot;),
f = a(&quot;#J_Taojia .backgrounds li&quot;),
g = c.size(),
h = e.size();
g <= 0 ? (a(d[h - 1]).removeClass(&quot;hide&quot;).addClass(&quot;show&quot;), a(f[h - 1]).removeClass(&quot;o&quot;).addClass(&quot;gray&quot;), e.removeClass(&quot;on&quot;)) : g > 0 && g < h ? (a(d[h - g - 1]).removeClass(&quot;hide&quot;).addClass(&quot;show&quot;), a(f[h - g - 1]).removeClass(&quot;o&quot;).addClass(&quot;gray&quot;), a(f[h - g - 1]).siblings(&quot;li&quot;).removeClass(&quot;gray&quot;), e.removeClass(&quot;on&quot;)) : g == h && (f.removeClass(&quot;gray&quot;), clearInterval(b))
}, c)
},
circlIconHide: function () {
var b = 25;
timer = setInterval(function () {
var b = a(&quot;#J_Taojia .icons&quot;).find(&quot;.hide&quot;),
c = a(&quot;#J_Taojia .icons li&quot;),
d = a(&quot;#J_Taojia .icons&quot;).find(&quot;a&quot;),
e = a(&quot;#J_Taojia .backgrounds li&quot;),
f = b.size(),
g = d.size();
f <= 0 ? (a(c[0]).removeClass(&quot;show&quot;).addClass(&quot;hide&quot;), a(e[0]).removeClass(&quot;o&quot;).addClass(&quot;gray&quot;)) : f > 0 && f < g ? (a(c[f]).removeClass(&quot;show&quot;).addClass(&quot;hide&quot;), a(e[f]).removeClass(&quot;o&quot;).addClass(&quot;gray&quot;), a(e[f]).siblings(&quot;li&quot;).removeClass(&quot;gray&quot;)) : f == g && (e.removeClass(&quot;gray&quot;), clearInterval(timer))
}, b)
},
circlHide2: function () {
var a = null,
b = 20;
a = setTimeout(function () {
d.taojiaTouch.removeClass(&quot;hide&quot;).addClass(&quot;on&quot;), d.taojiaCircle.find(&quot;.show&quot;).removeClass(&quot;show&quot;), d.taojiaCircle.find(&quot;.o&quot;).removeClass(&quot;o&quot;), d.taojiaCircle.removeClass(&quot;show&quot;)
}, b)
}
};
a(a(&quot;body > div&quot;)[0]).hasClass(&quot;ios&quot;) ? b == 1 ? (d.circlShow(), d.taojiaIconHide()) : b == 0 && (d.circlHide(), d.taojiaIconShow()) : b == 1 ? (d.circlAllShow(), d.taojiaIconHide()) : b == 0 && (d.circlAllHide(), d.taojiaIconShow())
},
st: function () {
var b = {
btn: a(&quot;#J_Taojia .taoplus-btn&quot;),
taojia: a(&quot;#J_Taojia&quot;),
st: function () {
if (b.taojia.attr(&quot;style&quot;) == &quot;none&quot;) return 0;
if (b.btn.hasClass(&quot;on&quot;)) return 1;
if (b.btn.hasClass(&quot;hide&quot;)) return 2
}
};
return b.st()
},
taojiaHide: function () {
a(&quot;#J_Taojia&quot;).hide(), this.circlBg(0)
},
taojiaShow: function () {
a(&quot;#J_Taojia&quot;).show()
},
circlHide: function () {
this.circlBg(0)
},
circlHide2: function () {
var b = a(&quot;#J_Taojia&quot;).find(&quot;.taoplus-btn&quot;),
c = a(&quot;#J_Taojia&quot;).find(&quot;.taoplus-main&quot;),
d = null,
e = 20;
d = setTimeout(function () {
b.removeClass(&quot;hide&quot;).addClass(&quot;on&quot;), c.find(&quot;.show&quot;).removeClass(&quot;show&quot;), c.find(&quot;.o&quot;).removeClass(&quot;o&quot;), c.removeClass(&quot;show&quot;)
}, e)
}
}, TaoJia = H5.TaoPlus
}(Zepto),
function () {
this.JST || (this.JST = {}), this.JST[&quot;templates/cart&quot;] = function (obj) {
var __p = [],
print = function () {
__p.push.apply(__p, arguments)
};
with(obj || {}) __p.push('  <div class=&quot;go-cart&quot;>\n    <a href=&quot;', url, '&quot;>已成功加入购物车,去购物车结算</a><span class=&quot;arrow right&quot;></span>\n  </div>\n');
return __p.join(&quot;&quot;)
}
}.call(this),
function () {
this.JST || (this.JST = {}), this.JST[&quot;templates/gallery&quot;] = function (obj) {
var __p = [],
print = function () {
__p.push.apply(__p, arguments)
};
with(obj || {}) {
__p.push('<div class=&quot;wrap&quot;>\n  <div class=&quot;ctrls&quot;>\n    <a href=&quot;#&quot; class=&quot;back-btn&quot;>返 回</a>\n    <a href=&quot;#&quot; class=&quot;orig-btn&quot;>原 图</a>\n  </div>\n  <div class=&quot;slide&quot;>\n    <ul>\n    ');
for (var i = 0; i < images.length; i++) __p.push('\n      <li><img class=&quot;lazy&quot; data-original=&quot;', images, '&quot; \n        src=&quot;http://a.tbcdn.cn/mw/base/styles/component/more/images/Loading_Taobao_320.gif&quot;></li>\n    ');
__p.push('\n    </ul>\n  </div>\n  <span class=&quot;arrow left&quot; style=&quot;display: none;&quot;></span>\n  <p class=&quot;page&quot;><span class=&quot;active&quot;>1</span> / <span class=&quot;total&quot;>', images.length, '</span></p>\n  <span class=&quot;arrow right&quot; style=&quot;', images.length > 1 ? &quot;&quot; : &quot;display: none;&quot;, '&quot;></span>\n</div>\n')
}
return __p.join(&quot;&quot;)
}
}.call(this),
function () {
this.JST || (this.JST = {}), this.JST[&quot;templates/notification&quot;] = function (obj) {
var __p = [],
print = function () {
__p.push.apply(__p, arguments)
};
with(obj || {}) __p.push('<p class=&quot;message&quot;>', message, &quot;</p>\n&quot;), action && __p.push('\n<div class=&quot;action&quot;>\n  <a href=&quot;#&quot; class=&quot;now&quot;>立即整理</a><a href=&quot;#&quot; class=&quot;later&quot;>稍后再说</a>\n</div>\n'), __p.push(&quot;\n&quot;);
return __p.join(&quot;&quot;)
}
}.call(this),
function () {
this.JST || (this.JST = {}), this.JST[&quot;templates/pagination&quot;] = function (obj) {
var __p = [],
print = function () {
__p.push.apply(__p, arguments)
};
with(obj || {}) {
__p.push('<ul>\n  <li class=&quot;prev ', index == 1 ? &quot;disabled&quot; : &quot;&quot;, '&quot;>上一页</li>\n  <li>\n    <span class=&quot;active&quot;>', index, '</span>/<span class=&quot;total&quot;>', total, '</span>\n    <span class=&quot;arrow down&quot;></span>\n    <select>\n      ');
for (var i = 1; i <= total; i++) __p.push('\n        <option value=&quot;', i, '&quot; ', i == index ? &quot;selected&quot; : &quot;&quot;, &quot;>第&quot;, i, &quot;页</option>\n      &quot;);
__p.push('\n    </select>\n  </li>\n  <li class=&quot;next ', index == total ? &quot;disabled&quot; : &quot;&quot;, '&quot;>下一页</li>\n</ul>\n')
}
return __p.join(&quot;&quot;)
}
}.call(this),
function () {
this.JST || (this.JST = {}), this.JST[&quot;templates/pop&quot;] = function (obj) {
var __p = [],
print = function () {
__p.push.apply(__p, arguments)
};
with(obj || {}) __p.push('<div class=&quot;pop&quot;>\n  <div class=&quot;main&quot;>\n    <span class=&quot;loading-orange30x12&quot;></span>\n  </div\n</div>\n');
return __p.join(&quot;&quot;)
}
}.call(this),
function () {
this.JST || (this.JST = {}), this.JST[&quot;templates/property&quot;] = function (obj) {
var __p = [],
print = function () {
__p.push.apply(__p, arguments)
};
with(obj || {}) __p.push(&quot;&quot;), _.each(props, function (a) {
__p.push('\n<div class=&quot;property&quot;>\n  <p class=&quot;name&quot;>', a.name, ':</p>\n  <div class=&quot;values&quot;>\n    '), _.each(a.values, function (b) {
__p.push('\n      <a href=&quot;#&quot; data-id=&quot;', b.id, '&quot; data-img=&quot;', b.img || &quot;&quot;, '&quot; data-name=&quot;', a.name, '&quot;>\n        ', b.txt, &quot;\n      </a>\n    &quot;)
}), __p.push(&quot;\n  </div>\n</div>\n&quot;)
}), __p.push('\n<ul class=&quot;notice table&quot;>\n  <li class=&quot;left&quot;>\n    <p>请选:</p>\n    <p>', propNames, '</p>\n  </li>\n  <li class=&quot;chosen&quot; style=&quot;display: none;&quot;>\n    <p>已选:</p>\n    <p></p>\n  </li>\n  <li class=&quot;sku-price&quot; style=&quot;display: none;&quot;>\n    <p>价格:</p>\n    <p><em></em>   (库存 <span>68</span> 件)</p>\n  </li>\n</ul>\n<div class=&quot;fold&quot;><a href=&quot;#&quot; class=&quot;ctrl&quot;><span class=&quot;arrow up&quot;></span></a></div>\n');
return __p.join(&quot;&quot;)
}
}.call(this),
function () {
this.JST || (this.JST = {}), this.JST[&quot;templates/recommend&quot;] = function (obj) {
var __p = [],
print = function () {
__p.push.apply(__p, arguments)
};
with(obj || {}) {
__p.push('<header>\n  <h1>本店推荐产品</h1>\n</header>\n<div class=&quot;slide&quot;>\n  <ul>\n    ');
for (var i = 0; i < Math.ceil(Math.min(items.length, 15) / 3); i++) {
__p.push('\n      <li>\n        <div class=&quot;item-group&quot;>\n          ');
for (var j = 0; j < 3; j++) __p.push(&quot;\n            &quot;), items[i * 3 + j] && (__p.push('\n              <div class=&quot;item&quot;>\n                <a href=&quot;', items[i * 3 + j].link, '&quot;>\n                  <img class=&quot;lazy&quot; data-original=&quot;', items[i * 3 + j].img, '&quot; src=&quot;http://a.tbcdn.cn/mw/base/styles/component/more/images/Loading_Taobao_320.gif&quot;>\n                </a>\n                '), items[i * 3 + j].price && __p.push(&quot;\n                  <p>¥ &quot;, items[i * 3 + j].price, &quot;</p>\n                &quot;), __p.push(&quot;\n              </div>\n            &quot;)), __p.push(&quot;\n          &quot;);
__p.push(&quot;\n        </div>\n      </li>\n    &quot;)
}
__p.push(&quot;\n  </ul>\n</div>\n\n&quot;);
if (items.length > 3) {
__p.push('\n<ul class=&quot;pager&quot;>\n  <li class=&quot;prev&quot;><span class=&quot;arrow left&quot;></span></li>\n  ');
for (var i = 0; i < Math.ceil(Math.min(items.length, 15) / 3); i++) __p.push('\n    <li class=&quot;counter ', i == 0 ? &quot;active&quot; : &quot;&quot;, '&quot;></li>\n  ');
__p.push('\n  <li class=&quot;next&quot;><span class=&quot;arrow right&quot;></span></li>\n</ul> \n')
}
__p.push(&quot;\n&quot;)
}
return __p.join(&quot;&quot;)
}
}.call(this),
function () {
this.JST || (this.JST = {}), this.JST[&quot;templates/review&quot;] = function (obj) {
var __p = [],
print = function () {
__p.push.apply(__p, arguments)
};
with(obj || {}) __p.push(&quot;&quot;), reviews.length ? (__p.push(&quot;\n<ul>\n  &quot;), _.each(reviews, function (a) {
__p.push(&quot;\n  <li>\n    &quot;), !tmall && !noReviewIcons && __p.push('\n      <span class=&quot;icon-review icon-review-', a.type, '&quot;></span>\n    '), __p.push('\n    <div class=&quot;wrap&quot;>\n      <p class=&quot;text&quot;>', a.text, &quot;</p>\n      &quot;), a.reply && __p.push('\n        <p class=&quot;reply&quot;><em>卖家回复:</em>', a.reply, &quot;</p>\n      &quot;), __p.push('\n      <p class=&quot;deal&quot;>', a.deal, '</p>\n      <p class=&quot;user&quot;>', a.user, '<span class=&quot;rank&quot;>', a.rank, &quot;</span>&quot;, a.date, &quot;</p>\n    </div>\n  </li>\n  &quot;)
}), __p.push(&quot;\n</ul>\n&quot;)) : __p.push('\n  <p class=&quot;notice&quot;>', message, &quot;</p>\n&quot;), __p.push(&quot;\n&quot;);
return __p.join(&quot;&quot;)
}
}.call(this),
function (a) {
App.ActionView = Backbone.View.extend({
events: {
&quot;click .btn-buy&quot;: &quot;placeOrder&quot;,
&quot;click .btn-cart&quot;: &quot;addToCart&quot;
},
initialize: function () {
var a = App.data;
this.tmall = a.tmall, this.itemId = a.itemId, this.hasProps = a.hasProps, this.prevSkuId = a.prevSkuId, this.reAddCart = a.reAddCart, this.reAddFav = a.reAddFav, this.loginUrl = a.loginUrl.replace(/&/g, &quot;&&quot;), this.addCartUrl = a.addCartUrl.replace(/&/g, &quot;&&quot;), this.addFavUrl = a.addFavUrl.replace(/&/g, &quot;&&quot;), this.bindFavAction(), this.tmall && this.$(&quot;.btn-buy&quot;).addClass(&quot;btn-tmall&quot;)
},
addToCart: function (b) {
b.preventDefault(), App.logUserAction(&quot;addcart#h#detail&quot;);
var c = this;
this.hasProps && !a(&quot;#sku-id&quot;).val() ? App.run(&quot;skuView:unfold&quot;) : a.ajax({
url: this.addCartUrl,
dataType: &quot;jsonp&quot;,
data: {
skuId: this.hasProps ? a(&quot;#sku-id&quot;).val() : &quot;&quot;
},
success: function (b) {
b = b || {};
if (b.status == &quot;true&quot;) {
App.run(&quot;notificationView:notify&quot;, App.addCartSuccMsg), c._renderCartUrl();
return
}
if (b.errorCode == &quot;NOT_LOGINED&quot;) {
window.location = c._appendRedirectUrl(c.loginUrl, &quot;%26func=cart%26skuId=&quot; + a(&quot;#sku-id&quot;).val());
return
}
if (b.total >= 50) {
App.run(&quot;notificationView:notify&quot;, App.cartIsFullMsg, !0);
return
}
App.run(&quot;notificationView:notify&quot;, b.error || App.errorMessage)
},
error: function () {
App.run(&quot;notificationView:notify&quot;, App.errorMessage)
}
})
},
bindFavAction: function () {
var b = this;
a(&quot;.fav.btn&quot;).on(&quot;click&quot;, function (c) {
c.preventDefault(), App.logUserAction(&quot;addfav#h#detail&quot;), a.ajax({
url: b.addFavUrl,
dataType: &quot;jsonp&quot;,
success: function (c) {
c = c || {}, c.addFav ? (a(&quot;.fav.btn&quot;).addClass(&quot;faved&quot;), App.run(&quot;notificationView:notify&quot;, App.addFavSuccMsg)) : c.msg.search(&quot;请登录后操作&quot;) > -1 ? window.location = b._appendRedirectUrl(b.loginUrl, &quot;%26func=fav&quot;) : (App.run(&quot;notificationView:notify&quot;, c.msg || App.errorMessage), c.msg.search(&quot;您已经收藏过了&quot;) > -1 && a(&quot;.fav.btn&quot;).addClass(&quot;faved&quot;))
},
error: function () {
App.run(&quot;notificationView:notify&quot;, App.errorMessage)
}
})
})
},
placeOrder: function (b) {
b.preventDefault(), App.logUserAction(&quot;buynow#h#detail&quot;);
if (this.hasProps && !a(&quot;#sku-id&quot;).val()) App.run(&quot;skuView:unfold&quot;);
else {
if (App.plugins && typeof App.plugins.buy == &quot;function&quot;) {
App.plugins.buy();
return
}
a(&quot;#order-form&quot;).submit()
}
},
performPreviousAction: function (b) {
if (!(window.localStorage && localStorage.getItem && localStorage.setItem)) return;
var c = localStorage.getItem(&quot;[detail]funcStates&quot;),
d = c ? JSON.parse(c) : {
id: this.itemId,
hasAddedCart: !1,
hasAddedFav: !1
};
if (d.id == this.itemId) {
if (d.hasAddedCart && this.reAddCart || d.hasAddedFav && this.reAddFav) return
} else d.id = this.itemId, d.hasAddedCart = !1, d.hasAddedFav = !1, localStorage.setItem(&quot;[detail]funcStates&quot;, JSON.stringify(d));
if (!this.reAddCart && !this.reAddFav) return;
if (this.hasProps && b) {
for (var e in b) if (this.prevSkuId == b[e].skuId) {
App.run(&quot;skuView:restore&quot;, e.split(&quot;;&quot;));
break
}
App.run(&quot;skuView:unfold&quot;)
}
this.reAddCart && this.$(&quot;.btn-cart&quot;).trigger(&quot;click&quot;) && (d.hasAddedCart = !0), this.reAddFav && a(&quot;.fav.btn&quot;).trigger(&quot;click&quot;) && (d.hasAddedFav = !0), localStorage.setItem(&quot;[detail]funcStates&quot;, JSON.stringify(d))
},
_appendRedirectUrl: function (a, b) {
var c = a.split(&quot;&&quot;);
for (var d = 0; d < c.length; d++) if (c[d].search(&quot;tpl_redirect_url&quot;) > -1) {
c[d] = c[d] + b;
break
}
return c.join(&quot;&&quot;)
},
_renderCartUrl: function () {
if (a(&quot;.go-cart&quot;).length) return;
return this.$el.after(JST[&quot;templates/cart&quot;]({
url: App.data.myCartUrl
})), this
}
})
}(Zepto),
function (a) {
App.DescriptionView = Backbone.View.extend({
events: {
&quot;click  .pagination .prev&quot;: &quot;prevPage&quot;,
&quot;click  .pagination .next&quot;: &quot;nextPage&quot;,
&quot;change .pagination select&quot;: &quot;changePage&quot;
},
initialize: function () {
this.url = App.data.descAjaxUrl, this.data = {
index: 1,
total: 0,
pages: [undefined]
}, this.firstRender = !0
},
getData: function () {
var b = this;
a.ajax({
url: this.url,
dataType: &quot;json&quot;,
success: function (a) {
b.data.pages = [undefined].concat(b._convert(a && a.pages || [])), b.data.total = a && a.pages && a.pages.length || 0, b.render()
},
error: function () {}
})
},
render: function () {
return this.firstRender ? this.firstRender = !1 : App.tabsFocus(), this.data.index == 1 ? this.$(&quot;.table&quot;).show() : this.$(&quot;.table&quot;).hide(), this.$(&quot;.main&quot;).html(this.data.pages[this.data.index]), this.data.total > 0 && this.paginate(), this
},
paginate: function () {
this.$(&quot;.pagination&quot;).html(JST[&quot;templates/pagination&quot;]({
index: this.data.index,
total: this.data.total
}))
},
toPage: function (a) {
this.data.index = a, this.render()
},
changePage: function (b) {
this.toPage(parseInt(a(b.target).val()))
},
prevPage: function () {
if (this.data.index == 1) return;
this.toPage(--this.data.index), App.logUserAction(&quot;auuppage#h#detail&quot;)
},
nextPage: function () {
if (this.data.index == this.data.total) return;
this.toPage(++this.data.index), App.logUserAction(&quot;aunextpage#h#detail&quot;)
},
_convert: function (a) {
var b = [];
for (var c = 0; c < a.length; c++) {
var d = a[c].replace(/<img[^>]+taobao[^>]+jpg[^>]*>/ig, function (a) {
if (a.search(/\d+x\d+\.jpg/) > -1 || a.match(/jpg/g).length > 1) return a;
var b = a.indexOf(&quot;jpg&quot;),
c = App.data.imgScale == 2 ? &quot;_400x400.jpg&quot; : &quot;_310x310.jpg&quot;;
return a.slice(0, b + 3) + c + a.slice(b + 3)
});
b.push(d)
}
return b
}
})
}(Zepto),
function (a) {
App.GalleryView = Backbone.View.extend({
template: JST[&quot;templates/gallery&quot;],
events: {
&quot;click .slide img&quot;: &quot;fullScreen&quot;,
&quot;click .back-btn&quot;: &quot;restore&quot;,
&quot;click .orig-btn&quot;: &quot;showOrig&quot;
},
initialize: function () {
App.data.images && App.data.images.length > 0 ? this.images = App.convertImages(App.data.images, App.data.imgScale == 2 ? &quot;460x460&quot; : &quot;310x310&quot;) : this.images = [App.defaultImage]
},
render: function () {
var a = this.template({
images: this.images
});
return this.$el.html(a), this
},
setup: function () {
var a = this;
return this.$(&quot;.arrow.left&quot;).hide(), this.slide = new Swipe(this.$(&quot;.slide&quot;)[0], {
preload: !0,
callback: function (b, c) {
a.$(&quot;.page .active&quot;).text(c + 1), a.$(&quot;.arrow&quot;).show(), c == 0 && a.$(&quot;.arrow.left&quot;).hide(), c == this.length - 1 && a.$(&quot;.arrow.right&quot;).hide(), a.slide.swipe ? a.slide.prevIndex > c ? App.logUserAction(&quot;muppic#h#detail&quot;) : App.logUserAction(&quot;mnextpic#h#detail&quot;) : a.slide.prevIndex > c ? App.logUserAction(&quot;uppic#h#detail&quot;) : App.logUserAction(&quot;nextpic#h#detail&quot;), a.slide.swipe = !0, a.slide.prevIndex = c
}
}), this.slide.swipe = !0, this.slide.prevIndex = 0, this.slide.load(), this.$(&quot;.arrow.left&quot;).on(&quot;click&quot;, function () {
a.slide.prev(), a.slide.swipe = !1
}), this.$(&quot;.arrow.right&quot;).on(&quot;click&quot;, function () {
a.slide.next(), a.slide.swipe = !1
}), this
},
fullScreen: function () {
if (this.$el.hasClass(&quot;float&quot;)) return;
App.data.taoPlus && (a(&quot;#J_Taojia&quot;).hide(), a(&quot;.h5 > header&quot;).hide()), a(&quot;content&quot;).hide(), this.$el.addClass(&quot;float&quot;), this.$el.prependTo(&quot;.detail&quot;), this.slide.setup(), App.logUserAction(&quot;getpic#h#detail&quot;)
},
restore: function () {
App.data.taoPlus && (a(&quot;#J_Taojia&quot;).show(), a(&quot;.h5 > header&quot;).show()), this.$el.removeClass(&quot;float&quot;), this.$el.prependTo(&quot;.appearance&quot;), this.slide.setup(), a(&quot;.content&quot;).show()
},
showOrig: function () {
App.logUserAction(&quot;originalpic#h#detail&quot;), window.location = App.data.images[this.slide.index]
}
})
}(Zepto),
function (a) {
App.NotificationView = Backbone.View.extend({
className: &quot;notification&quot;,
events: {
&quot;click .now&quot;: &quot;goToCart&quot;,
&quot;click .later&quot;: &quot;later&quot;
},
template: JST[&quot;templates/notification&quot;],
initialize: function () {
this.myCartUrl = App.data.myCartUrl, this.cleanNowUrl = App.data.cleannowUrl
},
render: function () {
return this.$el.html(this.template({
message: &quot;&quot;,
action: !0
})), a(&quot;.detail&quot;).prepend(this.el), this.$el.hide().css(&quot;z-index&quot;, &quot;999&quot;), this
},
notify: function (a, b) {
var c = this;
return this.$(&quot;.message&quot;).text(a), b ? this.$(&quot;.action&quot;).show() : (this.$(&quot;.action&quot;).hide(), setTimeout(function () {
c.hide()
}, 2e3)), this.show(), this
},
goToCart: function () {
this.$el.hide(), window.location = this.myCartUrl
},
later: function () {
this.hide(), App.logUserAction(&quot;clearnlater#h#cart&quot;)
},
show: function () {
this.$el.show(), this.$el.animate({
top: 0
}, 200)
},
hide: function () {
this.$el.animate({
top: -90
}, 200);
var a = this;
setTimeout(function () {
a.$el.hide()
}, 200)
}
})
}(Zepto),
function (a) {
App.RecommendView = Backbone.View.extend({
template: JST[&quot;templates/recommend&quot;],
initialize: function () {
this.url = App.data.recommendAjaxUrl, this.tmall = App.data.tmall, this.items = []
},
render: function () {
var a = this;
if (this.items.length == 0) {
this.$el.remove();
return
}
return this.convertImages(), this.$el.html(this.template({
items: this.items
})), this.tmall && this.$(&quot;.pager&quot;).addClass(&quot;tmall&quot;), this.slide = new Swipe(this.$(&quot;.slide&quot;)[0], {
preload: !0,
callback: function () {
a.$(&quot;.counter&quot;).removeClass(&quot;active&quot;).eq(a.slide.index).addClass(&quot;active&quot;)
}
}), this.slide.load(), this.$(&quot;.prev&quot;).bind(&quot;click&quot;, function () {
a.slide.prev()
}), this.$(&quot;.next&quot;).bind(&quot;click&quot;, function () {
a.slide.index < a.slide.length - 1 && a.slide.next()
}), this
},
listen: function () {
function c(d) {
d.preventDefault(), b.$el.offset().top < window.pageYOffset + window.innerHeight + 500 && (b.getData(), a(window).off(&quot;scroll&quot;, c))
}
var b = this;
a(window).on(&quot;scroll&quot;, c)
},
getData: function () {
var b = this;
a.ajax({
url: this.url,
dataType: &quot;json&quot;,
success: function (a) {
a && a.items && a.items.length && (b.items = a.items), b.hasPrice = a && a.hasPrice, b.render()
},
error: function () {
b.$el.remove()
}
})
},
convertImages: function () {
var a;
for (var b = 0; b < this.items.length; b++) a = this.items, a.img = App.convertImages(a.img, App.data.imgScale == 2 ? &quot;145x145&quot; : &quot;110x110&quot;)
}
})
}(Zepto),
function (a) {
App.ReviewView = Backbone.View.extend({
typeMap: {
all: &quot;&quot;,
good: &quot;1&quot;,
ok: &quot;0&quot;,
bad: &quot;-1&quot;,
1: &quot;good&quot;,
0: &quot;ok&quot;,
&quot;-1&quot;: &quot;bad&quot;
},
messages: {
all: &quot;该宝贝没有任何评论&quot;,
good: &quot;该宝贝没有好评&quot;,
ok: &quot;该宝贝没有中评&quot;,
bad: &quot;该宝贝没有差评&quot;
},
events: {
&quot;click  .types li&quot;: &quot;toType&quot;,
&quot;click  .fold .ctrl&quot;: &quot;toggle&quot;,
&quot;click  .pagination .prev&quot;: &quot;prevPage&quot;,
&quot;click  .pagination .next&quot;: &quot;nextPage&quot;,
&quot;change .pagination select&quot;: &quot;changePage&quot;
},
template: JST[&quot;templates/review&quot;],
initialize: function () {
this.url = App.data.reviewAjaxUrl, this.tmall = App.data.tmall, this.noReviewIcons = App.data.noReviewIcons, this.folded = !0, this.type = &quot;all&quot;, this.data = {
all: {
index: 1,
total: 0,
pages: [undefined]
},
good: {
index: 1,
total: 0,
pages: [undefined]
},
ok: {
index: 1,
total: 0,
pages: [undefined]
},
bad: {
index: 1,
total: 0,
pages: [undefined]
}
}, this.$(&quot;.types&quot;).hide(), this.tmall && this.$(&quot;.types&quot;).remove(), this.firstRender = !0, this.firstFold = !0
},
render: function (a, b) {
this.firstRender ? this.firstRender = !1 : App.tabsFocus(), this.type == &quot;all&quot; && this.getTotal() == 0 && (this.$(&quot;.types&quot;).remove(), this.$(&quot;.fold&quot;).remove());
var c = this.data[a].pages,
d = this.template({
type: a,
tmall: this.tmall,
reviews: c,
noReviewIcons: this.noReviewIcons,
message: this.messages[a]
});
return this.$(&quot;.main&quot;).html(d), this.paginate(), this.changeTypeTab(), this.folded && this.fold(), this
},
getData: function (b, c) {
var d = this;
this.xhr && this.xhr.abort(), this.xhr = a.ajax({
url: this.url,
data: {
rateRs: this.typeMap,
p: c,
ps: 10
},
dataType: &quot;json&quot;,
success: function (a) {
d.type = b, d.data.index = c, d.data.total = a && a.total || 0, d.data.pages[c] = a && d._convert(a.items || []), d.render(b, c)
},
error: function () {}
})
},
paginate: function () {
if (this.getTotal() == 0) return;
this.$(&quot;.pagination&quot;).html(JST[&quot;templates/pagination&quot;]({
index: this.getIndex(),
total: this.getTotal()
}))
},
changeTypeTab: function () {
var b = this.type;
this.$(&quot;.types li&quot;).removeClass(&quot;active&quot;).each(function () {
var c = a(this);
c.attr(&quot;data-tab&quot;) == b && c.addClass(&quot;active&quot;)
})
},
getIndex: function () {
return this.data[this.type].index
},
getTotal: function () {
return this.data[this.type].total
},
toType: function (b) {
var c = a(b.target).attr(&quot;data-tab&quot;),
d = this.data[c].index;
this.data[c].pages[d] == null ? this.getData(c, d) : (this.type = c, this.render(c, d)), c == &quot;all&quot; ? App.logUserAction(&quot;sayall#h#detail&quot;) : c == &quot;good&quot; ? App.logUserAction(&quot;saygood#h#detail&quot;) : c == &quot;ok&quot; ? App.logUserAction(&quot;saynormal#h#detail&quot;) : c == &quot;bad&quot; && App.logUserAction(&quot;saybad#h#detail&quot;)
},
toPage: function (a) {
this.data[this.type].pages[a] == null ? this.getData(this.type, a) : (this.data[this.type].index = a, this.render(this.type, a))
},
prevPage: function () {
var a = this.data[this.type].index;
if (a == 1) return;
this.toPage(--a), App.logUserAction(&quot;reuppage#h#detail&quot;)
},
nextPage: function () {
var a = this.data[this.type].index,
b = this.data[this.type].total;
if (a == b) return;
this.toPage(++a), App.logUserAction(&quot;renextpage#h#detail&quot;)
},
changePage: function (b) {
this.toPage(a(b.target).val())
},
fold: function (b) {
this.$(&quot;.types&quot;).hide(), this.$(&quot;.pagination&quot;).hide(), this.$(&quot;.fold .arrow&quot;).removeClass(&quot;up&quot;).addClass(&quot;down&quot;), this.$(&quot;.main li&quot;).each(function (b) {
b > 2 && a(this).hide()
}), this.firstFold ? this.firstFold = !1 : App.tabsFocus(), b && App.logUserAction(&quot;hidecomment#h#detail&quot;)
},
unfold: function (a) {
this.$(&quot;.types&quot;).show(), this.$(&quot;.main li&quot;).show(), this.$(&quot;.pagination&quot;).show(), this.$(&quot;.fold .arrow&quot;).removeClass(&quot;down&quot;).addClass(&quot;up&quot;), a && App.logUserAction(&quot;morecomment#h#detail&quot;)
},
toggle: function (a) {
a.preventDefault(), this.folded ? (this.unfold(a), this.folded = !1) : (this.fold(a), this.folded = !0)
},
_convert: function (b) {
function c(a) {
var b = H5.creditToRank(a),
c = [&quot;&quot;, &quot;颗心&quot;, &quot;颗黄钻&quot;, &quot;金冠&quot;, &quot;紫冠&quot;],
d = Math.ceil(b / 5),
e = (b - 5 * (d - 1)) % 6;
return b ? e + &quot; &quot; + c[d] : &quot;&quot;
}
var d = this,
e = [];
return a.each(b, function (a, b) {
e.push({
type: d.typeMap[b.type],
text: b.text,
date: b.date,
deal: b.deal,
reply: b.reply,
user: b.buyer,
rank: c(b.credit)
})
}), e
}
})
}(Zepto),
function (a) {
App.data.coins = a(&quot;.price .coins&quot;).text(), App.data.promoPrice = a(&quot;.price .promo-price&quot;).text(), App.SkuView = Backbone.View.extend({
template: JST[&quot;templates/property&quot;],
events: {
&quot;click .ctrl&quot;: &quot;fold&quot;,
&quot;click .props&quot;: &quot;unfold&quot;,
&quot;click .values a&quot;: &quot;select&quot;
},
initialize: function () {
this.url = App.data.propsAjaxUrl, App.data.tmall && this.$el.addClass(&quot;tmall&quot;)
},
render: function () {
this.propNames = _.pluck(this.skuProps, &quot;name&quot;), this.formatedPropNames = this.format(this.propNames);
var a = this.template({
props: this.skuProps,
propNames: this.formatedPropNames
}).replace(/\s*\n\s*/g, &quot;&quot;);
return this.$(&quot;.main&quot;).html(a), this.adjust(), this.fold(), this
},
format: function (a) {
return _(a).map(function (a) {
return &quot; “<em>&quot; + a + &quot;</em>” &quot;
}).join(&quot; &quot;)
},
getData: function () {
var b = this;
a.ajax({
url: b.url,
dataType: &quot;json&quot;,
success: function (a) {
b.skuProps = a && a.skuProps || [], b.availSKUs = a && a.availSKUs || {}, b.render(), App.run(&quot;actionView:performPreviousAction&quot;, b.availSKUs)
},
error: function () {
alert(App.errorMessage)
}
})
},
select: function (b) {
b.preventDefault(), $val = a(b.target);
if ($val.hasClass(&quot;disabled&quot;)) return;
a(&quot;#sku-id&quot;).val(&quot;&quot;), $val.attr(&quot;data-img&quot;) && !$val.hasClass(&quot;selected&quot;) ? this.popImage($val) : $val.parent().find(&quot;.pop&quot;).remove(), $val.hasClass(&quot;selected&quot;) ? $val.removeClass(&quot;selected&quot;) : ($val.addClass(&quot;selected&quot;), $val.siblings().removeClass(&quot;selected&quot;)), this.notice(), this.disable(), this.setPrice()
},
notice: function () {
a(&quot;.price .promo-price&quot;).length && this.$(&quot;.sku-price p:first-child&quot;).text(&quot;促销:&quot;);
var b = this.$(&quot;.selected&quot;),
c = [],
d = [];
b.each(function (b, e) {
c.push(a(e).attr(&quot;data-name&quot;)), d.push(a(e).text())
});
var e = _.difference(this.propNames, c);
b.length == 0 ? (this.$(&quot;.notice .left&quot;).show(), this.$(&quot;.notice .left p:last-child&quot;).html(this.formatedPropNames), this.$(&quot;.notice .chosen&quot;).css(&quot;display&quot;, &quot;none&quot;), this.$(&quot;.notice .sku-price&quot;).css(&quot;display&quot;, &quot;none&quot;)) : b.length == this.skuProps.length ? (this.$(&quot;.notice .left&quot;).css(&quot;display&quot;, &quot;none&quot;), this.$(&quot;.notice .chosen p:last-child&quot;).html(this.format(d)), this.$(&quot;.notice .chosen&quot;).show(), this.$(&quot;.notice .sku-price&quot;).show()) : (this.$(&quot;.notice .left&quot;).show(), this.$(&quot;.notice .left p:last-child&quot;).html(this.format(e)), this.$(&quot;.notice .chosen&quot;).show(), this.$(&quot;.notice .chosen p:last-child&quot;).html(this.format(d)), this.$(&quot;.sku-price&quot;).css(&quot;display&quot;, &quot;none&quot;))
},
disable: function () {
var b = this;
this.$values.removeClass(&quot;disabled&quot;);
var c = this.$(&quot;.selected&quot;);
if (c.length == 0) return;
if (this.$(&quot;.property&quot;).length == 1) return;
this.$values.each(function () {
var c = a(this);
if (c.hasClass(&quot;selected&quot;)) {
var d = c.parent().parent().siblings().find(&quot;a&quot;);
d.each(function (a, e) {
var f = !1;
for (var g in b.availSKUs) if (g.search(c.attr(&quot;data-id&quot;)) > -1 && g.search(d.eq(a).attr(&quot;data-id&quot;)) > -1) {
f = !0;
break
}
f || d.eq(a).addClass(&quot;disabled&quot;)
})
}
})
},
setPrice: function () {
var b = this.$(&quot;.selected&quot;);
if (b.length == this.skuProps.length) {
var c = [];
b.each(function (b, d) {
c.push(a(d).attr(&quot;data-id&quot;))
});
var d = c.join(&quot;;&quot;);
for (var e in this.availSKUs) if (d === e) {
var f = this.availSKUs[e];
a(&quot;#sku-id&quot;).val(f.skuId), this.$(&quot;.sku-price span&quot;).text(f.quantity), this.$(&quot;.sku-price em&quot;).text(&quot;¥&quot; + (f.promoPrice || f.price) + (App.data.coins || &quot;&quot;)), a(&quot;.price li:first-child p:last-child&quot;).text(&quot;¥&quot; + f.price), a(&quot;.price .promo-price&quot;).text(&quot;¥&quot; + f.promoPrice + (App.data.coins || &quot;&quot;));
break
}
} else a(&quot;.price li:first-child p:last-child&quot;).text(App.data.price), a(&quot;.price .promo-price&quot;).text(App.data.promoPrice)
},
adjust: function () {
this.$values = this.$(&quot;.values a&quot;), this.$values.each(function () {
var b = a(this),
c = b.width();
c < 32 ? b.addClass(&quot;a&quot;) : c < 80 ? b.addClass(&quot;b&quot;) : c < 138 ? b.addClass(&quot;c&quot;) : b.addClass(&quot;d&quot;)
}), this.$(&quot;.property&quot;).each(function () {
var b = a(this),
c = 0;
a(&quot;a&quot;, b).each(function () {
var b = a(this),
d = 1;
b.hasClass(&quot;a&quot;) ? d = 1 : b.hasClass(&quot;b&quot;) ? d = 2 : d = 3;
if (c + d < 6 && b.next().length) {
c += d;
return
}
if (c + d < 6 && b.next().length == 0 || c + d == 6) {
b.addClass(&quot;last&quot;), c = 0;
return
}
c + d > 6 && (b.prev().addClass(&quot;last&quot;), c = d, b.next().length == 0 && b.addClass(&quot;last&quot;))
})
})
},
popImage: function (a) {
var b = this,
c = function (a) {
return a.hasClass(&quot;last&quot;) ? a : arguments.callee(a.next())
}, d = function (a) {
var a = a.search(/jpg$/) > -1 ? a + &quot;_210x210.jpg&quot; : a,
c = new Image;
c.onload = function () {
b.$(&quot;.pop span&quot;).hide(), b.$(&quot;.pop .main&quot;).append('<img src=&quot;' + a + '&quot; style=&quot;opacity: 0;&quot; />'), b.$(&quot;.pop img&quot;).animate({
opacity: 1
}, App.fideInTime)
}, c.src = a
}, e = c(a);
e.next().hasClass(&quot;pop&quot;) ? (this.$(&quot;.pop img&quot;).remove(), this.$(&quot;.pop span&quot;).show()) : (this.$(&quot;.pop&quot;).remove(), e.after(JST[&quot;templates/pop&quot;]())), d(a.attr(&quot;data-img&quot;))
},
restore: function (b) {
for (var c = 0; c < b.length; c++) this.$(&quot;.values a&quot;).each(function () {
a(this).attr(&quot;data-id&quot;) == b[c] && a(this).trigger(&quot;click&quot;)
})
},
fold: function (a) {
return this.$(&quot;.main&quot;).hide(), this.$(&quot;.props&quot;).show(), a && App.logUserAction(&quot;hidefeature#h#detail&quot;), !1
},
unfold: function (a) {
return this.$(&quot;.main&quot;).show(), this.$(&quot;.props&quot;).hide(), a && App.logUserAction(&quot;feature#h#detail&quot;), !1
}
})
}(Zepto),
function (a) {
App.Router = Backbone.Router.extend({
routes: {
&quot;&quot;: &quot;index&quot;,
gallery: &quot;gallery&quot;
},
initialize: function () {
App.galleryView = new App.GalleryView({
el: &quot;.gallery&quot;
}), App.galleryView.render().setup(), App.data.hasProps ? App.skuView = new App.SkuView({
el: &quot;.sku&quot;
}) : a(&quot;.sku&quot;).remove(), App.skuView && App.skuView.getData(), App.notificationView = new App.NotificationView, App.notificationView.render(), App.actionView = new App.ActionView({
el: &quot;.sales .action&quot;
}), (!App.data.hasProps && App.data.reAddCart || App.data.reAddFav) && App.actionView.performPreviousAction(), this.setupTabs(), this.adjustTableStyle(), App.reviewView = new App.ReviewView({
el: &quot;.review&quot;
}), App.reviewView.toPage(1), App.descriptionView = new App.DescriptionView({
el: &quot;.description&quot;
}), App.descriptionView.getData(), App.recommendView = new App.RecommendView({
el: &quot;.recommend&quot;
}), App.recommendView.listen(), App.data.taoPlus && this.initTaoPlus()
},
index: function () {
App.galleryView.restore()
},
gallery: function () {
App.galleryView.fullScreen()
},
setupTabs: function () {
App.data.tmall && a(&quot;.tab-list&quot;).addClass(&quot;tmall&quot;), a(&quot;#tabs li&quot;).each(function (b) {
a(this).attr(&quot;data-tab&quot;, b).on(&quot;click&quot;, function () {
a(&quot;#tabs li&quot;).removeClass(&quot;active&quot;);
var b = a(this).addClass(&quot;active&quot;);
b.attr(&quot;data-tab&quot;) == 0 ? a(&quot;.review&quot;).show() : a(&quot;.review&quot;).hide(), b.attr(&quot;data-tab&quot;) == 1 ? a(&quot;.description&quot;).show() : a(&quot;.description&quot;).hide(), b.attr(&quot;data-tab&quot;) == 0 && App.logUserAction(&quot;comment#h#detail&quot;), b.attr(&quot;data-tab&quot;) == 1 && App.logUserAction(&quot;getinfo#h#detail&quot;)
})
}), a(&quot;.review-count&quot;).on(&quot;click&quot;, function () {
App.logUserAction(&quot;getcomment#h#detail&quot;), a(&quot;#tabs li&quot;).removeClass(&quot;active&quot;).eq(0).addClass(&quot;active&quot;), a(&quot;.review&quot;).show(), a(&quot;.description&quot;).hide()
})
},
adjustTableStyle: function () {
a(&quot;.description&quot;).show();
var b = 62;
a(&quot;.description .table .label&quot;).each(function () {
var c = a(this);
c.width() > b && (b = c.width())
}), a(&quot;.description .table .label&quot;).width(b + 14 + &quot;px&quot;), a(&quot;.description&quot;).hide()
},
initTaoPlus: function () {
a(&quot;header&quot;).attr(&quot;id&quot;, &quot;header&quot;), a(&quot;.h5&quot;).attr(&quot;id&quot;, &quot;tbh5v0&quot;);
var b = new a.swipeTop({
wrap: &quot;tbh5v0&quot;,
toptabHeight: 0,
headerHeight: 50
});
b.setOp(&quot;taojia&quot;, H5.TaoPlus), H5.TaoPlus.initialize({
onShow: function () {
b.tapDown()
},
onHide: function () {
b.tapDown()
}
})
},
start: function () {
Backbone.history.start()
}
}), a(function () {
(new App.Router).start()
})
}(Zepto);


  
  仔细阅读了下,大致了解了脉络。搜索:reviewAjaxUrl,搜索到的函数体内有如下内嵌函数:
  

getData: function (b, c) {
var d = this;
this.xhr && this.xhr.abort(), this.xhr = a.ajax({
url: this.url,
data: {
rateRs: this.typeMap,
p: c,
ps: 10
},
dataType: &quot;json&quot;,
success: function (a) {
d.type = b, d.data.index = c, d.data.total = a && a.total || 0, d.data.pages[c] = a && d._convert(a.items || []), d.render(b, c)
},
error: function () {}
})
},

这里的data中的3个参数rateRs, p, ps即为要查找的参数。  
  加上参数试试吧:http://a.m.tmall.com/ajax/rate_list.do?item_id=xxxx&p=2&ps=15
  获取的内容如下(JSON&#26684;式):
  

{&quot;index&quot;:2,&quot;items&quot;:[{&quot;annoy&quot;:0,&quot;buyer&quot;:&quot;xxx&quot;,&quot;credit&quot;:91,&quot;date&quot;:&quot;2012-07-17&quot;,&quot;deal&quot;:&quot;&quot;,&quot;rateId&quot;:19890633089,&quot;text&quot;:&quot;发货超快,经济实惠,以后就买你家产品了&quot;,&quot;type&quot;:0},{&quot;annoy&quot;:0,&quot;buyer&quot;:&quot;xxx&quot;,&quot;credit&quot;:91,&quot;date&quot;:&quot;2012-07-16&quot;,&quot;deal&quot;:&quot;&quot;,&quot;rateId&quot;:19859269704,&quot;reply&quot;:&quot;感谢您对我们的肯定和支持,非常感谢您对我们的服务认可,衷心的希望您能常来我们店!!!!o(∩_∩)o&quot;,&quot;text&quot;:&quot;不好意思啊,确认晚了,发货速度很快,客服的态度也很好,特别是小依,有什么问题总能很快的得到答复.这已经是第三次购买了.&quot;,&quot;type&quot;:0},{&quot;annoy&quot;:0,&quot;buyer&quot;:&quot;xxx&quot;,&quot;credit&quot;:501,&quot;date&quot;:&quot;2012-07-14&quot;,&quot;deal&quot;:&quot;&quot;,&quot;rateId&quot;:19823225928,&quot;reply&quot;:&quot;亲,十一坊的纯的乳清蛋白粉溶解度是很好的,如果您说的其它品牌溶解速度快,那是因为那款产品里面加了速溶剂,而速溶剂属于添加剂呀,所以希望你能理解这点。另外十一坊纯乳清蛋白粉的原料是新西兰原产地纯牛奶提炼的,不知道怎么亲会闻出来羊奶味,我们有相关资质可以作证的,希望亲在好好闻闻哈!&quot;,&quot;text&quot;:&quot;蛋白粉是我用过的的,外观最细腻的,泡沫最多的一款蛋白粉,同样也是奶味最浓的一款蛋白粉,有很浓的羊奶膻味,,(注意不是牛奶,不知为什么,)但是和美国大品牌蛋白粉比起来溶解度差,美国大品牌都是见水吉化,这款差点&quot;,&quot;type&quot;:0},{&quot;annoy&quot;:0,&quot;buyer&quot;:&quot;xxx&quot;,&quot;credit&quot;:11,&quot;date&quot;:&quot;2012-07-14&quot;,&quot;deal&quot;:&quot;&quot;,&quot;rateId&quot;:19816990927,&quot;text&quot;:&quot;好&quot;,&quot;type&quot;:0},{&quot;annoy&quot;:0,&quot;buyer&quot;:&quot;xxx&quot;,&quot;credit&quot;:91,&quot;date&quot;:&quot;2012-07-13&quot;,&quot;deal&quot;:&quot;&quot;,&quot;rateId&quot;:19801085374,&quot;reply&quot;:&quot;亲,多多关注我们店铺哦,还有更多优惠进行中~~~&quot;,&quot;text&quot;:&quot;第二次购买了,不错的卖家。以后还会回来买。&quot;,&quot;type&quot;:0},{&quot;annoy&quot;:0,&quot;buyer&quot;:&quot;xxx09&quot;,&quot;credit&quot;:11,&quot;date&quot;:&quot;2012-07-12&quot;,&quot;deal&quot;:&quot;&quot;,&quot;rateId&quot;:19756966488,&quot;reply&quot;:&quot;感谢您对我们的肯定和支持,衷心的希望您能常来我们店!&quot;,&quot;text&quot;:&quot;很好,有赠品和挂奖卡带金卡&quot;,&quot;type&quot;:0},{&quot;annoy&quot;:0,&quot;buyer&quot;:&quot;xxx&quot;,&quot;credit&quot;:91,&quot;date&quot;:&quot;2012-07-11&quot;,&quot;deal&quot;:&quot;&quot;,&quot;rateId&quot;:19726634975,&quot;reply&quot;:&quot;非常感谢您对店的支持~~~&quot;,&quot;text&quot;:&quot;hao dong xi&quot;,&quot;type&quot;:0},{&quot;annoy&quot;:0,&quot;buyer&quot;:&quot;xxx&quot;,&quot;credit&quot;:251,&quot;date&quot;:&quot;2012-07-09&quot;,&quot;deal&quot;:&quot;&quot;,&quot;rateId&quot;:19678002719,&quot;reply&quot;:&quot;感谢您对我们的肯定和支持,衷心的希望您能常来我们店!&quot;,&quot;text&quot;:&quot;很好,超划算,下次再来,谢谢小礼物&quot;,&quot;type&quot;:0},{&quot;annoy&quot;:0,&quot;buyer&quot;:&quot;xxx&quot;,&quot;credit&quot;:251,&quot;date&quot;:&quot;2012-07-09&quot;,&quot;deal&quot;:&quot;&quot;,&quot;rateId&quot;:19675522722,&quot;text&quot;:&quot;第一次来,卖家服务真好,还送了礼物,哈,还中了三等奖,别然小礼品一份,但也可看出卖家的用心,好评,会常来。&quot;,&quot;type&quot;:0},{&quot;annoy&quot;:1,&quot;buyer&quot;:&quot;a**0&quot;,&quot;credit&quot;:41,&quot;date&quot;:&quot;2012-07-09&quot;,&quot;deal&quot;:&quot;&quot;,&quot;rateId&quot;:19673848752,&quot;text&quot;:&quot;妈妈吃了,感觉还可以。坚持吃看看效果了哇。谢谢卖家的晓礼物哦&quot;,&quot;type&quot;:0},{&quot;annoy&quot;:0,&quot;buyer&quot;:&quot;xxx&quot;,&quot;credit&quot;:41,&quot;date&quot;:&quot;2012-07-09&quot;,&quot;deal&quot;:&quot;&quot;,&quot;rateId&quot;:19670631439,&quot;reply&quot;:&quot;亲,多多关注我们店铺哦,还有更多优惠进行中~~~&quot;,&quot;text&quot;:&quot;一如即往的好,老顾客了&quot;,&quot;type&quot;:0},{&quot;annoy&quot;:0,&quot;buyer&quot;:&quot;xxxx&quot;,&quot;credit&quot;:282,&quot;date&quot;:&quot;2012-07-06&quot;,&quot;deal&quot;:&quot;&quot;,&quot;rateId&quot;:19611318847,&quot;reply&quot;:&quot;亲们若有疑问请拨打十一坊免费营养咨询热线:800 888 9988 ,非常感谢您对店的支持,祝您天天好心情~~&quot;,&quot;text&quot;:&quot;发货速度很快,物流也很好。虽没查证,但感觉是正品,买家服务态度也很好,落发了一个摇摇杯说要给我寄过来,正在吃希望有效果,有效果再来喽!全5分好评了。。。。。&quot;,&quot;type&quot;:0},{&quot;annoy&quot;:1,&quot;buyer&quot;:&quot;3**王&quot;,&quot;credit&quot;:4,&quot;date&quot;:&quot;2012-07-06&quot;,&quot;deal&quot;:&quot;&quot;,&quot;rateId&quot;:19607636363,&quot;text&quot;:&quot;可以&quot;,&quot;type&quot;:0},{&quot;annoy&quot;:0,&quot;buyer&quot;:&quot;xxx&quot;,&quot;credit&quot;:152,&quot;date&quot;:&quot;2012-07-06&quot;,&quot;deal&quot;:&quot;&quot;,&quot;rateId&quot;:19596872786,&quot;text&quot;:&quot;蛋白粉一直在吃非常好&quot;,&quot;type&quot;:0},{&quot;annoy&quot;:0,&quot;buyer&quot;:&quot;xxx&quot;,&quot;credit&quot;:152,&quot;date&quot;:&quot;2012-07-03&quot;,&quot;deal&quot;:&quot;&quot;,&quot;rateId&quot;:19522938766,&quot;text&quot;:&quot;谢谢送的小赠品,还没喝不过看上去还不错&quot;,&quot;type&quot;:0}],&quot;total&quot;:9}

经过几次更改参数,得出如下结论:  
  p表示page;
  ps表示page size;
  结果中的total为总页数(随ps的不同而不同).
  rateRs应该为评价结果,取&#20540;如下:all, good, ok, bad, 1, 0, -1. 但是加上这个参数没有起作用,不知什么原因。
  至此,可以完整的实现一个商品评价数据的抓取了,可以分页抓取。
  


  注:为避免商家及买家用户信息泄露,对敏感处以xxx取代。本文仅供技术研究,不得用于其他非正常或非法用途,“Don't be evil&quot;. 转载请注明出处(http://blog.csdn.net/wave_1102/article/details/7829911)。
  

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-142811-1-1.html 上篇帖子: 为什么要阅读源代码?如何有效的阅读源代码? 选一些比较优秀的开源产品作为源代码阅读对象? 下篇帖子: socket ntop pton两个函数的使用

尚未签到

发表于 2024-3-6 03:45:23 | 显示全部楼层
Aviator Spribe играть без риска казино
I am final, I am sorry, but this answer does not approach me. Who else, what can prompt?
Добро пожаловать в захватывающий мир авиаторов! Aviator – это увлекательная игра, которая позволит вам окунуться в атмосферу боевых действий на небе. Необычные графика и захватывающий сюжет сделают ваше путешествие по воздуху неповторимым.

Наслаждайтесь игрой в <a href=https://sites.google.com/view/krash-aviator-spribe/>Aviator Spribe играть бесплатно</a> и выигрывайте крупные денежные призы!
Aviator игра позволит вам почувствовать себя настоящим пилотом. Вам предстоит совершить невероятные маневры, выполнять сложные задания и сражаться с противниками. Улучшайте свой самолет, чтобы быть готовым к любым ситуациям и становиться настоящим мастером.
Основные особенности Aviator краш игры:
1. Реалистичная графика и физика – благодаря передовой графике и реалистичной физике вы почувствуете себя настоящим пилотом.
2. Разнообразные режимы игры и миссии – в Aviator краш игре вы сможете выбрать различные режимы игры, такие как гонки, симулятор полетов и захватывающие воздушные бои. Кроме того, каждая миссия будет предлагать свои собственные вызовы и задачи.
3. Улучшение и модернизация самолетов – в игре доступны различные модели самолетов, которые можно покупать и улучшать. Вы сможете устанавливать новое оборудование, улучшать двигательность и мощность своего самолета, а также выбирать различные варианты окраски и декорации.
Aviator краш игра – это возможность испытать себя в роли авиатора и преодолеть все сложности и опасности воздушного пространства. Почувствуйте настоящую свободу и адреналин в Aviator краш игре онлайн!
Играйте в «Авиатор» в онлайн-казино Pin-Up
Aviator краш игра онлайн предлагает увлекательную и захватывающую игровую атмосферу, где вы становитесь настоящим авиатором и сражаетесь с самыми опасными искусственными интеллектами.
В этой игре вы должны показать свое мастерство и смекалку, чтобы преодолеть сложности многочисленных локаций и уровней. Вам предстоит собирать бонусы, уклоняться от препятствий и сражаться с врагами, используя свои навыки пилотирования и стрельбы.
Каждый уровень игры Aviator краш имеет свою уникальную атмосферу и задачи. Будьте готовы к неожиданностям, так как вас ждут захватывающие повороты сюжета и сложные испытания. Найдите все пути к победе и станьте настоящим героем авиатором!
Авиатор игра является прекрасным способом провести время и испытать настоящий адреналиновый разряд. Готовы ли вы стать лучшим авиатором? Не упустите свой шанс и начните играть в Aviator краш прямо сейчас!
Aviator – играй, сражайся, побеждай!
Aviator Pin Up (Авиатор Пин Ап ) – игра на деньги онлайн Казахстан
Aviator игра предлагает увлекательное и захватывающее разнообразие врагов и уровней, которые не оставят равнодушными даже самых требовательных геймеров.
Враги в Aviator краш игре онлайн представлены в самых разных формах и размерах. Здесь вы встретите группы из маленьких и быстрых врагов, а также огромных боссов с мощным вооружением. Разнообразие врагов позволяет игрокам использовать разные тактики и стратегии для победы.
Кроме того, Aviator игра предлагает разнообразие уровней сложности. Выберите легкий уровень, чтобы насладиться игровым процессом, или вызовите себе настоящий вызов, выбрав экспертный уровень. Независимо от выбранного уровня сложности, вы получите максимум удовольствия от игры и окунетесь в захватывающий мир авиаторов.
Играйте в Aviator и наслаждайтесь разнообразием врагов и уровней, которые позволят вам почувствовать себя настоящим авиатором.

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表