Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop
Showing
14 changed files
with
264 additions
and
209 deletions
framework @ 119c247f
@@ -975,3 +975,50 @@ | @@ -975,3 +975,50 @@ | ||
975 | 127.0.0.1 - - [16/Oct/2015:09:24:06 +0800] "GET /product/newsale/index HTTP/1.1" 200 5335 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | 975 | 127.0.0.1 - - [16/Oct/2015:09:24:06 +0800] "GET /product/newsale/index HTTP/1.1" 200 5335 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" |
976 | 127.0.0.1 - - [16/Oct/2015:09:24:06 +0800] "GET /css/index.css HTTP/1.1" 200 60066 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | 976 | 127.0.0.1 - - [16/Oct/2015:09:24:06 +0800] "GET /css/index.css HTTP/1.1" 200 60066 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" |
977 | 127.0.0.1 - - [16/Oct/2015:09:24:06 +0800] "GET /favicon.ico HTTP/1.1" 200 1150 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | 977 | 127.0.0.1 - - [16/Oct/2015:09:24:06 +0800] "GET /favicon.ico HTTP/1.1" 200 1150 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" |
978 | +127.0.0.1 - - [16/Oct/2015:09:32:16 +0800] "GET /product/newsale/index HTTP/1.1" 200 5335 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
979 | +127.0.0.1 - - [16/Oct/2015:09:32:16 +0800] "GET /css/index.css HTTP/1.1" 200 60066 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
980 | +127.0.0.1 - - [16/Oct/2015:09:32:17 +0800] "GET /favicon.ico HTTP/1.1" 200 1150 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
981 | +127.0.0.1 - - [16/Oct/2015:10:06:09 +0800] "GET /product/newsale/index HTTP/1.1" 200 15630 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
982 | +127.0.0.1 - - [16/Oct/2015:10:06:09 +0800] "GET /css/index.css HTTP/1.1" 200 60066 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
983 | +127.0.0.1 - - [16/Oct/2015:10:06:10 +0800] "GET /favicon.ico HTTP/1.1" 200 1150 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
984 | +127.0.0.1 - - [16/Oct/2015:10:09:12 +0800] "GET /product/newsale/index HTTP/1.1" 200 15620 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
985 | +127.0.0.1 - - [16/Oct/2015:10:09:12 +0800] "GET /css/index.css HTTP/1.1" 200 60066 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
986 | +127.0.0.1 - - [16/Oct/2015:10:09:32 +0800] "-" 400 0 "-" "-" | ||
987 | +127.0.0.1 - - [16/Oct/2015:10:09:42 +0800] "GET /favicon.ico HTTP/1.1" 200 1150 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
988 | +127.0.0.1 - - [16/Oct/2015:10:23:45 +0800] "GET /product/newsale/index HTTP/1.1" 200 15627 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
989 | +127.0.0.1 - - [16/Oct/2015:10:23:45 +0800] "GET /css/index.css HTTP/1.1" 200 60066 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
990 | +127.0.0.1 - - [16/Oct/2015:10:23:45 +0800] "GET /favicon.ico HTTP/1.1" 200 1150 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
991 | +127.0.0.1 - - [16/Oct/2015:10:35:33 +0800] "GET /product/newsale/index HTTP/1.1" 200 15627 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
992 | +127.0.0.1 - - [16/Oct/2015:10:35:33 +0800] "GET /css/index.css HTTP/1.1" 200 60066 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
993 | +127.0.0.1 - - [16/Oct/2015:10:35:33 +0800] "GET /favicon.ico HTTP/1.1" 200 1150 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
994 | +127.0.0.1 - - [16/Oct/2015:10:36:38 +0800] "GET /product/newsale/index HTTP/1.1" 200 15632 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
995 | +127.0.0.1 - - [16/Oct/2015:10:36:38 +0800] "GET /css/index.css HTTP/1.1" 200 60066 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
996 | +127.0.0.1 - - [16/Oct/2015:10:36:38 +0800] "GET /favicon.ico HTTP/1.1" 200 1150 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
997 | +127.0.0.1 - - [16/Oct/2015:10:36:41 +0800] "GET /product/newsale/index HTTP/1.1" 200 15632 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
998 | +127.0.0.1 - - [16/Oct/2015:10:36:41 +0800] "GET /css/index.css HTTP/1.1" 200 60066 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
999 | +127.0.0.1 - - [16/Oct/2015:10:36:41 +0800] "GET /favicon.ico HTTP/1.1" 200 1150 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
1000 | +127.0.0.1 - - [16/Oct/2015:10:37:40 +0800] "GET /product/newsale/index HTTP/1.1" 200 15632 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
1001 | +127.0.0.1 - - [16/Oct/2015:10:37:40 +0800] "GET /css/index.css HTTP/1.1" 200 60066 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
1002 | +127.0.0.1 - - [16/Oct/2015:10:37:40 +0800] "GET /favicon.ico HTTP/1.1" 200 1150 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
1003 | +127.0.0.1 - - [16/Oct/2015:10:38:26 +0800] "GET /product/newsale/index HTTP/1.1" 200 15632 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
1004 | +127.0.0.1 - - [16/Oct/2015:10:38:26 +0800] "GET /css/index.css HTTP/1.1" 200 60066 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
1005 | +127.0.0.1 - - [16/Oct/2015:10:38:26 +0800] "GET /favicon.ico HTTP/1.1" 200 1150 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
1006 | +127.0.0.1 - - [16/Oct/2015:10:38:34 +0800] "GET /product/newsale/index HTTP/1.1" 200 15632 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
1007 | +127.0.0.1 - - [16/Oct/2015:10:38:35 +0800] "GET /css/index.css HTTP/1.1" 200 60066 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
1008 | +127.0.0.1 - - [16/Oct/2015:10:38:52 +0800] "GET /product/newsale/index HTTP/1.1" 200 15632 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
1009 | +127.0.0.1 - - [16/Oct/2015:10:38:52 +0800] "GET /css/index.css HTTP/1.1" 200 60066 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
1010 | +127.0.0.1 - - [16/Oct/2015:10:38:52 +0800] "GET /favicon.ico HTTP/1.1" 200 1150 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
1011 | +127.0.0.1 - - [16/Oct/2015:10:39:04 +0800] "-" 400 0 "-" "-" | ||
1012 | +127.0.0.1 - - [16/Oct/2015:10:39:40 +0800] "GET /product/newsale/index HTTP/1.1" 200 15632 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
1013 | +127.0.0.1 - - [16/Oct/2015:10:39:40 +0800] "GET /css/index.css HTTP/1.1" 200 60066 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
1014 | +127.0.0.1 - - [16/Oct/2015:10:39:40 +0800] "GET /favicon.ico HTTP/1.1" 200 1150 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
1015 | +127.0.0.1 - - [16/Oct/2015:10:40:31 +0800] "GET /product/newsale/index HTTP/1.1" 499 0 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
1016 | +127.0.0.1 - - [16/Oct/2015:10:40:31 +0800] "GET /favicon.ico HTTP/1.1" 200 1150 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
1017 | +127.0.0.1 - - [16/Oct/2015:10:40:31 +0800] "GET /product/newsale/index HTTP/1.1" 200 15632 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
1018 | +127.0.0.1 - - [16/Oct/2015:10:40:31 +0800] "GET /css/index.css HTTP/1.1" 200 60066 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
1019 | +127.0.0.1 - - [16/Oct/2015:10:40:35 +0800] "GET /product/newsale/index HTTP/1.1" 200 15632 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
1020 | +127.0.0.1 - - [16/Oct/2015:10:40:35 +0800] "GET /css/index.css HTTP/1.1" 200 60066 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
1021 | +127.0.0.1 - - [16/Oct/2015:10:43:09 +0800] "GET /favicon.ico HTTP/1.1" 200 1150 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
1022 | +127.0.0.1 - - [16/Oct/2015:10:43:30 +0800] "GET /product/newsale/index HTTP/1.1" 200 15665 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
1023 | +127.0.0.1 - - [16/Oct/2015:10:43:30 +0800] "GET /css/index.css HTTP/1.1" 200 60066 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" | ||
1024 | +127.0.0.1 - - [16/Oct/2015:10:43:32 +0800] "GET /favicon.ico HTTP/1.1" 200 1150 "http://m.dev.yohobuy.com/product/newsale/index" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" |
@@ -31,10 +31,16 @@ function setLazyLoadAndMellipsis($infos) { | @@ -31,10 +31,16 @@ function setLazyLoadAndMellipsis($infos) { | ||
31 | lazyLoad($infos.find('img.lazy')); | 31 | lazyLoad($infos.find('img.lazy')); |
32 | 32 | ||
33 | $infos.each(function() { | 33 | $infos.each(function() { |
34 | - var $this = $(this); | 34 | + var $this = $(this), |
35 | + $title = $this.find('.info-title'), | ||
36 | + $text = $this.find('.info-text'); | ||
35 | 37 | ||
36 | - $this.find('.info-title')[0].mlellipsis(2); | ||
37 | - $this.find('.info-text')[0].mlellipsis(2); | 38 | + //减少重复调用 |
39 | + if ($title.attr('title') && $text.attr('title')) { | ||
40 | + return; | ||
41 | + } | ||
42 | + $title[0].mlellipsis(2); | ||
43 | + $text[0].mlellipsis(2); | ||
38 | }); | 44 | }); |
39 | } | 45 | } |
40 | 46 | ||
@@ -75,8 +81,6 @@ function initInfosEvt($container) { | @@ -75,8 +81,6 @@ function initInfosEvt($container) { | ||
75 | * 资讯LoadMore | 81 | * 资讯LoadMore |
76 | */ | 82 | */ |
77 | function loadMore($container, opt) { | 83 | function loadMore($container, opt) { |
78 | - var infosNum = $container.find('.guang-info').length; | ||
79 | - | ||
80 | if (loading) { | 84 | if (loading) { |
81 | return; | 85 | return; |
82 | } | 86 | } |
@@ -87,13 +91,10 @@ function loadMore($container, opt) { | @@ -87,13 +91,10 @@ function loadMore($container, opt) { | ||
87 | 91 | ||
88 | loading = true; | 92 | loading = true; |
89 | $.ajax({ | 93 | $.ajax({ |
90 | - type: 'POST', | 94 | + type: 'GET', |
91 | url: ' /guang/list/page', | 95 | url: ' /guang/list/page', |
92 | data: opt, | 96 | data: opt, |
93 | success: function(data) { | 97 | success: function(data) { |
94 | - var $newInfos; | ||
95 | - | ||
96 | - //请求结束 | ||
97 | if (data === ' ') { | 98 | if (data === ' ') { |
98 | opt.end = true; | 99 | opt.end = true; |
99 | loading = false; | 100 | loading = false; |
@@ -104,10 +105,9 @@ function loadMore($container, opt) { | @@ -104,10 +105,9 @@ function loadMore($container, opt) { | ||
104 | 105 | ||
105 | return; | 106 | return; |
106 | } | 107 | } |
107 | - | ||
108 | $container.append(data); | 108 | $container.append(data); |
109 | - $newInfos = $container.find('.guang-info:gt(' + (infosNum - 1) + ')'); | ||
110 | - setLazyLoadAndMellipsis($newInfos); | 109 | + |
110 | + setLazyLoadAndMellipsis($container.find('.guang-info')); | ||
111 | 111 | ||
112 | opt.page++; | 112 | opt.page++; |
113 | 113 |
@@ -2,27 +2,32 @@ var $ = require('yoho.zepto'), | @@ -2,27 +2,32 @@ var $ = require('yoho.zepto'), | ||
2 | lazyLoad = require('yoho.lazyload'); | 2 | lazyLoad = require('yoho.lazyload'); |
3 | 3 | ||
4 | var $curNav, | 4 | var $curNav, |
5 | - $navs = $('#newarrival-nav > li'), | ||
6 | - $navList = $('#newarrival-nav '); | ||
7 | - | ||
8 | -//$contents = $('#ps-content > .content'); | 5 | + $navList = $('#newarrival-nav'), |
6 | + $newArrivalList = $('#newarrival-list'), | ||
7 | + $goods = $newArrivalList.children('.newarrival-goods-list'); | ||
9 | 8 | ||
10 | lazyLoad($('img.lazy')); | 9 | lazyLoad($('img.lazy')); |
11 | - | ||
12 | -$navs.first().addClass('focus'); | ||
13 | $curNav = $navList.children('.focus'); | 10 | $curNav = $navList.children('.focus'); |
14 | 11 | ||
15 | $('#newarrival-nav').delegate('li', 'touchstart', function() { | 12 | $('#newarrival-nav').delegate('li', 'touchstart', function() { |
16 | - if ($(this).hasClass('focus')) { | 13 | + var $this = $(this), |
14 | + $content, | ||
15 | + index; | ||
16 | + | ||
17 | + if ($this.hasClass('focus')) { | ||
17 | return; | 18 | return; |
18 | } | 19 | } |
19 | 20 | ||
20 | - $(this).addClass('focus'); | 21 | + index = $this.index(); |
22 | + | ||
23 | + $this.addClass('focus'); | ||
21 | $curNav.removeClass('focus'); | 24 | $curNav.removeClass('focus'); |
22 | - $curNav = $(this); | 25 | + |
26 | + $goods.not('.hide').addClass('hide'); | ||
27 | + $content = $goods.eq(index); | ||
28 | + $content.removeClass('hide'); | ||
23 | 29 | ||
24 | - //$navs.toggleClass('focus'); | ||
25 | - //$contents.toggleClass('hide'); | 30 | + $curNav = $this; |
26 | 31 | ||
27 | $(document).trigger('scroll'); //Trigger lazyLoad | 32 | $(document).trigger('scroll'); //Trigger lazyLoad |
28 | }); | 33 | }); |
1 | {{>layout/header}} | 1 | {{>layout/header}} |
2 | <div class="newarrival-page yoho-page"> | 2 | <div class="newarrival-page yoho-page"> |
3 | -{{# headerBanner}} | ||
4 | - <ul id="newarrival-nav" class="newarrival-nav clearfix"> | ||
5 | - {{# tabs}} | ||
6 | - <li class="newarrival-nav-item">{{title}}</li> | ||
7 | - {{/ tabs}} | ||
8 | - </ul> | ||
9 | -{{/ headerBanner}} | 3 | + {{> newsale/header_banner}} |
10 | 4 | ||
11 | - | ||
12 | - {{# goodsContainer}} | ||
13 | - <div class="goods-list clearfix"> | ||
14 | - {{# goods}} | ||
15 | - {{> good}} | ||
16 | - {{/ goods}} | ||
17 | - </div> | ||
18 | - {{/ goodsContainer}} | 5 | + <ul id="newarrival-nav" class="newarrival-nav clearfix"> |
6 | + {{# tabs}} | ||
7 | + <li class="newarrival-nav-item {{#focus}}focus{{/focus}}">{{title}}</li> | ||
8 | + {{/ tabs}} | ||
9 | + </ul> | ||
10 | + | ||
11 | + <div id="newarrival-list"> | ||
12 | + {{# goodsContainer}} | ||
13 | + <div class="newarrival-goods-list {{^show}}hide{{/show}}"> | ||
14 | + {{# goods}} | ||
15 | + {{> good}} | ||
16 | + {{/ goods}} | ||
17 | + </div> | ||
18 | + {{/ goodsContainer}} | ||
19 | + </div> | ||
19 | 20 | ||
20 | - | ||
21 | </div> | 21 | </div> |
22 | {{>layout/footer}} | 22 | {{>layout/footer}} |
23 | 23 | ||
24 | + |
@@ -110,6 +110,12 @@ | @@ -110,6 +110,12 @@ | ||
110 | seajs.use('js/product/newsale/newarrival'); | 110 | seajs.use('js/product/newsale/newarrival'); |
111 | </script> | 111 | </script> |
112 | {{/if}} | 112 | {{/if}} |
113 | +{{!-- 折扣专区 --}} | ||
114 | +{{#if discount}} | ||
115 | + <script> | ||
116 | + seajs.use('js/product/newsale/discount'); | ||
117 | + </script> | ||
118 | +{{/if}} | ||
113 | 119 | ||
114 | {{!-- 品类 --}} | 120 | {{!-- 品类 --}} |
115 | {{#if categoryPage}} | 121 | {{#if categoryPage}} |
1 | -<div id="goods-content" class="goods-content clearfix" style="padding-left:10px;margin-top: 9px;"> | ||
2 | - <div class="new-patterns-container"></div> | ||
3 | - <div class="sales-volume-container hide"></div> | ||
4 | - <div class="price-container hide"></div> | ||
5 | - <div id="screen-mask" class="screen-mask hide"></div> | ||
6 | - <div id="screen-content" class="screen-content hide"> | ||
7 | - <ul class="classify"> | ||
8 | - <li class="gender c-item active"> | ||
9 | - 性别: | ||
10 | - <h1 id="show-gender" class="chosed">BOYS</h1> | ||
11 | - </li> | ||
12 | - <li class="brand c-item"> | ||
13 | - 品牌: | ||
14 | - <h1 id="show-brand" class="chosed default">全部品牌</h1> | ||
15 | - </li> | ||
16 | - <li class="msort c-item"> | ||
17 | - 品类: | ||
18 | - <h1 id="show-msort" class="chosed default">全部品类</h1> | ||
19 | - </li> | ||
20 | - <li class="color c-item"> | ||
21 | - 颜色: | ||
22 | - <h1 id="show-color" class="chosed default">全部颜色</h1> | ||
23 | - </li> | ||
24 | - <li class="size c-item"> | ||
25 | - 尺码: | ||
26 | - <h1 id="show-size" class="chosed default">全部尺码</h1> | ||
27 | - </li> | ||
28 | - <li class="price c-item"> | ||
29 | - 价格: | ||
30 | - <h1 id="show-price" class="chosed default">全部价格</h1> | ||
31 | - </li> | ||
32 | - <li class="discount c-item"> | ||
33 | - 折扣: | ||
34 | - <h1 id="show-discount" class="chosed default">全部折扣</h1> | ||
35 | - </li> | ||
36 | - </ul> | ||
37 | - <div class="sub-classify-container"> | ||
38 | - <ul id="sub-gender" class="sub-classify" data-type="gender"></ul> | ||
39 | - <ul id="sub-brand" class="sub-classify hide" data-type="brand"></ul> | ||
40 | - <ul id="sub-msort" class="sub-classify hide" data-type="msort"></ul> | ||
41 | - <ul id="sub-color" class="sub-classify hide" data-type="color"></ul> | ||
42 | - <ul id="sub-size" class="sub-classify hide" data-type="size"></ul> | ||
43 | - <ul id="sub-price" class="sub-classify hide" data-type="price"></ul> | ||
44 | - <ul id="sub-discount" class="sub-classify hide" data-type="discount"></ul> | ||
45 | - </div> | ||
46 | - </div> | ||
47 | -</div> |
1 | -<li class="goods-item"> | ||
2 | - <a href="{{url}}"> | ||
3 | - <img class="lazy" data-original="{{img}}" alt=""> | ||
4 | - <div class="goods-title">{{title}}</div> | ||
5 | - <div class="price"> | ||
6 | - <i class="vip-card hide"></i> | ||
7 | - <span class="sale-price {{^price}}no-price{{/price}}">{{# salePrice}}¥{{/ salePrice}}{{salePrice}}</span> | ||
8 | - {{#price}} | ||
9 | - <span class="market-price">¥{{.}}</span> | ||
10 | - {{/price}} | ||
11 | - </div> | ||
12 | - <div class="vip-cheap hide"> | ||
13 | - <i class="icon vip-icon"></i> 更优惠 | ||
14 | - </div> | ||
15 | - </a> | ||
16 | -</li> |
1 | -<script id="goods-tpl" type="x-tmpl-mustache"> | ||
2 | - <div class="good-info" data-id="\{{id}}"> | ||
3 | - <div class="tag-container clearfix"> | ||
4 | - \{{# tags}} | ||
5 | - \{{# isNew}} | ||
6 | - <p class="good-tag new-tag">NEW</p> | ||
7 | - \{{/ isNew}} | ||
8 | - \{{# isReNew}} | ||
9 | - <p class="good-tag renew-tag">再到着</p> | ||
10 | - \{{/ isReNew}} | ||
11 | - \{{# isSale}} | ||
12 | - <p class="good-tag sale-tag">SALE</p> | ||
13 | - \{{/ isSale}} | ||
14 | - \{{# isYohood}} | ||
15 | - <div class="good-tag yohood-tag"></div> | ||
16 | - \{{/ isYohood}} | ||
17 | - \{{# isLimit}} | ||
18 | - <p class="good-tag limit-tag">限量商品</p> | ||
19 | - \{{/ isLimit}} | ||
20 | - \{{/ tags}} | ||
21 | - </div> | ||
22 | - <div class="good-detail-img"> | ||
23 | - <a class="good-thumb" href="\{{url}}"> | ||
24 | - <img class="lazy" data-original="\{{thumb}}"> | ||
25 | - </a> | ||
26 | - \{{# isFew}} | ||
27 | - <p class="few-tag">即将售罄</p> | ||
28 | - \{{/ isFew}} | ||
29 | - </div> | ||
30 | - <div class="good-detail-text"> | ||
31 | - <div class="name"> | ||
32 | - <a href="\{{url}}">\{{name}}</a> | ||
33 | - </div> | ||
34 | - <div class="price"> | ||
35 | - <span class="sale-price \{{^price}}no-price\{{/price}}">¥\{{salePrice}}</span> | ||
36 | - \{{#price}} | ||
37 | - <span class="market-price">¥\{{.}}</span> | ||
38 | - \{{/price}} | ||
39 | - </div> | ||
40 | - </div> | ||
41 | -</div> | ||
42 | -</script> |
@@ -45,6 +45,7 @@ class NewsaleController extends AbstractAction | @@ -45,6 +45,7 @@ class NewsaleController extends AbstractAction | ||
45 | 'tabs' => array( | 45 | 'tabs' => array( |
46 | array( | 46 | array( |
47 | 'title' => '10月15日', | 47 | 'title' => '10月15日', |
48 | + 'focus' => true | ||
48 | ), | 49 | ), |
49 | array( | 50 | array( |
50 | 'title' => '本周上新' | 51 | 'title' => '本周上新' |
@@ -54,56 +55,170 @@ class NewsaleController extends AbstractAction | @@ -54,56 +55,170 @@ class NewsaleController extends AbstractAction | ||
54 | ) | 55 | ) |
55 | ), | 56 | ), |
56 | 'goodsContainer' => array( | 57 | 'goodsContainer' => array( |
57 | - 'goods' => array( | ||
58 | - array( | ||
59 | - 'id' => '', | ||
60 | - 'thumb' => 'http://img12.static.yhbimg.com/adpic/2015/08/14/12/0205a06e86edb30a7d1833477a9e886577.jpg?imageView/2/w/640/h/480', | ||
61 | - 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣', | ||
62 | - 'isLike' => false, | ||
63 | - 'price' => 1268, | ||
64 | - 'salePrice' => 589, | ||
65 | - 'isSale' => true, | ||
66 | - 'isFew' => true, | ||
67 | - 'isNew' => false, | ||
68 | - 'url' => '' | ||
69 | - ), | ||
70 | - array( | ||
71 | - 'id' => '', | ||
72 | - 'thumb' => 'http://img12.static.yhbimg.com/adpic/2015/08/14/12/0205a06e86edb30a7d1833477a9e886577.jpg?imageView/2/w/640/h/480', | ||
73 | - 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣', | ||
74 | - 'isLike' => false, | ||
75 | - 'price' => 1268, | ||
76 | - 'salePrice' => 589, | ||
77 | - 'isSale' => true, | ||
78 | - 'isFew' => true, | ||
79 | - 'isNew' => false, | ||
80 | - 'url' => '' | ||
81 | - ), | ||
82 | - array( | ||
83 | - 'id' => '', | ||
84 | - 'thumb' => 'http://img12.static.yhbimg.com/adpic/2015/08/14/12/0205a06e86edb30a7d1833477a9e886577.jpg?imageView/2/w/640/h/480', | ||
85 | - 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣', | ||
86 | - 'isLike' => false, | ||
87 | - 'price' => 1268, | ||
88 | - 'salePrice' => 589, | ||
89 | - 'isSale' => true, | ||
90 | - 'isFew' => true, | ||
91 | - 'isNew' => false, | ||
92 | - 'url' => '' | ||
93 | - ), | ||
94 | - array( | ||
95 | - 'id' => '', | ||
96 | - 'thumb' => 'http://img12.static.yhbimg.com/adpic/2015/08/14/12/0205a06e86edb30a7d1833477a9e886577.jpg?imageView/2/w/640/h/480', | ||
97 | - 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣', | ||
98 | - 'isLike' => false, | ||
99 | - 'price' => 1268, | ||
100 | - 'salePrice' => 589, | ||
101 | - 'isSale' => true, | ||
102 | - 'isFew' => true, | ||
103 | - 'isNew' => false, | ||
104 | - 'url' => '' | ||
105 | - ) | 58 | + array( |
59 | + 'show' => 'true', | ||
60 | + 'goods' => array( | ||
61 | + array( | ||
62 | + 'id' => '', | ||
63 | + 'thumb' => 'http://img12.static.yhbimg.com/adpic/2015/08/14/12/0205a06e86edb30a7d1833477a9e886577.jpg?imageView/2/w/640/h/480', | ||
64 | + 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣', | ||
65 | + 'isLike' => false, | ||
66 | + 'price' => 1268, | ||
67 | + 'salePrice' => 589, | ||
68 | + 'isSale' => true, | ||
69 | + 'isFew' => true, | ||
70 | + 'isNew' => false, | ||
71 | + 'url' => '' | ||
72 | + ), | ||
73 | + array( | ||
74 | + 'id' => '', | ||
75 | + 'thumb' => 'http://img12.static.yhbimg.com/adpic/2015/08/14/12/0205a06e86edb30a7d1833477a9e886577.jpg?imageView/2/w/640/h/480', | ||
76 | + 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣', | ||
77 | + 'isLike' => false, | ||
78 | + 'price' => 1268, | ||
79 | + 'salePrice' => 589, | ||
80 | + 'isSale' => true, | ||
81 | + 'isFew' => true, | ||
82 | + 'isNew' => false, | ||
83 | + 'url' => '' | ||
84 | + ), | ||
85 | + array( | ||
86 | + 'id' => '', | ||
87 | + 'thumb' => 'http://img12.static.yhbimg.com/adpic/2015/08/14/12/0205a06e86edb30a7d1833477a9e886577.jpg?imageView/2/w/640/h/480', | ||
88 | + 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣', | ||
89 | + 'isLike' => false, | ||
90 | + 'price' => 1268, | ||
91 | + 'salePrice' => 589, | ||
92 | + 'isSale' => true, | ||
93 | + 'isFew' => true, | ||
94 | + 'isNew' => false, | ||
95 | + 'url' => '' | ||
96 | + ), | ||
97 | + array( | ||
98 | + 'id' => '', | ||
99 | + 'thumb' => 'http://img12.static.yhbimg.com/adpic/2015/08/14/12/0205a06e86edb30a7d1833477a9e886577.jpg?imageView/2/w/640/h/480', | ||
100 | + 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣', | ||
101 | + 'isLike' => false, | ||
102 | + 'price' => 1268, | ||
103 | + 'salePrice' => 589, | ||
104 | + 'isSale' => true, | ||
105 | + 'isFew' => true, | ||
106 | + 'isNew' => false, | ||
107 | + 'url' => '' | ||
108 | + ) | ||
109 | + | ||
110 | + ) | ||
111 | + ), | ||
112 | + array( | ||
113 | + 'goods' => array( | ||
114 | + array( | ||
115 | + 'id' => '', | ||
116 | + 'thumb' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg', | ||
117 | + 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣', | ||
118 | + 'isLike' => false, | ||
119 | + 'price' => 1268, | ||
120 | + 'salePrice' => 589, | ||
121 | + 'isSale' => true, | ||
122 | + 'isFew' => true, | ||
123 | + 'isNew' => false, | ||
124 | + 'url' => '' | ||
125 | + ), | ||
126 | + array( | ||
127 | + 'id' => '', | ||
128 | + 'thumb' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg', | ||
129 | + 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣', | ||
130 | + 'isLike' => false, | ||
131 | + 'price' => 1268, | ||
132 | + 'salePrice' => 589, | ||
133 | + 'isSale' => true, | ||
134 | + 'isFew' => true, | ||
135 | + 'isNew' => false, | ||
136 | + 'url' => '' | ||
137 | + ), | ||
138 | + array( | ||
139 | + 'id' => '', | ||
140 | + 'thumb' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg', | ||
141 | + 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣', | ||
142 | + 'isLike' => false, | ||
143 | + 'price' => 1268, | ||
144 | + 'salePrice' => 589, | ||
145 | + 'isSale' => true, | ||
146 | + 'isFew' => true, | ||
147 | + 'isNew' => false, | ||
148 | + 'url' => '' | ||
149 | + ), | ||
150 | + array( | ||
151 | + 'id' => '', | ||
152 | + 'thumb' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg', | ||
153 | + 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣', | ||
154 | + 'isLike' => false, | ||
155 | + 'price' => 1268, | ||
156 | + 'salePrice' => 589, | ||
157 | + 'isSale' => true, | ||
158 | + 'isFew' => true, | ||
159 | + 'isNew' => false, | ||
160 | + 'url' => '' | ||
161 | + ) | ||
162 | + | ||
163 | + ) | ||
164 | + | ||
165 | + ), | ||
166 | + array( | ||
167 | + 'goods' => array( | ||
168 | + array( | ||
169 | + 'id' => '', | ||
170 | + 'thumb' => 'http://img11.static.yhbimg.com/yhb-img01/2015/09/17/09/015e14c53a41c7adf0bd039f6493b5a700.jpg?imageView/2/w/140/h/140', | ||
171 | + 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣', | ||
172 | + 'isLike' => false, | ||
173 | + 'price' => 1268, | ||
174 | + 'salePrice' => 589, | ||
175 | + 'isSale' => true, | ||
176 | + 'isFew' => true, | ||
177 | + 'isNew' => false, | ||
178 | + 'url' => '' | ||
179 | + ), | ||
180 | + array( | ||
181 | + 'id' => '', | ||
182 | + 'thumb' => 'http://img11.static.yhbimg.com/yhb-img01/2015/09/17/09/015e14c53a41c7adf0bd039f6493b5a700.jpg?imageView/2/w/140/h/140', | ||
183 | + 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣', | ||
184 | + 'isLike' => false, | ||
185 | + 'price' => 1268, | ||
186 | + 'salePrice' => 589, | ||
187 | + 'isSale' => true, | ||
188 | + 'isFew' => true, | ||
189 | + 'isNew' => false, | ||
190 | + 'url' => '' | ||
191 | + ), | ||
192 | + array( | ||
193 | + 'id' => '', | ||
194 | + 'thumb' => 'http://img11.static.yhbimg.com/yhb-img01/2015/09/17/09/015e14c53a41c7adf0bd039f6493b5a700.jpg?imageView/2/w/140/h/140', | ||
195 | + 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣', | ||
196 | + 'isLike' => false, | ||
197 | + 'price' => 1268, | ||
198 | + 'salePrice' => 589, | ||
199 | + 'isSale' => true, | ||
200 | + 'isFew' => true, | ||
201 | + 'isNew' => false, | ||
202 | + 'url' => '' | ||
203 | + ), | ||
204 | + array( | ||
205 | + 'id' => '', | ||
206 | + 'thumb' => 'http://img11.static.yhbimg.com/yhb-img01/2015/09/17/09/015e14c53a41c7adf0bd039f6493b5a700.jpg?imageView/2/w/140/h/140', | ||
207 | + 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣', | ||
208 | + 'isLike' => false, | ||
209 | + 'price' => 1268, | ||
210 | + 'salePrice' => 589, | ||
211 | + 'isSale' => true, | ||
212 | + 'isFew' => true, | ||
213 | + 'isNew' => false, | ||
214 | + 'url' => '' | ||
215 | + ) | ||
216 | + | ||
217 | + ) | ||
218 | + | ||
219 | + | ||
106 | ) | 220 | ) |
221 | + | ||
107 | ) | 222 | ) |
108 | ); | 223 | ); |
109 | 224 |
-
Please register or login to post a comment