Showing
10 changed files
with
824 additions
and
6 deletions
1 | {{> layout/header}} | 1 | {{> layout/header}} |
2 | <div class="home-page yoho-page"> | 2 | <div class="home-page yoho-page"> |
3 | - I am boys page | 3 | + {{# boy}} |
4 | + <div class="slide-container"> | ||
5 | + {{#if bigSlide}} | ||
6 | + <div class="big-slide"> | ||
7 | + <ul> | ||
8 | + {{# bigSlide}} | ||
9 | + <li> | ||
10 | + <a href="{{href}}"> | ||
11 | + <img src="{{img}}" alt=""> | ||
12 | + </a> | ||
13 | + </li> | ||
14 | + {{/ bigSlide}} | ||
15 | + </ul> | ||
16 | + <div class="slide-switch"> | ||
17 | + <a class="prev" href="javascript:;"> | ||
18 | + <span class="iconfont"></span> | ||
19 | + </a> | ||
20 | + <a class="next" href="javascript:;"> | ||
21 | + <span class="iconfont"></span> | ||
22 | + </a> | ||
23 | + </div> | ||
24 | + </div> | ||
25 | + {{/if}} | ||
26 | + | ||
27 | + {{#if smallSlide}} | ||
28 | + <div class="small-slide"> | ||
29 | + <ul class="clearfix"> | ||
30 | + {{# smallSlide}} | ||
31 | + <li> | ||
32 | + <a href="{{href}}"></a> | ||
33 | + <img src="{{img}}" alt=""> | ||
34 | + </li> | ||
35 | + {{/ smallSlide}} | ||
36 | + </ul> | ||
37 | + </div> | ||
38 | + {{/if}} | ||
39 | + </div> | ||
40 | + {{# newReport}} | ||
41 | + <div class="new-report clearfix"> | ||
42 | + {{> index/floor_header}} | ||
43 | + | ||
44 | + <ul class="report-list clearfix"> | ||
45 | + {{# list}} | ||
46 | + {{#unless @last}} | ||
47 | + <li> | ||
48 | + <a href="{{href}}"> | ||
49 | + <img src="{{img}}" alt=""> | ||
50 | + </a> | ||
51 | + </li> | ||
52 | + {{/unless}} | ||
53 | + {{/ list}} | ||
54 | + </ul> | ||
55 | + | ||
56 | + {{# list}} | ||
57 | + {{#if @last}} | ||
58 | + <div class="last-item"> | ||
59 | + <a href="{{href}}"> | ||
60 | + <img src="{{img}}" alt=""> | ||
61 | + </a> | ||
62 | + </div> | ||
63 | + {{/if}} | ||
64 | + {{/ list}} | ||
65 | + </div> | ||
66 | + {{/ newReport}} | ||
67 | + {{# preferenceBrand}} | ||
68 | + <div class="preference-brand"> | ||
69 | + {{> index/floor_header}} | ||
70 | + <div class="img-brand"> | ||
71 | + <ul class="img-list clearfix"> | ||
72 | + {{# imgBrand}} | ||
73 | + <li class="img-item"> | ||
74 | + <a href="{{href}}"> | ||
75 | + <img src="{{img}}" alt=""> | ||
76 | + </a> | ||
77 | + </li> | ||
78 | + {{/ imgBrand}} | ||
79 | + </ul> | ||
80 | + <div class="img-brand-switch"> | ||
81 | + <a class="prev" href="javascript:;"> | ||
82 | + <span class="iconfont"></span> | ||
83 | + </a> | ||
84 | + <a class="next" href="javascript:;"> | ||
85 | + <span class="iconfont"></span> | ||
86 | + </a> | ||
87 | + </div> | ||
88 | + </div> | ||
89 | + <div class="logo-brand"> | ||
90 | + <ul class="clearfix"> | ||
91 | + {{# logoBrand}} | ||
92 | + {{#if switch}} | ||
93 | + <li class="logo-brand-switch"> | ||
94 | + <a class="prev iconfont" href="javascript:;"></a> | ||
95 | + <a class="next iconfont" href="javascript:;"></a> | ||
96 | + </li> | ||
97 | + {{else}} | ||
98 | + {{#if more}} | ||
99 | + <li class="brand-more"> | ||
100 | + <a href="{{href}}">MORE ></a> | ||
101 | + </li> | ||
102 | + {{else}} | ||
103 | + <li> | ||
104 | + <a href="{{href}}"> | ||
105 | + <img src="{{img}}" alt=""> | ||
106 | + </a> | ||
107 | + </li> | ||
108 | + {{/if}} | ||
109 | + {{/if}} | ||
110 | + {{/ logoBrand}} | ||
111 | + </ul> | ||
112 | + </div> | ||
113 | + </div> | ||
114 | + {{/ preferenceBrand}} | ||
115 | + {{/ boy}} | ||
4 | </div> | 116 | </div> |
5 | {{> layout/footer}} | 117 | {{> layout/footer}} |
@@ -5,9 +5,10 @@ | @@ -5,9 +5,10 @@ | ||
5 | {{!-- 首页 --}} | 5 | {{!-- 首页 --}} |
6 | {{#if boysHomePage}} | 6 | {{#if boysHomePage}} |
7 | <script> | 7 | <script> |
8 | - seajs.use('js/home/entrey', function(h) { | 8 | + /*seajs.use('js/home/entrey', function(h) { |
9 | h.set('boys'); | 9 | h.set('boys'); |
10 | - }); | 10 | + });*/ |
11 | + seajs.use('js/home/home'); | ||
11 | </script> | 12 | </script> |
12 | {{/if}} | 13 | {{/if}} |
13 | 14 |
web-static/img/index/logo-brand-line.png
0 → 100644

2.27 KB
web-static/js/common/linkage-slider.js
0 → 100644
1 | +var $ = require('jquery'); | ||
2 | + | ||
3 | +(function($) { | ||
4 | + var LinkageSlider = function(element, options) { | ||
5 | + this.$element = $(element); | ||
6 | + this.options = $.extend({}, $.fn.linkageSlider.defaults, options); | ||
7 | + this.bigItem = this.$element.find('.big-slide').find('li'); | ||
8 | + this.smallItem = this.$element.find('.small-slide').find('li'); | ||
9 | + this.len = this.bigItem.size(); | ||
10 | + this.index = 0; | ||
11 | + this.timer = null; | ||
12 | + this.init(); | ||
13 | + }; | ||
14 | + | ||
15 | + LinkageSlider.prototype = { | ||
16 | + init: function() { | ||
17 | + this._slideShow(); | ||
18 | + if (this.len <= 1) { | ||
19 | + this.$element.find('.slide-switch').hide(); | ||
20 | + return; | ||
21 | + } | ||
22 | + this._bindEvent(); | ||
23 | + this._autoplay(); | ||
24 | + }, | ||
25 | + _bindEvent: function() { | ||
26 | + var that = this; | ||
27 | + | ||
28 | + this.$element.find('.slide-switch').on('click', '.next', function() { | ||
29 | + that._nextSlide(); | ||
30 | + clearInterval(that.timer); | ||
31 | + that.timer = setInterval(function() { | ||
32 | + that._nextSlide(); | ||
33 | + }, that.options.time); | ||
34 | + }).on('click', '.prev', function() { | ||
35 | + that._prevSlide(); | ||
36 | + clearInterval(that.timer); | ||
37 | + that.timer = setInterval(function() { | ||
38 | + that._nextSlide(); | ||
39 | + }, that.options.time); | ||
40 | + }); | ||
41 | + | ||
42 | + this.smallItem.on('mouseenter', function() { | ||
43 | + that.index = $(this).index(); | ||
44 | + clearInterval(that.timer); | ||
45 | + that._slideShow(); | ||
46 | + }).on('mouseleave', function() { | ||
47 | + that._autoplay(); | ||
48 | + }); | ||
49 | + }, | ||
50 | + _nextSlide: function() { | ||
51 | + if (this.index === this.len - 1) { | ||
52 | + this.index = 0; | ||
53 | + } else { | ||
54 | + this.index++; | ||
55 | + } | ||
56 | + this._slideShow(); | ||
57 | + }, | ||
58 | + _prevSlide: function() { | ||
59 | + if (this.index === 0) { | ||
60 | + this.index = this.len - 1; | ||
61 | + } else { | ||
62 | + this.index--; | ||
63 | + } | ||
64 | + this._slideShow(); | ||
65 | + }, | ||
66 | + _slideShow: function() { | ||
67 | + this.smallItem.eq(this.index).addClass('focus').siblings().removeClass('focus'); | ||
68 | + this.bigItem.eq(this.index).fadeIn().siblings().fadeOut(); | ||
69 | + }, | ||
70 | + _autoplay: function() { | ||
71 | + var that = this; | ||
72 | + | ||
73 | + clearInterval(this.timer); | ||
74 | + this.timer = setInterval(function() { | ||
75 | + that._nextSlide(); | ||
76 | + }, this.options.time); | ||
77 | + } | ||
78 | + }; | ||
79 | + $.fn.linkageSlider = function(option) { | ||
80 | + return this.each(function() { | ||
81 | + var $this = $(this), | ||
82 | + data = $this.data('linkageSlider'), | ||
83 | + options = typeof option === 'object' && option; | ||
84 | + | ||
85 | + if (!data) { | ||
86 | + $this.data('linkageSlider', (data = new LinkageSlider(this, options))); | ||
87 | + } | ||
88 | + if (typeof option === 'string') { | ||
89 | + data[option](); | ||
90 | + } | ||
91 | + }); | ||
92 | + }; | ||
93 | + $.fn.linkageSlider.Constructor = LinkageSlider; | ||
94 | + $.fn.linkageSlider.defaults = { | ||
95 | + time: 5000 | ||
96 | + }; | ||
97 | +})($); |
web-static/js/common/slider2.js
0 → 100644
1 | +/** | ||
2 | + * (品牌优选)图片幻灯片插件 | ||
3 | + * @author: wangqing(robin.wang@yoho.cn) | ||
4 | + * @date: 205/7/2 | ||
5 | + */ | ||
6 | +var $ = require('jquery'); | ||
7 | + | ||
8 | +(function($) { | ||
9 | + $.fn.slider2 = function(options) { | ||
10 | + $.fn.slider2.defaults = { | ||
11 | + index: 0, | ||
12 | + shownum: 3, | ||
13 | + autoplay: false, | ||
14 | + delaytime: 3000 | ||
15 | + }; | ||
16 | + return this.each(function() { | ||
17 | + var opts = $.extend({}, $.fn.slider2.defaults, options); | ||
18 | + var mr = parseInt($('.img-item').css('margin-right')); | ||
19 | + var $banneritems = $('.img-item'); | ||
20 | + var bannerarr = []; | ||
21 | + var _width = $banneritems.outerWidth() + mr, | ||
22 | + _size = $banneritems.length, | ||
23 | + j = 0; | ||
24 | + | ||
25 | + if (_size <= 3) { | ||
26 | + return; | ||
27 | + } | ||
28 | + for (j = 0; j < $banneritems.length; j++) { | ||
29 | + bannerarr.push($banneritems[j]); | ||
30 | + } | ||
31 | + _size = bannerarr.length; | ||
32 | + $(this).find('.img-list').css({ | ||
33 | + width: (_width * _size) | ||
34 | + }); | ||
35 | + $(this).find('.next').on('click', function(e) { | ||
36 | + var i = 0, | ||
37 | + _obj = null; | ||
38 | + | ||
39 | + e.preventDefault(); | ||
40 | + changePic(3, _width, function() { | ||
41 | + for (i = 0; i < 3; i++) { | ||
42 | + _obj = bannerarr.shift(); | ||
43 | + | ||
44 | + $('.img-item').parent().append(_obj.outerHTML); | ||
45 | + bannerarr.push(_obj); | ||
46 | + } | ||
47 | + $('.img-item').first().remove(); | ||
48 | + $('.img-item').first().remove(); | ||
49 | + $('.img-item').first().remove(); | ||
50 | + $('.img-list').css({ | ||
51 | + 'margin-left': '0' | ||
52 | + }); | ||
53 | + }); | ||
54 | + | ||
55 | + }); | ||
56 | + $(this).find('.prev').on('click', function(e) { | ||
57 | + var i = 0, | ||
58 | + _obj = null, | ||
59 | + offersetleft = ''; | ||
60 | + | ||
61 | + e.preventDefault(); | ||
62 | + for (i = 0; i < 3; i++) { | ||
63 | + _obj = bannerarr.pop(); | ||
64 | + | ||
65 | + $('.img-item').parent().prepend(_obj.outerHTML); | ||
66 | + bannerarr.unshift(_obj); | ||
67 | + } | ||
68 | + offersetleft = 3 * _width; | ||
69 | + $('.img-item').last().remove(); | ||
70 | + $('.img-item').last().remove(); | ||
71 | + $('.img-item').last().remove(); | ||
72 | + $('.img-list').css({ | ||
73 | + 'margin-left': -offersetleft + 'px' | ||
74 | + }); | ||
75 | + changePic(0, _width); | ||
76 | + }); | ||
77 | + if (opts.autoplay === true) { | ||
78 | + autoplayrecycle(opts.index, _size, true); | ||
79 | + } | ||
80 | + }); | ||
81 | + | ||
82 | + function autoplay(index, limit, toright) { | ||
83 | + if (toright === true) { | ||
84 | + $('.next').trigger('click'); | ||
85 | + if (index === (limit - 3)) { | ||
86 | + autoplayrecycle(--index, limit, false); | ||
87 | + } else { | ||
88 | + autoplayrecycle(++index, limit, true); | ||
89 | + } | ||
90 | + } else { | ||
91 | + $('.prev').trigger('click'); | ||
92 | + if (index === 0) { | ||
93 | + autoplayrecycle(++index, limit, true); | ||
94 | + } else { | ||
95 | + autoplayrecycle(--index, limit, false); | ||
96 | + } | ||
97 | + } | ||
98 | + } | ||
99 | + | ||
100 | + function autoplayrecycle(index, limit, toright) { | ||
101 | + window.setTimeout(autoplay, $.fn.slider2.defaults.delaytime, index, limit, toright); | ||
102 | + } | ||
103 | + | ||
104 | + function changePic(index, width, callback) { | ||
105 | + var offersetleft = -(index * width); | ||
106 | + | ||
107 | + $('.img-list') | ||
108 | + .animate({ | ||
109 | + 'margin-left': offersetleft + 'px' | ||
110 | + }, 'slow', callback); | ||
111 | + | ||
112 | + } | ||
113 | + }; | ||
114 | + | ||
115 | +}($)); |
@@ -2,4 +2,12 @@ | @@ -2,4 +2,12 @@ | ||
2 | * 首页 | 2 | * 首页 |
3 | * @author: xuqi<qi.xu@yoho.cn> | 3 | * @author: xuqi<qi.xu@yoho.cn> |
4 | * @date: 2015/11/23 | 4 | * @date: 2015/11/23 |
5 | - */ | ||
5 | + */ | ||
6 | + | ||
7 | +var $ = require('jquery'); | ||
8 | + | ||
9 | +require('../common/linkage-slider'); | ||
10 | +require('../common/slider2'); | ||
11 | + | ||
12 | +$('.slide-container').linkageSlider(); | ||
13 | +$('.img-brand').slider2(); |
@@ -13,7 +13,7 @@ | @@ -13,7 +13,7 @@ | ||
13 | "spm": { | 13 | "spm": { |
14 | "main": "index.js", | 14 | "main": "index.js", |
15 | "dependencies": { | 15 | "dependencies": { |
16 | - "jquery": "2.1.4" | 16 | + "jquery": "1.8.3" |
17 | }, | 17 | }, |
18 | "devDependencies": { | 18 | "devDependencies": { |
19 | "expect.js": "0.3.1" | 19 | "expect.js": "0.3.1" |
1 | +.home-page { | ||
2 | + width: 1150px; | ||
3 | + margin: 0 auto; | ||
4 | + | ||
5 | + .slide-container { | ||
6 | + margin: 10px 0 0; | ||
7 | + img { | ||
8 | + display: block; | ||
9 | + } | ||
10 | + } | ||
11 | + | ||
12 | + .big-slide { | ||
13 | + position: relative; | ||
14 | + height: 450px; | ||
15 | + overflow: hidden; | ||
16 | + | ||
17 | + ul { | ||
18 | + position: relative; | ||
19 | + height: 100%; | ||
20 | + } | ||
21 | + | ||
22 | + &:hover { | ||
23 | + .slide-switch { | ||
24 | + display: block; | ||
25 | + } | ||
26 | + } | ||
27 | + | ||
28 | + li { | ||
29 | + display: none; | ||
30 | + position: absolute; | ||
31 | + top: 0; | ||
32 | + right: 0; | ||
33 | + width: 100%; | ||
34 | + height: 100%; | ||
35 | + | ||
36 | + &:first-child { | ||
37 | + display: block; | ||
38 | + } | ||
39 | + } | ||
40 | + | ||
41 | + .slide-switch { | ||
42 | + display: none; | ||
43 | + /* @include opacity(0); | ||
44 | + @include transition-property(opacity); | ||
45 | + @include transition-duration(.2s); | ||
46 | + @include transition-timing-function(ease-in); */ | ||
47 | + a { | ||
48 | + position: absolute; | ||
49 | + top: 50%; | ||
50 | + margin: -30px 0 0; | ||
51 | + width: 60px; | ||
52 | + height: 60px; | ||
53 | + line-height: 56px; | ||
54 | + text-align: center; | ||
55 | + z-index: 2; | ||
56 | + background: #fff; | ||
57 | + @include opacity(0.55); | ||
58 | + | ||
59 | + &.prev { | ||
60 | + left: 0; | ||
61 | + } | ||
62 | + | ||
63 | + &.next { | ||
64 | + right: 0; | ||
65 | + } | ||
66 | + | ||
67 | + &:hover{ | ||
68 | + @include opacity(0.9); | ||
69 | + } | ||
70 | + | ||
71 | + .iconfont { | ||
72 | + font-size: 32px; | ||
73 | + color: #59585a; | ||
74 | + } | ||
75 | + } | ||
76 | + } | ||
77 | + } | ||
78 | + | ||
79 | + .small-slide { | ||
80 | + margin: 6px 0 0; | ||
81 | + padding: 0 0 0 2px; | ||
82 | + | ||
83 | + li { | ||
84 | + position: relative; | ||
85 | + float: left; | ||
86 | + margin: 0 0 0 6px; | ||
87 | + width: 138px; | ||
88 | + height: 54px; | ||
89 | + | ||
90 | + &:first-child { | ||
91 | + margin: 0; | ||
92 | + } | ||
93 | + | ||
94 | + &.focus { | ||
95 | + a { | ||
96 | + @include opacity(0); | ||
97 | + } | ||
98 | + } | ||
99 | + | ||
100 | + a { | ||
101 | + position: absolute; | ||
102 | + left: 0; | ||
103 | + right: 0; | ||
104 | + bottom: 0; | ||
105 | + top: 0; | ||
106 | + background: #000; | ||
107 | + @include opacity(0.3); | ||
108 | + } | ||
109 | + | ||
110 | + img { | ||
111 | + width: 100%; | ||
112 | + height: 100%; | ||
113 | + } | ||
114 | + } | ||
115 | + } | ||
116 | + | ||
117 | + .new-report { | ||
118 | + img { | ||
119 | + display: block; | ||
120 | + } | ||
121 | + .report-list { | ||
122 | + float: left; | ||
123 | + width: 868px; | ||
124 | + li { | ||
125 | + float: left; | ||
126 | + margin: 0 8px 8px 0; | ||
127 | + width: 185px; | ||
128 | + height: 248px; | ||
129 | + overflow: hidden; | ||
130 | + &:first-child { | ||
131 | + margin-right: 7px; | ||
132 | + width: 282px; | ||
133 | + height: 504px; | ||
134 | + } | ||
135 | + } | ||
136 | + } | ||
137 | + | ||
138 | + .last-item { | ||
139 | + float: left; | ||
140 | + width: 282px; | ||
141 | + height: 504px; | ||
142 | + overflow: hidden; | ||
143 | + } | ||
144 | + } | ||
145 | + | ||
146 | + .img-brand { | ||
147 | + position: relative; | ||
148 | + width: 100%; | ||
149 | + height: 175px; | ||
150 | + overflow: hidden; | ||
151 | + | ||
152 | + &:hover { | ||
153 | + .img-brand-switch { | ||
154 | + display: block; | ||
155 | + } | ||
156 | + } | ||
157 | + ul { | ||
158 | + width: 1158px; | ||
159 | + } | ||
160 | + li { | ||
161 | + float: left; | ||
162 | + margin: 0 8px 0 0; | ||
163 | + width: 378px; | ||
164 | + height: 175px; | ||
165 | + line-height: 175px; | ||
166 | + overflow: hidden; | ||
167 | + font-size: 0; | ||
168 | + text-align: center; | ||
169 | + | ||
170 | + img { | ||
171 | + max-width: 100%; | ||
172 | + max-height: 100%; | ||
173 | + vertical-align: middle; | ||
174 | + } | ||
175 | + } | ||
176 | + .img-brand-switch { | ||
177 | + display: none; | ||
178 | + a { | ||
179 | + position: absolute; | ||
180 | + top: 50%; | ||
181 | + margin: -20px 0 0; | ||
182 | + width: 40px; | ||
183 | + height: 40px; | ||
184 | + line-height: 40px; | ||
185 | + text-align: center; | ||
186 | + z-index: 2; | ||
187 | + background: #fff; | ||
188 | + @include opacity(0.55); | ||
189 | + | ||
190 | + &.prev { | ||
191 | + left: 0; | ||
192 | + } | ||
193 | + &.next { | ||
194 | + right: 0; | ||
195 | + } | ||
196 | + &:hover { | ||
197 | + @include opacity(0.9); | ||
198 | + } | ||
199 | + } | ||
200 | + } | ||
201 | + } | ||
202 | + | ||
203 | + .logo-brand { | ||
204 | + ul { | ||
205 | + width: 1158px; | ||
206 | + } | ||
207 | + li { | ||
208 | + float: left; | ||
209 | + margin: 8px 8px 0 0; | ||
210 | + width: 185px; | ||
211 | + height: 86px; | ||
212 | + line-height: 86px; | ||
213 | + font-size: 0; | ||
214 | + text-align: center; | ||
215 | + img { | ||
216 | + max-width: 100%; | ||
217 | + max-height: 100%; | ||
218 | + vertical-align: middle; | ||
219 | + } | ||
220 | + } | ||
221 | + .logo-brand-switch { | ||
222 | + position: relative; | ||
223 | + background: image-url('index/logo-brand-line.png') no-repeat center center; | ||
224 | + line-height: normal; | ||
225 | + .iconfont { | ||
226 | + position: absolute; | ||
227 | + left: 50%; | ||
228 | + font-size: 32px; | ||
229 | + | ||
230 | + &.prev { | ||
231 | + top: 10px; | ||
232 | + | ||
233 | + margin: 0 0 0 -48px; | ||
234 | + } | ||
235 | + &.next { | ||
236 | + bottom: 12px; | ||
237 | + margin: 0 0 0 20px; | ||
238 | + } | ||
239 | + } | ||
240 | + } | ||
241 | + .brand-more { | ||
242 | + font-size: 16px; | ||
243 | + &:hover { | ||
244 | + text-decoration: underline; | ||
245 | + } | ||
246 | + } | ||
247 | + } | ||
248 | + | ||
249 | + .floor-header { | ||
250 | + position: relative; | ||
251 | + margin: 50px 0 30px; | ||
252 | + | ||
253 | + .floor-title { | ||
254 | + margin: 0 auto; | ||
255 | + width: 298px; | ||
256 | + height: 31px; | ||
257 | + line-height: 31px; | ||
258 | + border: 1px solid #000; | ||
259 | + font-size: 16px; | ||
260 | + text-align: center; | ||
261 | + } | ||
262 | + | ||
263 | + .header-navs { | ||
264 | + position: absolute; | ||
265 | + padding: 10px 0; | ||
266 | + top: 0; | ||
267 | + right: 0; | ||
268 | + font-size: 14px; | ||
269 | + | ||
270 | + li { | ||
271 | + float: left; | ||
272 | + padding: 1px 10px; | ||
273 | + border-left: 1px solid #ccc; | ||
274 | + | ||
275 | + &:first-child { | ||
276 | + border-left: none; | ||
277 | + } | ||
278 | + | ||
279 | + &:hover { | ||
280 | + text-decoration: underline; | ||
281 | + } | ||
282 | + | ||
283 | + a { | ||
284 | + color: #333; | ||
285 | + } | ||
286 | + } | ||
287 | + } | ||
288 | + } | ||
289 | + | ||
290 | + @media screen and (min-width: 1150px) { | ||
291 | + .floor-header { | ||
292 | + margin: 80px 0 40px; | ||
293 | + | ||
294 | + .header-navs { | ||
295 | + li { | ||
296 | + padding: 1px 15px; | ||
297 | + } | ||
298 | + } | ||
299 | + } | ||
300 | + } | ||
301 | +} |
@@ -9,6 +9,178 @@ class BoysController extends AbstractAction | @@ -9,6 +9,178 @@ class BoysController extends AbstractAction | ||
9 | public function indexAction() | 9 | public function indexAction() |
10 | { | 10 | { |
11 | $this->setTitle('男生首页'); | 11 | $this->setTitle('男生首页'); |
12 | - $this->_view->display('index'); | 12 | + $data = array( |
13 | + 'boysHomePage' => true, | ||
14 | + 'boy' => array( | ||
15 | + 'bigSlide' => array( | ||
16 | + array( | ||
17 | + 'href' => '/?gender=1,3', | ||
18 | + 'img' => 'http://img10.static.yhbimg.com/taobaocms/2015/11/26/12/01c3b99f554ad50d9e5a9900719715c94c.jpg' | ||
19 | + ), | ||
20 | + array( | ||
21 | + 'href' => '/?gender=1,3', | ||
22 | + 'img' => 'http://img12.static.yhbimg.com/taobaocms/2015/11/27/09/02a4f1c10e1e81574520e5c0239741a076.jpg' | ||
23 | + ) | ||
24 | + ), | ||
25 | + 'smallSlide' => array( | ||
26 | + array( | ||
27 | + 'href' => 'http://sale.yohobuy.com/?specialsale_id=13&gender=1,3', | ||
28 | + 'img' => 'http://img13.static.yhbimg.com/taobaocms/2015/11/26/12/024a810cfa89d67569c6c3bacedba8869a.jpg?imageMogr2/thumbnail/138x54/extent/138x54/background/d2hpdGU=/position/center/quality/90' | ||
29 | + ), | ||
30 | + array( | ||
31 | + 'href' => 'http://sale.yohobuy.com/?specialsale_id=13&gender=1,3', | ||
32 | + 'img' => 'http://img10.static.yhbimg.com/taobaocms/2015/11/27/09/015b6a29ee526edeaacd13f4a7c81475f0.jpg?imageMogr2/thumbnail/138x54/extent/138x54/background/d2hpdGU=/position/center/quality/90' | ||
33 | + ) | ||
34 | + ), | ||
35 | + 'newReport' => array( | ||
36 | + 'name' => '最新速报 NEW!', | ||
37 | + 'navs' => array( | ||
38 | + array( | ||
39 | + 'id' => '', | ||
40 | + 'href' => '', | ||
41 | + 'name' => 'MORE' | ||
42 | + ) | ||
43 | + ), | ||
44 | + 'list' => array( | ||
45 | + array( | ||
46 | + 'href' => '', | ||
47 | + 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/27/03/0140fd98fd1c15c206d198d458e1c8e96f.jpg?imageView/1/w/377/h/504' | ||
48 | + ), | ||
49 | + array( | ||
50 | + 'href' => '', | ||
51 | + 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/30/03/01b2bd814ed65013e06790a301a0eb6408.jpg?imageView/1/w/185/h/248' | ||
52 | + ), | ||
53 | + array( | ||
54 | + 'href' => '', | ||
55 | + 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/30/03/01b2bd814ed65013e06790a301a0eb6408.jpg?imageView/1/w/185/h/248' | ||
56 | + ), | ||
57 | + array( | ||
58 | + 'href' => '', | ||
59 | + 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/30/03/01b2bd814ed65013e06790a301a0eb6408.jpg?imageView/1/w/185/h/248' | ||
60 | + ), | ||
61 | + array( | ||
62 | + 'href' => '', | ||
63 | + 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/30/03/01b2bd814ed65013e06790a301a0eb6408.jpg?imageView/1/w/185/h/248' | ||
64 | + ), | ||
65 | + array( | ||
66 | + 'href' => '', | ||
67 | + 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/30/03/01b2bd814ed65013e06790a301a0eb6408.jpg?imageView/1/w/185/h/248' | ||
68 | + ), | ||
69 | + array( | ||
70 | + 'href' => '', | ||
71 | + 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/30/03/01b2bd814ed65013e06790a301a0eb6408.jpg?imageView/1/w/185/h/248' | ||
72 | + ), | ||
73 | + array( | ||
74 | + 'href' => '', | ||
75 | + 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/27/03/0140fd98fd1c15c206d198d458e1c8e96f.jpg?imageView/1/w/377/h/504' | ||
76 | + ) | ||
77 | + ) | ||
78 | + ), | ||
79 | + 'preferenceBrand' => array( | ||
80 | + 'name' => '优选品牌 BRAND', | ||
81 | + 'imgBrand' => array( | ||
82 | + array( | ||
83 | + 'href' => '', | ||
84 | + 'img' => 'http://img11.static.yhbimg.com/taobaocms/2015/11/30/01/01ebe6968476da9e79ddddfd28f60496c7.jpg' | ||
85 | + ), | ||
86 | + array( | ||
87 | + 'href' => '', | ||
88 | + 'img' => 'http://img11.static.yhbimg.com/taobaocms/2015/11/30/01/01ebe6968476da9e79ddddfd28f60496c7.jpg' | ||
89 | + ), | ||
90 | + array( | ||
91 | + 'href' => '', | ||
92 | + 'img' => 'http://img11.static.yhbimg.com/taobaocms/2015/11/30/01/01ebe6968476da9e79ddddfd28f60496c7.jpg' | ||
93 | + ), | ||
94 | + array( | ||
95 | + 'href' => '', | ||
96 | + 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/30/06/0124c4e16548b0d7aff4f0fa4ad7b13481.jpg?imageView/1/w/1150/h/450' | ||
97 | + ), | ||
98 | + array( | ||
99 | + 'href' => '', | ||
100 | + 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/30/06/0124c4e16548b0d7aff4f0fa4ad7b13481.jpg?imageView/1/w/1150/h/450' | ||
101 | + ), | ||
102 | + array( | ||
103 | + 'href' => '', | ||
104 | + 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/30/06/0124c4e16548b0d7aff4f0fa4ad7b13481.jpg?imageView/1/w/1150/h/450' | ||
105 | + ), | ||
106 | + ), | ||
107 | + 'logoBrand' => array( | ||
108 | + array( | ||
109 | + 'href' => '', | ||
110 | + 'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86' | ||
111 | + ), | ||
112 | + array( | ||
113 | + 'href' => '', | ||
114 | + 'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86' | ||
115 | + ), | ||
116 | + array( | ||
117 | + 'href' => '', | ||
118 | + 'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86' | ||
119 | + ), | ||
120 | + array( | ||
121 | + 'href' => '', | ||
122 | + 'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86' | ||
123 | + ), | ||
124 | + array( | ||
125 | + 'href' => '', | ||
126 | + 'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86' | ||
127 | + ), | ||
128 | + array( | ||
129 | + 'switch' => true | ||
130 | + ), | ||
131 | + array( | ||
132 | + 'href' => '', | ||
133 | + 'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86' | ||
134 | + ), | ||
135 | + array( | ||
136 | + 'href' => '', | ||
137 | + 'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86' | ||
138 | + ), | ||
139 | + array( | ||
140 | + 'href' => '', | ||
141 | + 'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86' | ||
142 | + ), | ||
143 | + array( | ||
144 | + 'href' => '', | ||
145 | + 'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86' | ||
146 | + ), | ||
147 | + array( | ||
148 | + 'href' => '', | ||
149 | + 'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86' | ||
150 | + ), | ||
151 | + array( | ||
152 | + 'href' => '', | ||
153 | + 'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86' | ||
154 | + ), | ||
155 | + array( | ||
156 | + 'href' => '', | ||
157 | + 'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86' | ||
158 | + ), | ||
159 | + array( | ||
160 | + 'href' => '', | ||
161 | + 'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86' | ||
162 | + ), | ||
163 | + array( | ||
164 | + 'href' => '', | ||
165 | + 'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86' | ||
166 | + ), | ||
167 | + array( | ||
168 | + 'href' => '', | ||
169 | + 'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86' | ||
170 | + ), | ||
171 | + array( | ||
172 | + 'href' => '', | ||
173 | + 'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86' | ||
174 | + ), | ||
175 | + array( | ||
176 | + 'more' => true, | ||
177 | + 'href' => 'http://www.yohobuy.com' | ||
178 | + ), | ||
179 | + ) | ||
180 | + ) | ||
181 | + ) | ||
182 | + | ||
183 | + ); | ||
184 | + $this->_view->display('index', $data); | ||
13 | } | 185 | } |
14 | } | 186 | } |
-
Please register or login to post a comment