Showing
4 changed files
with
0 additions
and
2745 deletions
Too many changes to show.
To preserve performance only 4 of 4+ files are displayed.
1 | -define("index", ["zepto","lazyload","swiper","mlellipsis","iscroll-probe","index"], function(require, exports, module){ | ||
2 | -var yohobuy; | ||
3 | - | ||
4 | -require("js/common"); | ||
5 | - | ||
6 | -require("js/passport/index"); | ||
7 | -require("js/guang/index"); | ||
8 | -require("js/home/index"); | ||
9 | -require("js/product/index"); | ||
10 | -require("js/index/index"); | ||
11 | - | ||
12 | -module.exports = yohobuy; | ||
13 | - | ||
14 | -}); | ||
15 | -define("js/common", ["zepto"], function(require, exports, module){ | ||
16 | -/** | ||
17 | - * 页面公共逻辑 | ||
18 | - * @author: xuqi<qi.xu@yoho.cn> | ||
19 | - * @date: 2015/10/21 | ||
20 | - */ | ||
21 | -var $ = require("zepto"); | ||
22 | - | ||
23 | -function cookie(name) { | ||
24 | - var cookies = document.cookie, | ||
25 | - cookieVal, | ||
26 | - offset; | ||
27 | - | ||
28 | - if (document.cookie && document.cookie !== '') { | ||
29 | - offset = cookies.indexOf(name + '='); | ||
30 | - if (offset > -1) { | ||
31 | - offset += name.length + 1; | ||
32 | - | ||
33 | - cookieVal = decodeURIComponent($.trim(cookies.substring(offset, cookies.indexOf(';', offset)))); | ||
34 | - } | ||
35 | - } | ||
36 | - | ||
37 | - return cookieVal; | ||
38 | -} | ||
39 | - | ||
40 | -function getUser() { | ||
41 | - var c = cookie('_UID'), | ||
42 | - user; | ||
43 | - | ||
44 | - if (typeof c === 'undefined') { | ||
45 | - return 0; | ||
46 | - } | ||
47 | - | ||
48 | - user = c.split('::'); | ||
49 | - | ||
50 | - if (typeof user === 'undefined' || user.length < 4) { | ||
51 | - return 0; | ||
52 | - } | ||
53 | - | ||
54 | - return user; | ||
55 | -} | ||
56 | - | ||
57 | -function getUid() { | ||
58 | - var user = getUser(); | ||
59 | - | ||
60 | - if (user === 0) { | ||
61 | - return 0; | ||
62 | - } | ||
63 | - | ||
64 | - return user[1]; | ||
65 | -} | ||
66 | - | ||
67 | -function getShoppingKey() { | ||
68 | - var c = cookie('_g'); | ||
69 | - | ||
70 | - if (typeof c === 'undefined') { | ||
71 | - return ''; | ||
72 | - } | ||
73 | - | ||
74 | - return JSON.parse(c).k; | ||
75 | -} | ||
76 | - | ||
77 | -//页面通用底部位置及status设置 | ||
78 | -(function() { | ||
79 | - var $footer = $('#yoho-footer'), | ||
80 | - $op = $footer.children('.op-row'); | ||
81 | - | ||
82 | - var user = getUser(); | ||
83 | - | ||
84 | - if ($('body').height() < $(window).height()) { | ||
85 | - $footer.addClass('bottom'); | ||
86 | - } | ||
87 | - | ||
88 | - if (user === 0) { | ||
89 | - | ||
90 | - //未登录 | ||
91 | - $op.prepend( | ||
92 | - '<a href="http://m.yohobuy.com/signin.html">登录</a>' + | ||
93 | - '<span class="sep-line">|</span>' + | ||
94 | - '<a href="http://m.yohobuy.com/reg.html">注册</a>' | ||
95 | - ); | ||
96 | - } else { | ||
97 | - | ||
98 | - //已登录 | ||
99 | - $op.prepend( | ||
100 | - 'Hi,' + | ||
101 | - '<a class="user-name" href="http://m.yohobuy.com/home?tmp=' + Math.random() + '">' + user[0] + '</a>' + | ||
102 | - '<a href="http://m.yohobuy.com/passport/signout/index?token=' + user[3] + '">退出</a>' | ||
103 | - ); | ||
104 | - } | ||
105 | - | ||
106 | - $footer.removeClass('hide'); | ||
107 | -}()); | ||
108 | - | ||
109 | -//暴露公共接口 | ||
110 | -window.cookie = cookie; | ||
111 | - | ||
112 | -window.getUser = getUser; | ||
113 | - | ||
114 | -window.getUid = getUid; | ||
115 | - | ||
116 | -window.getShoppingKey = getShoppingKey; | ||
117 | -}); | ||
118 | -define("js/passport/index", ["zepto"], function(require, exports, module){ | ||
119 | -/** | ||
120 | - * 注册、登录、密码找回打包入口 | ||
121 | - * @author: xuqi<qi.xu@yoho.cn> | ||
122 | - * @date: 2015/10/8 | ||
123 | - */ | ||
124 | - | ||
125 | -//注册 | ||
126 | -require("js/passport/register/register"); | ||
127 | -require("js/passport/register/code"); | ||
128 | -require("js/passport/register/password"); | ||
129 | - | ||
130 | -//登录 | ||
131 | -require("js/passport/login/login"); | ||
132 | -require("js/passport/login/international"); | ||
133 | - | ||
134 | -//密码找回 | ||
135 | -require("js/passport/back/mobile"); | ||
136 | -require("js/passport/back/code"); | ||
137 | -require("js/passport/back/email"); | ||
138 | -require("js/passport/back/email-success"); | ||
139 | -require("js/passport/back/new-password"); | ||
140 | -}); | ||
141 | -define("js/passport/register/register", ["zepto"], function(require, exports, module){ | ||
142 | -/** | ||
143 | - * 注册 | ||
144 | - * @author: xuqi<qi.xu@yoho.cn> | ||
145 | - * @date: 2015/10/8 | ||
146 | - */ | ||
147 | -var $ = require("zepto"); | ||
148 | - | ||
149 | -var $phoneNum = $('#phone-num'), | ||
150 | - $countrySelect = $('#country-select'), | ||
151 | - $areaCode = $('#area-code'), | ||
152 | - $btnNext = $('#btn-next'); | ||
153 | - | ||
154 | -var api = require("js/passport/api"); | ||
155 | -var tip = require("js/plugin/tip"); | ||
156 | - | ||
157 | -var trim = $.trim; | ||
158 | -var showErrTip = tip.show; | ||
159 | - | ||
160 | -api.selectCssHack($('#country-select')); | ||
161 | - | ||
162 | -api.bindClearEvt(); | ||
163 | - | ||
164 | -$phoneNum.bind('input', function() { | ||
165 | - if (trim($phoneNum.val()) === '') { | ||
166 | - $btnNext.addClass('disable'); | ||
167 | - } else { | ||
168 | - $btnNext.removeClass('disable'); | ||
169 | - } | ||
170 | -}); | ||
171 | - | ||
172 | -$countrySelect.change(function() { | ||
173 | - $areaCode.text($countrySelect.val()); | ||
174 | -}); | ||
175 | - | ||
176 | -$btnNext.on('touchstart', function() { | ||
177 | - var pn = trim($phoneNum.val()), | ||
178 | - areaCode = $countrySelect.val(); | ||
179 | - | ||
180 | - if ($btnNext.hasClass('disable')) { | ||
181 | - return; | ||
182 | - } | ||
183 | - | ||
184 | - if (api.phoneRegx[areaCode].test(pn)) { | ||
185 | - $.ajax({ | ||
186 | - url: '/passport/reg/verifymobile', | ||
187 | - type: 'POST', | ||
188 | - data: { | ||
189 | - areaCode: areaCode.replace('+', ''), | ||
190 | - phoneNum: pn | ||
191 | - }, | ||
192 | - success: function(data) { | ||
193 | - if (data.code === 200) { | ||
194 | - location.href = data.data; | ||
195 | - } else { | ||
196 | - showErrTip(data.message); | ||
197 | - } | ||
198 | - } | ||
199 | - }); | ||
200 | - } else { | ||
201 | - showErrTip('手机号格式不正确,请重新输入'); | ||
202 | - } | ||
203 | -}); | ||
204 | -}); | ||
205 | -define("js/passport/api", ["zepto"], function(require, exports, module){ | ||
206 | -/** | ||
207 | - * 登录注册公用API | ||
208 | - * @author: xuqi<qi.xu@yoho.cn> | ||
209 | - * @date: 2015/10/8 | ||
210 | - */ | ||
211 | -var $ = require("zepto"); | ||
212 | - | ||
213 | -var trim = $.trim; | ||
214 | - | ||
215 | -//邮箱验证规则 | ||
216 | -var emailRegx = /^([a-zA-Z0-9]+[_|\_|\.|-]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.|-]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/; | ||
217 | - | ||
218 | -//手机号码验证规则 | ||
219 | -var phoneRegx = { | ||
220 | - '+86': /^1[35847]{1}[0-9]{9}$/, | ||
221 | - '+852': /^[965]{1}[0-9]{7}$/, | ||
222 | - '+853': /^[0-9]{8}$/, | ||
223 | - '+886': /^[0-9]{10}$/, | ||
224 | - '+65': /^[98]{1}[0-9]{7}$/, | ||
225 | - '+60': /^1[1234679]{1}[0-9]{8}$/, | ||
226 | - '+1': /^[0-9]{10}$/, | ||
227 | - '+82': /^01[0-9]{9}$/, | ||
228 | - '+44': /^7[789][0-9]{8}$/, | ||
229 | - '+81': /^0[9|8|7][0-9]{9}$/, | ||
230 | - '+61': /^[0-9]{11}$/ | ||
231 | -}; | ||
232 | - | ||
233 | -//密码显示隐藏 | ||
234 | -function bindEyesEvt() { | ||
235 | - var $hasEye = $('.has-eye'), | ||
236 | - $eye; | ||
237 | - | ||
238 | - $hasEye.append('<div class="eye close"></div>'); | ||
239 | - $eye = $hasEye.children('.eye'); | ||
240 | - | ||
241 | - $eye.on('touchstart', function(e) { | ||
242 | - var $this = $(this), | ||
243 | - $pwd = $this.siblings('.pwd'); | ||
244 | - | ||
245 | - e.preventDefault(); | ||
246 | - $this.toggleClass('close'); | ||
247 | - | ||
248 | - //切换密码显示和文本显示 | ||
249 | - if ($this.hasClass('close')) { | ||
250 | - $pwd.attr('type', 'password'); | ||
251 | - } else { | ||
252 | - $pwd.attr('type', 'text'); | ||
253 | - } | ||
254 | - $pwd.focus(); | ||
255 | - }); | ||
256 | -} | ||
257 | - | ||
258 | -// 清空账号显示 | ||
259 | -function bindClearEvt() { | ||
260 | - var $hasClear = $('.has-clear'), | ||
261 | - $clear; | ||
262 | - | ||
263 | - $hasClear.append('<div class="clear-input"></div>'); | ||
264 | - $clear = $hasClear.children('.clear-input'); | ||
265 | - | ||
266 | - $clear.on('touchstart', function(e) { | ||
267 | - var $input = $clear.siblings('.input'); | ||
268 | - | ||
269 | - $input.val('').trigger('input').focus(); | ||
270 | - e.preventDefault(); | ||
271 | - }); | ||
272 | - | ||
273 | - //反向逻辑 | ||
274 | - $hasClear.children('.input').bind('input', function() { | ||
275 | - var $this = $(this), | ||
276 | - $thisClear = $this.siblings('.clear-input'), | ||
277 | - val = trim($this.val()); | ||
278 | - | ||
279 | - if (val === '') { | ||
280 | - $thisClear.hide(); | ||
281 | - } else { | ||
282 | - $thisClear.show(); | ||
283 | - } | ||
284 | - }); | ||
285 | -} | ||
286 | - | ||
287 | -// 密码长度验证 | ||
288 | -function pwdValidate(pwd) { | ||
289 | - if (pwd.length >= 6 && pwd.length <= 20) { | ||
290 | - return true; | ||
291 | - } | ||
292 | - return false; | ||
293 | -} | ||
294 | - | ||
295 | -// hack for resolving direction:rtl didn't work in android uc | ||
296 | -function selectCssHack($countrySelect) { | ||
297 | - var u = navigator.userAgent; | ||
298 | - | ||
299 | - function autoSelectWidth() { | ||
300 | - var wordCount = $countrySelect.find('option:selected').text().length; | ||
301 | - | ||
302 | - switch (wordCount) { | ||
303 | - | ||
304 | - //分别有2,3,4个汉字的情况 | ||
305 | - case 2: | ||
306 | - $countrySelect.outerWidth(90); | ||
307 | - break; | ||
308 | - case 3: | ||
309 | - $countrySelect.outerWidth(110); | ||
310 | - break; | ||
311 | - default: | ||
312 | - $countrySelect.outerWidth(130); | ||
313 | - } | ||
314 | - } | ||
315 | - | ||
316 | - if (u.match(/uc/i) && u.match(/android/i)) { | ||
317 | - $countrySelect.change(function() { | ||
318 | - autoSelectWidth(); | ||
319 | - }); | ||
320 | - } else { | ||
321 | - $countrySelect.removeClass('in-android-uc'); | ||
322 | - } | ||
323 | -} | ||
324 | - | ||
325 | -//Exports APIs | ||
326 | -module.exports = { | ||
327 | - emailRegx: emailRegx, | ||
328 | - phoneRegx: phoneRegx, | ||
329 | - bindEyesEvt: bindEyesEvt, | ||
330 | - bindClearEvt: bindClearEvt, | ||
331 | - pwdValidate: pwdValidate, | ||
332 | - selectCssHack: selectCssHack | ||
333 | -}; | ||
334 | -}); | ||
335 | -define("js/plugin/tip", ["zepto"], function(require, exports, module){ | ||
336 | -/** | ||
337 | - * 弹框提示 | ||
338 | - * @author: xuqi<qi.xu@yoho.cn> | ||
339 | - * @date: 2015/10/10 | ||
340 | - */ | ||
341 | -var $ = require("zepto"); | ||
342 | - | ||
343 | -var $tip, tipItime; | ||
344 | - | ||
345 | -/** | ||
346 | - * 初始化提示框 | ||
347 | - */ | ||
348 | -(function() { | ||
349 | - var tipHtml = '<div id="yoho-tip" class="yoho-tip"></div>'; | ||
350 | - | ||
351 | - //插入提示HTML | ||
352 | - $('.yoho-page').append(tipHtml); | ||
353 | - | ||
354 | - $tip = $('#yoho-tip'); | ||
355 | - $tip.on('touchstart', function() { | ||
356 | - $tip.hide(); | ||
357 | - | ||
358 | - //清除Timeout | ||
359 | - clearTimeout(tipItime); | ||
360 | - }); | ||
361 | -}()); | ||
362 | - | ||
363 | -/** | ||
364 | - * 显示提示 | ||
365 | - */ | ||
366 | -function show(con, dur) { | ||
367 | - var content, duration; | ||
368 | - | ||
369 | - if (typeof con === 'undefined') { | ||
370 | - return; | ||
371 | - } | ||
372 | - | ||
373 | - content = con.toString(); | ||
374 | - duration = (dur && dur > 0) ? dur : 2000; | ||
375 | - | ||
376 | - $tip.text(content).show(); | ||
377 | - | ||
378 | - tipItime = setTimeout(function() { | ||
379 | - if ($tip.css('display') === 'block') { | ||
380 | - $tip.hide(); | ||
381 | - } | ||
382 | - }, duration); | ||
383 | -} | ||
384 | - | ||
385 | -exports.show = show; | ||
386 | -}); | ||
387 | -define("js/passport/register/code", ["zepto"], function(require, exports, module){ | ||
388 | -/** | ||
389 | - * 注册-验证码 | ||
390 | - * @author: xuqi<qi.xu@yoho.cn> | ||
391 | - * @date: 2015/10/8 | ||
392 | - */ | ||
393 | - | ||
394 | -require("js/passport/code")(true); | ||
395 | -}); | ||
396 | -define("js/passport/code", ["zepto"], function(require, exports, module){ | ||
397 | -/** | ||
398 | - * 注册/找回密码-验证码 | ||
399 | - * @author: xuqi<qi.xu@yoho.cn> | ||
400 | - * @date: 2015/10/8 | ||
401 | - */ | ||
402 | -var $ = require("zepto"); | ||
403 | - | ||
404 | -module.exports = function(useInRegister) { | ||
405 | - var $captcha = $('#captcha'), | ||
406 | - $btnNext = $('#btn-next'), | ||
407 | - $captchaTip = $('#captcha-tip'), | ||
408 | - phoneNum = $('#phone-num').val(), | ||
409 | - areaCode = $('#area-code').val().replace('+', ''); | ||
410 | - | ||
411 | - var api = require("js/passport/api"); | ||
412 | - var tip = require("js/plugin/tip"); | ||
413 | - | ||
414 | - var trim = $.trim; | ||
415 | - var showErrTip = tip.show; | ||
416 | - | ||
417 | - var urlMid = useInRegister ? 'reg' : 'back'; | ||
418 | - | ||
419 | - function countDown() { | ||
420 | - var count = 59, | ||
421 | - itime; | ||
422 | - | ||
423 | - itime = setInterval(function() { | ||
424 | - if (count === 0) { | ||
425 | - $captchaTip.text('重发验证码').removeClass('disable'); | ||
426 | - clearInterval(itime); | ||
427 | - } else { | ||
428 | - $captchaTip.text('重发验证码 (' + count-- + '秒)'); | ||
429 | - } | ||
430 | - }, 1000); | ||
431 | - } | ||
432 | - | ||
433 | - api.bindClearEvt(); | ||
434 | - | ||
435 | - $captcha.bind('input', function() { | ||
436 | - if (trim($captcha.val()) !== '') { | ||
437 | - $btnNext.removeClass('disable'); | ||
438 | - } else { | ||
439 | - $btnNext.addClass('disable'); | ||
440 | - } | ||
441 | - }); | ||
442 | - | ||
443 | - //重新发送验证码 | ||
444 | - $captchaTip.on('touchstart', function() { | ||
445 | - if ($captchaTip.hasClass('disable')) { | ||
446 | - return; | ||
447 | - } | ||
448 | - | ||
449 | - $.ajax({ | ||
450 | - type: 'POST', | ||
451 | - url: '/passport/' + urlMid + '/sendcode', | ||
452 | - data: { | ||
453 | - phoneNum: phoneNum, | ||
454 | - areaCode: areaCode | ||
455 | - }, | ||
456 | - success: function(data) { | ||
457 | - if (data.code === 200) { | ||
458 | - $captchaTip.text('重发验证码 (60秒)').addClass('disable'); | ||
459 | - countDown(); | ||
460 | - } else { | ||
461 | - | ||
462 | - //验证码不正确,显示提示 | ||
463 | - showErrTip(data.message); | ||
464 | - } | ||
465 | - } | ||
466 | - }); | ||
467 | - }); | ||
468 | - | ||
469 | - $btnNext.on('touchstart', function() { | ||
470 | - if ($btnNext.hasClass('disable')) { | ||
471 | - return; | ||
472 | - } | ||
473 | - | ||
474 | - $.ajax({ | ||
475 | - type: 'POST', | ||
476 | - url: '/passport/' + urlMid + '/verifycode', | ||
477 | - data: { | ||
478 | - phoneNum: phoneNum, | ||
479 | - areaCode: areaCode, | ||
480 | - code: trim($captcha.val()), | ||
481 | - token: $('#token').val() | ||
482 | - }, | ||
483 | - success: function(data) { | ||
484 | - if (data.code === 200) { | ||
485 | - location.href = data.data; | ||
486 | - } else { | ||
487 | - | ||
488 | - //验证码不正确,显示提示 | ||
489 | - showErrTip(data.message); | ||
490 | - } | ||
491 | - } | ||
492 | - }); | ||
493 | - }); | ||
494 | - | ||
495 | - countDown(); | ||
496 | -}; | ||
497 | -}); | ||
498 | -define("js/passport/register/password", ["zepto"], function(require, exports, module){ | ||
499 | -/** | ||
500 | - * 注册-密码 | ||
501 | - * @author: xuqi<qi.xu@yoho.cn> | ||
502 | - * @date: 2015/10/8 | ||
503 | - */ | ||
504 | -var $ = require("zepto"); | ||
505 | - | ||
506 | -var $pwd = $('#pwd'), | ||
507 | - $btnSure = $('#btn-sure'); | ||
508 | - | ||
509 | -var api = require("js/passport/api"); | ||
510 | -var tip = require("js/plugin/tip"); | ||
511 | - | ||
512 | -var trim = $.trim; | ||
513 | -var showErrTip = tip.show; | ||
514 | - | ||
515 | -api.bindEyesEvt(); | ||
516 | - | ||
517 | -$pwd.bind('input', function() { | ||
518 | - if (trim($pwd.val()) === '') { | ||
519 | - $btnSure.addClass('disable'); | ||
520 | - } else { | ||
521 | - $btnSure.removeClass('disable'); | ||
522 | - } | ||
523 | -}); | ||
524 | - | ||
525 | -$btnSure.on('touchstart', function() { | ||
526 | - var pwd = trim($pwd.val()); | ||
527 | - | ||
528 | - if ($btnSure.hasClass('disable')) { | ||
529 | - return; | ||
530 | - } | ||
531 | - | ||
532 | - if (api.pwdValidate(pwd) === false) { | ||
533 | - showErrTip('密码6-20位,请重新输入'); | ||
534 | - } else { | ||
535 | - $.ajax({ | ||
536 | - type: 'POST', | ||
537 | - url: '/passport/reg/setpassword', | ||
538 | - data: { | ||
539 | - password: pwd, | ||
540 | - phoneNum: $('#phone-num').val(), | ||
541 | - areaCode: $('#area-code').val(), | ||
542 | - token: $('#token').val() | ||
543 | - }, | ||
544 | - success: function(data) { | ||
545 | - if (data.code === 200) { | ||
546 | - showErrTip('注册成功'); | ||
547 | - | ||
548 | - //1000ms后跳转页面 | ||
549 | - setTimeout(function() { | ||
550 | - location.href = data.data; | ||
551 | - }, 1000); | ||
552 | - } else { | ||
553 | - if (data.code === 401 || data.code === 404 || data.code === 505) { | ||
554 | - showErrTip(data.message); | ||
555 | - } else { | ||
556 | - showErrTip(data.message); | ||
557 | - setTimeout(function() { | ||
558 | - location.href = data.data; | ||
559 | - }, 1000); | ||
560 | - } | ||
561 | - } | ||
562 | - } | ||
563 | - }); | ||
564 | - } | ||
565 | -}); | ||
566 | -}); | ||
567 | -define("js/passport/login/login", ["zepto"], function(require, exports, module){ | ||
568 | -/** | ||
569 | - * 登录 | ||
570 | - * @author: xuqi<qi.xu@yoho.cn> | ||
571 | - * @date: 2015/9/30 | ||
572 | - */ | ||
573 | -var $ = require("zepto"); | ||
574 | - | ||
575 | -var $account = $('#account'), | ||
576 | - $pwd = $('#pwd'), | ||
577 | - $loginBtn = $('#btn-login'), | ||
578 | - | ||
579 | - $mask = $('#retrive-pwd-mask'), | ||
580 | - $ways = $('#retrive-pwd-ways'), | ||
581 | - | ||
582 | - accPass = false, | ||
583 | - pwdPass = false; | ||
584 | - | ||
585 | -var api = require("js/passport/api"); | ||
586 | -var tip = require("js/plugin/tip"); | ||
587 | - | ||
588 | -var trim = $.trim; | ||
589 | -var showErrTip = tip.show; | ||
590 | - | ||
591 | -//登录按钮状态切换 | ||
592 | -function switchLoginBtnStatus() { | ||
593 | - if (accPass && pwdPass) { | ||
594 | - $loginBtn.removeClass('disable'); | ||
595 | - } else { | ||
596 | - $loginBtn.addClass('disable'); | ||
597 | - } | ||
598 | -} | ||
599 | - | ||
600 | -//显示找回密码面板 | ||
601 | -function showRetrivePanel() { | ||
602 | - $mask.show(); | ||
603 | - $ways.show(); | ||
604 | -} | ||
605 | - | ||
606 | -//隐藏找回密码面板 | ||
607 | -function hideRetrivePanel() { | ||
608 | - $mask.hide(); | ||
609 | - $ways.hide(); | ||
610 | -} | ||
611 | - | ||
612 | -//密码显示与隐藏 | ||
613 | -api.bindEyesEvt(); | ||
614 | - | ||
615 | -//清空账号输入框 | ||
616 | -api.bindClearEvt(); | ||
617 | - | ||
618 | -$account.bind('input', function() { | ||
619 | - if (trim($account.val()) !== '') { | ||
620 | - accPass = true; | ||
621 | - } else { | ||
622 | - accPass = false; | ||
623 | - } | ||
624 | - switchLoginBtnStatus(); | ||
625 | -}); | ||
626 | - | ||
627 | -$pwd.bind('input', function() { | ||
628 | - if (trim($pwd.val()) === '') { | ||
629 | - pwdPass = false; | ||
630 | - } else { | ||
631 | - pwdPass = true; | ||
632 | - } | ||
633 | - switchLoginBtnStatus(); | ||
634 | -}); | ||
635 | - | ||
636 | - | ||
637 | -// Login | ||
638 | -$loginBtn.on('touchstart', function() { | ||
639 | - var acc = trim($account.val()), | ||
640 | - pwd = trim($pwd.val()); | ||
641 | - | ||
642 | - if ($loginBtn.hasClass('disable')) { | ||
643 | - return; | ||
644 | - } | ||
645 | - | ||
646 | - //验证账号(数字或者邮箱)和密码合理性 | ||
647 | - if ((/^[0-9]+$/.test(acc) || api.emailRegx.test(acc)) && api.pwdValidate(pwd)) { | ||
648 | - $.ajax({ | ||
649 | - type: 'POST', | ||
650 | - url: '/passport/login/auth', | ||
651 | - data: { | ||
652 | - account: acc, | ||
653 | - password: pwd | ||
654 | - }, | ||
655 | - success: function(data) { | ||
656 | - if (data.code === 200) { | ||
657 | - showErrTip('登录成功'); | ||
658 | - | ||
659 | - //1s后跳转页面 | ||
660 | - setTimeout(function() { | ||
661 | - location.href = data.data; | ||
662 | - }, 1000); | ||
663 | - } else { | ||
664 | - showErrTip(data.message); | ||
665 | - } | ||
666 | - }, | ||
667 | - error: function() { | ||
668 | - showErrTip('网络断开连接啦~'); | ||
669 | - } | ||
670 | - }); | ||
671 | - } else { | ||
672 | - showErrTip('账号或密码有错误,请重新输入'); | ||
673 | - } | ||
674 | -}); | ||
675 | - | ||
676 | - | ||
677 | -$('#forget-pwd').on('touchstart', function() { | ||
678 | - showRetrivePanel(); | ||
679 | -}); | ||
680 | - | ||
681 | -$mask.on('touchstart', function() { | ||
682 | - hideRetrivePanel(); | ||
683 | -}); | ||
684 | - | ||
685 | -$('#cancel-retrive').on('touchstart', function(e) { | ||
686 | - e.preventDefault(); | ||
687 | - hideRetrivePanel(); | ||
688 | -}); | ||
689 | - | ||
690 | -//对初始有默认值的情况去初始化登录按钮状态 | ||
691 | -$account.trigger('input'); | ||
692 | -$pwd.trigger('input'); | ||
693 | -}); | ||
694 | -define("js/passport/login/international", ["zepto"], function(require, exports, module){ | ||
695 | -/** | ||
696 | - * 国际账号登录 | ||
697 | - * @author: xuqi<qi.xu@yoho.cn> | ||
698 | - * @date: 2015/10/8 | ||
699 | - */ | ||
700 | -var $ = require("zepto"); | ||
701 | - | ||
702 | -var $phoneNum = $('#phone-num'), | ||
703 | - $countrySelect = $('#country-select'), | ||
704 | - $areaCode = $('#area-code'), | ||
705 | - $pwd = $('#pwd'), | ||
706 | - $loginBtn = $('#btn-login'), | ||
707 | - | ||
708 | - pnPass = false, | ||
709 | - pwdPass = false; | ||
710 | - | ||
711 | -var api = require("js/passport/api"); | ||
712 | -var tip = require("js/plugin/tip"); | ||
713 | - | ||
714 | -var trim = $.trim; | ||
715 | -var showErrTip = tip.show; | ||
716 | - | ||
717 | -//登录按钮状态切换 | ||
718 | -function switchLoginBtnStatus() { | ||
719 | - if (pnPass && pwdPass) { | ||
720 | - $loginBtn.removeClass('disable'); | ||
721 | - } else { | ||
722 | - $loginBtn.addClass('disable'); | ||
723 | - } | ||
724 | -} | ||
725 | - | ||
726 | -//Android-UC下显示select的direction:rtl无效的临时解决办法 | ||
727 | -api.selectCssHack($countrySelect); | ||
728 | - | ||
729 | -//显示隐藏密码 | ||
730 | -api.bindEyesEvt(); | ||
731 | - | ||
732 | -//清空手机号码 | ||
733 | -api.bindClearEvt(); | ||
734 | - | ||
735 | -$phoneNum.bind('input', function() { | ||
736 | - if (trim($phoneNum.val()) === '') { | ||
737 | - pnPass = false; | ||
738 | - } else { | ||
739 | - pnPass = true; | ||
740 | - } | ||
741 | - | ||
742 | - switchLoginBtnStatus(); | ||
743 | -}); | ||
744 | - | ||
745 | -$pwd.bind('input', function() { | ||
746 | - var pwd = trim($pwd.val()); | ||
747 | - | ||
748 | - if (pwd === '') { | ||
749 | - pwdPass = false; | ||
750 | - } else { | ||
751 | - pwdPass = true; | ||
752 | - } | ||
753 | - | ||
754 | - switchLoginBtnStatus(); | ||
755 | -}); | ||
756 | - | ||
757 | -$countrySelect.change(function() { | ||
758 | - $areaCode.text($countrySelect.val()); | ||
759 | -}); | ||
760 | - | ||
761 | -$loginBtn.on('touchstart', function() { | ||
762 | - var pn = trim($phoneNum.val()), | ||
763 | - areaCode = $countrySelect.val(), | ||
764 | - pwd = trim($pwd.val()); | ||
765 | - | ||
766 | - if ($loginBtn.hasClass('disable')) { | ||
767 | - return; | ||
768 | - } | ||
769 | - | ||
770 | - if (api.phoneRegx[areaCode].test(pn) && api.pwdValidate(pwd)) { | ||
771 | - $.ajax({ | ||
772 | - type: 'POST', | ||
773 | - url: '/passport/login/auth', | ||
774 | - data: { | ||
775 | - areaCode: areaCode.replace('+', ''), | ||
776 | - account: pn, | ||
777 | - password: pwd | ||
778 | - }, | ||
779 | - success: function(data) { | ||
780 | - if (data.code === 200) { | ||
781 | - showErrTip('登录成功'); | ||
782 | - | ||
783 | - //1000ms后跳转页面 | ||
784 | - setTimeout(function() { | ||
785 | - location.href = data.data; | ||
786 | - }, 1000); | ||
787 | - } else { | ||
788 | - showErrTip(data.message); | ||
789 | - } | ||
790 | - }, | ||
791 | - error: function() { | ||
792 | - showErrTip('网络断开连接啦~'); | ||
793 | - } | ||
794 | - }); | ||
795 | - } else { | ||
796 | - showErrTip('账号或密码有错误,请重新输入'); | ||
797 | - } | ||
798 | -}); | ||
799 | - | ||
800 | -//对初始有默认值的情况去初始化登录按钮状态 | ||
801 | -$phoneNum.trigger('input'); | ||
802 | -$pwd.trigger('input'); | ||
803 | -}); | ||
804 | -define("js/passport/back/mobile", ["zepto"], function(require, exports, module){ | ||
805 | -/** | ||
806 | - * 找回密码-手机 | ||
807 | - * @author: xuqi<qi.xu@yoho.cn> | ||
808 | - * @date: 2015/10/8 | ||
809 | - */ | ||
810 | -var $ = require("zepto"); | ||
811 | - | ||
812 | -var $phoneNum = $('#phone-num'), | ||
813 | - $countrySelect = $('#country-select'), | ||
814 | - $areaCode = $('#area-code'), | ||
815 | - $btnNext = $('#btn-next'); | ||
816 | - | ||
817 | -var api = require("js/passport/api"); | ||
818 | -var tip = require("js/plugin/tip"); | ||
819 | - | ||
820 | -var trim = $.trim; | ||
821 | -var showErrTip = tip.show; | ||
822 | - | ||
823 | -api.selectCssHack($('#country-select')); | ||
824 | - | ||
825 | -api.bindClearEvt(); | ||
826 | - | ||
827 | -$phoneNum.bind('input', function() { | ||
828 | - if (trim($phoneNum.val()) === '') { | ||
829 | - $btnNext.addClass('disable'); | ||
830 | - } else { | ||
831 | - $btnNext.removeClass('disable'); | ||
832 | - } | ||
833 | -}); | ||
834 | - | ||
835 | -$countrySelect.change(function() { | ||
836 | - $areaCode.text($countrySelect.val()); | ||
837 | -}); | ||
838 | - | ||
839 | -$btnNext.on('touchstart', function() { | ||
840 | - var pn = trim($phoneNum.val()), | ||
841 | - area = $countrySelect.val(); | ||
842 | - | ||
843 | - if ($btnNext.hasClass('disable')) { | ||
844 | - return; | ||
845 | - } | ||
846 | - | ||
847 | - if (api.phoneRegx[area].test(pn)) { | ||
848 | - $.ajax({ | ||
849 | - url: '/passport/back/sendcode', | ||
850 | - type: 'POST', | ||
851 | - data: { | ||
852 | - areaCode: area.replace('+', ''), | ||
853 | - phoneNum: pn | ||
854 | - }, | ||
855 | - success: function(data) { | ||
856 | - if (data.code === 200) { | ||
857 | - location.href = data.data; | ||
858 | - } else { | ||
859 | - showErrTip(data.message); | ||
860 | - } | ||
861 | - } | ||
862 | - }); | ||
863 | - } else { | ||
864 | - showErrTip('手机号格式不正确,请重新输入'); | ||
865 | - } | ||
866 | -}); | ||
867 | -}); | ||
868 | -define("js/passport/back/code", ["zepto"], function(require, exports, module){ | ||
869 | -/** | ||
870 | - * 找回密码-验证码 | ||
871 | - * @author: xuqi<qi.xu@yoho.cn> | ||
872 | - * @date: 2015/10/8 | ||
873 | - */ | ||
874 | - | ||
875 | -require("js/passport/code")(false); | ||
876 | -}); | ||
877 | -define("js/passport/back/email", ["zepto"], function(require, exports, module){ | ||
878 | -/** | ||
879 | - * 找回密码-邮箱找回 | ||
880 | - * @author: xuqi<qi.xu@yoho.cn> | ||
881 | - * @date: 2015/10/8 | ||
882 | - */ | ||
883 | -var $ = require("zepto"); | ||
884 | - | ||
885 | -var $email = $('#email'), | ||
886 | - $btnSure = $('#btn-sure'); | ||
887 | - | ||
888 | -var api = require("js/passport/api"); | ||
889 | -var tip = require("js/plugin/tip"); | ||
890 | - | ||
891 | -var trim = $.trim; | ||
892 | -var showErrTip = tip.show; | ||
893 | - | ||
894 | -api.bindClearEvt(); | ||
895 | - | ||
896 | -$email.bind('input', function() { | ||
897 | - if (trim($email.val()) === '') { | ||
898 | - $btnSure.addClass('disable'); | ||
899 | - } else { | ||
900 | - $btnSure.removeClass('disable'); | ||
901 | - } | ||
902 | -}); | ||
903 | - | ||
904 | -$btnSure.on('touchstart', function() { | ||
905 | - var email = trim($email.val()); | ||
906 | - | ||
907 | - if ($btnSure.hasClass('disable')) { | ||
908 | - return; | ||
909 | - } | ||
910 | - | ||
911 | - if (api.emailRegx.test(email)) { | ||
912 | - $.ajax({ | ||
913 | - url: '/passport/back/sendemail', | ||
914 | - type: 'POST', | ||
915 | - data: { | ||
916 | - email: email | ||
917 | - }, | ||
918 | - success: function(data) { | ||
919 | - if (data.code === 200) { | ||
920 | - location.href = data.data; | ||
921 | - } else { | ||
922 | - showErrTip(data.message); | ||
923 | - } | ||
924 | - } | ||
925 | - }); | ||
926 | - } else { | ||
927 | - showErrTip('邮箱格式不正确,请重新输入'); | ||
928 | - } | ||
929 | -}); | ||
930 | -}); | ||
931 | -define("js/passport/back/email-success", ["zepto"], function(require, exports, module){ | ||
932 | -/** | ||
933 | - * 找回密码-邮箱找回成功 | ||
934 | - * @author: xuqi<qi.xu@yoho.cn> | ||
935 | - * @date: 2015/10/8 | ||
936 | - */ | ||
937 | - | ||
938 | -var $ = require("zepto"); | ||
939 | - | ||
940 | -var $resend = $('#resend'); | ||
941 | - | ||
942 | -var tip = require("js/plugin/tip"), | ||
943 | - showErrTip = tip.show; | ||
944 | - | ||
945 | -$resend.on('touchstart', function(e) { | ||
946 | - e.preventDefault(); | ||
947 | - | ||
948 | - $.ajax({ | ||
949 | - url: $resend.data('url'), | ||
950 | - type: 'GET', | ||
951 | - success: function(data) { | ||
952 | - if (data.code === 200) { | ||
953 | - showErrTip(data.message); | ||
954 | - } else { | ||
955 | - showErrTip(data.message); | ||
956 | - } | ||
957 | - } | ||
958 | - }); | ||
959 | -}); | ||
960 | -}); | ||
961 | -define("js/passport/back/new-password", ["zepto"], function(require, exports, module){ | ||
962 | -/** | ||
963 | - * 密码找回-新密码 | ||
964 | - * @author: xuqi<qi.xu@yoho.cn> | ||
965 | - * @date: 2015/10/8 | ||
966 | - */ | ||
967 | -var $ = require("zepto"); | ||
968 | - | ||
969 | -var $pwd = $('#pwd'), | ||
970 | - $btnOk = $('#btn-ok'); | ||
971 | - | ||
972 | -var api = require("js/passport/api"); | ||
973 | -var tip = require("js/plugin/tip"); | ||
974 | - | ||
975 | -var trim = $.trim; | ||
976 | -var showErrTip = tip.show; | ||
977 | - | ||
978 | -var $phoneNum = $('#phone-num'); | ||
979 | - | ||
980 | -api.bindEyesEvt(); | ||
981 | - | ||
982 | -$pwd.bind('input', function() { | ||
983 | - if (trim($pwd.val()) === '') { | ||
984 | - $btnOk.addClass('disable'); | ||
985 | - } else { | ||
986 | - $btnOk.removeClass('disable'); | ||
987 | - } | ||
988 | -}); | ||
989 | - | ||
990 | -$btnOk.on('touchstart', function() { | ||
991 | - var pwd = trim($pwd.val()), | ||
992 | - mobileBack = true, | ||
993 | - setting, | ||
994 | - url; | ||
995 | - | ||
996 | - if ($btnOk.hasClass('disable')) { | ||
997 | - return; | ||
998 | - } | ||
999 | - | ||
1000 | - setting = { | ||
1001 | - password: pwd | ||
1002 | - }; | ||
1003 | - | ||
1004 | - if ($phoneNum.length === 0) { | ||
1005 | - mobileBack = false; | ||
1006 | - } | ||
1007 | - | ||
1008 | - if (mobileBack) { | ||
1009 | - $.extend(setting, { | ||
1010 | - phoneNum: $phoneNum.val(), | ||
1011 | - areaCode: $('#areaCode').val(), | ||
1012 | - token: $('#token').val() | ||
1013 | - }); | ||
1014 | - | ||
1015 | - url = '/passport/back/passwordByMobile'; | ||
1016 | - } else { | ||
1017 | - $.extend(setting, { | ||
1018 | - code: $('#email-code').val() | ||
1019 | - }); | ||
1020 | - | ||
1021 | - url = '/passport/back/passwordByEmail'; | ||
1022 | - } | ||
1023 | - | ||
1024 | - | ||
1025 | - if (api.pwdValidate(pwd)) { | ||
1026 | - $.ajax({ | ||
1027 | - type: 'POST', | ||
1028 | - url: url, | ||
1029 | - data: setting, | ||
1030 | - success: function(data) { | ||
1031 | - if (data.code === 200) { | ||
1032 | - showErrTip('密码修改成功'); | ||
1033 | - | ||
1034 | - //1000ms后跳转页面 | ||
1035 | - setTimeout(function() { | ||
1036 | - location.href = data.data; | ||
1037 | - }, 1000); | ||
1038 | - } else { | ||
1039 | - showErrTip(data.message); | ||
1040 | - } | ||
1041 | - } | ||
1042 | - }); | ||
1043 | - } else { | ||
1044 | - showErrTip('密码6-20位,请重新输入'); | ||
1045 | - } | ||
1046 | -}); | ||
1047 | -}); | ||
1048 | -define("js/guang/index", ["zepto","lazyload","swiper","mlellipsis","iscroll-probe","index"], function(require, exports, module){ | ||
1049 | -/** | ||
1050 | - * 逛打包入口 | ||
1051 | - * @author: xuqi<qi.xu@yoho.cn> | ||
1052 | - * @date: 2015/10/9 | ||
1053 | - */ | ||
1054 | - | ||
1055 | -require("js/guang/plus-star/list"); | ||
1056 | -require("js/guang/plus-star/detail"); | ||
1057 | - | ||
1058 | -require("js/guang/home"); | ||
1059 | -require("js/guang/list"); | ||
1060 | -require("js/guang/detail"); | ||
1061 | -}); | ||
1062 | -define("js/guang/plus-star/list", ["zepto","lazyload","swiper","index"], function(require, exports, module){ | ||
1063 | -/** | ||
1064 | - * PLUS+STAR列表页 | ||
1065 | - * @author: xuqi<qi.xu@yoho.cn> | ||
1066 | - * @date: 2015/10/10 | ||
1067 | - */ | ||
1068 | - | ||
1069 | -var $ = require("zepto"), | ||
1070 | - lazyLoad = require("lazyload"), | ||
1071 | - Swiper = require("swiper"); | ||
1072 | - | ||
1073 | -var $navs = $('#nav-tab > li'), | ||
1074 | - $contents = $('#ps-content > .content'); | ||
1075 | - | ||
1076 | -var mySwiper; | ||
1077 | - | ||
1078 | -lazyLoad($('img.lazy')); | ||
1079 | - | ||
1080 | -mySwiper = new Swiper('.swiper-container', { | ||
1081 | - lazyLoading: true, | ||
1082 | - pagination: '.swiper-pagination' | ||
1083 | -}); | ||
1084 | - | ||
1085 | -$('#nav-tab').delegate('li', 'touchstart', function() { | ||
1086 | - if ($(this).hasClass('focus')) { | ||
1087 | - return; | ||
1088 | - } | ||
1089 | - | ||
1090 | - $navs.toggleClass('focus'); | ||
1091 | - $contents.toggleClass('hide'); | ||
1092 | - | ||
1093 | - $(document).trigger('scroll'); //Trigger lazyLoad | ||
1094 | -}); | ||
1095 | -}); | ||
1096 | -define("js/guang/plus-star/detail", ["zepto","mlellipsis","lazyload"], function(require, exports, module){ | ||
1097 | -/** | ||
1098 | - * PLUS+STAR详情页 | ||
1099 | - * @author: xuqi<qi.xu@yoho.cn> | ||
1100 | - * @date: 2015/10/10 | ||
1101 | - */ | ||
1102 | - | ||
1103 | -var $ = require("zepto"), | ||
1104 | - ellipsis = require("mlellipsis"), | ||
1105 | - lazyLoad = require("lazyload"); | ||
1106 | - | ||
1107 | -var $intro = $('#intro'), | ||
1108 | - $imt = $('#intro-more-txt'), | ||
1109 | - $infosContainer = $('#related-infos-container'); | ||
1110 | - | ||
1111 | -var info = require("js/guang/info"); | ||
1112 | - | ||
1113 | -var tip = require("js/plugin/tip"); | ||
1114 | - | ||
1115 | -var brandId = $('#brand-info').data('id'); | ||
1116 | - | ||
1117 | -var mIntro, aIntro; | ||
1118 | - | ||
1119 | -ellipsis.init(); | ||
1120 | - | ||
1121 | -//Init LazyLoad | ||
1122 | -lazyLoad($('img.lazy')); | ||
1123 | - | ||
1124 | -//文字介绍文字截取 | ||
1125 | -$intro[0].mlellipsis(3); | ||
1126 | - | ||
1127 | -//获取截取文字和完整文字 | ||
1128 | -setTimeout(function() { | ||
1129 | - mIntro = $intro.text(); | ||
1130 | - aIntro = $intro.attr('title'); | ||
1131 | -}); | ||
1132 | - | ||
1133 | -info.initInfosEvt($infosContainer); | ||
1134 | - | ||
1135 | -//文字介绍收起与展开 | ||
1136 | -$('#more-intro').bind('touchstart', function() { | ||
1137 | - var $this = $(this); | ||
1138 | - | ||
1139 | - $this.toggleClass('spread'); | ||
1140 | - | ||
1141 | - if ($this.hasClass('spread')) { | ||
1142 | - | ||
1143 | - //显示 | ||
1144 | - $intro.text(aIntro); | ||
1145 | - $imt.text('收起'); | ||
1146 | - } else { | ||
1147 | - | ||
1148 | - //隐藏 | ||
1149 | - $intro.text(mIntro); | ||
1150 | - $imt.text('more'); | ||
1151 | - } | ||
1152 | -}); | ||
1153 | - | ||
1154 | -//品牌收藏 | ||
1155 | -$('#brand-like').bind('touchstart', function(e) { | ||
1156 | - var opt = 'ok', | ||
1157 | - $this = $(this); | ||
1158 | - | ||
1159 | - e.preventDefault(); | ||
1160 | - | ||
1161 | - if ($this.hasClass('like')) { | ||
1162 | - opt = 'cancel'; | ||
1163 | - } | ||
1164 | - | ||
1165 | - $.ajax({ | ||
1166 | - type: 'POST', | ||
1167 | - url: '/guang/opt/favoriteBrand', | ||
1168 | - data: { | ||
1169 | - id: brandId, | ||
1170 | - opt: opt | ||
1171 | - }, | ||
1172 | - success: function(data) { | ||
1173 | - if (data.code === 200) { | ||
1174 | - $this.toggleClass('like'); | ||
1175 | - } else if (data.code === 400) { | ||
1176 | - tip.show('未登录'); | ||
1177 | - } | ||
1178 | - }, | ||
1179 | - error: function() { | ||
1180 | - tip.show('网络断开连接了~'); | ||
1181 | - } | ||
1182 | - }); | ||
1183 | -}); | ||
1184 | -}); | ||
1185 | -define("js/guang/info", ["zepto","mlellipsis","lazyload"], function(require, exports, module){ | ||
1186 | -/** | ||
1187 | - * 资讯相关API | ||
1188 | - * @author: xuqi<qi.xu@yoho.cn> | ||
1189 | - * @date: 2015/10/10 | ||
1190 | - */ | ||
1191 | - | ||
1192 | -var $ = require("zepto"), | ||
1193 | - ellipsis = require("mlellipsis"), | ||
1194 | - lazyLoad = require("lazyload"); | ||
1195 | - | ||
1196 | -var tip = require("js/plugin/tip"); | ||
1197 | - | ||
1198 | -var $loadMoreInfo = $('#load-more-info'); | ||
1199 | -var $loading = $(''), | ||
1200 | - $noMore = $(''); | ||
1201 | - | ||
1202 | -var loading = false; | ||
1203 | - | ||
1204 | -ellipsis.init(); | ||
1205 | - | ||
1206 | -if ($loadMoreInfo.length > 0) { | ||
1207 | - $loading = $loadMoreInfo.children('.loading'); | ||
1208 | - $noMore = $loadMoreInfo.children('.no-more'); | ||
1209 | -} | ||
1210 | - | ||
1211 | -/** | ||
1212 | - * 设置指定资讯项的Lazyload和文字截取 | ||
1213 | - * @params $infos 资讯项 | ||
1214 | - */ | ||
1215 | -function setLazyLoadAndMellipsis($infos) { | ||
1216 | - lazyLoad($infos.find('img.lazy')); | ||
1217 | - | ||
1218 | - $infos.each(function() { | ||
1219 | - var $this = $(this), | ||
1220 | - $title = $this.find('.info-title'), | ||
1221 | - $text = $this.find('.info-text'); | ||
1222 | - | ||
1223 | - $title[0].mlellipsis(2); | ||
1224 | - $text[0].mlellipsis(2); | ||
1225 | - }); | ||
1226 | -} | ||
1227 | - | ||
1228 | -/** | ||
1229 | - * 初始化资讯列表事件绑定 | ||
1230 | - * @params $container 逛资讯列表容器 | ||
1231 | - */ | ||
1232 | -function initInfosEvt($container) { | ||
1233 | - $container.delegate('.like-btn', 'touchstart', function(e) { | ||
1234 | - var $likeBtn = $(e.currentTarget), | ||
1235 | - $info = $likeBtn.closest('.guang-info'), | ||
1236 | - opt = 'ok'; | ||
1237 | - | ||
1238 | - if ($likeBtn.hasClass('like')) { | ||
1239 | - opt = 'cancel'; | ||
1240 | - } | ||
1241 | - | ||
1242 | - $.ajax({ | ||
1243 | - type: 'POST', | ||
1244 | - url: '/guang/opt/praiseArticle', | ||
1245 | - data: { | ||
1246 | - id: $info.data('id'), | ||
1247 | - opt: opt | ||
1248 | - }, | ||
1249 | - success: function(data) { | ||
1250 | - var code = data.code; | ||
1251 | - | ||
1252 | - if (code === 200) { | ||
1253 | - $likeBtn.next('.like-count').text(data.data); | ||
1254 | - | ||
1255 | - //切换点赞状态 | ||
1256 | - $likeBtn.toggleClass('like'); | ||
1257 | - } | ||
1258 | - }, | ||
1259 | - error: function() { | ||
1260 | - tip.show('网络断开连接了~'); | ||
1261 | - } | ||
1262 | - }); | ||
1263 | - }); | ||
1264 | - | ||
1265 | - setLazyLoadAndMellipsis($container.find('.guang-info')); | ||
1266 | -} | ||
1267 | - | ||
1268 | -/** | ||
1269 | - * 资讯LoadMore | ||
1270 | - */ | ||
1271 | -function loadMore($container, opt) { | ||
1272 | - if (loading) { | ||
1273 | - return; | ||
1274 | - } | ||
1275 | - | ||
1276 | - if (opt.end) { | ||
1277 | - return; | ||
1278 | - } | ||
1279 | - | ||
1280 | - loading = true; | ||
1281 | - $.ajax({ | ||
1282 | - type: 'GET', | ||
1283 | - url: ' /guang/list/page', | ||
1284 | - data: opt, | ||
1285 | - success: function(data) { | ||
1286 | - if (data === ' ') { | ||
1287 | - opt.end = true; | ||
1288 | - loading = false; | ||
1289 | - | ||
1290 | - // | ||
1291 | - $loading.addClass('hide'); | ||
1292 | - $noMore.removeClass('hide'); | ||
1293 | - | ||
1294 | - return; | ||
1295 | - } | ||
1296 | - $container.append(data); | ||
1297 | - | ||
1298 | - setLazyLoadAndMellipsis($container.find('.guang-info')); | ||
1299 | - | ||
1300 | - opt.page++; | ||
1301 | - | ||
1302 | - loading = false; | ||
1303 | - }, | ||
1304 | - error: function() { | ||
1305 | - tip.show('网络断开连接了~'); | ||
1306 | - loading = false; | ||
1307 | - } | ||
1308 | - }); | ||
1309 | -} | ||
1310 | - | ||
1311 | -exports.initInfosEvt = initInfosEvt; | ||
1312 | -exports.setLazyLoadAndMellipsis = setLazyLoadAndMellipsis; | ||
1313 | -exports.loadMore = loadMore; | ||
1314 | -}); | ||
1315 | -define("js/guang/home", ["zepto","swiper","mlellipsis","lazyload","index"], function(require, exports, module){ | ||
1316 | -/** | ||
1317 | - * 逛首页 | ||
1318 | - * @author: xuqi<qi.xu@yoho.cn> | ||
1319 | - * @date: 2015/10/10 | ||
1320 | - */ | ||
1321 | - | ||
1322 | -var $ = require("zepto"), | ||
1323 | - Swiper = require("swiper"); | ||
1324 | - | ||
1325 | -var info = require("js/guang/info"), | ||
1326 | - setLazyLoadAndMellipsis = info.setLazyLoadAndMellipsis, | ||
1327 | - loadMore = info.loadMore; | ||
1328 | - | ||
1329 | -var $loadMoreInfo = $('#load-more-info'); | ||
1330 | -var $loading = $(''), | ||
1331 | - $noMore = $(''); | ||
1332 | - | ||
1333 | -var winH = $(window).height(), | ||
1334 | - loadMoreH = $loadMoreInfo.height(); | ||
1335 | - | ||
1336 | -var $infoList = $('#info-list'), | ||
1337 | - $infos = $infoList.children('.info-list'), | ||
1338 | - $nav = $('#guang-nav'), | ||
1339 | - $curNav = $nav.children('.focus'), | ||
1340 | - curType = $curNav.data('type'); | ||
1341 | - | ||
1342 | -var state = {}; | ||
1343 | - | ||
1344 | -var mySwiper; | ||
1345 | - | ||
1346 | -if ($loadMoreInfo.length > 0) { | ||
1347 | - $loading = $loadMoreInfo.children('.loading'); | ||
1348 | - $noMore = $loadMoreInfo.children('.no-more'); | ||
1349 | -} | ||
1350 | - | ||
1351 | -mySwiper = new Swiper('.swiper-container', { | ||
1352 | - lazyLoading: true, | ||
1353 | - pagination: '.swiper-pagination' | ||
1354 | -}); | ||
1355 | - | ||
1356 | -info.initInfosEvt($infoList); | ||
1357 | - | ||
1358 | -//初始化各Nav下资讯加载的状态 | ||
1359 | -(function() { | ||
1360 | - var gender = $('#gender').val(); | ||
1361 | - | ||
1362 | - $nav.children('.guang-nav-item').each(function() { | ||
1363 | - var type = $(this).data('type'); | ||
1364 | - | ||
1365 | - state[type] = { | ||
1366 | - page: 1, | ||
1367 | - gender: gender, | ||
1368 | - type: type, | ||
1369 | - end: false | ||
1370 | - }; | ||
1371 | - }); | ||
1372 | -}()); | ||
1373 | - | ||
1374 | -$nav.delegate('.guang-nav-item', 'touchstart', function() { | ||
1375 | - var $this = $(this), | ||
1376 | - $content, | ||
1377 | - index; | ||
1378 | - | ||
1379 | - if ($this.hasClass('focus')) { | ||
1380 | - return; | ||
1381 | - } | ||
1382 | - | ||
1383 | - index = $this.index(); | ||
1384 | - | ||
1385 | - $this.addClass('focus'); | ||
1386 | - $curNav.removeClass('focus'); | ||
1387 | - | ||
1388 | - $infos.not('.hide').addClass('hide'); | ||
1389 | - | ||
1390 | - $content = $infos.eq(index); | ||
1391 | - $content.removeClass('hide'); | ||
1392 | - | ||
1393 | - //lazyload & mellipsis | ||
1394 | - setLazyLoadAndMellipsis($content.children('.guang-info')); | ||
1395 | - | ||
1396 | - $curNav = $this; | ||
1397 | - curType = $this.data('type'); | ||
1398 | - | ||
1399 | - //重置当前Tab的load-more | ||
1400 | - if (state[curType].end) { | ||
1401 | - $loading.addClass('hide'); | ||
1402 | - $noMore.removeClass('hide'); | ||
1403 | - } else { | ||
1404 | - $loading.removeClass('hide'); | ||
1405 | - $noMore.addClass('hide'); | ||
1406 | - } | ||
1407 | -}); | ||
1408 | - | ||
1409 | -$(document).scroll(function() { | ||
1410 | - if ($(window).scrollTop() + winH >= $(document).height() - loadMoreH) { | ||
1411 | - loadMore($infos, state[curType]); | ||
1412 | - } | ||
1413 | -}); | ||
1414 | -}); | ||
1415 | -define("js/guang/list", ["zepto","mlellipsis","lazyload"], function(require, exports, module){ | ||
1416 | -/** | ||
1417 | - * 列表页,编辑页 | ||
1418 | - * @author: xuqi<qi.xu@yoho.cn> | ||
1419 | - * @date: 2015/10/10 | ||
1420 | - */ | ||
1421 | - | ||
1422 | -var $ = require("zepto"); | ||
1423 | - | ||
1424 | -var info = require("js/guang/info"), | ||
1425 | - loadMore = info.loadMore; | ||
1426 | - | ||
1427 | -var winH = $(window).height(), | ||
1428 | - loadMoreH = $('#load-more').height(); | ||
1429 | - | ||
1430 | -var $author = $('#author-infos'); | ||
1431 | -var $tag = $('#tag'); | ||
1432 | - | ||
1433 | -var setting = { | ||
1434 | - page: 1, | ||
1435 | - end: false | ||
1436 | -}; | ||
1437 | - | ||
1438 | -var $infos = $('#info-list'); | ||
1439 | - | ||
1440 | -info.initInfosEvt($infos); | ||
1441 | - | ||
1442 | -if ($author.length > 0) { | ||
1443 | - $.extend(setting, { | ||
1444 | - authorId: $author.data('id') | ||
1445 | - }); | ||
1446 | -} | ||
1447 | - | ||
1448 | -if ($tag.length > 0) { | ||
1449 | - $.extend(setting, { | ||
1450 | - tag: $tag.val() | ||
1451 | - }); | ||
1452 | -} | ||
1453 | - | ||
1454 | -$(document).scroll(function() { | ||
1455 | - if ($(window).scrollTop() + winH >= $(document).height() - loadMoreH) { | ||
1456 | - loadMore($infos, setting); | ||
1457 | - } | ||
1458 | -}); | ||
1459 | -}); | ||
1460 | -define("js/guang/detail", ["zepto","mlellipsis","lazyload","iscroll-probe"], function(require, exports, module){ | ||
1461 | -/** | ||
1462 | - * 逛详情页 | ||
1463 | - * @author: xuqi<qi.xu@yoho.cn> | ||
1464 | - * @date: 2015/10/13 | ||
1465 | - */ | ||
1466 | - | ||
1467 | -var $ = require("zepto"), | ||
1468 | - ellipsis = require("mlellipsis"), | ||
1469 | - lazyLoad = require("lazyload"), | ||
1470 | - IScroll = require("iscroll-probe"); | ||
1471 | - | ||
1472 | -var $authorIntro = $('.author .intro'); | ||
1473 | - | ||
1474 | -var isIphone = navigator.userAgent.indexOf('iPhone') > 0 ? true : false; | ||
1475 | - | ||
1476 | -var hasCollocationBlock = $('.collocation-block').length > 0 ? true : false; | ||
1477 | - | ||
1478 | -//collocation block variable | ||
1479 | -var thumbWidth = 0, | ||
1480 | - $fixedThumbContainer = $(''), | ||
1481 | - $coBlock, $thumbContainer, $thumbs, $prods, | ||
1482 | - scrollToEl; | ||
1483 | - | ||
1484 | -var scrollToEl = document.querySelector('#wrapper .collocation-block'); | ||
1485 | - | ||
1486 | -var winW = $(window).width(); | ||
1487 | - | ||
1488 | -var myScroll; | ||
1489 | - | ||
1490 | -/** | ||
1491 | - * 计算搭配的箭头的位置 | ||
1492 | - * @param $curPos 当前focus的搭配项 | ||
1493 | - */ | ||
1494 | -function posCollocationArrow($curCo) { | ||
1495 | - var left = $curCo.offset().left, | ||
1496 | - bgPos = -winW + left + (thumbWidth / 2) + 'px'; | ||
1497 | - | ||
1498 | - $thumbContainer.css({ | ||
1499 | - backgroundPosition: bgPos + ' bottom' | ||
1500 | - }); | ||
1501 | - | ||
1502 | - if (isIphone) { | ||
1503 | - $fixedThumbContainer.css({ | ||
1504 | - backgroundPosition: bgPos + ' bottom' | ||
1505 | - }); | ||
1506 | - } | ||
1507 | -} | ||
1508 | - | ||
1509 | -//搭配thumb的touch事件句柄 | ||
1510 | -function thumbTouchEvt(e) { | ||
1511 | - var $curCo = $(e.currentTarget), | ||
1512 | - index = $curCo.index(), | ||
1513 | - $brother, $brotherCo, | ||
1514 | - $curProds; | ||
1515 | - | ||
1516 | - if ($curCo.hasClass('focus')) { | ||
1517 | - return; | ||
1518 | - } | ||
1519 | - | ||
1520 | - $thumbs.filter('.focus').removeClass('focus'); | ||
1521 | - | ||
1522 | - if (isIphone) { | ||
1523 | - if ($curCo.closest('.fixed-thumb-container').length > 0) { | ||
1524 | - $brother = $thumbContainer; | ||
1525 | - } else { | ||
1526 | - $brother = $fixedThumbContainer; | ||
1527 | - } | ||
1528 | - | ||
1529 | - $brotherCo = $brother.find('.thumb').eq(index); | ||
1530 | - $fixedThumbContainer.find('.thumb.focus').removeClass('focus'); | ||
1531 | - $brotherCo.addClass('focus'); | ||
1532 | - } | ||
1533 | - | ||
1534 | - $curCo.addClass('focus'); | ||
1535 | - | ||
1536 | - //定位arrow | ||
1537 | - posCollocationArrow($curCo); | ||
1538 | - | ||
1539 | - $prods.not('.hide').addClass('hide'); | ||
1540 | - $curProds = $prods.eq(index); | ||
1541 | - $curProds.removeClass('hide'); | ||
1542 | - | ||
1543 | - // | ||
1544 | - lazyLoad($curProds.find('.lazy')); | ||
1545 | - | ||
1546 | - if (isIphone) { | ||
1547 | - if (myScroll) { | ||
1548 | - myScroll.scrollToElement(scrollToEl, 400); | ||
1549 | - } | ||
1550 | - } else { | ||
1551 | - $('body').animate({ | ||
1552 | - scrollTop: $coBlock.offset().top | ||
1553 | - }, 400); | ||
1554 | - } | ||
1555 | -} | ||
1556 | - | ||
1557 | -if (isIphone) { | ||
1558 | - $('#wrapper').addClass('ios'); | ||
1559 | -} | ||
1560 | - | ||
1561 | -ellipsis.init(); | ||
1562 | - | ||
1563 | -lazyLoad($('.lazy')); | ||
1564 | - | ||
1565 | -//title mlellipsis | ||
1566 | -$('.info-list .title, .one-good .reco-name').each(function() { | ||
1567 | - this.mlellipsis(2); | ||
1568 | -}); | ||
1569 | - | ||
1570 | -//offset.left约等于marginLeft的值则表示介绍被换行,则清除intro的paddingTop让其更靠近头像和作者名 | ||
1571 | -if (parseInt($authorIntro.offset().left, 10) === parseInt($authorIntro.css('margin-left'), 10)) { | ||
1572 | - $authorIntro.css('padding-top', 0); | ||
1573 | -} | ||
1574 | - | ||
1575 | -//有搭配模块,iphone使用iscroll初始化滚动并有固定的搭配栏,其他的没有 | ||
1576 | -if (hasCollocationBlock) { | ||
1577 | - $coBlock = $('.collocation-block'); | ||
1578 | - $thumbContainer = $coBlock.children('.thumb-container'); | ||
1579 | - $thumbs = $thumbContainer.find('li'); | ||
1580 | - $prods = $coBlock.find('.prod'); | ||
1581 | - | ||
1582 | - thumbWidth = $thumbs.width(); | ||
1583 | - | ||
1584 | - if (isIphone) { | ||
1585 | - $fixedThumbContainer = $('#wrapper') | ||
1586 | - .after($thumbContainer.clone().addClass('fixed-thumb-container fixed-bottom')) | ||
1587 | - .next('.thumb-container'); | ||
1588 | - | ||
1589 | - //load img of fixed thumb container | ||
1590 | - lazyLoad($fixedThumbContainer.find('.lazy'), { | ||
1591 | - event: 'sporty' | ||
1592 | - }); | ||
1593 | - } | ||
1594 | - | ||
1595 | - //Init Arrow Position | ||
1596 | - posCollocationArrow($thumbs.filter('.focus')); | ||
1597 | - | ||
1598 | - $thumbContainer.delegate('.thumb', 'touchend', thumbTouchEvt); | ||
1599 | - | ||
1600 | - if (isIphone) { | ||
1601 | - $fixedThumbContainer.delegate('.thumb', 'touchend', thumbTouchEvt); | ||
1602 | - } | ||
1603 | -} | ||
1604 | - | ||
1605 | -// 初始化iscroll | ||
1606 | -window.onload = function() { | ||
1607 | - var $scroller = $('#scroller'); | ||
1608 | - | ||
1609 | - var winH, tcH, cbH, cbTop, fixedThumbDom; | ||
1610 | - | ||
1611 | - if (!isIphone) { | ||
1612 | - return; | ||
1613 | - } | ||
1614 | - | ||
1615 | - myScroll = new IScroll('#wrapper', { | ||
1616 | - probeType: 3, | ||
1617 | - mouseWheel: true, | ||
1618 | - click: true | ||
1619 | - }); | ||
1620 | - | ||
1621 | - document.addEventListener('touchmove', function (e) { | ||
1622 | - e.preventDefault(); | ||
1623 | - }, false); | ||
1624 | - | ||
1625 | - if (!hasCollocationBlock) { | ||
1626 | - myScroll.on('scroll', function() { | ||
1627 | - $scroller.trigger('scroll'); | ||
1628 | - }); | ||
1629 | - return; | ||
1630 | - } | ||
1631 | - | ||
1632 | - winH = $(window).height(); | ||
1633 | - fixedThumbDom = $fixedThumbContainer[0]; | ||
1634 | - | ||
1635 | - tcH = $thumbContainer.height(); | ||
1636 | - cbH = $coBlock.height(); | ||
1637 | - cbTop = $coBlock.offset().top; | ||
1638 | - | ||
1639 | - myScroll.on('scroll', function() { | ||
1640 | - var sTop = -this.y; | ||
1641 | - var classList = fixedThumbDom.className; | ||
1642 | - | ||
1643 | - if (sTop <= cbTop - winH + tcH) { | ||
1644 | - if (classList.indexOf('fixed-bottom') === -1) { | ||
1645 | - $fixedThumbContainer | ||
1646 | - .addClass('fixed-bottom') | ||
1647 | - .removeClass('hide'); | ||
1648 | - } | ||
1649 | - } else if (sTop <= cbTop) { | ||
1650 | - if (classList.indexOf('hide') === -1) { | ||
1651 | - $fixedThumbContainer | ||
1652 | - .addClass('hide') | ||
1653 | - .removeClass('fixed-bottom fixed-top'); | ||
1654 | - } | ||
1655 | - } else if (sTop <= cbTop + cbH - tcH) { | ||
1656 | - if (classList.indexOf('fixed-top') === -1) { | ||
1657 | - $fixedThumbContainer | ||
1658 | - .addClass('fixed-top') | ||
1659 | - .removeClass('hide absolute') | ||
1660 | - .css('top', ''); | ||
1661 | - } | ||
1662 | - } else if (sTop <= cbTop + cbH) { | ||
1663 | - if (classList.indexOf('absolute') === -1) { | ||
1664 | - $fixedThumbContainer | ||
1665 | - .addClass('absolute') | ||
1666 | - .removeClass('fixed-top hide'); | ||
1667 | - } | ||
1668 | - fixedThumbDom.style.top = cbTop + cbH - tcH - sTop + 'px'; | ||
1669 | - } else if (sTop > cbTop + cbH) { | ||
1670 | - if (classList.indexOf('hide') === -1) { | ||
1671 | - $fixedThumbContainer | ||
1672 | - .addClass('hide') | ||
1673 | - .removeClass('absolute'); | ||
1674 | - } | ||
1675 | - } | ||
1676 | - $scroller.trigger('scroll'); | ||
1677 | - }); | ||
1678 | -}; | ||
1679 | -}); | ||
1680 | -define("js/home/index", ["zepto","swiper","lazyload","index"], function(require, exports, module){ | ||
1681 | -/** | ||
1682 | - * 首页打包入口 | ||
1683 | - * @author: liangzhifeng<zhifeng.liang@yoho.cn> | ||
1684 | - * @date: 2015/10/12 | ||
1685 | - */ | ||
1686 | - | ||
1687 | -require("js/home/home"); | ||
1688 | -require("js/home/maybe-like"); | ||
1689 | -}); | ||
1690 | -define("js/home/home", ["zepto","swiper","lazyload","index"], function(require, exports, module){ | ||
1691 | -/** | ||
1692 | - * 首页 | ||
1693 | - * @author: liangzhifeng<zhifeng.liang@yoho.cn> | ||
1694 | - * @date: 2015/10/12 | ||
1695 | - */ | ||
1696 | -var $ = require("zepto"), | ||
1697 | - Swiper = require("swiper"), | ||
1698 | - lazyLoad = require("lazyload"), | ||
1699 | - bannerSwiper, | ||
1700 | - recommendSwiper, | ||
1701 | - hotBrandsSwiper, | ||
1702 | - trendTopicSwiper, | ||
1703 | - goodsSwiper; | ||
1704 | - | ||
1705 | -var requestFrame, | ||
1706 | - thisFunc, | ||
1707 | - start = 0, | ||
1708 | - i, | ||
1709 | - swiperClass, | ||
1710 | - supportCss3, | ||
1711 | - $logotrans = $('.home-header .logo'), | ||
1712 | - isen = true; | ||
1713 | - | ||
1714 | -require("js/home/maybe-like"); | ||
1715 | - | ||
1716 | -lazyLoad($('img.lazy')); | ||
1717 | - | ||
1718 | -//$('img:in-viewport').trigger('appear'); | ||
1719 | - | ||
1720 | -//点击首页汉堡menu图标,滑出侧栏导航 | ||
1721 | -$('.nav-btn').on('click', function (event) { | ||
1722 | - if (!$(this).hasClass('menu-open')) { | ||
1723 | - $('.mobile-wrap').addClass('menu-open'); | ||
1724 | - $('.overlay').addClass('show'); | ||
1725 | - $('.side-nav').addClass('on'); | ||
1726 | - | ||
1727 | - //设置boy高宽,页面不能上下滑动 | ||
1728 | - $('body').css({ | ||
1729 | - height: $(window).height(), | ||
1730 | - width: '100%', | ||
1731 | - overflow: 'hidden' | ||
1732 | - }); | ||
1733 | - } | ||
1734 | - event.stopPropagation(); | ||
1735 | -}); | ||
1736 | - | ||
1737 | -//点击页面主体,收起侧栏导航及二级导航 | ||
1738 | -$('.mobile-wrap').on('click', function () { | ||
1739 | - if ($(this).hasClass('menu-open')) { | ||
1740 | - $('.mobile-wrap').removeClass('menu-open'); | ||
1741 | - $('.overlay').removeClass('show'); | ||
1742 | - $('.sub-nav').removeClass('show'); | ||
1743 | - $('.side-nav').removeClass('on'); | ||
1744 | - $('body').css({ | ||
1745 | - height: 'auto', | ||
1746 | - overflow: 'auto' | ||
1747 | - }); | ||
1748 | - } | ||
1749 | -}); | ||
1750 | - | ||
1751 | -//点击一级导航,弹出二级导航 | ||
1752 | -$('.side-nav').on('click', 'li', function () { | ||
1753 | - if ($(this).find('.sub-nav').size() > 0) { | ||
1754 | - $('.sub-nav').removeClass('show'); | ||
1755 | - $(this).find('.sub-nav').addClass('show'); | ||
1756 | - } | ||
1757 | -}); | ||
1758 | - | ||
1759 | -//返回一级导航,收起二级导航 | ||
1760 | -$('.sub-nav').each(function () { | ||
1761 | - $(this).find('li').eq(0).on('click', function (e) { | ||
1762 | - $('.sub-nav').removeClass('show'); | ||
1763 | - e.stopPropagation(); | ||
1764 | - }); | ||
1765 | -}); | ||
1766 | - | ||
1767 | -//二级导航样式控制 | ||
1768 | -$('.sub-nav').on('mouseenter', 'li', function () { | ||
1769 | - if ($(this).index() !== 0) { | ||
1770 | - $(this).addClass('current').siblings().removeClass('current'); | ||
1771 | - } | ||
1772 | -}); | ||
1773 | - | ||
1774 | -//头部banner轮播 | ||
1775 | -if ($('.banner-swiper').find('li').size() > 1) { | ||
1776 | - bannerSwiper = new Swiper('.banner-swiper', { | ||
1777 | - loop: true, | ||
1778 | - autoplay: 3000, | ||
1779 | - autoplayDisableOnInteraction: false, | ||
1780 | - paginationClickable: true, | ||
1781 | - slideElement: 'li', | ||
1782 | - pagination: '.banner-top .pagination-inner' | ||
1783 | - }); | ||
1784 | -} | ||
1785 | - | ||
1786 | -//热门品牌滑动 | ||
1787 | -hotBrandsSwiper = new Swiper('.brands-swiper', { | ||
1788 | - grabCursor: true, | ||
1789 | - slidesPerView: 'auto', | ||
1790 | - wrapperClass: 'brands-list', | ||
1791 | - slideElement: 'li' | ||
1792 | -}); | ||
1793 | - | ||
1794 | -//推荐搭配滑动 | ||
1795 | -recommendSwiper = new Swiper('.recommend-swiper', { | ||
1796 | - grabCursor: true, | ||
1797 | - slidesPerView: 'auto', | ||
1798 | - wrapperClass: 'recommend-list', | ||
1799 | - slideElement: 'li' | ||
1800 | -}); | ||
1801 | - | ||
1802 | -//潮品话题轮播 | ||
1803 | -if ($('.trend-topic-swiper').find('li').size() > 1) { | ||
1804 | - trendTopicSwiper = new Swiper('.trend-topic-swiper', { | ||
1805 | - loop: true, | ||
1806 | - autoplay: 3000, | ||
1807 | - autoplayDisableOnInteraction: false, | ||
1808 | - paginationClickable: true, | ||
1809 | - slideElement: 'li', | ||
1810 | - pagination: '.trend-topic-content .pagination-inner' | ||
1811 | - }); | ||
1812 | -} | ||
1813 | - | ||
1814 | -//潮流上装/经典裤装等轮播 | ||
1815 | -$('.category-swiper').each(function (i, index) { | ||
1816 | - swiperClass = 'category-swiper' + i; | ||
1817 | - $(this).addClass(swiperClass); | ||
1818 | - if ($('.' + swiperClass).find('.swiper-slide').size() > 1) { | ||
1819 | - goodsSwiper = new Swiper('.' + swiperClass, { | ||
1820 | - loop: true, | ||
1821 | - autoplay: 3000, | ||
1822 | - autoplayDisableOnInteraction: false, | ||
1823 | - paginationClickable: true, | ||
1824 | - slideElement: 'li', | ||
1825 | - pagination: '.' + swiperClass + ' .pagination-inner' | ||
1826 | - }); | ||
1827 | - } | ||
1828 | -}); | ||
1829 | - | ||
1830 | - | ||
1831 | -//回到顶部 | ||
1832 | -// $('.back-to-top').bind('touchstart', function (e) { | ||
1833 | -// e.preventDefault(); | ||
1834 | -// $(window).scrollTop(0); | ||
1835 | -// }); | ||
1836 | - | ||
1837 | -//关闭头部下载浮层 | ||
1838 | -$('.header-download').on('click', '.close-btn', function () { | ||
1839 | - $(this).parent().remove(); | ||
1840 | -}); | ||
1841 | - | ||
1842 | - | ||
1843 | -//logo动画 | ||
1844 | -requestFrame = (function () { | ||
1845 | - var tempFunc = null, | ||
1846 | - prefixList = ['webkit', 'moz', 'ms']; | ||
1847 | - | ||
1848 | - for (i = 0; i < prefixList.length; i++) { | ||
1849 | - thisFunc = prefixList[i] + 'RequestAnimationFrame'; | ||
1850 | - if (window[thisFunc]) { | ||
1851 | - supportCss3 = true; | ||
1852 | - tempFunc = thisFunc; | ||
1853 | - } | ||
1854 | - } | ||
1855 | - | ||
1856 | - if (supportCss3) { | ||
1857 | - return function (callback) { | ||
1858 | - window[tempFunc](callback); | ||
1859 | - }; | ||
1860 | - } | ||
1861 | - return function (callback) { | ||
1862 | - window.setTimeout(callback, 67); | ||
1863 | - }; | ||
1864 | -})(); | ||
1865 | - | ||
1866 | -function tsAnimate() { | ||
1867 | - start = start + 10; | ||
1868 | - $logotrans.css({ | ||
1869 | - transform: 'rotateX(' + start + 'deg)', | ||
1870 | - '-webkit-transform': 'rotateX(' + start + 'deg)', | ||
1871 | - '-moz-transform': 'rotateX(' + start + 'deg)' | ||
1872 | - }); | ||
1873 | - if (start / 90 % 2 === 1) { | ||
1874 | - if (isen) { | ||
1875 | - $logotrans.addClass('animate'); | ||
1876 | - isen = false; | ||
1877 | - } else { | ||
1878 | - $logotrans.removeClass('animate'); | ||
1879 | - isen = true; | ||
1880 | - } | ||
1881 | - } | ||
1882 | - if (start / 90 % 2 === 0 && start % 360 !== 0) { | ||
1883 | - window.setTimeout(tsAnimate, 3000); | ||
1884 | - } else { | ||
1885 | - if (start % 360 === 0) { | ||
1886 | - window.setTimeout(tsAnimate, 3 * 60 * 1000); | ||
1887 | - } else { | ||
1888 | - requestFrame(function () { | ||
1889 | - tsAnimate(); | ||
1890 | - }); | ||
1891 | - } | ||
1892 | - } | ||
1893 | -} | ||
1894 | - | ||
1895 | -tsAnimate(); | ||
1896 | - | ||
1897 | - | ||
1898 | -}); | ||
1899 | -define("js/home/maybe-like", ["zepto","lazyload"], function(require, exports, module){ | ||
1900 | -/** | ||
1901 | - * “你可能喜欢”模块JS | ||
1902 | - * @author: liangzhifeng<zhifeng.liang@yoho.cn> | ||
1903 | - * @date: 2015/10/12 | ||
1904 | - */ | ||
1905 | - | ||
1906 | -var $ = require("zepto"), | ||
1907 | - tip = require("js/plugin/tip"), | ||
1908 | - lazyLoad = require("lazyload"); | ||
1909 | - | ||
1910 | -var winH = $(window).height(), | ||
1911 | - loadMoreH = $('#load-more').height(), | ||
1912 | - $goodList = $('#goods-list'), | ||
1913 | - loading = false, | ||
1914 | - page = 0, | ||
1915 | - gender = $('.mobile-wrap').hasClass('boys-wrap') ? '1,3' : '2,3', | ||
1916 | - kidsType = $('.mobile-wrap').hasClass('kids-wrap') ? true : false, | ||
1917 | - lifestyleType = $('.mobile-wrap').hasClass('lifestyle-wrap') ? true : false, | ||
1918 | - num, | ||
1919 | - url; | ||
1920 | - | ||
1921 | -var $curNav, | ||
1922 | - index, | ||
1923 | - $navList = $('#maybe-like-nav'); | ||
1924 | - | ||
1925 | -//ajax url | ||
1926 | -if (kidsType) { | ||
1927 | - url = '/product/recom/maylikekids'; | ||
1928 | -} else if (lifestyleType) { | ||
1929 | - url = '/product/recom/maylikelife'; | ||
1930 | -} else { | ||
1931 | - url = '/product/recom/maylike?gender=' + gender; | ||
1932 | -} | ||
1933 | - | ||
1934 | -$curNav = $navList.children('.focus'); | ||
1935 | - | ||
1936 | -$('#maybe-like-nav').delegate('li', 'touchstart', function() { | ||
1937 | - var $this = $(this), | ||
1938 | - $goods = $('.goods-list'), | ||
1939 | - $content; | ||
1940 | - | ||
1941 | - | ||
1942 | - if ($this.hasClass('focus')) { | ||
1943 | - return; | ||
1944 | - } | ||
1945 | - | ||
1946 | - index = $this.index(); | ||
1947 | - | ||
1948 | - $this.addClass('focus'); | ||
1949 | - $curNav.removeClass('focus'); | ||
1950 | - | ||
1951 | - $goods.not('.hide').addClass('hide'); | ||
1952 | - $content = $goods.eq(index); | ||
1953 | - $content.removeClass('hide'); | ||
1954 | - | ||
1955 | - $curNav = $this; | ||
1956 | - | ||
1957 | - $(document).trigger('scroll'); //Trigger lazyLoad | ||
1958 | -}); | ||
1959 | - | ||
1960 | -//srcoll to load more | ||
1961 | -$(window).scroll(function () { | ||
1962 | - if ($(window).scrollTop() + winH >= $(document).height() - loadMoreH) { | ||
1963 | - if (loading) { | ||
1964 | - return; | ||
1965 | - } | ||
1966 | - loading = true; | ||
1967 | - num = $goodList.children('.good-info').length; | ||
1968 | - $.ajax({ | ||
1969 | - type: 'GET', | ||
1970 | - url: url, | ||
1971 | - data: { | ||
1972 | - page: page + 1 | ||
1973 | - }, | ||
1974 | - success: function(data) { | ||
1975 | - if (data === ' ') { | ||
1976 | - loading = true; | ||
1977 | - return; | ||
1978 | - } | ||
1979 | - $goodList.append(data); | ||
1980 | - | ||
1981 | - //lazyLoad | ||
1982 | - //lazyLoad($goodList.children('.good-info:gt(' + (num - 1) + ')').find('img.lazy')); | ||
1983 | - lazyLoad($('.good-info').find('img.lazy')); | ||
1984 | - | ||
1985 | - loading = false; | ||
1986 | - page++; | ||
1987 | - }, | ||
1988 | - error: function() { | ||
1989 | - tip.show('网络断开连接了~'); | ||
1990 | - loading = false; | ||
1991 | - } | ||
1992 | - }); | ||
1993 | - } | ||
1994 | - | ||
1995 | -}); | ||
1996 | -}); | ||
1997 | -define("js/product/index", ["zepto","swiper","lazyload","index"], function(require, exports, module){ | ||
1998 | -/** | ||
1999 | - * 产品打包入口 | ||
2000 | - * @author: liangzhifeng<zhifeng.liang@yoho.cn> | ||
2001 | - * @date: 2015/10/12 | ||
2002 | - */ | ||
2003 | - | ||
2004 | -require("js/product/newsale/newarrival"); | ||
2005 | -require("js/product/newsale/discount"); | ||
2006 | -require("js/product/list"); | ||
2007 | -require("js/product/detail/detail"); | ||
2008 | -}); | ||
2009 | -define("js/product/newsale/newarrival", ["zepto","swiper","lazyload","index"], function(require, exports, module){ | ||
2010 | -var $ = require("zepto"), | ||
2011 | - tip = require("js/plugin/tip"), | ||
2012 | - Swiper = require("swiper"), | ||
2013 | - lazyLoad = require("lazyload"); | ||
2014 | - | ||
2015 | -var $curNav, | ||
2016 | - $navList = $('#newarrival-nav'), | ||
2017 | - $newArrivalList = $('#newarrival-goods-list'), | ||
2018 | - $goods = $newArrivalList.children('.goods-list'); | ||
2019 | - | ||
2020 | -var winH = $(window).height(), | ||
2021 | - loadMoreH = $('#load-more').height(), | ||
2022 | - $goodList = $('.goods-list'), | ||
2023 | - loading = false, | ||
2024 | - page = 0, | ||
2025 | - index = 0; | ||
2026 | - | ||
2027 | -var swiper; | ||
2028 | - | ||
2029 | -swiper = new Swiper('.swiper-container', { | ||
2030 | - lazyLoading: true, | ||
2031 | - pagination: '.swiper-pagination' | ||
2032 | -}); | ||
2033 | - | ||
2034 | -lazyLoad($('img.lazy')); | ||
2035 | -$curNav = $navList.children('.focus'); | ||
2036 | - | ||
2037 | -$('#newarrival-nav').delegate('li', 'touchstart', function() { | ||
2038 | - var $this = $(this), | ||
2039 | - $content; | ||
2040 | - | ||
2041 | - if ($this.hasClass('focus')) { | ||
2042 | - return; | ||
2043 | - } | ||
2044 | - | ||
2045 | - index = $this.index(); | ||
2046 | - | ||
2047 | - $this.addClass('focus'); | ||
2048 | - $curNav.removeClass('focus'); | ||
2049 | - | ||
2050 | - $goods.not('.hide').addClass('hide'); | ||
2051 | - $content = $goods.eq(index); | ||
2052 | - $content.removeClass('hide'); | ||
2053 | - | ||
2054 | - $curNav = $this; | ||
2055 | - | ||
2056 | - $(document).trigger('scroll'); //Trigger lazyLoad | ||
2057 | -}); | ||
2058 | - | ||
2059 | -//srcoll to load more | ||
2060 | -$(window).scroll(function () { | ||
2061 | - if ($(window).scrollTop() + winH >= $(document).height() - loadMoreH) { | ||
2062 | - if (loading) { | ||
2063 | - return; | ||
2064 | - } | ||
2065 | - loading = true; | ||
2066 | - | ||
2067 | - //num = $goodList.children('.good-info').length; | ||
2068 | - $.ajax({ | ||
2069 | - type: 'GET', | ||
2070 | - url: '/product/newsale/selectNewSale', | ||
2071 | - data: { | ||
2072 | - dayLimit: index + 1, | ||
2073 | - page: page + 1 | ||
2074 | - }, | ||
2075 | - success: function(data) { | ||
2076 | - if (data === ' ') { | ||
2077 | - loading = true; | ||
2078 | - return; | ||
2079 | - } | ||
2080 | - | ||
2081 | - $goodList.append(data); | ||
2082 | - | ||
2083 | - //lazyLoad | ||
2084 | - //lazyLoad($goodList.children('.good-info:gt(' + (num - 1) + ')').find('img.lazy')); | ||
2085 | - lazyLoad($('.good-info').find('img.lazy')); | ||
2086 | - | ||
2087 | - loading = false; | ||
2088 | - page++; | ||
2089 | - }, | ||
2090 | - error: function() { | ||
2091 | - tip.show('网络断开连接了~'); | ||
2092 | - loading = false; | ||
2093 | - } | ||
2094 | - }); | ||
2095 | - } | ||
2096 | - | ||
2097 | -}); | ||
2098 | -}); | ||
2099 | -define("js/product/newsale/discount", ["zepto","swiper","lazyload","index"], function(require, exports, module){ | ||
2100 | -var $ = require("zepto"), | ||
2101 | - Swiper = require("swiper"), | ||
2102 | - lazyLoad = require("lazyload"); | ||
2103 | - | ||
2104 | -var $curNav, | ||
2105 | - $navList = $('#discount-nav'), | ||
2106 | - $newArrivalList = $('#discount-goods-list'), | ||
2107 | - $goods = $newArrivalList.children('.goods-list'), | ||
2108 | - $goodList = $('.goods-list'); | ||
2109 | - | ||
2110 | -var swiper; | ||
2111 | -var index = 0, | ||
2112 | - winH = $(window).height(), | ||
2113 | - loadMoreH = $('#load-more').height(), | ||
2114 | - loading = false, | ||
2115 | - page = 0, | ||
2116 | - pd = ""; | ||
2117 | - | ||
2118 | -swiper = new Swiper('.swiper-container', { | ||
2119 | - lazyLoading: true, | ||
2120 | - pagination: '.swiper-pagination' | ||
2121 | -}); | ||
2122 | - | ||
2123 | -lazyLoad($('img.lazy')); | ||
2124 | -$curNav = $navList.children('.focus'); | ||
2125 | - | ||
2126 | -$('#discount-nav').delegate('li', 'touchstart', function() { | ||
2127 | - var $this = $(this), | ||
2128 | - $content; | ||
2129 | - | ||
2130 | - if ($this.hasClass('focus')) { | ||
2131 | - return; | ||
2132 | - } | ||
2133 | - | ||
2134 | - index = $this.index(); | ||
2135 | - pd = getSalePdByChoose(index); | ||
2136 | - | ||
2137 | - $this.addClass('focus'); | ||
2138 | - $curNav.removeClass('focus'); | ||
2139 | - | ||
2140 | - $goods.not('.hide').addClass('hide'); | ||
2141 | - $content = $goods.eq(index); | ||
2142 | - $content.removeClass('hide'); | ||
2143 | - | ||
2144 | - $curNav = $this; | ||
2145 | - | ||
2146 | - $(document).trigger('scroll'); //Trigger lazyLoad | ||
2147 | -}); | ||
2148 | - | ||
2149 | -//srcoll to load more | ||
2150 | -$(window).scroll(function () { | ||
2151 | - if ($(window).scrollTop() + winH >= $(document).height() - loadMoreH) { | ||
2152 | - if (loading) { | ||
2153 | - return; | ||
2154 | - } | ||
2155 | - loading = true; | ||
2156 | - | ||
2157 | - // num = $goodList.children('.good-info').length; | ||
2158 | - $.ajax({ | ||
2159 | - type: 'GET', | ||
2160 | - url: '/product/newsale/selectNewSale', | ||
2161 | - data: { | ||
2162 | - p_d: pd, | ||
2163 | - page: page + 1 | ||
2164 | - }, | ||
2165 | - success: function(data) { | ||
2166 | - if (data === ' ') { | ||
2167 | - | ||
2168 | - //opt.end = true; | ||
2169 | - loading = false; | ||
2170 | - return; | ||
2171 | - } | ||
2172 | - | ||
2173 | - $goodList.append(data); | ||
2174 | - | ||
2175 | - //lazyLoad | ||
2176 | - //lazyLoad($goodList.children('.good-info:gt(' + (num - 1) + ')').find('img.lazy')); | ||
2177 | - lazyLoad($('.good-info').find('img.lazy')); | ||
2178 | - | ||
2179 | - loading = false; | ||
2180 | - page++; | ||
2181 | - }, | ||
2182 | - error: function() { | ||
2183 | - tip.show('网络断开连接了~'); | ||
2184 | - loading = false; | ||
2185 | - } | ||
2186 | - }); | ||
2187 | - } | ||
2188 | - | ||
2189 | -}); | ||
2190 | - | ||
2191 | -/** | ||
2192 | - * 根据用户的选择获取商品折扣值 | ||
2193 | - * | ||
2194 | - * @param int index | ||
2195 | - * @return string | ||
2196 | - */ | ||
2197 | -function getSalePdByChoose(index) { | ||
2198 | - var pd = "0.1,0.3"; | ||
2199 | - switch (index) { | ||
2200 | - case 0: | ||
2201 | - pd = "0.1,0.3"; | ||
2202 | - break; | ||
2203 | - case 1: | ||
2204 | - pd = "0.4,0.6"; | ||
2205 | - break; | ||
2206 | - case 2: | ||
2207 | - pd = "0.7,0.9"; | ||
2208 | - break; | ||
2209 | - case 3: | ||
2210 | - pd = "0.1,0.9"; | ||
2211 | - break; | ||
2212 | - } | ||
2213 | - return pd; | ||
2214 | -} | ||
2215 | -}); | ||
2216 | -define("js/product/list", ["zepto","lazyload"], function(require, exports, module){ | ||
2217 | -/** | ||
2218 | - * 商品列表页 | ||
2219 | - * @author: xuqi<qi.xu@yoho.cn> | ||
2220 | - * @date: 2015/10/20 | ||
2221 | - */ | ||
2222 | - | ||
2223 | -var $ = require("zepto"), | ||
2224 | - lazyLoad = require("lazyload"); | ||
2225 | - | ||
2226 | -//品牌页参数 | ||
2227 | -var $brandHeader = $('#brand-header'), | ||
2228 | - $introBox = $('#intro-box'); | ||
2229 | - | ||
2230 | -var filter = require("js/plugin/filter"); | ||
2231 | - | ||
2232 | -var $goodsContainer = $('#goods-container'), | ||
2233 | - $ngc = $goodsContainer.children('.new-goods'), | ||
2234 | - $pgc = $goodsContainer.children('.price-goods'), | ||
2235 | - $dgc = $goodsContainer.children('.discount-goods'); | ||
2236 | - | ||
2237 | -var winH = $(window).height(); | ||
2238 | - | ||
2239 | -//默认筛选条件 | ||
2240 | -var defaultOpt = { | ||
2241 | - gender: $('#gender').val(), | ||
2242 | - brand: $('#brand').val(), | ||
2243 | - msort: $('#msort').val(), | ||
2244 | - color: $('#color').val(), | ||
2245 | - size: $('#size').val(), | ||
2246 | - price: $('#price').val(), | ||
2247 | - discount: $('#discount').val() | ||
2248 | -}; | ||
2249 | - | ||
2250 | -var $listNav = $('#list-nav'), | ||
2251 | - | ||
2252 | - //导航数据信息 | ||
2253 | - navInfo = { | ||
2254 | - newest: { | ||
2255 | - order: 1, | ||
2256 | - reload: true, | ||
2257 | - page: 0, | ||
2258 | - end: false | ||
2259 | - }, | ||
2260 | - price: { | ||
2261 | - order: 0, | ||
2262 | - reload: true, | ||
2263 | - page: 0, | ||
2264 | - end: false | ||
2265 | - }, | ||
2266 | - discount: { | ||
2267 | - order: 0, | ||
2268 | - reload: true, | ||
2269 | - page: 0, | ||
2270 | - end: false | ||
2271 | - } | ||
2272 | - }, | ||
2273 | - $pre, //纪录进入筛选前的active项 | ||
2274 | - searching; | ||
2275 | - | ||
2276 | -/** | ||
2277 | - * 筛选注册的回调,筛选子项点击后逻辑 | ||
2278 | - * 需要执行search的场景:1.点选筛选项;2.relaod为true时切换导航;3.下拉加载 | ||
2279 | - * @param opt {type, id} | ||
2280 | - */ | ||
2281 | -function search(opt) { | ||
2282 | - var setting = {}, | ||
2283 | - ext, | ||
2284 | - att, | ||
2285 | - nav, navType, | ||
2286 | - page; | ||
2287 | - | ||
2288 | - if (opt) { | ||
2289 | - | ||
2290 | - //筛选项变更则重置reload为true | ||
2291 | - for (att in navInfo) { | ||
2292 | - if (navInfo.hasOwnProperty(att)) { | ||
2293 | - navInfo[att].reload = true; | ||
2294 | - } | ||
2295 | - } | ||
2296 | - | ||
2297 | - //处理active状态 | ||
2298 | - $listNav.children('.active').removeClass('active'); | ||
2299 | - $pre.addClass('active'); | ||
2300 | - | ||
2301 | - switch (opt.type) { | ||
2302 | - case 'gender': | ||
2303 | - ext = { | ||
2304 | - gender: opt.id | ||
2305 | - }; | ||
2306 | - break; | ||
2307 | - case 'brand': | ||
2308 | - ext = { | ||
2309 | - brand: opt.id | ||
2310 | - }; | ||
2311 | - break; | ||
2312 | - case 'msort': | ||
2313 | - ext = { | ||
2314 | - msort: opt.id | ||
2315 | - }; | ||
2316 | - break; | ||
2317 | - case 'color': | ||
2318 | - ext = { | ||
2319 | - color: opt.id | ||
2320 | - }; | ||
2321 | - break; | ||
2322 | - case 'size': | ||
2323 | - ext = { | ||
2324 | - size: opt.id | ||
2325 | - }; | ||
2326 | - break; | ||
2327 | - case 'price': | ||
2328 | - ext = { | ||
2329 | - price: opt.id | ||
2330 | - }; | ||
2331 | - break; | ||
2332 | - case 'discount': | ||
2333 | - ext = { | ||
2334 | - discount: opt.id | ||
2335 | - }; | ||
2336 | - break; | ||
2337 | - } | ||
2338 | - | ||
2339 | - $.extend(defaultOpt, ext); //扩展筛选项 | ||
2340 | - } | ||
2341 | - | ||
2342 | - if (searching) { | ||
2343 | - return; | ||
2344 | - } | ||
2345 | - | ||
2346 | - //导航类别 | ||
2347 | - if ($pre.hasClass('new')) { | ||
2348 | - navType = 'newest'; | ||
2349 | - } else if ($pre.hasClass('price')) { | ||
2350 | - navType = 'price'; | ||
2351 | - } else if ($pre.hasClass('discount')) { | ||
2352 | - navType = 'discount'; | ||
2353 | - } | ||
2354 | - | ||
2355 | - nav = navInfo[navType]; | ||
2356 | - | ||
2357 | - page = nav.page + 1; | ||
2358 | - if (nav.reload) { | ||
2359 | - page = 1; | ||
2360 | - } else if (nav.end) { | ||
2361 | - | ||
2362 | - //不需要重新加载并且数据请求结束 | ||
2363 | - return; | ||
2364 | - } | ||
2365 | - | ||
2366 | - $.extend(setting, defaultOpt, { | ||
2367 | - type: navType, | ||
2368 | - order: nav.order, | ||
2369 | - page: page | ||
2370 | - }); | ||
2371 | - | ||
2372 | - searching = true; | ||
2373 | - | ||
2374 | - $.ajax({ | ||
2375 | - type: 'GET', | ||
2376 | - url: '/product/list/search', | ||
2377 | - data: setting, | ||
2378 | - success: function(data) { | ||
2379 | - var noResult = '<p class="no-result">未找到相关搜索结果</p>', | ||
2380 | - $container; | ||
2381 | - | ||
2382 | - switch (navType) { | ||
2383 | - case 'newest': | ||
2384 | - $container = $ngc; | ||
2385 | - break; | ||
2386 | - case 'price': | ||
2387 | - $container = $pgc; | ||
2388 | - break; | ||
2389 | - case 'discount': | ||
2390 | - $container = $dgc; | ||
2391 | - break; | ||
2392 | - } | ||
2393 | - | ||
2394 | - if (data === ' ') { | ||
2395 | - nav.end = true; | ||
2396 | - | ||
2397 | - if (nav.reload) { | ||
2398 | - $container.html(noResult); | ||
2399 | - } | ||
2400 | - } else { | ||
2401 | - if (nav.reload) { | ||
2402 | - $container.html(data); | ||
2403 | - } else { | ||
2404 | - $container.append(data); | ||
2405 | - } | ||
2406 | - | ||
2407 | - lazyLoad($container.find('.lazy')); | ||
2408 | - } | ||
2409 | - | ||
2410 | - nav.reload = true; | ||
2411 | - nav.page = page; | ||
2412 | - | ||
2413 | - searching = false; | ||
2414 | - } | ||
2415 | - }); | ||
2416 | - | ||
2417 | -} | ||
2418 | - | ||
2419 | -lazyLoad($('.lazy')); | ||
2420 | - | ||
2421 | -filter.registerCbFn(search); | ||
2422 | - | ||
2423 | -//导航栏点击逻辑说明: | ||
2424 | -//1.点击非active项时切换active状态 | ||
2425 | -//2.价格和折扣active状态时继续点击切换排序 | ||
2426 | -//3.筛选无active时点击展开筛选面板 | ||
2427 | -//4.筛选有active时点击隐藏筛选面板并恢复点击筛选前active项的active状态 | ||
2428 | -//5.当前active为筛选并且点击其他项时,隐藏筛选面板 | ||
2429 | -$listNav.delegate('li', 'touchstart', function() { | ||
2430 | - var $this = $(this), | ||
2431 | - nav, | ||
2432 | - navType, | ||
2433 | - $active; | ||
2434 | - | ||
2435 | - if ($this.hasClass('filter')) { | ||
2436 | - | ||
2437 | - //筛选面板切换状态 | ||
2438 | - if ($this.hasClass('active')) { | ||
2439 | - filter.hideFilter(); | ||
2440 | - | ||
2441 | - //点击筛选钱的active项回复active | ||
2442 | - $pre.addClass('active'); | ||
2443 | - $this.removeClass('active'); | ||
2444 | - } else { | ||
2445 | - $pre = $this.siblings('.active'); | ||
2446 | - | ||
2447 | - $pre.removeClass('active'); | ||
2448 | - $this.addClass('active'); | ||
2449 | - | ||
2450 | - filter.showFilter(); | ||
2451 | - } | ||
2452 | - } else { | ||
2453 | - | ||
2454 | - if ($this.hasClass('new')) { | ||
2455 | - navType = 'newest'; | ||
2456 | - } else if ($this.hasClass('price')) { | ||
2457 | - navType = 'price'; | ||
2458 | - } else if ($this.hasClass('discount')) { | ||
2459 | - navType = 'discount'; | ||
2460 | - } | ||
2461 | - | ||
2462 | - nav = navInfo[navType]; | ||
2463 | - | ||
2464 | - if ($this.hasClass('active')) { | ||
2465 | - | ||
2466 | - //最新无排序切换 | ||
2467 | - if ($this.hasClass('new')) { | ||
2468 | - return; | ||
2469 | - } | ||
2470 | - | ||
2471 | - if ($this.hasClass('price') || $this.hasClass('discount')) { | ||
2472 | - | ||
2473 | - // 价格/折扣切换排序状态 | ||
2474 | - $this.find('.icon > .iconfont').toggleClass('cur'); | ||
2475 | - $pre = $this; //更新pre为当前项 | ||
2476 | - nav.reload = true; //重置reload,HTML会被替换为逆序的HTML | ||
2477 | - nav.order = nav.order === 0 ? 1 : 0; //切换排序 | ||
2478 | - } | ||
2479 | - } else { | ||
2480 | - $active = $this.siblings('.active'); | ||
2481 | - | ||
2482 | - $pre = $this; //$pre为除筛选导航的其他导航项,若当前active的为筛选,则把$pre置为当前点击项 | ||
2483 | - | ||
2484 | - if ($active.hasClass('filter')) { | ||
2485 | - | ||
2486 | - //若之前active项为筛选,则隐藏筛选面板 | ||
2487 | - filter.hideFilter(); | ||
2488 | - } else { | ||
2489 | - | ||
2490 | - //切换container显示 | ||
2491 | - $goodsContainer.children('.container:not(.hide)').addClass('hide'); | ||
2492 | - | ||
2493 | - switch (navType) { | ||
2494 | - case 'newest': | ||
2495 | - $ngc.removeClass('hide'); | ||
2496 | - break; | ||
2497 | - | ||
2498 | - case 'price': | ||
2499 | - $pgc.removeClass('hide'); | ||
2500 | - break; | ||
2501 | - | ||
2502 | - case 'discount': | ||
2503 | - $dgc.removeClass('hide'); | ||
2504 | - break; | ||
2505 | - } | ||
2506 | - } | ||
2507 | - | ||
2508 | - $active.removeClass('active'); | ||
2509 | - $this.addClass('active'); | ||
2510 | - } | ||
2511 | - | ||
2512 | - if (nav.reload) { | ||
2513 | - search(); | ||
2514 | - } | ||
2515 | - } | ||
2516 | -}); | ||
2517 | - | ||
2518 | -$(window).scroll(function() { | ||
2519 | - | ||
2520 | - //当scroll到1/4$goodsContainer高度后继续请求下一页数据 | ||
2521 | - if ($(window).scrollTop() + winH > | ||
2522 | - $(document).height() - 0.25 * $goodsContainer.height()) { | ||
2523 | - search(); | ||
2524 | - } | ||
2525 | -}); | ||
2526 | - | ||
2527 | -//品牌介绍 | ||
2528 | -$brandHeader.children('.btn-intro').bind('touchstart', function() { | ||
2529 | - $introBox.removeClass('hide'); | ||
2530 | -}); | ||
2531 | - | ||
2532 | -$('.close-intro, .brand-intro-box').click(function() { | ||
2533 | - $introBox.addClass('hide'); | ||
2534 | -}); | ||
2535 | - | ||
2536 | -$('#brand-intro').click(function(e) { | ||
2537 | - e.stopPropagation(); | ||
2538 | -}); | ||
2539 | - | ||
2540 | -//品牌收藏 | ||
2541 | -$brandHeader.children('.btn-col').bind('touchstart', function() { | ||
2542 | - $(this).toggleClass('coled'); | ||
2543 | -}); | ||
2544 | -}); | ||
2545 | -define("js/plugin/filter", ["zepto"], function(require, exports, module){ | ||
2546 | -/** | ||
2547 | - * 筛选JS | ||
2548 | - * 暴露三个接口:注册回调、显示filter、隐藏filter | ||
2549 | - * @author: xuqi<qi.xu@yoho.cn> | ||
2550 | - * @date: 2015/10/19 | ||
2551 | - */ | ||
2552 | - | ||
2553 | -var $ = require("zepto"); | ||
2554 | - | ||
2555 | -var $filter = $('.filter-mask, .filter-body'); | ||
2556 | - | ||
2557 | -var $classify = $filter.find('.classify'), | ||
2558 | - $subClassify = $filter.find('.sub-classify'); | ||
2559 | - | ||
2560 | -var cbFn; | ||
2561 | - | ||
2562 | -//隐藏筛选界面 | ||
2563 | -function hideFilter() { | ||
2564 | - $filter.addClass('hide'); | ||
2565 | -} | ||
2566 | - | ||
2567 | -//显示筛选界面 | ||
2568 | -function showFilter() { | ||
2569 | - $filter.removeClass('hide'); | ||
2570 | -} | ||
2571 | - | ||
2572 | -//注册sub-classify点击后的回调 | ||
2573 | -function registerCbFn(cb) { | ||
2574 | - cbFn = cb; | ||
2575 | -} | ||
2576 | - | ||
2577 | -//设置完高度后显示sub并设置选中 | ||
2578 | -$classify.children(':first-child').addClass('active'); //T:不在HTML中使用{{#if @first}}active{{/if}}来初始化active为避免sub设置高度时的闪烁 | ||
2579 | - | ||
2580 | -//classify switch | ||
2581 | -$classify.delegate('.classify-item', 'touchstart', function() { | ||
2582 | - var $this = $(this); | ||
2583 | - | ||
2584 | - if ($this.hasClass('active')) { | ||
2585 | - return; | ||
2586 | - } | ||
2587 | - | ||
2588 | - $this.siblings('.active').removeClass('active'); | ||
2589 | - | ||
2590 | - $this.addClass('active'); | ||
2591 | -}); | ||
2592 | - | ||
2593 | -//点击Mask隐藏筛选界面 | ||
2594 | -$filter.filter('.filter-mask').click(function() { | ||
2595 | - hideFilter(); | ||
2596 | -}); | ||
2597 | - | ||
2598 | -$subClassify.delegate('li', 'click', function(e) { | ||
2599 | - var $this = $(this), | ||
2600 | - id = $this.data('id'); | ||
2601 | - | ||
2602 | - var $sub = $this.closest('.sub-classify'); | ||
2603 | - | ||
2604 | - var $shower = $sub.siblings('.shower'); | ||
2605 | - | ||
2606 | - var html, shower; | ||
2607 | - | ||
2608 | - e.stopPropagation(); | ||
2609 | - | ||
2610 | - if ($this.hasClass('chosed')) { | ||
2611 | - return; | ||
2612 | - } | ||
2613 | - | ||
2614 | - $sub.children('.chosed').removeClass('chosed'); | ||
2615 | - $this.addClass('chosed'); | ||
2616 | - | ||
2617 | - html = $.trim($this.html()); | ||
2618 | - | ||
2619 | - shower = $.trim($shower.html()); | ||
2620 | - | ||
2621 | - $shower.html( | ||
2622 | - shower.substring(0, shower.indexOf('</span>') + 7) + //拆分出shower的title | ||
2623 | - html.substring(0, html.indexOf('<i')) //拆分选中筛选值 | ||
2624 | - ); | ||
2625 | - | ||
2626 | - if ($this.index() === 0) { | ||
2627 | - $shower.addClass('default'); | ||
2628 | - } else { | ||
2629 | - $shower.removeClass('default'); | ||
2630 | - } | ||
2631 | - | ||
2632 | - if (cbFn) { | ||
2633 | - cbFn({ | ||
2634 | - type: $sub.data('type'), | ||
2635 | - id: id | ||
2636 | - }); | ||
2637 | - } | ||
2638 | - | ||
2639 | - hideFilter(); | ||
2640 | -}); | ||
2641 | - | ||
2642 | - | ||
2643 | -exports.showFilter = showFilter; | ||
2644 | - | ||
2645 | -exports.hideFilter = hideFilter; | ||
2646 | - | ||
2647 | -exports.registerCbFn = registerCbFn; | ||
2648 | -}); | ||
2649 | -define("js/product/detail/detail", ["zepto","swiper","lazyload","index"], function(require, exports, module){ | ||
2650 | -/** | ||
2651 | - * 产品打包入口 | ||
2652 | - * @author: liangzhifeng<zhifeng.liang@yoho.cn> | ||
2653 | - * @date: 2015/10/20 | ||
2654 | - */ | ||
2655 | - var $ = require("zepto"), | ||
2656 | - Swiper = require("swiper"), | ||
2657 | - lazyLoad = require("lazyload"), | ||
2658 | - goodsSwiper; | ||
2659 | - | ||
2660 | -lazyLoad($('img.lazy')); | ||
2661 | - | ||
2662 | -goodsSwiper = new Swiper('.banner-swiper', { | ||
2663 | - loop: true, | ||
2664 | - pagination: '.banner-top .pagination-inner', | ||
2665 | - slideElement: 'div', | ||
2666 | - nextButton: '.swiper-button-next', | ||
2667 | - prevButton: '.swiper-button-prev' | ||
2668 | -}); | ||
2669 | -}); | ||
2670 | -define("js/index/index", ["zepto"], function(require, exports, module){ | ||
2671 | -/** | ||
2672 | - * Index打包入口 | ||
2673 | - * @author: xuqi<qi.xu@yoho.cn> | ||
2674 | - * @date: 2015/10/19 | ||
2675 | - */ | ||
2676 | - | ||
2677 | -require("js/index/search"); | ||
2678 | -require("js/index/channel"); | ||
2679 | -}); | ||
2680 | -define("js/index/search", ["zepto"], function(require, exports, module){ | ||
2681 | -/** | ||
2682 | - * 搜索JS | ||
2683 | - * @author: xuqi<qi.xu@yoho.cn> | ||
2684 | - * @date: 2015/10/19 | ||
2685 | - */ | ||
2686 | - | ||
2687 | -var $ = require("zepto"); | ||
2688 | - | ||
2689 | -var $input = $('#search-input > input'); | ||
2690 | - | ||
2691 | -var $clear = $('#search-input > .clear-input'); | ||
2692 | - | ||
2693 | -var $history = $('.history'); | ||
2694 | - | ||
2695 | -$('#clear-history').bind('touchstart', function() { | ||
2696 | - $.ajax({ | ||
2697 | - type: 'POST', | ||
2698 | - url: '/search/clearHistory', | ||
2699 | - success: function(data) { | ||
2700 | - if (data.code === 200) { | ||
2701 | - $history.html(''); //clear search history items | ||
2702 | - } | ||
2703 | - } | ||
2704 | - }); | ||
2705 | -}); | ||
2706 | - | ||
2707 | -$('#search').bind('touchstart', function() { | ||
2708 | - var val = $input.val(); | ||
2709 | - | ||
2710 | - $.ajax({ | ||
2711 | - type: 'POST', | ||
2712 | - url: '/search', | ||
2713 | - data: { | ||
2714 | - val: val | ||
2715 | - }, | ||
2716 | - success: function(data) { | ||
2717 | - if (data.code === 200) { | ||
2718 | - location.href = data.data; | ||
2719 | - } | ||
2720 | - } | ||
2721 | - }); | ||
2722 | -}); | ||
2723 | - | ||
2724 | -$input.bind('input', function() { | ||
2725 | - if ($input.val() === '') { | ||
2726 | - $clear.addClass('hide'); | ||
2727 | - } else { | ||
2728 | - $clear.removeClass('hide'); | ||
2729 | - } | ||
2730 | -}); | ||
2731 | - | ||
2732 | -$clear.bind('touchstart', function() { | ||
2733 | - $input.val('').trigger('input'); | ||
2734 | -}); | ||
2735 | -}); | ||
2736 | -define("js/index/channel", [], function(require, exports, module){ | ||
2737 | -/** | ||
2738 | - * 频道选择 | ||
2739 | - * @author: liangzhifeng<zhifeng.liang@yoho.cn> | ||
2740 | - * @date: 2015/10/12 | ||
2741 | - */ | ||
2742 | - | ||
2743 | -}); |
static/dist/myohobuy/0.0.1/index.css
deleted
100644 → 0
1 | -html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}html{line-height:1}ol,ul{list-style:none}table{border-collapse:collapse;border-spacing:0}caption,th,td{text-align:left;font-weight:normal;vertical-align:middle}q,blockquote{quotes:none}q:before,q:after,blockquote:before,blockquote:after{content:"";content:none}a img{border:none}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}*{-webkit-tap-highlight-color:transparent;-moz-tap-highlight-color:transparent;tap-highlight-color:transparent}html,body{font-family:helvetica,Arial,"黑体";width:100%;font-size:12px;line-height:1.4}.clearfix:before,.clearfix:after{content:"";display:table}.clearfix:after{clear:both}.clearfix{*zoom:1}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}img{max-width:100%;display:block;border:0;margin:0 auto}a{text-decoration:none;outline:none;color:#000}*:focus{outline:none}.hide{display:none}@font-face{font-family:"iconfont";src:url('../assets/font/iconfont.eot?1445849928');src:url('../assets/font/iconfont.eot?&1445849928#iefix') format("embedded-opentype"),url('../assets/font/iconfont.woff?1445849729') format("woff"),url('../assets/font/iconfont.ttf?1445849928') format("truetype"),url('../assets/font/iconfont.svg?1445849928#iconfont') format("svg")}.iconfont{font-family:"iconfont" !important;font-size:16px;font-style:normal;text-decoration:none;-webkit-font-smoothing:antialiased;-webkit-text-stroke-width:0.2px;-moz-osx-font-smoothing:grayscale}.yoho-tip{position:absolute;display:none;text-align:center;width:70%;padding:34px 0;top:50%;left:50%;margin-left:-35%;margin-top:-45px;background-color:#000;opacity:0.7;color:#fff;font-size:18px;border:none;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px}.yoho-header{position:relative;background-color:#000;color:#fff;width:100%;overflow:hidden;height:44px;line-height:44px}.yoho-header .nav-back{position:absolute;left:17px;top:14px;width:9px;height:16px;background:url('../assets/img/layout/back.png?1445849729') no-repeat;background-size:100% 100%;outline:none}.yoho-header .nav-home{position:absolute;top:14px;right:17px;width:20px;height:20px;background:url('../assets/img/layout/home.png?1445849729') no-repeat;background-size:100% 100%;outline:none}.yoho-header .nav-title{position:absolute;margin-left:26px;margin-right:32px;height:100%;font-size:18px;color:#fff;font-weight:bold;top:0;right:0;left:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-align:center}.yoho-footer{font-size:12px;background-color:#fff}.yoho-footer .op-row{position:relative;padding:0 30px;height:60px;line-height:60px}.yoho-footer .op-row .user-name{text-decoration:underline;margin-left:.3em;margin-right:1em}.yoho-footer .op-row .back-to-top{position:absolute;right:20px}.yoho-footer .op-row .sep-line{margin:0 0.3em}.yoho-footer .copyright{height:60px;line-height:60px;border-top:1px solid #ccc;text-align:center;color:#666;background-color:#eee}.yoho-footer.bottom{position:absolute;width:100%;bottom:0}.good-info{float:left;width:6.9rem;height:12.15rem;margin:0.7rem 0.375rem 0}.good-info .tag-container{height:0.7rem;width:100%}.good-info .tag-container .good-tag{display:block;float:left;height:0.7rem;font-size:0.45rem;text-align:center;line-height:0.8rem;margin-right:0.1rem}.good-info .tag-container .good-tag:last-child{margin-right:0}.good-info .tag-container .new-tag{width:1.5rem;background-color:#78dc7e;color:#fff}.good-info .tag-container .renew-tag{width:2.25rem;background-color:#78dc7e;color:#fff}.good-info .tag-container .sale-tag{width:1.5rem;background-color:#ff575c;color:#fff}.good-info .tag-container .new-festival-tag{width:2.25rem;background-color:#000;color:#fff}.good-info .tag-container .limit-tag{box-sizing:border-box;width:2.25rem;border:1px solid #000;color:#000;line-height:0.6rem}.good-detail-img{position:relative}.good-detail-img img{display:block;width:100%;height:9.15rem}.good-detail-img .few-tag{position:absolute;bottom:0;width:100%;height:0.7rem;background:#ffac5b;font-size:0.45rem;color:#fff;line-height:0.7rem;text-align:center}.good-detail-text .name a{display:block;line-height:1.4rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-decoration:none;font-size:0.55rem;color:#444}.good-detail-text .price{line-height:0.55rem;font-size:0.55rem}.good-detail-text .price .sale-price{color:#d62927}.good-detail-text .price .sale-price.no-price{color:#000}.good-detail-text .price .market-price{margin:0 0 0 0.125rem;color:#b0b0b0;text-decoration:line-through}.filter-mask,.filter-body{position:absolute;left:0;right:0;top:0}.filter-mask{height:100%;background:rgba(0,0,0,0.1)}.filter-body{background:#fff;color:#000;cursor:pointer;font-size:14px;height:440px}.filter-body .classify{width:50%;height:100%;background:#f8f8f8}.filter-body .classify>li{height:60px;line-height:60px}.filter-body .classify>li>*{box-sizing:border-box}.filter-body .classify>li.active{background:#fff}.filter-body .classify>li .shower{padding-left:20px;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.filter-body .classify>li .default{color:#999}.filter-body .classify>li .title{float:left;color:#000}.filter-body .sub-classify{position:absolute;display:none;width:50%;height:440px;padding-left:15px;left:50%;top:0;overflow:auto}.filter-body .sub-classify>li{height:60px;line-height:60px;border-bottom:1px solid #e6e6e6;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.filter-body .sub-classify .chosed-icon{display:none}.filter-body .sub-classify .chosed .chosed-icon{display:inline}.filter-body .active>.sub-classify{display:block}body.passport-body{background-color:#444;font-family:"MicroSoft YaHei",SimSun,sans-serif}body.passport-body *{box-sizing:border-box}.passport-page{text-align:center;padding:0 6%}.passport-page .header{position:relative;height:40px;margin:20px 0 30px}.passport-page .header .go-back{display:block;position:absolute;height:30px;width:30px;top:5px;left:0;background:url('../assets/img/passport/go-back.png?1445849729') no-repeat;background-size:100% 100%}.passport-page .header .title{font-size:20px;line-height:40px;color:#fff}.passport-page .header .img-header{width:68px;height:40px;background:url('../assets/img/passport/yoho-family.png?1445849729') no-repeat;background-size:100% 100%;margin:0 auto}.passport-page .input-container,.passport-page .select-container{position:relative;width:100%;height:52px;font-size:20px;background-color:#575757;border:1px solid #606060;border-radius:5px;text-align:left;color:#fff}.passport-page .select-container .select{position:absolute;height:50px;padding-right:40px;right:0;color:#fff;background-color:transparent;border:0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;-moz-appearance:none;-webkit-appearance:none;direction:rtl}.passport-page .select-container .select:focus{outline:0;border:none}.passport-page .select-container .select:-moz-focusring{color:transparent;text-shadow:0 0 0 #fff}.passport-page .select-container .select-title{line-height:2.5;margin-left:15px}.passport-page .select-container .arrow-right{position:absolute;width:13px;height:20px;right:15px;top:16px;background:url('../assets/img/passport/arrow-right.png?1445849729') no-repeat;background-size:100% 100%}.passport-page .has-eye,.passport-page .has-clear{padding-right:30px}.passport-page .area-code{position:absolute;left:15px;line-height:2.5}.passport-page .phone-container{padding-left:55px}.passport-page .input{width:100%;line-height:26px;padding:12px 0;padding-left:15px;border-radius:5px;color:#fff;background-color:transparent;border:none}.passport-page .btn{display:block;width:100%;font-size:20px;line-height:2.5;background-color:#36a74c;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;color:#fff}.passport-page .btn.disable{background-color:#a2a2a2}.passport-page .country-select.in-android-uc{width:90px}.passport-page .clear-input{position:absolute;display:none;top:18px;right:10px;width:16px;height:16px;background:url('../assets/img/passport/clear-input.png?1445849729') no-repeat;background-size:100% 100%}.passport-page .eye{position:absolute;top:20px;right:10px;width:19px;height:12px;background:url('../assets/img/passport/eye.png?1445849729') no-repeat;background-size:100% 100%}.passport-page .eye.close{background-image:url('../assets/img/passport/eye-close.png?1445849729')}.passport-page .row{margin-bottom:10px}.reg-page .register-tip{color:#fff;font-size:15px}.login-page .yoho-logo{position:absolute;height:31px;width:26px;background:url('../assets/img/passport/yoho.png?1445849729');background-size:100% 100%;top:10px;left:15px}.login-page .acc-container{padding-left:45px}.login-page .op-container{position:relative;width:100%;margin:20px 0;text-align:left;font-size:16px}.login-page .op-container .go-register{text-decoration:underline;color:#858585}.login-page .op-container .forget-pwd{position:absolute;right:0;text-decoration:underline;color:#858585}.login-page .third-party-login{text-align:left}.login-page .third-party-login>span{font-size:16px;color:#858585}.login-page .third-party-login .tp-link{text-align:center;padding:20px 0}.login-page .third-party-login .tp-link>a{display:inline-block;width:44px;height:44px;margin:0 7px;-moz-border-radius:50%;-webkit-border-radius:50%;border-radius:50%;background-color:#333;background-repeat:no-repeat;background-size:100% 100%}.login-page .third-party-login .tp-link .alipay{background-image:url('../assets/img/passport/alipay.png?1445849729')}.login-page .third-party-login .tp-link .weibo{background-image:url('../assets/img/passport/weibo.png?1445849729')}.login-page .third-party-login .tp-link .weixin{background-image:url('../assets/img/passport/weixin.png?1445849729')}.login-page .third-party-login .tp-link .qq{background-image:url('../assets/img/passport/qq.png?1445849729')}.login-page .international{display:block;width:200px;padding:5px 10px;background-color:#333;border:none;border-radius:20px;margin:0 auto;font-size:16px;color:#d8d8d8}.login-page .login-tip{font-size:16px;position:relative;color:#d8d8d8;margin:15px 0}.login-page .login-tip .info-icon{display:inline-block;height:12px;width:12px;background-image:url('../assets/img/passport/info.png?1445849729');background-size:100% 100%}.login-page .mask{position:fixed;display:none;top:0;bottom:0;right:0;left:0;background-color:rgba(0,0,0,0.5)}.login-page .retrive-pwd-ways{position:fixed;display:none;bottom:5px;left:10px;right:10px;font-size:16px}.login-page .retrive-pwd-ways li{background-color:#fff;width:100%;height:40px;line-height:40px;text-align:center}.login-page .retrive-pwd-ways li:nth-child(1){-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;border-top-left-radius:5px;-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;border-top-right-radius:5px;border-bottom:1px solid #9f9f9f}.login-page .retrive-pwd-ways li:nth-child(2){-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;border-bottom-left-radius:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;border-bottom-right-radius:5px}.login-page .retrive-pwd-ways li:last-child{margin-top:10px;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.back-email-success-page .tip{font-size:20px;color:#fff;margin-top:30px}.back-email-success-page .sub-tip,.back-email-success-page .resend{color:#939393;font-size:16px}.back-email-success-page .go-email{margin:20px 0 10px}.back-email-success-page .resend{float:right}.reg-code-page .captcha-tip,.back-code-page .captcha-tip{position:absolute;width:148px;text-align:center;right:15px;top:8px;color:#36a74c;padding:5px 0;border:1px solid #36a74c;border-radius:20px;font-size:16px}.reg-code-page .captcha-tip.disable,.back-code-page .captcha-tip.disable{color:#8f8f8f;border-color:#8f8f8f}.reg-code-page .input-container,.back-code-page .input-container{padding-right:190px}.reg-code-page .text-container,.back-code-page .text-container{color:#fff;font-size:16px;margin-bottom:20px}.reg-code-page .phone,.back-code-page .phone{color:#4ecae8}.reg-code-page .clear-input,.back-code-page .clear-input{right:170px}.time-view-like-share{color:#b0b0b0;line-height:0.95rem;height:0.95rem;font-size:0.6rem}.time-view-like-share .iconfont{vertical-align:9%;margin-right:0.1rem;font-size:0.6rem}.time-view-like-share .like-share-container{display:inline-block;float:right}.time-view-like-share .like-share-container>*{float:left}.time-view-like-share .like-share-container .iconfont{position:relative;height:1.5rem;line-height:1.5rem;display:inline-block;color:#b0b0b0;width:1.5rem;top:-0.35rem;font-size:0.85rem;text-align:center;margin-right:0;outline:none}.time-view-like-share .like-share-container .share-btn{margin-left:0.5rem}.time-view-like-share .like-share-container .like-btn.like{color:#444}.time-view-like-share .like-share-container .collect-btn{margin-left:0.5rem}.time-view-like-share .like-share-container .collect-btn.collected{color:#444}.guang-info{margin-bottom:0.75rem;padding:0 0 0.6rem 0;border-top:1px solid #e0e0e0;border-bottom:1px solid #e0e0e0;background:#fff}.guang-info .info-author{display:block;width:100%}.guang-info .info-author .avatar{float:left;margin-top:0.5rem;width:1.25rem;height:1.25rem;margin-left:0.75rem;-moz-border-radius:50%;-webkit-border-radius:50%;border-radius:50%}.guang-info .info-author .name{float:left;margin-left:0.75rem;padding:0.75rem 0;font-size:0.7rem;color:#000}.guang-info:last-child{margin-bottom:0}.guang-info .info-img{position:relative;width:100%}.guang-info .info-img img{display:block;width:100%}.guang-info .info-match{position:absolute;top:0;left:0;width:3.25rem;height:1.25rem;line-height:1.25rem;font-size:0.7rem;color:#fff;background:#000;text-align:center;text-decoration:none}.guang-info .info-tag{position:absolute;top:0;left:2.625rem;height:1.25rem;width:1.25rem}.guang-info .info-tag.collocation{background:url('../assets/img/guang/info/collocation.png?1445849729');background-size:100% 100%}.guang-info .info-tag.fashion-good{background:url('../assets/img/guang/info/fashion-good.png?1445849729');background-size:100% 100%}.guang-info .info-tag.fashion-man{background:url('../assets/img/guang/info/fashion-man.png?1445849729');background-size:100% 100%}.guang-info .info-tag.tip{background:url('../assets/img/guang/info/tip.png?1445849729');background-size:100% 100%}.guang-info .info-tag.topic{background:url('../assets/img/guang/info/topic.png?1445849729');background-size:100% 100%}.guang-info .info-deps{margin:0.8rem 0 0 0;padding:0 1rem 0 0.75rem}.guang-info .info-deps .info-title-container{text-decoration:none;color:#000}.guang-info .info-deps .info-title{line-height:1.1rem;color:#000;font-size:1rem;font-weight:bold}.guang-info .info-deps .info-text{margin:0.4rem 0 0 0;line-height:1.15rem;font-size:0.7rem;color:#444}.guang-info .info-deps .time-view-like-share{margin-top:0.4rem}.ps-list-page{background-color:#f0f0f0}.ps-list-page .nav-tab,.ps-list-page .ps-content{width:100%}.ps-list-page .nav-tab{height:1.5rem;padding:0.25rem 0;background-color:#fff}.ps-list-page .star-nav,.ps-list-page .plus-nav{box-sizing:border-box;float:left;width:50%;height:1.5rem;line-height:1.5rem;font-size:16px;text-align:center;color:#ccc}.ps-list-page .star-nav.focus,.ps-list-page .plus-nav.focus{color:#000}.ps-list-page .star-nav{border-right:1px solid #ccc}.ps-list-page .plus-star-row{margin-bottom:0.25rem}.ps-list-page .plus-star-row:last-child{margin-bottom:0}.ps-list-page .plus-star-row>a{display:block;height:7.75rem}.ps-list-page .content.hide{display:none}.ps-list-page .swiper-container{height:7.75rem}.ps-list-page .swiper-pagination-bullet-active{background:#fff}.ps-list-page .brand-deps{height:1rem;line-height:1rem;padding-left:0.25rem;font-size:14px;background:#fff;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ps-detail-page{background-color:#f0f0f0}.ps-detail-page .ps-block{margin-bottom:0.75rem;border-bottom:1px solid #e0e0e0;border-top:1px solid #e0e0e0;background-color:#fff}.ps-detail-page .ps-block.header,.ps-detail-page .ps-block.related-infos{border-top:none}.ps-detail-page .ps-block.related-infos{margin-bottom:0;background-color:#f0f0f0}.ps-detail-page .header{position:relative}.ps-detail-page .header .banner{width:100%;height:7.75rem}.ps-detail-page .header .logo{position:absolute;border:1px solid #b5b5b5;height:4.2rem;width:4.2rem;top:5.65rem;left:1.25rem}.ps-detail-page .header .header-content{padding:0 0.75rem}.ps-detail-page .header .name-islike-container{padding-left:6.2rem;margin-top:0.6rem;font-size:0.85rem}.ps-detail-page .header .name{color:#000;height:1.025rem;width:7.375rem}.ps-detail-page .header .brand-islike{position:relative;float:right;color:#b0b0b0;height:1.5rem;width:1.5rem;line-height:1.5rem;text-align:center;top:-0.25rem;left:-0.25rem}.ps-detail-page .header .brand-islike.like{color:#f00}.ps-detail-page .intro{margin-top:1.225rem;font-size:0.6rem;color:#444;line-height:150%}.ps-detail-page .more-intro{padding:0.75rem 0;font-size:0.7rem;line-height:104%;color:#bbb;float:right}.ps-detail-page .more-intro .icon{display:inline-block;height:100%;width:1rem;-moz-transition:-moz-transform 0.1s ease-in;-o-transition:-o-transform 0.1s ease-in;-webkit-transition:-webkit-transform 0.1s ease-in;transition:transform 0.1s ease-in}.ps-detail-page .more-intro.spread .icon{-moz-transform:rotate(-180deg);-ms-transform:rotate(-180deg);-webkit-transform:rotate(-180deg);transform:rotate(-180deg);-moz-transform:scale(0.83, 0.83);-ms-transform:scale(0.83, 0.83);-webkit-transform:scale(0.83, 0.83);transform:scale(0.83, 0.83)}.ps-detail-page .new-arrival{padding-left:0 0.75rem}.ps-detail-page .new-arrival .new-arrival-content{padding:0.5rem 0.35rem}.ps-detail-page .new-arrival .more-goods-container{height:2.25rem;padding:0 0.75rem;border-top:1px solid #e0e0e0;color:#000}.ps-detail-page .new-arrival .mg-text{height:100%;line-height:2.25rem;color:#000;text-decoration:none;display:block;font-size:16px}.ps-detail-page .new-arrival .more-prods{float:right;color:#b0b0b0}.ps-detail-page .new-arrival .new-arrival-header .more-prods{margin-right:0.75rem;margin-top:0.25rem}.ps-detail-page .new-arrival-header{padding-left:5.55rem;padding-top:0.825rem}.ps-detail-page .new-arrival-header .header-text{font-size:0.7rem;color:#000;line-height:122%;font-weight:bold}.ps-detail-page .related-info-title{margin:0 0.725rem;border:1px solid #e0e0e0;border-bottom:none;line-height:1.8rem;font-size:0.75rem;color:#b0b0b0;text-align:center;background-color:#fff}.ps-detail-page .related-infos-container .guang-info:first-child{margin-top:0}.guang-list-page .editor-header{margin-bottom:0.75rem;padding-top:0.9rem;padding-bottom:1rem;background:#fff;border-bottom:1px solid #e0e0e0}.guang-list-page .avatar{float:left;margin-left:0.75rem}.guang-list-page .avatar img{width:2.5rem;height:2.5rem;-moz-border-radius:50%;-webkit-border-radius:50%;border-radius:50%}.guang-list-page .text{float:left;margin-left:0.8rem;width:11.875rem}.guang-list-page .text .name{font-size:0.8rem;line-height:1rem}.guang-list-page .text .info{margin-top:0.15rem;color:#bdbdbf;font-size:0.6rem;line-height:0.8rem}.guang-list-page .swiper-container{width:100%;height:7.75rem}.guang-list-page .swiper-container img{height:100%;width:100%}.guang-list-page .swiper-container .swiper-pagination{bottom:0;left:0;width:100%}.guang-list-page .swiper-container .swiper-pagination-bullet-active{background:#fff}.guang-list-page .guang-nav{background-color:#fff;overflow:hidden;height:2rem}.guang-list-page .guang-nav-item{float:left;color:#ccc;font-size:0.7rem;padding:0 0.55rem;line-height:2rem}.guang-list-page .guang-nav-item.focus{color:#000}.guang-list-page .info-list.hide{display:none}.guang-list-page .load-more-info{width:100%;height:1.75rem;line-height:1.75rem;text-align:center;font-size:14px;overflow:hidden}.guang-list-page .load-more-info .status.hide{display:none}.clothes-sprite{background-image:url('../assets/img/guang/clothes-s7f658d7d2c.png');background-repeat:no-repeat}.guang-detail-page #wrapper.ios{position:absolute;top:0;bottom:0;left:0;right:0;overflow:hidden}.guang-detail-page .author{border-bottom:1px solid #e0e0e0;background:#fff}.guang-detail-page .author>a{display:block;height:100%}.guang-detail-page .author .avatar{float:left;margin-top:0.5rem;margin-left:0.75rem;width:1.25rem;height:1.25rem;-moz-border-radius:50%;-webkit-border-radius:50%;border-radius:50%}.guang-detail-page .author .name{float:left;font-size:0.7rem;color:#000;padding:0.75rem 0;margin-left:0.75rem}.guang-detail-page .author .intro{float:left;font-size:0.7rem;color:#b0b0b0;padding:0.75rem 0;margin-left:0.75rem}.guang-detail-page .post-title{padding:0.4rem 0 0.65rem 0.75rem;background:#fff}.guang-detail-page .post-title .title{line-height:1.5rem;font-size:1rem;color:#000;font-weight:bold}.guang-detail-page .text-block{padding:0.5rem 0.75rem;line-height:1.15rem;font-size:0.7rem;background:#fff;color:#444}.guang-detail-page .big-img-block{padding-bottom:0.125rem;background:#fff}.guang-detail-page .big-img-block img{width:100%;height:16rem}.guang-detail-page .small-img-block{padding-bottom:0.2rem;background:#fff}.guang-detail-page .small-img-block img{float:right;width:7.875rem;height:10.5rem}.guang-detail-page .small-img-block img:first-child{float:left}.guang-detail-page .collocation-block{background:#fff}.guang-detail-page .collocation-block .good-list{padding-left:0.375rem}.guang-detail-page .thumb-container{padding-top:0.75rem;padding-left:0.75rem;background:transparent url('../assets/img/guang/thumb-container-bg.png?1445849729') no-repeat;background-size:200% 100%}.guang-detail-page .thumb-container.fixed-top{position:fixed;left:0;right:0;top:0}.guang-detail-page .thumb-container.fixed-bottom{position:fixed;left:0;right:0;bottom:0;background:rgba(255,255,255,0.9)}.guang-detail-page .thumb-container.absolute{position:absolute;left:0;right:0}.guang-detail-page .thumb-container.static{position:static}.guang-detail-page .thumb-container.hide{display:none}.guang-detail-page .clothe-type{position:absolute;right:0.15rem;bottom:0.85rem;width:20px;height:20px;-moz-border-radius:50%;-webkit-border-radius:50%;border-radius:50%}.guang-detail-page .clothe-type.bag{background:url('../assets/img/guang/clothes-se45f5825d0.png') 0 0 no-repeat;-moz-background-size:20px auto;-o-background-size:20px auto;-webkit-background-size:20px auto;background-size:20px auto;display:block;background-color:#fff;background-size:100%}.guang-detail-page .clothe-type.cloth{background:url('../assets/img/guang/clothes-se45f5825d0.png') 0 -20px no-repeat;-moz-background-size:20px auto;-o-background-size:20px auto;-webkit-background-size:20px auto;background-size:20px auto;display:block;background-color:#fff;background-size:100%}.guang-detail-page .clothe-type.dress{background:url('../assets/img/guang/clothes-se45f5825d0.png') 0 -40px no-repeat;-moz-background-size:20px auto;-o-background-size:20px auto;-webkit-background-size:20px auto;background-size:20px auto;display:block;background-color:#fff;background-size:100%}.guang-detail-page .clothe-type.headset{background:url('../assets/img/guang/clothes-se45f5825d0.png') 0 -60px no-repeat;-moz-background-size:20px auto;-o-background-size:20px auto;-webkit-background-size:20px auto;background-size:20px auto;display:block;background-color:#fff;background-size:100%}.guang-detail-page .clothe-type.lamp{background:url('../assets/img/guang/clothes-se45f5825d0.png') 0 -80px no-repeat;-moz-background-size:20px auto;-o-background-size:20px auto;-webkit-background-size:20px auto;background-size:20px auto;display:block;background-color:#fff;background-size:100%}.guang-detail-page .clothe-type.pants{background:url('../assets/img/guang/clothes-se45f5825d0.png') 0 -100px no-repeat;-moz-background-size:20px auto;-o-background-size:20px auto;-webkit-background-size:20px auto;background-size:20px auto;display:block;background-color:#fff;background-size:100%}.guang-detail-page .clothe-type.shoe{background:url('../assets/img/guang/clothes-se45f5825d0.png') 0 -120px no-repeat;-moz-background-size:20px auto;-o-background-size:20px auto;-webkit-background-size:20px auto;background-size:20px auto;display:block;background-color:#fff;background-size:100%}.guang-detail-page .clothe-type.swim-suit{background:url('../assets/img/guang/clothes-se45f5825d0.png') 0 -140px no-repeat;-moz-background-size:20px auto;-o-background-size:20px auto;-webkit-background-size:20px auto;background-size:20px auto;display:block;background-color:#fff;background-size:100%}.guang-detail-page .clothe-type.under{background:url('../assets/img/guang/clothes-se45f5825d0.png') 0 -160px no-repeat;-moz-background-size:20px auto;-o-background-size:20px auto;-webkit-background-size:20px auto;background-size:20px auto;display:block;background-color:#fff;background-size:100%}.guang-detail-page .clothe-type.watch{background:url('../assets/img/guang/clothes-se45f5825d0.png') 0 -180px no-repeat;-moz-background-size:20px auto;-o-background-size:20px auto;-webkit-background-size:20px auto;background-size:20px auto;display:block;background-color:#fff;background-size:100%}.guang-detail-page .thumb{display:inline-block;position:relative;margin-right:0.55rem;padding-bottom:0.75rem}.guang-detail-page .thumb:last-child{margin-right:0}.guang-detail-page .thumb.focus .thumb-img{border-color:#000}.guang-detail-page .thumb-img{height:3.35rem;width:2.4rem;border:1px solid transparent}.guang-detail-page .related-reco-block{background:#fff;padding-left:0.375rem;border-top:1px solid #e0e0e0}.guang-detail-page .related-reco-block h2{margin-left:-0.375rem;line-height:2.6rem;font-size:0.75rem;color:#b0b0b0;text-align:center}.guang-detail-page .related-reco-block .one-good{padding-left:0.375rem;padding-right:0.75rem;margin-bottom:0.5rem}.guang-detail-page .related-reco-block .one-good .thumb{float:left;height:3.35rem;width:2.4rem}.guang-detail-page .related-reco-block .one-good .content-container{padding-left:3rem;height:3.35rem;line-height:1;font-size:0.6rem}.guang-detail-page .related-reco-block .one-good .content-container>p{height:50%;line-height:2.35rem}.guang-detail-page .related-reco-block .one-good .content-container span{display:inline-block;line-height:0.6rem}.guang-detail-page .related-reco-block .one-good .content-container .price{line-height:1.175rem}.guang-detail-page .related-reco-block .one-good .sale-price{color:#d62927;line-height:1.5}.guang-detail-page .related-reco-block .one-good .sale-price.no-price{color:#000}.guang-detail-page .related-reco-block .one-good .market-price{margin-left:0.125rem;color:#b0b0b0;text-decoration:line-through;line-height:1.5}.guang-detail-page .related-reco-block .one-good .check-detail{display:inline-block;color:#000;border:1px solid;border-radius:2px;float:right;padding:0 5px;line-height:1.5}.guang-detail-page .related-brand{margin-top:0.75rem}.guang-detail-page .related-brand h2{margin:0 0.725rem;background:#fff;border:1px solid #e0e0e0;border-bottom:none;line-height:1.8rem;font-size:0.75rem;color:#b0b0b0;text-align:center}.guang-detail-page .related-brand .brand-list{border-top:1px solid #e0e0e0;border-bottom:1px solid #e0e0e0;padding:0.75rem 0 0.75rem;background:#fff}.guang-detail-page .related-brand .brand{float:left;width:3.95rem;height:3.2rem;border-right:1px solid #e0e0e0;margin-bottom:0.25rem}.guang-detail-page .related-brand .brand a{display:block}.guang-detail-page .related-brand .brand:nth-child(4n){border-right:none}.guang-detail-page .related-brand .brand-logo{display:table-cell;width:3.95rem;height:2.35rem;vertical-align:middle}.guang-detail-page .related-brand .brand-logo img{display:block;max-width:3.95rem;max-height:2.35rem;vertical-align:middle;margin:0 auto}.guang-detail-page .related-brand .brand-name{margin:0.25rem 0 0 0;line-height:0.6rem;font-size:0.45rem;color:#babac2;text-align:center;text-decoration:none;border-bottom:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.guang-detail-page .related-tag{position:relative;padding-bottom:0.75rem;border-bottom:1px solid #e0e0e0;background:#fff}.guang-detail-page .related-tag .tag-bg{position:absolute;height:1rem;width:1rem;background:url('../assets/img/guang/tag.png?1445849729') no-repeat;background-size:100% 100%;top:0.875rem;left:0.5rem}.guang-detail-page .related-tag .tag-list{margin-left:1.25rem}.guang-detail-page .related-tag li{float:left;margin-top:0.775rem;margin-left:0.775rem}.guang-detail-page .related-tag a{height:1.25rem;line-height:1.25rem;font-size:0.75rem;color:#000;text-decoration:underline;white-space:nowrap}.guang-detail-page .related-info{margin-top:0.75rem}.guang-detail-page .related-info h2{margin:0 0.725rem;background:#fff;border:1px solid #e0e0e0;border-bottom:none;line-height:1.8rem;font-size:0.75rem;color:#b0b0b0;text-align:center}.guang-detail-page .related-info .info-list{background:#fff;padding-bottom:0.75rem;border-top:1px solid #e0e0e0}.guang-detail-page .related-info li{padding-top:0.75rem;margin-bottom:0.25rem}.guang-detail-page .related-info li a{display:block}.guang-detail-page .related-info li img{float:left;margin-left:0.75rem;width:4.55rem;height:2.85rem}.guang-detail-page .related-info li img.square{height:4.55rem}.guang-detail-page .related-info .title,.guang-detail-page .related-info .publish-time{float:left;width:9rem;margin-left:0.75rem;line-height:1rem;color:#444;font-size:0.7rem}.guang-detail-page .related-info .publish-time{font-size:0.45rem;margin-top:0;color:#b0b0b0}.guang-detail-page .related-info .publish-time .iconfont{font-size:0.45rem}.header-download{position:relative;height:5.3rem;padding:1.2rem 0 0;overflow:hidden}.header-download .download-bg{position:absolute;left:0;top:0;width:100%;z-index:-1}.header-download .yoho-logo{height:1.425rem;background:url('../assets/img/app-logo.png?1445849928') no-repeat center center;background-size:auto 100%}.header-download p{line-height:1.2rem;font-size:0.7rem;color:#fff;text-align:center}.header-download .download-btn{display:block;margin:0.45rem auto 0;width:7.35rem;height:1.6rem;line-height:1.6rem;border:0.075rem solid #fff;font-size:0.9rem;text-align:center;color:#fff}.header-download .close-btn{position:absolute;top:0.425rem;right:0.325rem;width:1.25rem;height:1.25rem;background:url('../assets/img/close-icon.png?1445849928');background-size:100% 100%}.banner-top{position:relative}.banner-top .swiper-pagination{position:absolute;left:0;right:0;bottom:0.5rem;text-align:center}.banner-top .swiper-pagination .pagination-inner{display:inline-block}.banner-top .swiper-pagination .pagination-inner span{display:inline-block;width:0.35rem;height:0.35rem;background:#fff;opacity:0.5;margin:0 0.225rem;border-radius:50%}.banner-top .swiper-pagination .pagination-inner span.swiper-active-switch{opacity:1}.banner-swiper{height:7.725rem;overflow:hidden}.banner-swiper ul{position:relative;height:100%}.banner-swiper ul li{float:left;height:100%}.banner-swiper ul li img{width:100%;height:100%}.banner-center{margin:0.75rem 0 0;height:5rem;overflow:hidden}.banner-center img{display:block;width:100%;height:100%}.banner-bottom{margin:0.75rem 0 0;height:4rem;overflow:hidden}.banner-bottom img{display:block;width:100%}.side-nav{display:none;background:#fff;position:fixed;top:0;right:2.5rem;bottom:0;left:0;z-index:1;overflow:hidden}.side-nav ul{background:#f0f0f0}.side-nav li{position:relative;height:3.2rem;line-height:3.2rem;border-bottom:1px solid #e0e0e0;background:#fff}.side-nav li a{display:block;height:100%;padding-left:2.75rem;color:#444;font-size:0.6rem}.side-nav li .nav-icon,.side-nav li .nav-img{position:absolute;width:1.5rem;height:1.5rem;top:50%;margin-top:-0.75rem;left:0.6rem}.side-nav li .enter-subnav{position:absolute;right:0.75rem;top:0;bottom:0;font-size:0.9rem;color:#b0b0b0;font-weight:lighter}.side-nav li em{margin-right:0.25rem;font-weight:bold;font-size:0.85rem}.side-nav li.boys i{background:url('../assets/img/side-nav/boys.png?1445849729') no-repeat left center;background-size:100% 100%}.side-nav li.girls i{background:url('../assets/img/side-nav/girls.png?1445849729') no-repeat left center;background-size:100% 100%}.side-nav li.kids i{background:url('../assets/img/side-nav/kids.png?1445849729') no-repeat left center;background-size:100% 100%}.side-nav li.life i{background:url('../assets/img/side-nav/life.png?1445849729') no-repeat left center;background-size:100% 100%}.side-nav li.new{margin:0.475rem 0 0;border-top:1px solid #e0e0e0}.side-nav li.new i{background:url('../assets/img/side-nav/new.png?1445849729') no-repeat left center;background-size:100% 100%}.side-nav li.guang .nav-icon,.side-nav li.trendfinder .nav-icon{background:url('../assets/img/side-nav/guang.png?1445849729') no-repeat left center;background-size:100% 100%}.side-nav.on{display:block}.sub-nav{position:fixed;top:0;right:2.5rem;left:0;bottom:0;background:#fff !important;z-index:2;-moz-transform:translateX(100%);-ms-transform:translateX(100%);-webkit-transform:translateX(100%);transform:translateX(100%);-moz-transition:-moz-transform 0.3s;-o-transition:-o-transform 0.3s;-webkit-transition:-webkit-transform 0.3s;transition:transform 0.3s}.sub-nav li{height:2.725rem;line-height:2.725rem;border:none}.sub-nav li a{position:relative;display:block;margin:0 0 0 0.75rem;padding-left:1.25rem;border-bottom:1px solid #e0e0e0;font-size:0.9rem;z-index:2}.sub-nav li .nav-point{position:absolute;left:0rem;font-size:0.4rem;color:#f0f0f0}.sub-nav li em{font-weight:normal;font-size:0.9rem}.sub-nav li:hover .nav-point,.sub-nav li.current .nav-point{color:#3e3e3e}.sub-nav li:first-child{height:2.2rem;line-height:2.2rem;background:#3e3e3e}.sub-nav li:first-child a{color:#fff;border-bottom:none;padding-left:2.75rem}.sub-nav li:first-child .nav-back{position:absolute;left:0}.sub-nav.show{-moz-transform:translateX(0);-ms-transform:translateX(0);-webkit-transform:translateX(0);transform:translateX(0);-moz-transition:-moz-transform 0.3s;-o-transition:-o-transform 0.3s;-webkit-transition:-webkit-transform 0.3s;transition:transform 0.3s}.floor-header{margin:0.725rem 0.75rem 0;background:#fff;border:1px solid #e0e0e0;border-bottom:none;height:1.75rem;line-height:1.75rem;text-align:center;font-size:0.75rem;color:#b1b1b1}.floor-header-more{position:relative;height:2.475rem;line-height:2.475rem;margin:0.725rem 0 0;background:#fff;border-top:1px solid #e0e0e0;text-align:center;font-size:0.8rem;color:#444}.floor-header-more .more-btn{position:absolute;right:0.75rem;top:0;bottom:0;color:#b0b0b0}.hot-brands{background:#fff;border-bottom:1px solid #e0e0e0}.hot-brands a{display:block;text-decoration:none;height:100%}.hot-brands .brand{float:left;width:3.95rem;height:4.35rem;border-right:1px solid #e0e0e0;border-top:1px solid #e0e0e0;overflow:hidden}.hot-brands .brand .brand-logo{width:100%;height:3.2rem;line-height:3.2rem;text-align:center;font-size:0}.hot-brands .brand .brand-logo img{vertical-align:middle;max-width:100%;max-height:100%}.hot-brands .brand .brand-name{line-height:1.1rem;font-size:0.45rem;color:#babac2;text-align:center;text-decoration:none;border-bottom:none;overflow:hidden;text-overflow:ellipsis;-o-text-overflow:ellipsis;white-space:nowrap}.hot-brands .brand:nth-child(5n){border-right:none}.hot-brands .more{float:left;width:7.925rem;height:4.35rem;border-top:1px solid #e0e0e0}.hot-brands .more a{display:block;width:100%;height:100%;background:url('../assets/img/more-brand.png?1445849729') no-repeat;background-size:100% 100%}.brands-swiper{background:#fff;width:100%;height:3.5rem;margin-bottom:0.7rem;overflow:hidden}.brands-swiper .brands-list{position:relative;height:3.5rem}.brands-swiper .brands-list li{float:left;padding-left:5%;width:21.875%;height:3.5rem;border-top:1px solid #e0e0e0}.brands-swiper .brands-list li a{position:relative;display:block;width:100%;height:100%;line-height:3.5rem;font-size:0}.brands-swiper .brands-list li img{max-width:100%;max-height:100%;vertical-align:middle}.brands-swiper .brands-list li .brands-title{position:absolute;left:0.2rem;right:0.2rem;bottom:0.2rem;height:0.7rem;line-height:0.7rem;text-align:center;font-size:0.45rem;color:#444;background:rgba(255,255,255,0.5);overflow:hidden;text-overflow:ellipsis;-o-text-overflow:ellipsis;white-space:nowrap}.fine-brands{background:#fff;border-top:1px solid #e0e0e0}.fine-brands a{display:block;text-decoration:none}.fine-brands .brand{float:left;width:3.95rem;height:4.35rem;border-right:1px solid #e0e0e0;border-bottom:1px solid #e0e0e0}.fine-brands .brand .brand-logo{display:table-cell;width:3.95rem;height:3.25rem;vertical-align:middle}.fine-brands .brand .brand-logo img{display:block;max-width:3.95rem;max-height:3.25rem;vertical-align:middle;margin:0 auto}.fine-brands .brand .brand-name{line-height:1.1rem;font-size:0.45rem;color:#babac2;text-align:center;text-decoration:none;border-bottom:none;overflow:hidden}.fine-brands .brand:nth-child(4n){border-right:none}.creative-life{background:#fff}.creative-life .banner{display:block}.creative-life .banner img{width:100%;height:10.1rem}.creative-life .classify-list>li{float:left;width:5.3rem;height:4.8rem;border-bottom:1px solid #e0e0e0;border-right:1px solid #e0e0e0}.creative-life .classify-logo{display:table-cell;width:5.3rem;height:3.5rem;vertical-align:middle}.creative-life .classify-logo img{display:block;max-width:5.3rem;max-height:3.5rem;vertical-align:middle;margin:0 auto}.creative-life .classify-name{line-height:1.3rem;font-size:0.65rem;color:#000;text-align:center;text-decoration:none;border-bottom:none;overflow:hidden}.creative-life .classify:nth-child(3n){border-right:0}.plus-star img{display:block;width:100%;height:4.95rem}.maybe-like{background:#fff;padding-left:0.375rem;border-top:1px solid #ccc;border-bottom:1px solid #ccc;margin-top:0.75rem}.maybe-like .title{height:2.6rem;line-height:2.6rem;text-align:center;color:#dadada}.maybe-like .icon{display:inline-block;height:0.775rem;width:0.775rem;background:url('../assets/img/up-icon.png?1445849729') no-repeat;background-size:100% 100%}.maybe-like .maybe-like-nav{width:100%;height:1.5rem;padding:0.25rem 0;background-color:#fff}.maybe-like .maybe-like-nav-item{box-sizing:border-box;float:left;width:50%;height:1.5rem;line-height:1.5rem;text-align:center;color:#ccc;border-right:1px solid #ccc}.maybe-like .maybe-like-nav-item.focus{color:#000}.maybe-like .load-more-info{width:100%;height:14.25rem;line-height:1.75rem;text-align:center;font-size:14px;overflow:hidden}.maybe-like .load-more-info .status.hide{display:none}.icons-wrapper{box-sizing:border-box;padding:0.75rem 0 0.4rem;background:#fff;border-bottom:1px solid #e0e0e0}.icons-item{float:left;margin-bottom:0.25rem;width:25%;height:3.65rem;text-align:center}.imagebar{margin:0 auto;display:flex;display:-webkit-flex;width:2.45rem;height:2.45rem;overflow:hidden;align-items:center;justify-content:center}.imagebar img{max-width:100%;max-height:100%}.linkbar{display:block;line-height:1.1rem;font-size:0.6rem;color:#444}.trend-coll-wrapper{background:#fff;height:16.125rem;border-bottom:1px solid #e0e0e0}.trend-coll-header{position:relative;widows:100%}.trend-coll-header .trend-coll-title{width:100%;height:2.5rem;line-height:2.5rem;text-align:center;font-size:0.85rem;color:#747474}.trend-coll-header .more{position:absolute;right:0.6rem;top:0.5rem}.trend-coll-content{padding:0 0.375rem}.trend-coll-content .lspan{float:left;margin:0 0.375rem}.trend-coll-content .rspan{float:right;margin:0 0.375rem}.lspanimg{display:block;float:right;width:6.875rem;height:6.875rem}.rspanimg{display:block;float:right;width:6.875rem;height:6.875rem}.trend-coll-tail{box-sizing:border-box;width:100%;height:6.675rem;clear:both}.recommend-title{widows:100%;height:2.5rem;line-height:2.5rem;text-align:center;font-size:0.85rem}.recommend-swiper{width:100%;height:3.5rem;overflow:hidden}.recommend-list{position:relative}.recommend-list .recommend-item{float:left;padding-left:0.75rem;width:3.5rem;height:3.5rem}.recommend-list .recommend-item a{display:block;width:100%;height:100%}.recommend-list .recommend-item a img{width:100%;height:100%}.trend-topic-wrapper{background:#fff}.trend-topic-content{position:relative;width:100%;border-bottom:1px solid #e0e0e0}.trend-topic-content .swiper-pagination{position:absolute;left:0;right:0;bottom:0.55rem;text-align:center}.trend-topic-content .swiper-pagination .pagination-inner{display:inline-block}.trend-topic-content .swiper-pagination span{float:left;width:0.4rem;height:0.4rem;margin:0 0.2rem;background:#efefef;border-radius:50%}.trend-topic-content .swiper-pagination span.swiper-active-switch{background:#b0b0b0}.trend-topic-swiper{height:13.35rem;overflow:hidden}.trend-topic-swiper ul{position:relative}.trend-topic-swiper ul li{float:left;height:13.35rem}.trend-topic-swiper ul li .img-box{display:flex;display:-webkit-flex;height:9rem;margin:0 0.75rem;align-items:center;justify-content:center}.trend-topic-swiper ul li .img-box img{max-width:100%;max-height:100%}.trend-topic-swiper ul li .item-content{margin:0.5rem 0.75rem 0}.trend-topic-swiper ul li .item-content .title{line-height:1.3rem;font-size:0.75rem;color:#000}.trend-topic-swiper ul li .item-content .time{margin:0.4rem 0 0;line-height:0.6rem;color:#afafaf;font-size:0.45rem}.trend-topic-swiper ul li .item-content .time .time-icon{margin-right:0.2rem;font-size:0.35rem}.category-swiper{position:relative;height:10.075rem;overflow:hidden}.category-swiper ul li{float:left;width:100%}.category-swiper ul li a,.category-swiper ul li img{display:block;width:100%;height:100%}.category-swiper .swiper-pagination{position:absolute;left:0;right:0;bottom:0.5rem;text-align:center}.category-swiper .swiper-pagination .pagination-inner{display:inline-block}.category-swiper .swiper-pagination .pagination-inner span{display:inline-block;width:0.35rem;height:0.35rem;background:#fff;opacity:0.5;margin:0 0.225rem;border-radius:50%}.category-swiper .swiper-pagination .pagination-inner span.swiper-active-switch{opacity:1}.goods-category .category-list{background:#f5f7f6;height:9.575rem}.goods-category .category-list li{float:left;width:4.775rem;height:4.525rem;padding:0.25rem 0 0;border-left:1px solid #e0e0e0;border-bottom:1px solid #e0e0e0}.goods-category .category-list li .first-show{display:none}.goods-category .category-list li .img-box{display:flex;display:-webkit-flex;height:3.5rem;align-items:center;justify-content:center}.goods-category .category-list li .img-box img{max-width:100%;max-height:100%}.goods-category .category-list li .category-name{line-height:0.8rem;font-size:0.5rem;color:#444;text-align:center}.goods-category .category-list li:first-child{width:6.325rem;height:8.375rem;border-left:none;padding:1.2rem 0 0 0}.goods-category .category-list li:first-child .first-show{display:block;line-height:1.1rem;font-size:0.75rem;color:#444;text-align:center}.goods-category .category-list li:first-child .img-box{height:5.5rem}.goods-category .category-list li:first-child .category-name{line-height:1rem;font-size:0.55rem}.hot-category{margin:0.75rem 0 0;border-top:1px solid #e0e0e0}.hot-category .category-banner{height:4.95rem}.hot-category .category-banner img{display:block;width:100%;height:100%}.hot-category .category-list{background:#fff;border-top:1px solid #e0e0e0}.hot-category .category-list li{float:left;width:3.95rem;height:4.35rem;border-bottom:1px solid #e0e0e0;border-left:1px solid #e0e0e0}.hot-category .category-list li .img-box{width:100%;height:3.45rem;text-align:center;vertical-align:middle}.hot-category .category-list li .img-box img{max-width:100%;max-height:100%;vertical-align:middle}.home-header{height:2.2rem;line-height:2.2rem;background-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzMyMzIzMiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzQxNDE0MSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');background-size:100%;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #323232),color-stop(100%, #414141));background-image:-moz-linear-gradient(#323232,#414141);background-image:-webkit-linear-gradient(#323232,#414141);background-image:linear-gradient(#323232,#414141);position:relative}.home-header .iconfont{color:#fff}.home-header .nav-btn{position:absolute;left:0.8rem;top:0;bottom:0;z-index:2}.home-header .logo{display:block;margin:0 auto;width:5.2rem;height:2.175rem;background:url('../assets/img/yohologo02.png?1445849729') no-repeat center center;background-size:100%}.home-header .logo.animate{background:url('../assets/img/yohologo01.png?1445849729') no-repeat center center;background-size:100%}.home-header .search-btn{position:absolute;right:0.8rem;top:0;bottom:0}.home-header .search-btn a{color:#fff}.girls-wrap .home-header{background:#FF88AE}.kids-wrap .logo{font-style:italic;font-family:"helvetica","Arial","榛戜綋";font-weight:bold;color:#fff}.mobile-container{width:100%;overflow:hidden}.mobile-wrap{position:relative;z-index:2;background:#f0f0f0;-moz-transition:-moz-transform 0.3s;-o-transition:-o-transform 0.3s;-webkit-transition:-webkit-transform 0.3s;transition:transform 0.3s}.mobile-wrap.menu-open{-moz-transform:translateX(13.5rem);-ms-transform:translateX(13.5rem);-webkit-transform:translateX(13.5rem);transform:translateX(13.5rem);-moz-transition:-moz-transform 0.3s;-o-transition:-o-transform 0.3s;-webkit-transition:-webkit-transform 0.3s;transition:transform 0.3s}.overlay{display:none;position:absolute;top:0;left:0;right:0;bottom:0;background:#000;opacity:0.3;z-index:99}.overlay.show{display:block}.brand-page .newbrand-search{width:93.75%;height:30px;padding:7px 3.125%;background-color:#f8f8f8;left:0;z-index:10}.brand-page .newbrand-search .search-box{position:relative;height:30px;background-color:#FFF;border-radius:15px;padding:0 16px 0 26px}.brand-page .newbrand-search .search-box .search-input{width:100%;height:30px;border:0}.brand-page .newbrand-search .search-box .search-icon{position:absolute;font-size:12px;top:16px;left:24px}.brand-page .hot-brand{margin:0.75rem 0 0}.brand-page .hot-brand .hot-brand-list{background:#fff}.brand-page .hot-brand .hot-brand-list li{float:left;width:3.95rem;height:3.95rem}.brand-page .hot-brand .hot-brand-list li .img-box{width:100%;height:100%}.brand-page .brand-list{width:100%}.brand-page .brand-list .title-bar{width:100%;background:#eeeeee;color:#999999;font-weight:bold;position:relative}.brand-page .brand-list .title-bar h2{width:100%;height:25px;line-height:25px;font-size:17px;border-top:1px solid #e6e6e6;background-color:#f4f4f4}.brand-page .brand-list p{cursor:pointer;height:25px;padding-right:10px}.brand-page .brand-list p a{display:block;font-size:17px;border-bottom:1px solid #f3f3f3;border-top:1px solid #f9f9f9}.brand-page .brand-list p a i{position:relative;top:1px;color:#ff0000;padding-left:16px}.brand-page .right-bar{width:30px;top:120px !important;overflow:hidden;position:fixed;right:1px;border-radius:6px;background:rgba(0,0,0,0.8);z-index:2}.brand-page .right-bar b{height:16px;line-height:14px;text-align:center;display:block;color:#999999;font-weight:bold}.brand-page .con{padding-top:5px}.category-page{font-size:0.75rem}.category-page .search-input{position:relative;background-color:#f8f8f8;padding:0.325rem 0.5rem}.category-page .search-input p{box-sizing:border-box;width:100%;height:1.5rem;line-height:1.5rem;border:none;padding-left:1.325rem;border-radius:1.5rem;font-size:0.75rem;background:#fff;color:#999}.category-page .search-icon{position:absolute;top:0;bottom:0;left:1.075rem;line-height:2.15rem;color:#999}.category-page .category-nav{height:1.775rem;border-bottom:1px solid #e6e6e6}.category-page .category-nav li{display:block;box-sizing:border-box;float:left;height:100%;line-height:1.775rem;width:25%;text-align:center;border-right:1px solid #e6e6e6;color:#999}.category-page .category-nav li:last-child{border-right:none}.category-page .category-nav li.focus{color:#000}.category-page .content.hide{display:none}.category-page .primary-level{float:left;box-sizing:border-box;width:40%;background:#f8f8f8}.category-page .primary-level>li{height:1.725rem;line-height:1.725rem;padding-left:0.8rem}.category-page .primary-level>li.focus{background-color:#fff}.category-page .sub-level-container{float:left;box-sizing:border-box;padding-left:0.5rem;background:#fff;width:60%}.category-page .sub-level{width:100%}.category-page .sub-level.hide{display:none}.category-page .sub-level>li{height:1.775rem;line-height:1.775rem;border-bottom:1px solid #e6e6e6}.category-page .sub-level>li:last-child{border-bottom:none}.newarrival-page{background-color:#f0f0f0}.newarrival-page .swiper-container{width:100%;height:7.75rem}.newarrival-page .swiper-container img{height:100%;width:100%}.newarrival-page .swiper-container .swiper-pagination{bottom:0;left:0;width:100%}.newarrival-page .swiper-container .swiper-pagination-bullet-active{background:#fff}.newarrival-page .newarrival-nav{width:100%;height:1.5rem;padding:0.25rem 0;background-color:#fff}.newarrival-page .newarrival-nav-item{box-sizing:border-box;float:left;width:33.333333%;height:1.5rem;line-height:1.5rem;text-align:center;color:#ccc;border-right:1px solid #ccc}.newarrival-page .newarrival-nav-item.focus{color:#000}.newarrival-page .goods-list.hide{display:none}.discount-page{background-color:#f0f0f0}.discount-page .swiper-container{width:100%;height:7.75rem}.discount-page .swiper-container img{height:100%;width:100%}.discount-page .swiper-container .swiper-pagination{bottom:0;left:0;width:100%}.discount-page .swiper-container .swiper-pagination-bullet-active{background:#fff}.discount-page .discount-nav{width:100%;height:1.5rem;padding:0.25rem 0;background-color:#fff}.discount-page .discount-nav-item{box-sizing:border-box;float:left;width:25%;height:1.5rem;line-height:1.5rem;text-align:center;color:#ccc;border-right:1px solid #ccc}.discount-page .discount-nav-item.focus{color:#000}.discount-page .goods-list.hide{display:none}.good-list-page .search-input{position:relative;padding:7px 46px 7px 15px;background:#f8f8f8}.good-list-page .search-input .search-icon{position:absolute;font-size:12px;top:16px;left:24px}.good-list-page .search-input input{height:30px;width:100%;border-radius:15px;text-indent:26px;background:#fff;border:none}.good-list-page .search-input .clear-input{position:absolute;top:12px;right:50px}.good-list-page .search-input .search{position:absolute;top:12px;right:0;border:none;background:transparent;font-size:16px}.good-list-page .brand-way{padding-bottom:10px;background:#f4f4f4}.good-list-page .brand-way>a{display:block;height:40px;line-height:40px;padding:0 10px;border-bottom:1px solid #e6e6e6;border-top:1px solid #e6e6e6;font-size:17px;background:#fff}.good-list-page .brand-way .brand-thumb{display:block;float:left;width:75px;height:40px;margin:0}.good-list-page .brand-way .entry{color:#999;font-size:14px;float:right}.good-list-page .brand-header{position:relative;height:3.75rem}.good-list-page .brand-header>img{display:block;height:100%}.good-list-page .btn-intro,.good-list-page .btn-col{position:absolute;display:block;width:62px;height:24px;line-height:24px;text-align:center;border:1px solid #fff;color:#fff;top:50%;margin-top:-12px}.good-list-page .btn-intro{right:90px}.good-list-page .btn-col{right:15px}.good-list-page .btn-col .iconfont{font-size:12px}.good-list-page .brand-intro-box{position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.3);padding:44px 0;z-index:1;overflow:auto}.good-list-page .brand-intro-box .brand-intro{position:relative;box-sizing:border-box;width:85%;margin:0 7.5%;background:#fff;padding:10px 8%}.good-list-page .brand-intro-box h2{text-align:center;font-size:17px;line-height:40px}.good-list-page .brand-intro-box .con{font-size:12px;line-height:16px;padding:20px 0;border-top:1px solid #e6e6e6;border-bottom:1px solid #e6e6e6;overflow-x:hidden}.good-list-page .brand-intro-box .fo{font-size:18px;height:40px;line-height:40px;text-align:center}.good-list-page .brand-intro-box .close-intro{position:absolute;top:6px;right:6px}.good-list-page .list-nav>li{float:left;width:25%;height:33px;line-height:33px;text-align:center;font-size:14px}.good-list-page .list-nav a{display:block;box-sizing:border-box;width:100%;height:100%;color:#999}.good-list-page .list-nav .active>a{border-bottom:2px solid #000;color:#000}.good-list-page .list-nav .active>a .iconfont{color:#999}.good-list-page .list-nav .active>a .iconfont.cur{color:#000}.good-list-page .list-nav .new .iconfont{-moz-transform:scale(0.8, 0.8);-ms-transform:scale(0.8, 0.8);-webkit-transform:scale(0.8, 0.8);transform:scale(0.8, 0.8);font-weight:bold}.good-list-page .list-nav .filter .iconfont{font-size:12px;-moz-transition:-moz-transform ease-in;-o-transition:-o-transform ease-in;-webkit-transition:-webkit-transform ease-in;transition:transform ease-in}.good-list-page .list-nav .filter.active .iconfont{-moz-transform:rotate(-180deg);-ms-transform:rotate(-180deg);-webkit-transform:rotate(-180deg);transform:rotate(-180deg)}.good-list-page .list-nav .icon{position:relative}.good-list-page .list-nav .icon i{position:absolute;-moz-transform:scale(0.8, 0.8);-ms-transform:scale(0.8, 0.8);-webkit-transform:scale(0.8, 0.8);transform:scale(0.8, 0.8);font-weight:bold}.good-list-page .list-nav .icon .up{top:-11px}.good-list-page .list-nav .icon .down{top:-4px}.good-list-page .no-result{text-align:center;vertical-align:middle;color:#ccc;font-size:1.2em;margin-top:220px}.good-list-page .goods-container{position:relative;min-height:440px}.good-detail-page .banner-top{height:16.5rem;overflow:hidden;position:relative}.good-detail-page .banner-top .swiper-pagination{position:absolute;left:0;right:0;bottom:1rem;text-align:center}.good-detail-page .banner-top .swiper-pagination .pagination-inner{display:inline-block}.good-detail-page .banner-top .swiper-pagination .pagination-inner span{display:inline-block;width:0.35rem;height:0.35rem;background:#fff;opacity:0.5;margin:0 0.225rem;border-radius:50%}.good-detail-page .banner-top .swiper-pagination .pagination-inner span.swiper-active-switch{opacity:1}.good-detail-page .banner-top .swiper-pagination .pagination-inner .swiper-pagination-bullet-active{background-color:#000000}.good-detail-page .banner-swiper{height:15rem;width:11.2rem;margin:0.75rem 2.4rem;position:relative;overflow:hidden}.good-detail-page .banner-swiper ul{position:relative;height:100%}.good-detail-page .banner-swiper ul li{float:left;height:100%}.good-detail-page .detailName{font-size:0.7rem;color:#222222;padding-bottom:6px;text-align:center}.good-detail-page .detailTitle{font-size:0.9rem;text-align:center;padding-bottom:2px;font-weight:bold}.good-detail-page .vipLevel{color:#999999;text-align:center;padding-bottom:15px}.good-detail-page .detailToBuy{padding:0 10px;margin-bottom:20px;text-align:center;overflow:hidden}.good-detail-page .detailToBuy .AddFavorite{background-color:#cccccc;width:2.75rem;height:2.5rem;line-height:2.5rem;font-size:1.7em;color:white;margin-right:0.5rem;overflow:hidden;float:left !important}.good-detail-page .detailToBuy .toBuyNow{height:50px;line-height:50px;color:white;display:block;margin-left:2.4em;font-size:1.84em;overflow:hidden;font-weight:bold;background-color:#ed0010}.good-detail-page .discountNotice{margin-bottom:20px}.good-detail-page .discountNotice p{height:44px;line-height:44px;padding:0 10px;margin-bottom:1px;font-size:12px;background-color:#eeeeee}.good-detail-page .detailToShop{margin:0 10px 20px;padding:10px;height:47px;line-height:47px;overflow:hidden;background-color:#eee}.good-detail-page .detailToShop .fz14{font-size:1.2em;float:right !important}.good-detail-page .detailSize{padding:0 10px;margin-bottom:20px}.good-detail-page .detailSize h3{text-align:center;font-size:1.3em;margin-bottom:5px}.good-detail-page .detailSize h3 span{font-size:0.6em;display:block;text-transform:uppercase}.good-detail-page .detailSize table{background-color:white;width:100%}.good-detail-page .detailSize td{text-align:left;padding:0.4em 0.8em;border:1px solid white;background-color:#eee;font-size:1em}.good-detail-page .detail-img{padding:0 10px;margin-bottom:10px}.index-page{width:100%;overflow:hidden;margin:0 auto}.index-page .index-container{position:relative;-moz-transition:-moz-transform 0.5s;-o-transition:-o-transform 0.5s;-webkit-transition:-webkit-transform 0.5s;transition:transform 0.5s;background-color:white}.index-page .index-container .index_header{height:2rem;line-height:2rem;overflow:hidden;padding:0 0.25rem}.index-page .index-container .index-channel{color:#FFF;text-align:center;position:relative;background-color:#000000}.index-page .index-container .index-channel .index-channel-list{padding-top:50%;width:100%;position:absolute;top:0}.index-page .index-container .index-channel .index-channel-list .homestyle{margin-bottom:1.25rem;width:7.1825rem}.search-page .search-input{position:relative;padding:7px 46px 7px 15px;background:#f8f8f8}.search-page .search-input .search-icon{position:absolute;font-size:12px;top:16px;left:24px}.search-page .search-input input{height:30px;width:100%;border-radius:15px;text-indent:26px;background:#fff;border:none}.search-page .search-input .clear-input{position:absolute;top:12px;right:50px}.search-page .search-input .search{position:absolute;top:12px;right:0;border:none;background:transparent;font-size:16px}.search-page .search-items{padding:20px 10px}.search-page .search-items h3{font-size:12px;margin-bottom:10px}.search-page .search-items li{float:left;height:34px;line-height:34px;font-size:14px;height:34px;line-height:34px;margin-right:10px;margin-bottom:10px;padding:0 10px;background:#f8f8f8;color:#000}.search-page .search-items .clear-history{height:32px;line-height:32px;border:1px solid #e6e6e6;background:#fff;font-size:14px}.shopping-cart-good{position:relative;padding-left:0.4rem}.shopping-cart-good .checkbox{position:absolute;top:50%;margin-top:-0.35rem;font-size:0.7rem;color:#f0f0f0}.shopping-cart-good .checkbox.icon-cb-checked{color:#000}.shopping-cart-good .info{float:left;margin-left:1.25rem;padding:0.4rem 0;border-bottom:1px solid #e0e0e0}.shopping-cart-good .thumb{float:left;width:3rem;height:4rem}.shopping-cart-good .deps{margin-left:3.375rem;padding-right:0.5rem}.shopping-cart-good .name{font-size:0.7rem}.shopping-cart-good .row:nth-child(2){font-size:0.55rem;height:1.125rem;line-height:1.125rem}.shopping-cart-good .row:nth-child(2)>span{margin-right:0.375rem}.shopping-cart-good .row:nth-child(3){position:relative}.shopping-cart-good .color,.shopping-cart-good .size{color:#b6b6b6}.shopping-cart-good .appear-date{color:#e01}.shopping-cart-good .price{font-size:0.6rem;color:#000}.shopping-cart-good .count{font-size:0.5rem;color:#999;margin-left:0.55rem}.shopping-cart-good .sold-out,.shopping-cart-good .low-stocks{display:inline-block;width:2.5rem;height:0.75rem;line-height:0.75rem;font-size:0.55rem;border:none;color:#fff;text-align:center;margin-left:0.4rem}.shopping-cart-good .sold-out{background:#999}.shopping-cart-good .low-stocks{background:#e01}.shopping-cart-good .icon-del,.shopping-cart-good .icon-edit{position:absolute;color:#ccc;font-size:0.75rem}.shopping-cart-good .icon-del{right:0.35rem}.shopping-cart-good .icon-edit{right:1.8rem}.shopping-cart-good .opt-panel{position:absolute;width:5.5rem;height:4.75rem;right:0;color:#fff}.shopping-cart-good .opt-panel>div{float:left;box-sizing:border-box;width:2.75rem;height:100%;text-align:center;padding:1rem 0.5rem 0;font-size:15px}.shopping-cart-good .opt-panel span{display:block}.shopping-cart-good .opt-panel .put-in-favorite{background:#bbb}.shopping-cart-good .opt-panel .del{background:#999}.shopping-cart-good .opt-panel .del .iconfont{margin-bottom:0.5rem}.chose-panel{position:absolute;top:0;bottom:0;left:0;right:0;background:rgba(0,0,0,0.3)}.chose-panel .main{position:absolute;height:15.25rem;bottom:0;left:0;right:0;background:#fff}.chose-panel .infos{height:11.5rem;padding:0 0.55rem;padding-top:0.75rem}.chose-panel .chose-items{height:8.125rem;overflow:auto}.chose-panel .basic-info{margin-bottom:0.75rem}.chose-panel .thumb{float:left;width:2rem;height:2.65rem}.chose-panel .text-info{margin-left:2.55rem}.chose-panel .text-info .name{font-size:0.7rem}.chose-panel .text-info .sale-price{color:#e10}.chose-panel .text-info .sale-price.no-price{color:#000}.chose-panel .text-info .market-price{color:#b0b0b0;text-decoration:line-through}.chose-panel .color-list,.chose-panel .size-list,.chose-panel .num{position:relative;font-size:0.7rem;padding-left:2rem}.chose-panel .color-list>span,.chose-panel .size-list>span,.chose-panel .num>span{position:absolute;left:0;top:0.5rem}.chose-panel .block{float:left;display:block;width:2rem;height:2rem;border:1px solid #000;margin-right:0.75rem;margin-bottom:0.75rem;line-height:2rem;text-align:center}.chose-panel .block.chosed{border-color:#e10;background:url('../assets/img/shopping-cart/right.png?1445849729') no-repeat;background-size:0.95rem;background-position:bottom right;color:#e10}.chose-panel .num{margin-bottom:0.5rem}.chose-panel .num .btn{float:left;display:block;height:2rem;width:2rem;text-align:center;line-height:2rem;border:1px solid #e6e6e6}.chose-panel .num .btn.disable{color:#e6e6e6}.chose-panel .good-num{float:left;width:2.65rem;height:2rem;line-height:2rem;padding:0;border:none;border-top:1px solid #e6e6e6;border-bottom:1px solid #e6e6e6;text-align:center}.chose-panel .btn-wrap{height:3rem;border-top:1px solid #e6e6e6;padding:0.5rem;text-align:center;box-sizing:border-box}.chose-panel .btn-wrap .btn-sure{width:6.5rem;height:2rem;background:#e10;color:#fff;font-size:0.8rem;border:none}.gift-advance-page .gift-advance-good{position:relative;padding:0.5rem 0;margin-left:0.85rem;height:4rem;border-bottom:1px solid #e0e0e0}.gift-advance-page .gift-advance-good:last-child{border-bottom:none}.gift-advance-page .advance-block .gift-advance-good:last-child{border-bottom:none}.gift-advance-page .advance-block:last-child .gift-advance-good:last-child{border-bottom:1px solid #e0e0e0}.gift-advance-page .thumb-wrap{position:relative;float:left;width:3rem;height:4rem}.gift-advance-page .thumb-wrap .thumb{width:100%;height:100%}.gift-advance-page .tag{position:absolute;bottom:0;left:0;right:0;height:0.625rem;color:#fff;text-align:center;background:#a1ce4e}.gift-advance-page .tag:before{content:'赠品'}.gift-advance-page .deps{margin-left:3.375rem}.gift-advance-page .name{font-size:0.7rem}.gift-advance-page .row:nth-child(2){font-size:0.55rem;height:1.125rem;line-height:1.125rem}.gift-advance-page .row:nth-child(2)>span{margin-right:0.375rem}.gift-advance-page .row:nth-child(3){position:relative}.gift-advance-page .color,.gift-advance-page .size{color:#b6b6b6}.gift-advance-page .price{font-size:0.6rem;color:#000}.gift-advance-page .count{font-size:0.5rem;color:#999;margin-left:0.55rem}.gift-advance-page .chose{position:absolute;width:2.2rem;height:1.45rem;background:#f8f8f8;border:1px solid #ccc;right:0.5rem;top:1.775rem;font-size:0.65rem}.gift-advance-page .title{height:1.25rem;line-height:1.25rem;padding-left:0.5rem;font-size:0.6rem;background:#f8f8f8}.gift-advance-page .advance-block .tag{background:#eb76aa}.gift-advance-page .advance-block .tag:before{content:'加价购'}.icon-checkbox:before{content:"\e61c"}.icon-cb-checked:before{content:"\e61d"}.shopping-cart-page{padding-bottom:3rem}.shopping-cart-page .cart-nav{height:0.75rem;color:#c6c6c6;border-bottom:1px solid #e0e0e0;padding:0.75rem 0}.shopping-cart-page .cart-nav li{float:left;width:50%}.shopping-cart-page .cart-nav li.active{color:#000}.shopping-cart-page .cart-nav span{display:block;box-sizing:border-box;width:100%;height:0.75rem;line-height:0.75rem;font-size:0.75rem;text-align:center}.shopping-cart-page .cart-nav li:first-child span{border-right:1px solid #e0e0e0}.shopping-cart-page .login-info{height:1.15rem;padding:0.425rem 0.5rem;color:#24acaa;text-align:center;font-size:0.7rem}.shopping-cart-page .login-info .btn{display:inline-block;background:#ed0010;color:#fff;width:2rem;height:1.15rem;line-height:1.15rem}.shopping-cart-page .presell-info{height:1.5rem;padding:0.375rem 0.75rem;font-size:0.55rem;background:#f0f0f0;color:#b7b7b7}.shopping-cart-page .presell-info>span{display:block}.shopping-cart-page .presell-info .iconfont{float:left;font-size:1.125rem}.shopping-cart-page .presell-info .txt{height:0.75rem;line-height:0.75rem;margin-left:2rem}.shopping-cart-page .cart-goods{border-bottom:1px solid #e0e0e0}.shopping-cart-page .cart-goods .shopping-cart-good:last-child .info{border-bottom:none}.shopping-cart-page .freebie-and-advance-buy{padding:0.5rem;font-size:0.6rem;border-bottom:1px solid #e0e0e0}.shopping-cart-page .freebie-and-advance-buy>li{box-sizing:border-box;height:2.25rem;line-height:2.25rem;margin-bottom:0.25rem;background:#f8f8f8;padding:0 0.5rem}.shopping-cart-page .freebie-and-advance-buy>li:last-child{margin-bottom:0}.shopping-cart-page .freebie-and-advance-buy>li a{float:right}.shopping-cart-page .freebie-and-advance-buy .count{color:#f00}.shopping-cart-page .freebie-and-advance-buy .icon-right-arrow{color:#8f8f8f}.shopping-cart-page .price-compute{padding:0.5rem;border-bottom:1px solid #e0e0e0;font-size:0.65rem}.shopping-cart-page .price-compute .title{display:inline-block;width:4.375rem}.shopping-cart-page .price-compute .minus{float:right}.shopping-cart-page .balance{position:fixed;box-sizing:border-box;bottom:0;width:100%;padding:0.5rem;height:3rem;border-top:1px solid #e0e0e0;background:#fff}.shopping-cart-page .balance .iconfont{position:absolute;top:50%;margin-top:-0.35rem;font-size:0.7rem}.shopping-cart-page .balance p{float:left;margin-left:1.25rem;font-size:0.65rem}.shopping-cart-page .balance p span{display:block;height:1rem;line-height:1rem}.shopping-cart-page .balance p .tip{color:#666;font-size:0.55rem}.shopping-cart-page .balance .btn-balance{float:right;width:3.5rem;height:2rem;line-height:2rem;text-align:center;background:#e01;color:#fff;border:none;font-size:0.7rem} |
static/dist/myohobuy/0.0.1/index.js
deleted
100644 → 0
1 | -define("index",["zepto","lazyload","swiper","mlellipsis","iscroll-probe","index"],function(e,a,s){var t;e("js/common"),e("js/passport/index"),e("js/guang/index"),e("js/home/index"),e("js/product/index"),e("js/index/index"),s.exports=t}),define("js/common",["zepto"],function(e,a,s){function t(e){var a,s,t=document.cookie;return document.cookie&&""!==document.cookie&&(s=t.indexOf(e+"="),s>-1&&(s+=e.length+1,a=decodeURIComponent(l.trim(t.substring(s,t.indexOf(";",s)))))),a}function i(){var e,a=t("_UID");return"undefined"==typeof a?0:(e=a.split("::"),"undefined"==typeof e||e.length<4?0:e)}function o(){var e=i();return 0===e?0:e[1]}function n(){var e=t("_g");return"undefined"==typeof e?"":JSON.parse(e).k}var l=e("zepto");!function(){var e=l("#yoho-footer"),a=e.children(".op-row"),s=i();l("body").height()<l(window).height()&&e.addClass("bottom"),0===s?a.prepend('<a href="http://m.yohobuy.com/signin.html">登录</a><span class="sep-line">|</span><a href="http://m.yohobuy.com/reg.html">注册</a>'):a.prepend('Hi,<a class="user-name" href="http://m.yohobuy.com/home?tmp='+Math.random()+'">'+s[0]+'</a><a href="http://m.yohobuy.com/passport/signout/index?token='+s[3]+'">退出</a>'),e.removeClass("hide")}(),window.cookie=t,window.getUser=i,window.getUid=o,window.getShoppingKey=n}),define("js/passport/index",["zepto"],function(e,a,s){e("js/passport/register/register"),e("js/passport/register/code"),e("js/passport/register/password"),e("js/passport/login/login"),e("js/passport/login/international"),e("js/passport/back/mobile"),e("js/passport/back/code"),e("js/passport/back/email"),e("js/passport/back/email-success"),e("js/passport/back/new-password")}),define("js/passport/register/register",["zepto"],function(e,a,s){var t=e("zepto"),i=t("#phone-num"),o=t("#country-select"),n=t("#area-code"),l=t("#btn-next"),r=e("js/passport/api"),d=e("js/plugin/tip"),c=t.trim,p=d.show;r.selectCssHack(t("#country-select")),r.bindClearEvt(),i.bind("input",function(){""===c(i.val())?l.addClass("disable"):l.removeClass("disable")}),o.change(function(){n.text(o.val())}),l.on("touchstart",function(){var e=c(i.val()),a=o.val();l.hasClass("disable")||(r.phoneRegx[a].test(e)?t.ajax({url:"/passport/reg/verifymobile",type:"POST",data:{areaCode:a.replace("+",""),phoneNum:e},success:function(e){200===e.code?location.href=e.data:p(e.message)}}):p("手机号格式不正确,请重新输入"))})}),define("js/passport/api",["zepto"],function(e,a,s){function t(){var e,a=l(".has-eye");a.append('<div class="eye close"></div>'),e=a.children(".eye"),e.on("touchstart",function(e){var a=l(this),s=a.siblings(".pwd");e.preventDefault(),a.toggleClass("close"),a.hasClass("close")?s.attr("type","password"):s.attr("type","text"),s.focus()})}function i(){var e,a=l(".has-clear");a.append('<div class="clear-input"></div>'),e=a.children(".clear-input"),e.on("touchstart",function(a){var s=e.siblings(".input");s.val("").trigger("input").focus(),a.preventDefault()}),a.children(".input").bind("input",function(){var e=l(this),a=e.siblings(".clear-input"),s=r(e.val());""===s?a.hide():a.show()})}function o(e){return e.length>=6&&e.length<=20?!0:!1}function n(e){function a(){var a=e.find("option:selected").text().length;switch(a){case 2:e.outerWidth(90);break;case 3:e.outerWidth(110);break;default:e.outerWidth(130)}}var s=navigator.userAgent;s.match(/uc/i)&&s.match(/android/i)?e.change(function(){a()}):e.removeClass("in-android-uc")}var l=e("zepto"),r=l.trim,d=/^([a-zA-Z0-9]+[_|\_|\.|-]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.|-]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/,c={"+86":/^1[35847]{1}[0-9]{9}$/,"+852":/^[965]{1}[0-9]{7}$/,"+853":/^[0-9]{8}$/,"+886":/^[0-9]{10}$/,"+65":/^[98]{1}[0-9]{7}$/,"+60":/^1[1234679]{1}[0-9]{8}$/,"+1":/^[0-9]{10}$/,"+82":/^01[0-9]{9}$/,"+44":/^7[789][0-9]{8}$/,"+81":/^0[9|8|7][0-9]{9}$/,"+61":/^[0-9]{11}$/};s.exports={emailRegx:d,phoneRegx:c,bindEyesEvt:t,bindClearEvt:i,pwdValidate:o,selectCssHack:n}}),define("js/plugin/tip",["zepto"],function(e,a,s){function t(e,a){var s,t;"undefined"!=typeof e&&(s=e.toString(),t=a&&a>0?a:2e3,i.text(s).show(),o=setTimeout(function(){"block"===i.css("display")&&i.hide()},t))}var i,o,n=e("zepto");!function(){var e='<div id="yoho-tip" class="yoho-tip"></div>';n(".yoho-page").append(e),i=n("#yoho-tip"),i.on("touchstart",function(){i.hide(),clearTimeout(o)})}(),a.show=t}),define("js/passport/register/code",["zepto"],function(e,a,s){e("js/passport/code")(!0)}),define("js/passport/code",["zepto"],function(e,a,s){var t=e("zepto");s.exports=function(a){function s(){var e,a=59;e=setInterval(function(){0===a?(n.text("重发验证码").removeClass("disable"),clearInterval(e)):n.text("重发验证码 ("+a--+"秒)")},1e3)}var i=t("#captcha"),o=t("#btn-next"),n=t("#captcha-tip"),l=t("#phone-num").val(),r=t("#area-code").val().replace("+",""),d=e("js/passport/api"),c=e("js/plugin/tip"),p=t.trim,u=c.show,h=a?"reg":"back";d.bindClearEvt(),i.bind("input",function(){""!==p(i.val())?o.removeClass("disable"):o.addClass("disable")}),n.on("touchstart",function(){n.hasClass("disable")||t.ajax({type:"POST",url:"/passport/"+h+"/sendcode",data:{phoneNum:l,areaCode:r},success:function(e){200===e.code?(n.text("重发验证码 (60秒)").addClass("disable"),s()):u(e.message)}})}),o.on("touchstart",function(){o.hasClass("disable")||t.ajax({type:"POST",url:"/passport/"+h+"/verifycode",data:{phoneNum:l,areaCode:r,code:p(i.val()),token:t("#token").val()},success:function(e){200===e.code?location.href=e.data:u(e.message)}})}),s()}}),define("js/passport/register/password",["zepto"],function(e,a,s){var t=e("zepto"),i=t("#pwd"),o=t("#btn-sure"),n=e("js/passport/api"),l=e("js/plugin/tip"),r=t.trim,d=l.show;n.bindEyesEvt(),i.bind("input",function(){""===r(i.val())?o.addClass("disable"):o.removeClass("disable")}),o.on("touchstart",function(){var e=r(i.val());o.hasClass("disable")||(n.pwdValidate(e)===!1?d("密码6-20位,请重新输入"):t.ajax({type:"POST",url:"/passport/reg/setpassword",data:{password:e,phoneNum:t("#phone-num").val(),areaCode:t("#area-code").val(),token:t("#token").val()},success:function(e){200===e.code?(d("注册成功"),setTimeout(function(){location.href=e.data},1e3)):401===e.code||404===e.code||505===e.code?d(e.message):(d(e.message),setTimeout(function(){location.href=e.data},1e3))}}))})}),define("js/passport/login/login",["zepto"],function(e,a,s){function t(){u&&h?d.removeClass("disable"):d.addClass("disable")}function i(){c.show(),p.show()}function o(){c.hide(),p.hide()}var n=e("zepto"),l=n("#account"),r=n("#pwd"),d=n("#btn-login"),c=n("#retrive-pwd-mask"),p=n("#retrive-pwd-ways"),u=!1,h=!1,f=e("js/passport/api"),g=e("js/plugin/tip"),m=n.trim,v=g.show;f.bindEyesEvt(),f.bindClearEvt(),l.bind("input",function(){u=""!==m(l.val())?!0:!1,t()}),r.bind("input",function(){h=""===m(r.val())?!1:!0,t()}),d.on("touchstart",function(){var e=m(l.val()),a=m(r.val());d.hasClass("disable")||((/^[0-9]+$/.test(e)||f.emailRegx.test(e))&&f.pwdValidate(a)?n.ajax({type:"POST",url:"/passport/login/auth",data:{account:e,password:a},success:function(e){200===e.code?(v("登录成功"),setTimeout(function(){location.href=e.data},1e3)):v(e.message)},error:function(){v("网络断开连接啦~")}}):v("账号或密码有错误,请重新输入"))}),n("#forget-pwd").on("touchstart",function(){i()}),c.on("touchstart",function(){o()}),n("#cancel-retrive").on("touchstart",function(e){e.preventDefault(),o()}),l.trigger("input"),r.trigger("input")}),define("js/passport/login/international",["zepto"],function(e,a,s){function t(){c&&p?d.removeClass("disable"):d.addClass("disable")}var i=e("zepto"),o=i("#phone-num"),n=i("#country-select"),l=i("#area-code"),r=i("#pwd"),d=i("#btn-login"),c=!1,p=!1,u=e("js/passport/api"),h=e("js/plugin/tip"),f=i.trim,g=h.show;u.selectCssHack(n),u.bindEyesEvt(),u.bindClearEvt(),o.bind("input",function(){c=""===f(o.val())?!1:!0,t()}),r.bind("input",function(){var e=f(r.val());p=""===e?!1:!0,t()}),n.change(function(){l.text(n.val())}),d.on("touchstart",function(){var e=f(o.val()),a=n.val(),s=f(r.val());d.hasClass("disable")||(u.phoneRegx[a].test(e)&&u.pwdValidate(s)?i.ajax({type:"POST",url:"/passport/login/auth",data:{areaCode:a.replace("+",""),account:e,password:s},success:function(e){200===e.code?(g("登录成功"),setTimeout(function(){location.href=e.data},1e3)):g(e.message)},error:function(){g("网络断开连接啦~")}}):g("账号或密码有错误,请重新输入"))}),o.trigger("input"),r.trigger("input")}),define("js/passport/back/mobile",["zepto"],function(e,a,s){var t=e("zepto"),i=t("#phone-num"),o=t("#country-select"),n=t("#area-code"),l=t("#btn-next"),r=e("js/passport/api"),d=e("js/plugin/tip"),c=t.trim,p=d.show;r.selectCssHack(t("#country-select")),r.bindClearEvt(),i.bind("input",function(){""===c(i.val())?l.addClass("disable"):l.removeClass("disable")}),o.change(function(){n.text(o.val())}),l.on("touchstart",function(){var e=c(i.val()),a=o.val();l.hasClass("disable")||(r.phoneRegx[a].test(e)?t.ajax({url:"/passport/back/sendcode",type:"POST",data:{areaCode:a.replace("+",""),phoneNum:e},success:function(e){200===e.code?location.href=e.data:p(e.message)}}):p("手机号格式不正确,请重新输入"))})}),define("js/passport/back/code",["zepto"],function(e,a,s){e("js/passport/code")(!1)}),define("js/passport/back/email",["zepto"],function(e,a,s){var t=e("zepto"),i=t("#email"),o=t("#btn-sure"),n=e("js/passport/api"),l=e("js/plugin/tip"),r=t.trim,d=l.show;n.bindClearEvt(),i.bind("input",function(){""===r(i.val())?o.addClass("disable"):o.removeClass("disable")}),o.on("touchstart",function(){var e=r(i.val());o.hasClass("disable")||(n.emailRegx.test(e)?t.ajax({url:"/passport/back/sendemail",type:"POST",data:{email:e},success:function(e){200===e.code?location.href=e.data:d(e.message)}}):d("邮箱格式不正确,请重新输入"))})}),define("js/passport/back/email-success",["zepto"],function(e,a,s){var t=e("zepto"),i=t("#resend"),o=e("js/plugin/tip"),n=o.show;i.on("touchstart",function(e){e.preventDefault(),t.ajax({url:i.data("url"),type:"GET",success:function(e){n(200===e.code?e.message:e.message)}})})}),define("js/passport/back/new-password",["zepto"],function(e,a,s){var t=e("zepto"),i=t("#pwd"),o=t("#btn-ok"),n=e("js/passport/api"),l=e("js/plugin/tip"),r=t.trim,d=l.show,c=t("#phone-num");n.bindEyesEvt(),i.bind("input",function(){""===r(i.val())?o.addClass("disable"):o.removeClass("disable")}),o.on("touchstart",function(){var e,a,s=r(i.val()),l=!0;o.hasClass("disable")||(e={password:s},0===c.length&&(l=!1),l?(t.extend(e,{phoneNum:c.val(),areaCode:t("#areaCode").val(),token:t("#token").val()}),a="/passport/back/passwordByMobile"):(t.extend(e,{code:t("#email-code").val()}),a="/passport/back/passwordByEmail"),n.pwdValidate(s)?t.ajax({type:"POST",url:a,data:e,success:function(e){200===e.code?(d("密码修改成功"),setTimeout(function(){location.href=e.data},1e3)):d(e.message)}}):d("密码6-20位,请重新输入"))})}),define("js/guang/index",["zepto","lazyload","swiper","mlellipsis","iscroll-probe","index"],function(e,a,s){e("js/guang/plus-star/list"),e("js/guang/plus-star/detail"),e("js/guang/home"),e("js/guang/list"),e("js/guang/detail")}),define("js/guang/plus-star/list",["zepto","lazyload","swiper","index"],function(e,a,s){var t,i=e("zepto"),o=e("lazyload"),n=e("swiper"),l=i("#nav-tab > li"),r=i("#ps-content > .content");o(i("img.lazy")),t=new n(".swiper-container",{lazyLoading:!0,pagination:".swiper-pagination"}),i("#nav-tab").delegate("li","touchstart",function(){i(this).hasClass("focus")||(l.toggleClass("focus"),r.toggleClass("hide"),i(document).trigger("scroll"))})}),define("js/guang/plus-star/detail",["zepto","mlellipsis","lazyload"],function(e,a,s){var t,i,o=e("zepto"),n=e("mlellipsis"),l=e("lazyload"),r=o("#intro"),d=o("#intro-more-txt"),c=o("#related-infos-container"),p=e("js/guang/info"),u=e("js/plugin/tip"),h=o("#brand-info").data("id");n.init(),l(o("img.lazy")),r[0].mlellipsis(3),setTimeout(function(){t=r.text(),i=r.attr("title")}),p.initInfosEvt(c),o("#more-intro").bind("touchstart",function(){var e=o(this);e.toggleClass("spread"),e.hasClass("spread")?(r.text(i),d.text("收起")):(r.text(t),d.text("more"))}),o("#brand-like").bind("touchstart",function(e){var a="ok",s=o(this);e.preventDefault(),s.hasClass("like")&&(a="cancel"),o.ajax({type:"POST",url:"/guang/opt/favoriteBrand",data:{id:h,opt:a},success:function(e){200===e.code?s.toggleClass("like"):400===e.code&&u.show("未登录")},error:function(){u.show("网络断开连接了~")}})})}),define("js/guang/info",["zepto","mlellipsis","lazyload"],function(e,a,s){function t(e){r(e.find("img.lazy")),e.each(function(){var e=n(this),a=e.find(".info-title"),s=e.find(".info-text");a[0].mlellipsis(2),s[0].mlellipsis(2)})}function i(e){e.delegate(".like-btn","touchstart",function(e){var a=n(e.currentTarget),s=a.closest(".guang-info"),t="ok";a.hasClass("like")&&(t="cancel"),n.ajax({type:"POST",url:"/guang/opt/praiseArticle",data:{id:s.data("id"),opt:t},success:function(e){var s=e.code;200===s&&(a.next(".like-count").text(e.data),a.toggleClass("like"))},error:function(){d.show("网络断开连接了~")}})}),t(e.find(".guang-info"))}function o(e,a){h||a.end||(h=!0,n.ajax({type:"GET",url:" /guang/list/page",data:a,success:function(s){return" "===s?(a.end=!0,h=!1,p.addClass("hide"),void u.removeClass("hide")):(e.append(s),t(e.find(".guang-info")),a.page++,void(h=!1))},error:function(){d.show("网络断开连接了~"),h=!1}}))}var n=e("zepto"),l=e("mlellipsis"),r=e("lazyload"),d=e("js/plugin/tip"),c=n("#load-more-info"),p=n(""),u=n(""),h=!1;l.init(),c.length>0&&(p=c.children(".loading"),u=c.children(".no-more")),a.initInfosEvt=i,a.setLazyLoadAndMellipsis=t,a.loadMore=o}),define("js/guang/home",["zepto","swiper","mlellipsis","lazyload","index"],function(e,a,s){var t,i=e("zepto"),o=e("swiper"),n=e("js/guang/info"),l=n.setLazyLoadAndMellipsis,r=n.loadMore,d=i("#load-more-info"),c=i(""),p=i(""),u=i(window).height(),h=d.height(),f=i("#info-list"),g=f.children(".info-list"),m=i("#guang-nav"),v=m.children(".focus"),w=v.data("type"),b={};d.length>0&&(c=d.children(".loading"),p=d.children(".no-more")),t=new o(".swiper-container",{lazyLoading:!0,pagination:".swiper-pagination"}),n.initInfosEvt(f),function(){var e=i("#gender").val();m.children(".guang-nav-item").each(function(){var a=i(this).data("type");b[a]={page:1,gender:e,type:a,end:!1}})}(),m.delegate(".guang-nav-item","touchstart",function(){var e,a,s=i(this);s.hasClass("focus")||(a=s.index(),s.addClass("focus"),v.removeClass("focus"),g.not(".hide").addClass("hide"),e=g.eq(a),e.removeClass("hide"),l(e.children(".guang-info")),v=s,w=s.data("type"),b[w].end?(c.addClass("hide"),p.removeClass("hide")):(c.removeClass("hide"),p.addClass("hide")))}),i(document).scroll(function(){i(window).scrollTop()+u>=i(document).height()-h&&r(g,b[w])})}),define("js/guang/list",["zepto","mlellipsis","lazyload"],function(e,a,s){var t=e("zepto"),i=e("js/guang/info"),o=i.loadMore,n=t(window).height(),l=t("#load-more").height(),r=t("#author-infos"),d=t("#tag"),c={page:1,end:!1},p=t("#info-list");i.initInfosEvt(p),r.length>0&&t.extend(c,{authorId:r.data("id")}),d.length>0&&t.extend(c,{tag:d.val()}),t(document).scroll(function(){t(window).scrollTop()+n>=t(document).height()-l&&o(p,c)})}),define("js/guang/detail",["zepto","mlellipsis","lazyload","iscroll-probe"],function(e,a,s){function t(e){var a=e.offset().left,s=-C+a+w/2+"px";n.css({backgroundPosition:s+" bottom"}),m&&b.css({backgroundPosition:s+" bottom"})}function i(e){var a,s,i,u=p(e.currentTarget),f=u.index();u.hasClass("focus")||(l.filter(".focus").removeClass("focus"),m&&(a=u.closest(".fixed-thumb-container").length>0?n:b,s=a.find(".thumb").eq(f),b.find(".thumb.focus").removeClass("focus"),s.addClass("focus")),u.addClass("focus"),t(u),r.not(".hide").addClass("hide"),i=r.eq(f),i.removeClass("hide"),h(i.find(".lazy")),m?c&&c.scrollToElement(d,400):p("body").animate({scrollTop:o.offset().top},400))}var o,n,l,r,d,c,p=e("zepto"),u=e("mlellipsis"),h=e("lazyload"),f=e("iscroll-probe"),g=p(".author .intro"),m=navigator.userAgent.indexOf("iPhone")>0?!0:!1,v=p(".collocation-block").length>0?!0:!1,w=0,b=p(""),d=document.querySelector("#wrapper .collocation-block"),C=p(window).width();m&&p("#wrapper").addClass("ios"),u.init(),h(p(".lazy")),p(".info-list .title, .one-good .reco-name").each(function(){this.mlellipsis(2)}),parseInt(g.offset().left,10)===parseInt(g.css("margin-left"),10)&&g.css("padding-top",0),v&&(o=p(".collocation-block"),n=o.children(".thumb-container"),l=n.find("li"),r=o.find(".prod"),w=l.width(),m&&(b=p("#wrapper").after(n.clone().addClass("fixed-thumb-container fixed-bottom")).next(".thumb-container"),h(b.find(".lazy"),{event:"sporty"})),t(l.filter(".focus")),n.delegate(".thumb","touchend",i),m&&b.delegate(".thumb","touchend",i)),window.onload=function(){var e,a,s,t,i,l=p("#scroller");if(m){if(c=new f("#wrapper",{probeType:3,mouseWheel:!0,click:!0}),document.addEventListener("touchmove",function(e){e.preventDefault()},!1),!v)return void c.on("scroll",function(){l.trigger("scroll")});e=p(window).height(),i=b[0],a=n.height(),s=o.height(),t=o.offset().top,c.on("scroll",function(){var o=-this.y,n=i.className;t-e+a>=o?-1===n.indexOf("fixed-bottom")&&b.addClass("fixed-bottom").removeClass("hide"):t>=o?-1===n.indexOf("hide")&&b.addClass("hide").removeClass("fixed-bottom fixed-top"):t+s-a>=o?-1===n.indexOf("fixed-top")&&b.addClass("fixed-top").removeClass("hide absolute").css("top",""):t+s>=o?(-1===n.indexOf("absolute")&&b.addClass("absolute").removeClass("fixed-top hide"),i.style.top=t+s-a-o+"px"):o>t+s&&-1===n.indexOf("hide")&&b.addClass("hide").removeClass("absolute"),l.trigger("scroll")})}}}),define("js/home/index",["zepto","swiper","lazyload","index"],function(e,a,s){e("js/home/home"),e("js/home/maybe-like")}),define("js/home/home",["zepto","swiper","lazyload","index"],function(e,a,s){function t(){v+=10,w.css({transform:"rotateX("+v+"deg)","-webkit-transform":"rotateX("+v+"deg)","-moz-transform":"rotateX("+v+"deg)"}),v/90%2===1&&(b?(w.addClass("animate"),b=!1):(w.removeClass("animate"),b=!0)),v/90%2===0&&v%360!==0?window.setTimeout(t,3e3):v%360===0?window.setTimeout(t,18e4):d(function(){t()})}var i,o,n,l,r,d,c,p,u,h,f=e("zepto"),g=e("swiper"),m=e("lazyload"),v=0,w=f(".home-header .logo"),b=!0;e("js/home/maybe-like"),m(f("img.lazy")),f(".nav-btn").on("click",function(e){f(this).hasClass("menu-open")||(f(".mobile-wrap").addClass("menu-open"),f(".overlay").addClass("show"),f(".side-nav").addClass("on"),f("body").css({height:f(window).height(),width:"100%",overflow:"hidden"})),e.stopPropagation()}),f(".mobile-wrap").on("click",function(){f(this).hasClass("menu-open")&&(f(".mobile-wrap").removeClass("menu-open"),f(".overlay").removeClass("show"),f(".sub-nav").removeClass("show"),f(".side-nav").removeClass("on"),f("body").css({height:"auto",overflow:"auto"}))}),f(".side-nav").on("click","li",function(){f(this).find(".sub-nav").size()>0&&(f(".sub-nav").removeClass("show"),f(this).find(".sub-nav").addClass("show"))}),f(".sub-nav").each(function(){f(this).find("li").eq(0).on("click",function(e){f(".sub-nav").removeClass("show"),e.stopPropagation()})}),f(".sub-nav").on("mouseenter","li",function(){0!==f(this).index()&&f(this).addClass("current").siblings().removeClass("current")}),f(".banner-swiper").find("li").size()>1&&(i=new g(".banner-swiper",{loop:!0,autoplay:3e3,autoplayDisableOnInteraction:!1,paginationClickable:!0,slideElement:"li",pagination:".banner-top .pagination-inner"})),n=new g(".brands-swiper",{grabCursor:!0,slidesPerView:"auto",wrapperClass:"brands-list",slideElement:"li"}),o=new g(".recommend-swiper",{grabCursor:!0,slidesPerView:"auto",wrapperClass:"recommend-list",slideElement:"li"}),f(".trend-topic-swiper").find("li").size()>1&&(l=new g(".trend-topic-swiper",{loop:!0,autoplay:3e3,autoplayDisableOnInteraction:!1,paginationClickable:!0,slideElement:"li",pagination:".trend-topic-content .pagination-inner"})),f(".category-swiper").each(function(e,a){u="category-swiper"+e,f(this).addClass(u),f("."+u).find(".swiper-slide").size()>1&&(r=new g("."+u,{loop:!0,autoplay:3e3,autoplayDisableOnInteraction:!1,paginationClickable:!0,slideElement:"li",pagination:"."+u+" .pagination-inner"}))}),f(".header-download").on("click",".close-btn",function(){f(this).parent().remove()}),d=function(){var e=null,a=["webkit","moz","ms"];for(p=0;p<a.length;p++)c=a[p]+"RequestAnimationFrame",window[c]&&(h=!0,e=c);return h?function(a){window[e](a)}:function(e){window.setTimeout(e,67)}}(),t()}),define("js/home/maybe-like",["zepto","lazyload"],function(e,a,s){var t,i,o,n,l=e("zepto"),r=e("js/plugin/tip"),d=e("lazyload"),c=l(window).height(),p=l("#load-more").height(),u=l("#goods-list"),h=!1,f=0,g=l(".mobile-wrap").hasClass("boys-wrap")?"1,3":"2,3",m=l(".mobile-wrap").hasClass("kids-wrap")?!0:!1,v=l(".mobile-wrap").hasClass("lifestyle-wrap")?!0:!1,w=l("#maybe-like-nav");i=m?"/product/recom/maylikekids":v?"/product/recom/maylikelife":"/product/recom/maylike?gender="+g,o=w.children(".focus"),l("#maybe-like-nav").delegate("li","touchstart",function(){var e,a=l(this),s=l(".goods-list");a.hasClass("focus")||(n=a.index(),a.addClass("focus"),o.removeClass("focus"),s.not(".hide").addClass("hide"),e=s.eq(n),e.removeClass("hide"),o=a,l(document).trigger("scroll"))}),l(window).scroll(function(){if(l(window).scrollTop()+c>=l(document).height()-p){if(h)return;h=!0,t=u.children(".good-info").length,l.ajax({type:"GET",url:i,data:{page:f+1},success:function(e){return" "===e?void(h=!0):(u.append(e),d(l(".good-info").find("img.lazy")),h=!1,void f++)},error:function(){r.show("网络断开连接了~"),h=!1}})}})}),define("js/product/index",["zepto","swiper","lazyload","index"],function(e,a,s){e("js/product/newsale/newarrival"),e("js/product/newsale/discount"),e("js/product/list"),e("js/product/detail/detail")}),define("js/product/newsale/newarrival",["zepto","swiper","lazyload","index"],function(e,a,s){var t,i,o=e("zepto"),n=e("js/plugin/tip"),l=e("swiper"),r=e("lazyload"),d=o("#newarrival-nav"),c=o("#newarrival-goods-list"),p=c.children(".goods-list"),u=o(window).height(),h=o("#load-more").height(),f=o(".goods-list"),g=!1,m=0,v=0;i=new l(".swiper-container",{lazyLoading:!0,pagination:".swiper-pagination"}),r(o("img.lazy")),t=d.children(".focus"),o("#newarrival-nav").delegate("li","touchstart",function(){var e,a=o(this);a.hasClass("focus")||(v=a.index(),a.addClass("focus"),t.removeClass("focus"),p.not(".hide").addClass("hide"),e=p.eq(v),e.removeClass("hide"),t=a,o(document).trigger("scroll"))}),o(window).scroll(function(){if(o(window).scrollTop()+u>=o(document).height()-h){if(g)return;g=!0,o.ajax({type:"GET",url:"/product/newsale/selectNewSale",data:{dayLimit:v+1,page:m+1},success:function(e){return" "===e?void(g=!0):(f.append(e),r(o(".good-info").find("img.lazy")),g=!1,void m++)},error:function(){n.show("网络断开连接了~"),g=!1}})}})}),define("js/product/newsale/discount",["zepto","swiper","lazyload","index"],function(e,a,s){function t(e){var a="0.1,0.3";switch(e){case 0:a="0.1,0.3";break;case 1:a="0.4,0.6";break;case 2:a="0.7,0.9";break;case 3:a="0.1,0.9"}return a}var i,o,n=e("zepto"),l=e("swiper"),r=e("lazyload"),d=n("#discount-nav"),c=n("#discount-goods-list"),p=c.children(".goods-list"),u=n(".goods-list"),h=0,f=n(window).height(),g=n("#load-more").height(),m=!1,v=0,w="";o=new l(".swiper-container",{lazyLoading:!0,pagination:".swiper-pagination"}),r(n("img.lazy")),i=d.children(".focus"),n("#discount-nav").delegate("li","touchstart",function(){var e,a=n(this);a.hasClass("focus")||(h=a.index(),w=t(h),a.addClass("focus"),i.removeClass("focus"),p.not(".hide").addClass("hide"),e=p.eq(h),e.removeClass("hide"),i=a,n(document).trigger("scroll"))}),n(window).scroll(function(){if(n(window).scrollTop()+f>=n(document).height()-g){if(m)return;m=!0,n.ajax({type:"GET",url:"/product/newsale/selectNewSale",data:{p_d:w,page:v+1},success:function(e){return" "===e?void(m=!1):(u.append(e),r(n(".good-info").find("img.lazy")),m=!1,void v++)},error:function(){tip.show("网络断开连接了~"),m=!1}})}})}),define("js/product/list",["zepto","lazyload"],function(e,a,s){function t(e){var a,s,t,r,d,c={};if(e){for(s in w)w.hasOwnProperty(s)&&(w[s].reload=!0);switch(v.children(".active").removeClass("active"),i.addClass("active"),e.type){case"gender":a={gender:e.id};break;case"brand":a={brand:e.id};break;case"msort":a={msort:e.id};break;case"color":a={color:e.id};break;case"size":a={size:e.id};break;case"price":a={price:e.id};break;case"discount":a={discount:e.id}}n.extend(m,a)}if(!o){if(i.hasClass("new")?r="newest":i.hasClass("price")?r="price":i.hasClass("discount")&&(r="discount"),t=w[r],d=t.page+1,t.reload)d=1;else if(t.end)return;n.extend(c,m,{type:r,order:t.order,page:d}),o=!0,n.ajax({type:"GET",url:"/product/list/search",data:c,success:function(e){var a,s='<p class="no-result">未找到相关搜索结果</p>';switch(r){case"newest":a=u;break;case"price":a=h;break;case"discount":a=f}" "===e?(t.end=!0,t.reload&&a.html(s)):(t.reload?a.html(e):a.append(e),l(a.find(".lazy"))),t.reload=!0,t.page=d,o=!1}})}}var i,o,n=e("zepto"),l=e("lazyload"),r=n("#brand-header"),d=n("#intro-box"),c=e("js/plugin/filter"),p=n("#goods-container"),u=p.children(".new-goods"),h=p.children(".price-goods"),f=p.children(".discount-goods"),g=n(window).height(),m={gender:n("#gender").val(),brand:n("#brand").val(),msort:n("#msort").val(),color:n("#color").val(),size:n("#size").val(),price:n("#price").val(),discount:n("#discount").val()},v=n("#list-nav"),w={newest:{order:1,reload:!0,page:0,end:!1},price:{order:0,reload:!0,page:0,end:!1},discount:{order:0,reload:!0,page:0,end:!1}};l(n(".lazy")),c.registerCbFn(t),v.delegate("li","touchstart",function(){var e,a,s,o=n(this);if(o.hasClass("filter"))o.hasClass("active")?(c.hideFilter(),i.addClass("active"),o.removeClass("active")):(i=o.siblings(".active"),i.removeClass("active"),o.addClass("active"),c.showFilter());else{if(o.hasClass("new")?a="newest":o.hasClass("price")?a="price":o.hasClass("discount")&&(a="discount"),e=w[a],o.hasClass("active")){if(o.hasClass("new"))return;(o.hasClass("price")||o.hasClass("discount"))&&(o.find(".icon > .iconfont").toggleClass("cur"),i=o,e.reload=!0,e.order=0===e.order?1:0)}else{if(s=o.siblings(".active"),i=o,s.hasClass("filter"))c.hideFilter();else switch(p.children(".container:not(.hide)").addClass("hide"),a){case"newest":u.removeClass("hide");break;case"price":h.removeClass("hide");break;case"discount":f.removeClass("hide")}s.removeClass("active"),o.addClass("active")}e.reload&&t()}}),n(window).scroll(function(){n(window).scrollTop()+g>n(document).height()-.25*p.height()&&t()}),r.children(".btn-intro").bind("touchstart",function(){d.removeClass("hide")}),n(".close-intro, .brand-intro-box").click(function(){d.addClass("hide")}),n("#brand-intro").click(function(e){e.stopPropagation()}),r.children(".btn-col").bind("touchstart",function(){n(this).toggleClass("coled")})}),define("js/plugin/filter",["zepto"],function(e,a,s){function t(){r.addClass("hide")}function i(){r.removeClass("hide")}function o(e){n=e}var n,l=e("zepto"),r=l(".filter-mask, .filter-body"),d=r.find(".classify"),c=r.find(".sub-classify");d.children(":first-child").addClass("active"),d.delegate(".classify-item","touchstart",function(){var e=l(this);e.hasClass("active")||(e.siblings(".active").removeClass("active"),e.addClass("active"))}),r.filter(".filter-mask").click(function(){t()}),c.delegate("li","click",function(e){var a,s,i=l(this),o=i.data("id"),r=i.closest(".sub-classify"),d=r.siblings(".shower");e.stopPropagation(),i.hasClass("chosed")||(r.children(".chosed").removeClass("chosed"),i.addClass("chosed"),a=l.trim(i.html()),s=l.trim(d.html()),d.html(s.substring(0,s.indexOf("</span>")+7)+a.substring(0,a.indexOf("<i"))),0===i.index()?d.addClass("default"):d.removeClass("default"),n&&n({type:r.data("type"),id:o}),t())}),a.showFilter=i,a.hideFilter=t,a.registerCbFn=o}),define("js/product/detail/detail",["zepto","swiper","lazyload","index"],function(e,a,s){var t,i=e("zepto"),o=e("swiper"),n=e("lazyload");n(i("img.lazy")),t=new o(".banner-swiper",{loop:!0,pagination:".banner-top .pagination-inner",slideElement:"div",nextButton:".swiper-button-next",prevButton:".swiper-button-prev"})}),define("js/index/index",["zepto"],function(e,a,s){e("js/index/search"),e("js/index/channel")}),define("js/index/search",["zepto"],function(e,a,s){var t=e("zepto"),i=t("#search-input > input"),o=t("#search-input > .clear-input"),n=t(".history");t("#clear-history").bind("touchstart",function(){t.ajax({type:"POST",url:"/search/clearHistory",success:function(e){200===e.code&&n.html("")}})}),t("#search").bind("touchstart",function(){var e=i.val();t.ajax({type:"POST",url:"/search",data:{val:e},success:function(e){200===e.code&&(location.href=e.data)}})}),i.bind("input",function(){""===i.val()?o.addClass("hide"):o.removeClass("hide")}),o.bind("touchstart",function(){i.val("").trigger("input")})}),define("js/index/channel",[],function(e,a,s){}); |
static/dist/myohobuy/0.0.1/lib.js
deleted
100644 → 0
This diff could not be displayed because it is too large.
-
Please register or login to post a comment