Showing
27 changed files
with
1356 additions
and
7 deletions
static/js/homePage/column-goods.js
0 → 100644
1 | +/** | ||
2 | + * kids,lifestyle商品模块JS | ||
3 | + * @author: liuyue(yue.liu@yoho.cn) | ||
4 | + * @date: 2015/9/23 | ||
5 | + */ | ||
6 | +/* | ||
7 | +var $ = require('yoho.zepto'), | ||
8 | + Mustache = require('yoho.mustache'), | ||
9 | + lazyLoad = require('yoho.lazyload'); | ||
10 | + | ||
11 | + | ||
12 | +var tpl, | ||
13 | + res, | ||
14 | + $firstColumnNav = $('.column-nav').find('li').eq(0), | ||
15 | + $goodList = $('.two-column-goods').find('.goods-list'); | ||
16 | + | ||
17 | +if ($('.two-column-goods').size() <= 0) { | ||
18 | + return; | ||
19 | +} | ||
20 | + | ||
21 | +//read good-info template | ||
22 | +$.get('/common/goodinfo', function (data) { | ||
23 | + tpl = '{{# goods}}' + data + '{{/ goods}}'; | ||
24 | + Mustache.parse(tpl); | ||
25 | +}); | ||
26 | + | ||
27 | + | ||
28 | +function goodsAjax(url) { | ||
29 | + $.ajax({ | ||
30 | + type: 'GET', | ||
31 | + url: url | ||
32 | + }).then(function (data) { | ||
33 | + if (data.code === 200) { | ||
34 | + res = data.data; | ||
35 | + | ||
36 | + $goodList.html(Mustache.render(tpl, { | ||
37 | + goods: res.goods | ||
38 | + })); | ||
39 | + | ||
40 | + //lazyLoad | ||
41 | + lazyLoad($goodList.children('.good-info').find('img.lazy')); | ||
42 | + } | ||
43 | + }); | ||
44 | +} | ||
45 | + | ||
46 | +$firstColumnNav.addClass('current'); | ||
47 | +goodsAjax($('.column-nav').find('.current').data('url')); | ||
48 | + | ||
49 | +$('.column-nav').on('click', 'li', function () { | ||
50 | + $(this).addClass('current').siblings().removeClass('current'); | ||
51 | + goodsAjax($(this).data('url')); | ||
52 | +});*/ |
static/js/homePage/home.js
0 → 100644
1 | +/** | ||
2 | + * 首页 | ||
3 | + * @author: liangzhifeng<zhifeng.liang@yoho.cn> | ||
4 | + * @date: 2015/10/12 | ||
5 | + */ | ||
6 | +var $ = require('yoho.zepto'), | ||
7 | + // Swiper = require('yoho.iswiper'), | ||
8 | + lazyLoad = require('yoho.lazyload'), | ||
9 | + bannerSwiper, | ||
10 | + hotBrandsSwiper, | ||
11 | + recommendSwiper, | ||
12 | + trendTopicSwiper, | ||
13 | + goodsSwiper; | ||
14 | + | ||
15 | +var swiperClass; | ||
16 | + | ||
17 | +var requestFrame, | ||
18 | + thisFunc, | ||
19 | + prefixList, | ||
20 | + start = 0, | ||
21 | + i, | ||
22 | + supportCss3, | ||
23 | + $logotrans = $('.home-header .logo'), | ||
24 | + isen = true; | ||
25 | + | ||
26 | +//lazyload | ||
27 | +lazyLoad($('img.lazy')); | ||
28 | +/*$('img:in-viewport').trigger('appear'); | ||
29 | + | ||
30 | + | ||
31 | +//点击首页汉堡menu图标,滑出侧栏导航 | ||
32 | +$('.nav-btn').on('click', function (event) { | ||
33 | + if (!$(this).hasClass('menu-open')) { | ||
34 | + $('.mobile-wrap').addClass('menu-open'); | ||
35 | + $('.overlay').addClass('show'); | ||
36 | + $('.side-nav').addClass('on'); | ||
37 | + | ||
38 | + //设置boy高宽,页面不能上下滑动 | ||
39 | + $('body').css({ | ||
40 | + height: $(window).height(), | ||
41 | + width: '100%', | ||
42 | + overflow: 'hidden' | ||
43 | + }); | ||
44 | + } | ||
45 | + event.stopPropagation(); | ||
46 | +}); | ||
47 | + | ||
48 | +//点击页面主体,收起侧栏导航及二级导航 | ||
49 | +$('.mobile-wrap').on('click', function () { | ||
50 | + if ($(this).hasClass('menu-open')) { | ||
51 | + $('.mobile-wrap').removeClass('menu-open'); | ||
52 | + $('.overlay').removeClass('show'); | ||
53 | + $('.sub-nav').removeClass('show'); | ||
54 | + $('.side-nav').removeClass('on'); | ||
55 | + $('body').css({ | ||
56 | + height: 'auto', | ||
57 | + overflow: 'auto' | ||
58 | + }); | ||
59 | + } | ||
60 | +}); | ||
61 | + | ||
62 | +//点击一级导航,弹出二级导航 | ||
63 | +$('.side-nav').on('click', 'li', function () { | ||
64 | + if ($(this).find('.sub-nav').size() > 0) { | ||
65 | + $('.sub-nav').removeClass('show'); | ||
66 | + $(this).find('.sub-nav').addClass('show'); | ||
67 | + } | ||
68 | +}); | ||
69 | + | ||
70 | +//返回一级导航,收起二级导航 | ||
71 | +$('.sub-nav').each(function () { | ||
72 | + $(this).find('li').eq(0).on('click', function (e) { | ||
73 | + $('.sub-nav').removeClass('show'); | ||
74 | + e.stopPropagation(); | ||
75 | + }); | ||
76 | +}); | ||
77 | + | ||
78 | +//二级导航样式控制 | ||
79 | +$('.sub-nav').on('mouseenter', 'li', function () { | ||
80 | + if ($(this).index() !== 0) { | ||
81 | + $(this).addClass('current').siblings().removeClass('current'); | ||
82 | + } | ||
83 | +}); | ||
84 | + | ||
85 | +//头部banner轮播 | ||
86 | +if ($('.banner-swiper').find('li').size() > 1) { | ||
87 | + bannerSwiper = new Swiper('.banner-swiper', { | ||
88 | + loop: true, | ||
89 | + autoplay: 3000, | ||
90 | + autoplayDisableOnInteraction: false, | ||
91 | + paginationClickable: true, | ||
92 | + slideElement: 'li', | ||
93 | + pagination: '.banner-top .pagination-inner' | ||
94 | + }); | ||
95 | +} | ||
96 | + | ||
97 | +//热门品牌滑动 | ||
98 | +// hotBrandsSwiper = new Swiper('.brands-swiper', { | ||
99 | +// grabCursor: true, | ||
100 | +// slidesPerView: 'auto', | ||
101 | +// wrapperClass: 'brands-list', | ||
102 | +// slideElement: 'li' | ||
103 | +// }); | ||
104 | + | ||
105 | +//推荐搭配滑动 | ||
106 | +recommendSwiper = new Swiper('.recommend-swiper', { | ||
107 | + grabCursor: true, | ||
108 | + slidesPerView: 'auto', | ||
109 | + wrapperClass: 'recommend-list', | ||
110 | + slideElement: 'li' | ||
111 | +}); | ||
112 | + | ||
113 | +//潮品话题轮播 | ||
114 | +if ($('.trend-topic-swiper').find('li').size() > 1) { | ||
115 | + trendTopicSwiper = new Swiper('.trend-topic-swiper', { | ||
116 | + loop: true, | ||
117 | + autoplay: 3000, | ||
118 | + autoplayDisableOnInteraction: false, | ||
119 | + paginationClickable: true, | ||
120 | + slideElement: 'li', | ||
121 | + pagination: '.trend-topic-content .pagination-inner' | ||
122 | + }); | ||
123 | +} | ||
124 | + | ||
125 | +//潮流上装/经典裤装等轮播 | ||
126 | +$('.category-swiper').each(function (i, index) { | ||
127 | + swiperClass = 'category-swiper' + i; | ||
128 | + $(this).addClass(swiperClass); | ||
129 | + if ($('.' + swiperClass).find('.swiper-slide').size() > 1) { | ||
130 | + goodsSwiper = new Swiper('.' + swiperClass, { | ||
131 | + loop: true, | ||
132 | + autoplay: 3000, | ||
133 | + autoplayDisableOnInteraction: false, | ||
134 | + paginationClickable: true, | ||
135 | + slideElement: 'li', | ||
136 | + pagination: '.' + swiperClass + ' .pagination-inner' | ||
137 | + }); | ||
138 | + } | ||
139 | +}); | ||
140 | + | ||
141 | + | ||
142 | +//回到顶部 | ||
143 | +// $('.back-to-top').bind('touchstart', function (e) { | ||
144 | +// e.preventDefault(); | ||
145 | +// $(window).scrollTop(0); | ||
146 | +// }); | ||
147 | + | ||
148 | +//关闭头部下载浮层 | ||
149 | +$('.header-download').on('click', '.close-btn', function () { | ||
150 | + $(this).parent().remove(); | ||
151 | +}); | ||
152 | + | ||
153 | + | ||
154 | +//logo动画 | ||
155 | +requestFrame = (function () { | ||
156 | + prefixList = ['webkit', 'moz', 'ms']; | ||
157 | + for (i = 0; i < prefixList.length; i++) { | ||
158 | + thisFunc = prefixList[i] + 'RequestAnimationFrame'; | ||
159 | + if (window[thisFunc]) { | ||
160 | + supportCss3 = true; | ||
161 | + return function (callback) { | ||
162 | + window[thisFunc](callback); | ||
163 | + }; | ||
164 | + } | ||
165 | + } | ||
166 | + return function (callback) { | ||
167 | + window.setTimeout(callback, 67); | ||
168 | + }; | ||
169 | +})(); | ||
170 | + | ||
171 | +function tsAnimate() { | ||
172 | + start = start + 10; | ||
173 | + $logotrans.css({ | ||
174 | + 'transform': 'rotateX(' + start + 'deg)', | ||
175 | + '-webkit-transform': 'rotateX(' + start + 'deg)', | ||
176 | + '-moz-transform': 'rotateX(' + start + 'deg)' | ||
177 | + }); | ||
178 | + if (start / 90 % 2 === 1) { | ||
179 | + if (isen) { | ||
180 | + $logotrans.addClass('animate'); | ||
181 | + isen = false; | ||
182 | + } else { | ||
183 | + $logotrans.removeClass('animate'); | ||
184 | + isen = true; | ||
185 | + } | ||
186 | + } | ||
187 | + if (start / 90 % 2 === 0 && start % 360 !== 0) { | ||
188 | + window.setTimeout(tsAnimate, 3000); | ||
189 | + } else { | ||
190 | + if (start % 360 === 0) { | ||
191 | + window.setTimeout(tsAnimate, 3 * 60 * 1000); | ||
192 | + } else { | ||
193 | + requestFrame(function () { | ||
194 | + tsAnimate(); | ||
195 | + }); | ||
196 | + } | ||
197 | + } | ||
198 | +} | ||
199 | + | ||
200 | +tsAnimate(); | ||
201 | + | ||
202 | +*/ |
static/js/homePage/index.js
0 → 100644
static/js/homePage/maybe-like.js
0 → 100644
1 | +/** | ||
2 | + * “你可能喜欢”模块JS | ||
3 | + * @author: xuqi(qi.xu@yoho.cn) | ||
4 | + * @date: 2015/7/15 | ||
5 | + */ | ||
6 | + | ||
7 | +/*var $ = require('yoho.jquery'), | ||
8 | + Mustache = require('yoho.mustache'), | ||
9 | + lazyLoad = require('yoho.lazyload'); | ||
10 | + | ||
11 | +var $maybeLike = $('.maybe-like:last'); | ||
12 | + | ||
13 | +var winH = $(window).height(), | ||
14 | + loading = false, | ||
15 | + end = false, | ||
16 | + page = 1, | ||
17 | + tpl, | ||
18 | + num, | ||
19 | + res, | ||
20 | + type = ''; | ||
21 | + | ||
22 | +var $goodList = $maybeLike.children('.goods-list'), | ||
23 | + mblTop; //页面内容固定,可以预先求出高度 | ||
24 | + | ||
25 | +var isLogin = 'Y'; //是否登录,后台提供,区分走Ajax还是页面跳转 | ||
26 | + | ||
27 | +if ($('.maybe-like').size() <= 0) { | ||
28 | + return; | ||
29 | +} | ||
30 | + | ||
31 | +mblTop = $maybeLike.offset().top; | ||
32 | + | ||
33 | +// 无可能喜欢模块时直接返回 | ||
34 | +if ($maybeLike.length === 0) { | ||
35 | + return; | ||
36 | +} | ||
37 | + | ||
38 | +//read good-info template | ||
39 | +$.get('/common/goodinfo', function (data) { | ||
40 | + tpl = '{{# goods}}' + data + '{{/ goods}}'; | ||
41 | + Mustache.parse(tpl); | ||
42 | +}); | ||
43 | + | ||
44 | + | ||
45 | +type = $('.mobile-wrap').hasClass('boys-wrap') ? 'index' : 'girl'; | ||
46 | + | ||
47 | +//商品收藏 | ||
48 | +$('.goods-list').delegate('.good-islike', 'touchstart', function (e) { | ||
49 | + var $cur, $good, id, url; | ||
50 | + | ||
51 | + if (isLogin === 'Y') { | ||
52 | + e.preventDefault(); // 阻止链接跳转改AJAX | ||
53 | + | ||
54 | + $cur = $(e.currentTarget); | ||
55 | + $good = $cur.closest('.good-info'); | ||
56 | + id = $good.data('id'); | ||
57 | + | ||
58 | + if ($cur.hasClass('good-like')) { | ||
59 | + url = '/' + type + '/cancelprise'; | ||
60 | + } else { | ||
61 | + url = '/' + type + '/prise'; | ||
62 | + } | ||
63 | + | ||
64 | + | ||
65 | + $.ajax({ | ||
66 | + type: 'GET', | ||
67 | + url: url, | ||
68 | + data: { | ||
69 | + id: id | ||
70 | + } | ||
71 | + }).then(function (data) { | ||
72 | + if (data.code === 200) { | ||
73 | + $cur.toggleClass('good-like'); | ||
74 | + } | ||
75 | + }); | ||
76 | + } | ||
77 | +}); | ||
78 | + | ||
79 | + | ||
80 | + | ||
81 | +//srcoll to load more | ||
82 | +$(window).scroll(function () { | ||
83 | + if (end || loading) { | ||
84 | + return; | ||
85 | + } | ||
86 | + | ||
87 | + if ($(window).scrollTop() + winH < mblTop + $maybeLike.height()) { | ||
88 | + return; | ||
89 | + } | ||
90 | + | ||
91 | + loading = true; | ||
92 | + num = $goodList.children('.good-info').length; | ||
93 | + $.ajax({ | ||
94 | + type: 'GET', | ||
95 | + url: '/' + type + '/getmore', | ||
96 | + data: { | ||
97 | + page: page + 1 | ||
98 | + } | ||
99 | + }).then(function (data) { | ||
100 | + if (data.code === 200) { | ||
101 | + res = data.data; | ||
102 | + | ||
103 | + if (res.end) { | ||
104 | + end = res.end; | ||
105 | + } | ||
106 | + | ||
107 | + $goodList.append(Mustache.render(tpl, { | ||
108 | + goods: res.goods | ||
109 | + })); | ||
110 | + | ||
111 | + //lazyLoad | ||
112 | + lazyLoad($goodList.children('.good-info:gt(' + (num - 1) + ')').find('img.lazy')); | ||
113 | + | ||
114 | + loading = false; | ||
115 | + page++; | ||
116 | + } | ||
117 | + }); | ||
118 | +});*/ |
1 | +{{# data}} | ||
2 | + {{> common/header}} | ||
3 | + {{> common/header_banner}} | ||
4 | + <!-- <div class="goods-container"> | ||
5 | + {{# ../goodsNav}} | ||
6 | + {{> common/goods_nav}} | ||
7 | + {{/ ../goodsNav}} | ||
8 | + | ||
9 | + {{# discountSection}} | ||
10 | + <div class="goods-group discount-detail"> | ||
11 | + <ul class="clearfix"> | ||
12 | + {{# list}} | ||
13 | + {{> common/goods_item}} | ||
14 | + {{/ list}} | ||
15 | + </ul> | ||
16 | + </div> | ||
17 | + {{/ discountSection}} | ||
18 | + </div> --> | ||
19 | + {{# goodsNav}} | ||
20 | + {{> common/goods_nav}} | ||
21 | + {{/ goodsNav}} | ||
22 | + {{> common/goods_container}} | ||
23 | +{{/ data}} |
1 | + | ||
2 | + {{> newsale/header}} | ||
3 | + {{# discountSection}} | ||
4 | + <div class="discount-section"> | ||
5 | + <ul class="clearfix"> | ||
6 | + {{# list}} | ||
7 | + <li class="clearfix"> | ||
8 | + <a href="{{url}}"> | ||
9 | + <img class="lazy" data-original="{{img}}" alt=""> | ||
10 | + <span class="title">{{title}}</span> | ||
11 | + <span class="time {{rush}}">{{time}}</span> | ||
12 | + </a> | ||
13 | + </li> | ||
14 | + {{/ list}} | ||
15 | + </ul> | ||
16 | + </div> | ||
17 | + {{/ discountSection}} | ||
18 | + | ||
19 | + |
1 | +{{# data}} | ||
2 | + {{> common/header}} | ||
3 | + <script type="text/javascript"> | ||
4 | + // 判断是否是微信浏览器 | ||
5 | + function isWeixin() { | ||
6 | + var ua = navigator.userAgent.toLowerCase(); | ||
7 | + if (ua.match(/MicroMessenger/i) == "micromessenger") { | ||
8 | + return true; | ||
9 | + } else { | ||
10 | + return false; | ||
11 | + } | ||
12 | + } | ||
13 | + | ||
14 | + if (isWeixin()) { | ||
15 | + document.getElementById('header').style.display = 'none'; | ||
16 | + } | ||
17 | + </script> | ||
18 | + {{> common/header_banner}} | ||
19 | + {{> common/sgoods_nav}} | ||
20 | + {{# rankList}} | ||
21 | + <div class="rank-main"> | ||
22 | + <ul> | ||
23 | + {{# list}} | ||
24 | + <li> | ||
25 | + <a class="clearfix" href="{{url}}"> | ||
26 | + <div class="item-img"> | ||
27 | + <img class="lazy" data-original="{{img}}"> | ||
28 | + </div> | ||
29 | + <div class="item-content"> | ||
30 | + <i class="rank-icon top">{{rank}}</i> | ||
31 | + <h2>{{title}}</h2> | ||
32 | + <p>{{active}}</p> | ||
33 | + <p>{{sPrice}}<span>{{price}}</span></p> | ||
34 | + </div> | ||
35 | + </a> | ||
36 | + </li> | ||
37 | + {{/ list}} | ||
38 | + </ul> | ||
39 | + </div> | ||
40 | + {{/ rankList}} | ||
41 | +{{/ data}} |
1 | +{{# data}} | ||
2 | + {{> common/header}} | ||
3 | + {{> common/header_banner}} | ||
4 | + <!-- <div class="goods-container"> | ||
5 | + {{# ../goodsNav}} | ||
6 | + {{> common/goods_nav}} | ||
7 | + {{/ ../goodsNav}} | ||
8 | + | ||
9 | + {{# onlyForMemberSection}} | ||
10 | + <div class="goods-group only-for-member"> | ||
11 | + <ul class="clearfix"> | ||
12 | + {{# list}} | ||
13 | + {{> common/goods_item}} | ||
14 | + {{/ list}} | ||
15 | + </ul> | ||
16 | + </div> | ||
17 | + {{/ onlyForMemberSection}} | ||
18 | + </div> --> | ||
19 | + {{# goodsNav}} | ||
20 | + {{> common/goods_nav}} | ||
21 | + {{/ goodsNav}} | ||
22 | + {{> common/goods_container}} | ||
23 | +{{/ data}} |
1 | +{{# data}} | ||
2 | + {{> common/header}} | ||
3 | + {{> common/header_banner}} | ||
4 | + <!-- <div class="goods-container"> | ||
5 | + {{# ../goodsNav}} | ||
6 | + {{> common/goods_nav}} | ||
7 | + {{/ ../goodsNav}} | ||
8 | + {{# outletSection}} | ||
9 | + <div class="goods-group outlets"> | ||
10 | + <ul class="clearfix"> | ||
11 | + {{# list}} | ||
12 | + {{> common/goods_item}} | ||
13 | + {{/ list}} | ||
14 | + </ul> | ||
15 | + </div> | ||
16 | + {{/ outletSection}} | ||
17 | + </div> --> | ||
18 | + {{# goodsNav}} | ||
19 | + {{> common/goods_nav}} | ||
20 | + {{/ goodsNav}} | ||
21 | + {{> common/goods_container}} | ||
22 | + | ||
23 | +{{/ data}} |
1 | +{{# data}} | ||
2 | + {{> common/header}} | ||
3 | + {{> common/header_banner}} | ||
4 | + <!-- <div class="goods-container"> | ||
5 | + {{# ../goodsNav}} | ||
6 | + {{> common/goods_nav}} | ||
7 | + {{/ ../goodsNav}} | ||
8 | + | ||
9 | + {{# reducedPriceSection}} | ||
10 | + <div class="goods-group reduced-price"> | ||
11 | + <ul class="clearfix"> | ||
12 | + {{# list}} | ||
13 | + {{> common/goods_item}} | ||
14 | + {{/ list}} | ||
15 | + </ul> | ||
16 | + </div> | ||
17 | + {{/ reducedPriceSection}} | ||
18 | + </div> --> | ||
19 | + {{# goodsNav}} | ||
20 | + {{> common/goods_nav}} | ||
21 | + {{/ goodsNav}} | ||
22 | + {{> common/goods_container}} | ||
23 | +{{/ data}} |
1 | + | ||
2 | + {{> newsale/header}} | ||
3 | + {{> newsale/header_banner}} | ||
4 | + {{# saleSection}} | ||
5 | + <div class="sale-section"> | ||
6 | + <ul class="clearfix"> | ||
7 | + {{# list}} | ||
8 | + <li> | ||
9 | + <a href="{{url}}"> | ||
10 | + <img src="{{img}}" alt=""> | ||
11 | + </a> | ||
12 | + </li> | ||
13 | + {{/ list}} | ||
14 | + </ul> | ||
15 | + </div> | ||
16 | + {{/ saleSection}} | ||
17 | + {{# latestSale}} | ||
18 | + {{> newsale/floor_header}} | ||
19 | + {{/ latestSale}} | ||
20 | + {{# goodsNav}} | ||
21 | + {{> newsale/goods_nav}} | ||
22 | + {{/ goodsNav}} | ||
23 | + {{> newsale/goods_container}} |
1 | +{{# data}} | ||
2 | + {{> newsale/header}} | ||
3 | + {{> newsale/header_banner}} | ||
4 | + <!-- <div class="goods-container"> | ||
5 | + {{# ../goodsNav}} | ||
6 | + {{> common/goods_nav}} | ||
7 | + {{/ ../goodsNav}} | ||
8 | + | ||
9 | + {{# shortInSizeSection}} | ||
10 | + <div class="goods-group short-in-size"> | ||
11 | + <ul class="clearfix"> | ||
12 | + {{# list}} | ||
13 | + {{> common/goods_item}} | ||
14 | + {{/ list}} | ||
15 | + </ul> | ||
16 | + </div> | ||
17 | + {{/ shortInSizeSection}} | ||
18 | + </div> --> | ||
19 | + {{# goodsNav}} | ||
20 | + {{> newsale/goods_nav}} | ||
21 | + {{/ goodsNav}} | ||
22 | + {{> newsale/goods_container}} | ||
23 | +{{/ data}} |
1 | +<div class="good-info" data-id="{{id}}"> | ||
2 | + <div class="tag-container clearfix"> | ||
3 | + {{# tags}} | ||
4 | + {{# isNew}} | ||
5 | + <p class="good-tag new-tag">NEW</p> | ||
6 | + {{/ isNew}} | ||
7 | + {{# isReNew}} | ||
8 | + <p class="good-tag renew-tag">再到着</p> | ||
9 | + {{/ isReNew}} | ||
10 | + {{# isSale}} | ||
11 | + <p class="good-tag sale-tag">SALE</p> | ||
12 | + {{/ isSale}} | ||
13 | + {{# isYohood}} | ||
14 | + <div class="good-tag yohood-tag"></div> | ||
15 | + {{/ isYohood}} | ||
16 | + {{# isLimit}} | ||
17 | + <p class="good-tag limit-tag">限量商品</p> | ||
18 | + {{/ isLimit}} | ||
19 | + {{/ tags}} | ||
20 | + </div> | ||
21 | + <div class="good-detail-img"> | ||
22 | + <!-- <a class="good-islike {{# isLike}}good-like{{/ isLike}} iconfont" href="{{likeUrl}}"></a> --> | ||
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 class="vip-tag">更优惠</div> | ||
41 | + </div> | ||
42 | +</div> | ||
43 | + |
1 | +{{# goodsContainer}} | ||
2 | +<div id="goods-content" class="goods-content {{# vipNoLogin}}vip-no-login{{/ vipNoLogin}} {{# vipLogin}}vip-card vip-{{.}}{{/ vipLogin}} clearfix"> | ||
3 | + {{> common/script_good_info}} | ||
4 | + <div class="new-patterns-container hide"> | ||
5 | + {{# goods}} | ||
6 | + {{> common/good_info}} | ||
7 | + {{/ goods}} | ||
8 | + </div> | ||
9 | + <div class="sales-volume-container hide"></div> | ||
10 | + <div class="price-container hide"></div> | ||
11 | + <div class="cloth-container hide"></div> | ||
12 | + <div class="pants-container hide"></div> | ||
13 | + <div class="shose-container hide"></div> | ||
14 | + <div class="other-container hide"></div> | ||
15 | + <div id="screen-mask" class="screen-mask hide"></div> | ||
16 | + <div id="screen-content" class="screen-content hide clearfix"> | ||
17 | + <ul class="classify"> | ||
18 | + <li class="gender c-item active"> | ||
19 | + 性别: | ||
20 | + <h1 id="show-gender" class="chosed default">BOYS</h1> | ||
21 | + </li> | ||
22 | + <li class="brand c-item"> | ||
23 | + 品牌: | ||
24 | + <h1 id="show-brand" class="chosed default">全部品牌</h1> | ||
25 | + </li> | ||
26 | + <li class="msort c-item"> | ||
27 | + 品类: | ||
28 | + <h1 id="show-msort" class="chosed default">全部品类</h1> | ||
29 | + </li> | ||
30 | + <li class="color c-item"> | ||
31 | + 颜色: | ||
32 | + <h1 id="show-color" class="chosed default">全部颜色</h1> | ||
33 | + </li> | ||
34 | + <li class="size c-item"> | ||
35 | + 尺码: | ||
36 | + <h1 id="show-size" class="chosed default">全部尺码</h1> | ||
37 | + </li> | ||
38 | + <li class="price c-item"> | ||
39 | + 价格: | ||
40 | + <h1 id="show-price" class="chosed default">全部价格</h1> | ||
41 | + </li> | ||
42 | + <li class="discount c-item"> | ||
43 | + 折扣: | ||
44 | + <h1 id="show-discount" class="chosed default">全部折扣</h1> | ||
45 | + </li> | ||
46 | + </ul> | ||
47 | + <div class="sub-classify-container"> | ||
48 | + <ul id="sub-gender" class="sub-classify" data-type="gender"></ul> | ||
49 | + <ul id="sub-brand" class="sub-classify hide" data-type="brand"></ul> | ||
50 | + <ul id="sub-msort" class="sub-classify hide" data-type="msort"></ul> | ||
51 | + <ul id="sub-color" class="sub-classify hide" data-type="color"></ul> | ||
52 | + <ul id="sub-size" class="sub-classify hide" data-type="size"></ul> | ||
53 | + <ul id="sub-price" class="sub-classify hide" data-type="price"></ul> | ||
54 | + <ul id="sub-discount" class="sub-classify hide" data-type="discount"></ul> | ||
55 | + </div> | ||
56 | + </div> | ||
57 | +</div> | ||
58 | +{{/ goodsContainer}} |
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 | +<ul id="goods-nav" class="goods-nav"> | ||
2 | + {{# all}} | ||
3 | + <li class="nav-item all-nav focus"> | ||
4 | + <span>全部</span> | ||
5 | + </li> | ||
6 | + {{/ all}} | ||
7 | + {{# newPatterns}} | ||
8 | + <li class="nav-item new-patterns-nav focus"> | ||
9 | + <span>最新</span> | ||
10 | + </li> | ||
11 | + {{/ newPatterns}} | ||
12 | + {{# price}} | ||
13 | + <li class="nav-item price-nav"> | ||
14 | + <span>价格</span> | ||
15 | + <span class="sort"> | ||
16 | + <i class="up iconfont"></i> | ||
17 | + <i class="down iconfont cur"></i> | ||
18 | + </span> | ||
19 | + </li> | ||
20 | + {{/ price}} | ||
21 | + {{# salesCount}} | ||
22 | + <li class="nav-item sales-count-nav"> | ||
23 | + <span>销量</span> | ||
24 | + </li> | ||
25 | + {{/ salesCount}} | ||
26 | + {{# salesVolume}} | ||
27 | + <li class="nav-item sales-volume-nav"> | ||
28 | + <span>折扣</span> | ||
29 | + <span class="sort"> | ||
30 | + <i class="up iconfont"></i> | ||
31 | + <i class="down iconfont cur"></i> | ||
32 | + </span> | ||
33 | + </li> | ||
34 | + {{/ salesVolume}} | ||
35 | + | ||
36 | + {{# cloth}} | ||
37 | + <li class="nav-item cloth-nav"> | ||
38 | + <span>上装</span> | ||
39 | + </li> | ||
40 | + {{/ cloth}} | ||
41 | + | ||
42 | + {{# pants}} | ||
43 | + <li class="nav-item pants-nav"> | ||
44 | + <span>下装</span> | ||
45 | + </li> | ||
46 | + {{/ pants}} | ||
47 | + | ||
48 | + {{# shoes}} | ||
49 | + <li class="nav-item shose-nav"> | ||
50 | + <span>鞋</span> | ||
51 | + </li> | ||
52 | + {{/ shoes}} | ||
53 | + | ||
54 | + {{# other}} | ||
55 | + <li class="nav-item other-nav"> | ||
56 | + <span>其他</span> | ||
57 | + </li> | ||
58 | + {{/ other}} | ||
59 | + | ||
60 | + {{# screen}} | ||
61 | + <li class="nav-item screen-nav"> | ||
62 | + <span>筛选</span> | ||
63 | + <span class="sort"> | ||
64 | + <i class="iconfont"></i> | ||
65 | + </span> | ||
66 | + </li> | ||
67 | + {{/ screen}} | ||
68 | +</ul> | ||
69 | +{{# sizeNav}} | ||
70 | +<div id="size-nav" class="size-nav swiper-container"> | ||
71 | + <ul class="swiper-wrapper"> | ||
72 | + {{# list}} | ||
73 | + <li class="size-nav-item swiper-slide" data-size="{{size}}">{{textCn}}</li> | ||
74 | + {{/ list}} | ||
75 | + </ul> | ||
76 | +</div> | ||
77 | + | ||
78 | +{{/ sizeNav}} |
1 | +{{# headerBanner}} | ||
2 | +<div class="header-banner swiper-container"> | ||
3 | + <div class="swiper-wrapper"> | ||
4 | + {{# list}} | ||
5 | + <div class="swiper-slide"> | ||
6 | + <a href="{{url}}"> | ||
7 | + <img src="{{img}}"> | ||
8 | + {{# desc}} | ||
9 | + <span class="desc">{{../desc}}</span> | ||
10 | + {{/ desc}} | ||
11 | + </a> | ||
12 | + </div> | ||
13 | + {{/ list}} | ||
14 | + </div> | ||
15 | +</div> | ||
16 | +{{/ headerBanner}} |
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> |
@@ -12,7 +12,6 @@ class LifestyleController extends AbstractAction | @@ -12,7 +12,6 @@ class LifestyleController extends AbstractAction | ||
12 | 12 | ||
13 | public function indexAction() | 13 | public function indexAction() |
14 | { | 14 | { |
15 | - | ||
16 | // 显示侧边栏 | 15 | // 显示侧边栏 |
17 | $this->setNavSide(); | 16 | $this->setNavSide(); |
18 | 17 | ||
@@ -24,16 +23,456 @@ class LifestyleController extends AbstractAction | @@ -24,16 +23,456 @@ class LifestyleController extends AbstractAction | ||
24 | $data = array(); | 23 | $data = array(); |
25 | 24 | ||
26 | // 频道数据 | 25 | // 频道数据 |
27 | - $channelData = IndexData::getUserChannelData(0, '1,3', '9aa25f5133f011ec96c2045eb15ae425'); | 26 | + $channelData = IndexData::getUserChannelData(0, '2,3', '201504091403002'); |
28 | $channels = array(); | 27 | $channels = array(); |
29 | if($channelData['code'] == 200) | 28 | if($channelData['code'] == 200) |
30 | { | 29 | { |
31 | - $data['content'] = FloorProcess::getContent($channelData['data'], 4); | 30 | + $data['content'] = FloorProcess::getContent($channelData['data'], 2); |
32 | } | 31 | } |
33 | 32 | ||
33 | + /*// 也许喜欢 | ||
34 | + $maybeLikeData = RecomData::mayLike('2,3', 2, false); | ||
35 | + $maybeLike = array(); | ||
36 | + if($maybeLikeData['code'] == 200) | ||
37 | + { | ||
38 | + $maybeLike = FloorProcess::maybeLike($maybeLikeData['data']['product_list']); | ||
39 | + $num = count($data['content']); | ||
40 | + $data['content'][] = array('maybeLike' =>$maybeLike); | ||
41 | + }*/ | ||
42 | + | ||
43 | + $data = array( | ||
44 | + 'headerDownload' => array( | ||
45 | + 'img' => 'http://img11.static.yhbimg.com/adpic/2015/02/28/18/01d83bfad41c8fca8fd1ad334216d7d733.jpg?imageView/2/w/640/h/480', | ||
46 | + 'url' => 'http://www.baidu.com' | ||
47 | + ), | ||
48 | + 'homeHeader' => array( | ||
49 | + 'bgColor' => '#FF88AE', | ||
50 | + 'searchUrl' => '' | ||
51 | + ), | ||
52 | + 'sideNav' => array( | ||
53 | + array( | ||
54 | + 'textCn' => '男生', | ||
55 | + 'textEn' => 'Boys', | ||
56 | + 'styleClass' => 'boys', | ||
57 | + 'url' => '' | ||
58 | + ), | ||
59 | + array( | ||
60 | + 'textCn' => '女生', | ||
61 | + 'textEn' => 'GIRLS', | ||
62 | + 'styleClass' => 'girls', | ||
63 | + 'url' => '' | ||
64 | + ), | ||
65 | + array( | ||
66 | + 'textCn' => '潮童', | ||
67 | + 'textEn' => 'KIDS', | ||
68 | + 'styleClass' => 'kids', | ||
69 | + 'url' => '' | ||
70 | + ), | ||
71 | + array( | ||
72 | + 'textCn' => '创意生活', | ||
73 | + 'textEn' => 'LIFE STYLE', | ||
74 | + 'styleClass' => 'life', | ||
75 | + 'url' => '' | ||
76 | + ), | ||
77 | + array( | ||
78 | + 'textCn' => '逛', | ||
79 | + 'textEn' => 'TRENDFINDER', | ||
80 | + 'styleClass' => 'guang', | ||
81 | + 'subNav' => array( | ||
82 | + 'list' => array( | ||
83 | + array( | ||
84 | + 'textCn' => '逛', | ||
85 | + 'textEn' => 'TrendFinder', | ||
86 | + 'back' => true, | ||
87 | + 'bgColor' => '#fd307f' | ||
88 | + ), | ||
89 | + array( | ||
90 | + 'textCn' => '查看全部', | ||
91 | + 'url' => '' | ||
92 | + ), | ||
93 | + array( | ||
94 | + 'textCn' => '只看男生', | ||
95 | + 'textEn' => 'Boys', | ||
96 | + 'url' => '' | ||
97 | + ), | ||
98 | + array( | ||
99 | + 'textCn' => '只看女生', | ||
100 | + 'textEn' => 'Girls', | ||
101 | + 'url' => '', | ||
102 | + 'isSelect' => true | ||
103 | + ) | ||
104 | + ) | ||
105 | + ) | ||
106 | + ) | ||
107 | + ), | ||
108 | + 'content' => array( | ||
109 | + 'bannerTop' => array( | ||
110 | + 'list' => array( | ||
111 | + array( | ||
112 | + 'url' => '', | ||
113 | + 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg' | ||
114 | + ), | ||
115 | + array( | ||
116 | + 'url' => '', | ||
117 | + 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg' | ||
118 | + ), | ||
119 | + array( | ||
120 | + 'url' => '', | ||
121 | + 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg' | ||
122 | + ) | ||
123 | + ) | ||
124 | + ), | ||
125 | + 'iconsEnter' => array( | ||
126 | + 'list' => array( | ||
127 | + array( | ||
128 | + 'url' => '', | ||
129 | + 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg', | ||
130 | + 'text' => '新品到着' | ||
131 | + ), | ||
132 | + array( | ||
133 | + 'url' => '', | ||
134 | + 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg', | ||
135 | + 'text' => '全球优选' | ||
136 | + ), | ||
137 | + array( | ||
138 | + 'url' => '', | ||
139 | + 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg', | ||
140 | + 'text' => '明星潮牌' | ||
141 | + ), | ||
142 | + array( | ||
143 | + 'url' => '', | ||
144 | + 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg', | ||
145 | + 'text' => '全部品类' | ||
146 | + ), | ||
147 | + array( | ||
148 | + 'url' => '', | ||
149 | + 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg', | ||
150 | + 'text' => '逛' | ||
151 | + ), | ||
152 | + array( | ||
153 | + 'url' => '', | ||
154 | + 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg', | ||
155 | + 'text' => '搭配指南' | ||
156 | + ), | ||
157 | + array( | ||
158 | + 'url' => '', | ||
159 | + 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg', | ||
160 | + 'text' => '潮品推荐' | ||
161 | + ), | ||
162 | + array( | ||
163 | + 'url' => '', | ||
164 | + 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg', | ||
165 | + 'text' => '折扣精选' | ||
166 | + ) | ||
167 | + ) | ||
168 | + ), | ||
169 | + 'bannerCenter' => array( | ||
170 | + 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/24/16/02ee02f1dd11c9103f7cf7995eafdaa605.jpg', | ||
171 | + 'url' => '' | ||
172 | + ), | ||
173 | + | ||
174 | + 'hotCategory' => array( | ||
175 | + 'title' => array( | ||
176 | + 'name' => '热门品类' | ||
177 | + ), | ||
178 | + 'list' => array( | ||
179 | + array( | ||
180 | + 'textCn' => '卫衣', | ||
181 | + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
182 | + 'url' => '' | ||
183 | + ), | ||
184 | + array( | ||
185 | + 'textCn' => 'T恤', | ||
186 | + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
187 | + 'url' => '' | ||
188 | + ), | ||
189 | + array( | ||
190 | + 'textCn' => '打底衫', | ||
191 | + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
192 | + 'url' => '' | ||
193 | + ), | ||
194 | + array( | ||
195 | + 'textCn' => '打底衫', | ||
196 | + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
197 | + 'url' => '' | ||
198 | + ), | ||
199 | + array( | ||
200 | + 'textCn' => '打底衫', | ||
201 | + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
202 | + 'url' => '' | ||
203 | + ), | ||
204 | + array( | ||
205 | + 'textCn' => '打底衫', | ||
206 | + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
207 | + 'url' => '' | ||
208 | + ), | ||
209 | + array( | ||
210 | + 'textCn' => '打底衫', | ||
211 | + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
212 | + 'url' => '' | ||
213 | + ), | ||
214 | + array( | ||
215 | + 'textCn' => '打底衫', | ||
216 | + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
217 | + 'url' => '' | ||
218 | + ) | ||
219 | + ) | ||
220 | + ), | ||
221 | + 'hotBrands' => array( | ||
222 | + 'title' => array( | ||
223 | + 'name' => '热门品牌' | ||
224 | + ), | ||
225 | + 'list' => array( | ||
226 | + array( | ||
227 | + 'textCn' => 'Moussy', | ||
228 | + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
229 | + 'url' => '' | ||
230 | + ), | ||
231 | + array( | ||
232 | + 'textCn' => 'Moussy', | ||
233 | + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
234 | + 'url' => '' | ||
235 | + ), | ||
236 | + array( | ||
237 | + 'textCn' => 'Moussy', | ||
238 | + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
239 | + 'url' => '' | ||
240 | + ), | ||
241 | + array( | ||
242 | + 'textCn' => 'Moussy', | ||
243 | + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
244 | + 'url' => '' | ||
245 | + ), | ||
246 | + array( | ||
247 | + 'textCn' => 'Moussy', | ||
248 | + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
249 | + 'url' => '' | ||
250 | + ), | ||
251 | + array( | ||
252 | + 'textCn' => 'Moussy', | ||
253 | + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
254 | + 'url' => '' | ||
255 | + ) | ||
256 | + ) | ||
257 | + ), | ||
258 | + | ||
259 | + 'trendColloaction' => array( | ||
260 | + 'title' => array( | ||
261 | + 'title' => '潮人 ▪ 搭配', | ||
262 | + 'more_name' => '...', | ||
263 | + 'more_url' => 'http://www.yohobuy.com?openby:yohobuy={"action":"go.guangchannel","params":{"id":3,"name":"\u6f6e\u4eba"}}' | ||
264 | + ), | ||
265 | + 'article' => array( | ||
266 | + array( | ||
267 | + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
268 | + 'url' => '' | ||
269 | + ), | ||
270 | + array( | ||
271 | + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
272 | + 'url' => '' | ||
273 | + ) | ||
274 | + ), | ||
275 | + | ||
276 | + 'recommend_collocation' => array( | ||
277 | + array( | ||
278 | + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
279 | + 'url' => '' | ||
280 | + ), | ||
281 | + array( | ||
282 | + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
283 | + 'url' => '' | ||
284 | + ), | ||
285 | + array( | ||
286 | + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
287 | + 'url' => '' | ||
288 | + ), | ||
289 | + array( | ||
290 | + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
291 | + 'url' => '' | ||
292 | + ), | ||
293 | + array( | ||
294 | + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
295 | + 'url' => '' | ||
296 | + ) | ||
297 | + ) | ||
298 | + ), | ||
299 | + 'trendTopics' => array( | ||
300 | + 'title' => array( | ||
301 | + 'title' => '潮品 ▪ 话题', | ||
302 | + 'more_name' => '...', | ||
303 | + 'more_url' => 'http://www.yohobuy.com?openby:yohobuy={"action":"go.guangchannel","params":{"id":3,"name":"\u6f6e\u4eba"}}' | ||
304 | + ), | ||
305 | + 'list' => array( | ||
306 | + array( | ||
307 | + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
308 | + 'url' => '', | ||
309 | + 'title' => '现代裁剪', | ||
310 | + 'time' => '2月13日 12:34' | ||
311 | + ), | ||
312 | + array( | ||
313 | + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
314 | + 'url' => '', | ||
315 | + 'title' => '现代裁剪', | ||
316 | + 'time' => '2月13日 12:34' | ||
317 | + ), | ||
318 | + array( | ||
319 | + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
320 | + 'url' => '', | ||
321 | + 'title' => '现代裁剪', | ||
322 | + 'time' => '2月13日 12:34' | ||
323 | + ) | ||
324 | + ) | ||
325 | + ), | ||
326 | + 'goodsCategory' => array( | ||
327 | + 'title' => array( | ||
328 | + 'title' => '潮流时装', | ||
329 | + 'more_name' => '...', | ||
330 | + 'more_url' => 'http://www.yohobuy.com?openby:yohobuy={"action":"go.guangchannel","params":{"id":3,"name":"\u6f6e\u4eba"}}' | ||
331 | + ), | ||
332 | + 'big_image' => array( | ||
333 | + 'list' => array( | ||
334 | + array( | ||
335 | + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
336 | + 'url' => '' | ||
337 | + ) | ||
338 | + ) | ||
339 | + ), | ||
340 | + 'list' => array( | ||
341 | + array( | ||
342 | + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
343 | + 'url' => '', | ||
344 | + 'textCn' => '手表' | ||
345 | + ), | ||
346 | + array( | ||
347 | + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
348 | + 'url' => '', | ||
349 | + 'textCn' => '烛台' | ||
350 | + ), | ||
351 | + array( | ||
352 | + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
353 | + 'url' => '', | ||
354 | + 'textCn' => '围巾' | ||
355 | + ), | ||
356 | + array( | ||
357 | + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
358 | + 'url' => '', | ||
359 | + 'textCn' => '盘子' | ||
360 | + ), | ||
361 | + array( | ||
362 | + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
363 | + 'url' => '', | ||
364 | + 'textCn' => '耳机' | ||
365 | + ) | ||
366 | + ) | ||
367 | + ), | ||
368 | + 'creativeLife' => array( | ||
369 | + 'title' => array( | ||
370 | + 'title' => '新入住品牌', | ||
371 | + 'more_name' => '...', | ||
372 | + 'more_url' => 'http://www.yohobuy.com?openby:yohobuy={"action":"go.guangchannel","params":{"id":3,"name":"\u6f6e\u4eba"}}' | ||
373 | + ), | ||
374 | + 'banner' => 'http://img10.static.yhbimg.com/yhb-img01/2015/07/09/18/0119ffceddb0819d36d74b408bd743b4a9.jpg?imageView/2/w/640/h/640', | ||
375 | + 'classify' => array( | ||
376 | + array( | ||
377 | + 'url' => '', | ||
378 | + 'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/04/10/05/029bef1041343ea2e31dc0423f2f176589.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
379 | + 'name' => '手表' | ||
380 | + ), array( | ||
381 | + 'url' => '', | ||
382 | + 'img' => 'http://img12.static.yhbimg.com/goodsimg/2015/07/07/09/02271a775d17649860abec4387b4559e26.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
383 | + 'name' => '烛台' | ||
384 | + ), array( | ||
385 | + 'url' => '', | ||
386 | + 'img' => 'http://img12.static.yhbimg.com/goodsimg/2015/05/19/07/02a269d20ed44803eee33e255fe88d7873.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
387 | + 'name' => '围巾' | ||
388 | + ), array( | ||
389 | + 'url' => '', | ||
390 | + 'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/06/01/07/02fe94083352435ce53b5d90812cc5bdbd.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
391 | + 'name' => '盘子' | ||
392 | + ), array( | ||
393 | + 'url' => '', | ||
394 | + 'img' => 'http://img12.static.yhbimg.com/goodsimg/2015/07/08/07/028db8a2afbe4ecbf37bebc7e98e8e1e80.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
395 | + 'name' => '耳机' | ||
396 | + ), array( | ||
397 | + 'url' => '', | ||
398 | + 'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/04/22/02/02a1b688b6dafd786f391e0624aea1e93b.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
399 | + 'name' => '生活' | ||
400 | + ) | ||
401 | + ) | ||
402 | + ), | ||
403 | + | ||
404 | + | ||
405 | + 'plusStar' => array( | ||
406 | + array( | ||
407 | + 'name' => 'PLUS 全球优选', | ||
408 | + 'url' => '', | ||
409 | + 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/07/13/15/014f7ba48071160053ac3b8f045b9fc264.jpg?imageView/2/w/640/h/640' | ||
410 | + ), | ||
411 | + array( | ||
412 | + 'name' => 'PLUS 全球优选', | ||
413 | + 'url' => '', | ||
414 | + 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/07/13/15/014f7ba48071160053ac3b8f045b9fc264.jpg?imageView/2/w/640/h/640' | ||
415 | + ) | ||
416 | + ), | ||
417 | + | ||
418 | + 'maybeLike' => array( | ||
419 | + 'goods' => array( | ||
420 | + array( | ||
421 | + 'id' => 1, | ||
422 | + 'thumb' => 'http://img11.static.yhbimg.com/goodsimg/2015/03/02/07/01ebfb219e22770ffb0c2c3a2cbb2b4bef.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
423 | + 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣', | ||
424 | + 'isLike' => false, | ||
425 | + 'price' => 1268, | ||
426 | + 'salePrice' => 589, | ||
427 | + 'isSale' => true, | ||
428 | + 'isFew' => true, | ||
429 | + 'isNew' => false, | ||
430 | + 'url' => '' | ||
431 | + ), array( | ||
432 | + 'id' => 2, | ||
433 | + 'thumb' => 'http://img13.static.yhbimg.com/goodsimg/2015/03/03/08/023d70c59e81ccbfb39404487aaf642da2.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
434 | + 'name' => 'CLOTtee 撞色连帽外套', | ||
435 | + 'isLike' => false, | ||
436 | + 'price' => 488, | ||
437 | + 'salePrice' => 139, | ||
438 | + 'isSale' => true, | ||
439 | + 'isFew' => true, | ||
440 | + 'isNew' => false, | ||
441 | + 'url' => '' | ||
442 | + ), array( | ||
443 | + 'id' => 3, | ||
444 | + 'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/03/02/08/02e2d44125e95495e3152aa459fa6b9b0c.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
445 | + 'name' => 'HALFGIRL 插肩棒球服短裙套装', | ||
446 | + 'isLike' => true, | ||
447 | + 'price' => 478, | ||
448 | + 'salePrice' => 208, | ||
449 | + 'isSale' => true, | ||
450 | + 'isFew' => true, | ||
451 | + 'isNew' => false, | ||
452 | + 'url' => '' | ||
453 | + ), array( | ||
454 | + 'id' => 4, | ||
455 | + 'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/03/03/08/022f25fbe177ee12803c522f04fcce06d0.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
456 | + 'name' => '黄伟文Wyman X yohood联名商品YYYOHOOD连帽卫衣', | ||
457 | + 'isLike' => false, | ||
458 | + 'salePrice' => 148, | ||
459 | + 'isSale' => false, | ||
460 | + 'isFew' => false, | ||
461 | + 'isNew' => true, | ||
462 | + 'url' => '' | ||
463 | + ) | ||
464 | + ) | ||
465 | + ), | ||
466 | + | ||
467 | + 'bannerBottom' => array( | ||
468 | + 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/24/16/02ee02f1dd11c9103f7cf7995eafdaa605.jpg', | ||
469 | + 'url' => '' | ||
470 | + ) | ||
471 | + | ||
472 | + )); | ||
473 | + | ||
34 | $this->_view->assign('title', 'YOHO!有货'); | 474 | $this->_view->assign('title', 'YOHO!有货'); |
35 | $this->_view->display('index', $data); | 475 | $this->_view->display('index', $data); |
36 | - | ||
37 | - | ||
38 | } | 476 | } |
39 | -} | 477 | + |
478 | +} |
-
Please register or login to post a comment