measurement method upadate
Showing
4 changed files
with
92 additions
and
12 deletions
@@ -6,9 +6,11 @@ | @@ -6,9 +6,11 @@ | ||
6 | var $ = require('jquery'), | 6 | var $ = require('jquery'), |
7 | Swiper = require('yoho.iswiper'), | 7 | Swiper = require('yoho.iswiper'), |
8 | lazyLoad = require('yoho.lazyload'), | 8 | lazyLoad = require('yoho.lazyload'), |
9 | + Handlebars = require('yoho.handlebars'), | ||
9 | goodsSwiper, | 10 | goodsSwiper, |
10 | sizeSwiper, | 11 | sizeSwiper, |
11 | - refSwiper; | 12 | + refSwiper, |
13 | + handleHelper; | ||
12 | 14 | ||
13 | 15 | ||
14 | lazyLoad($('img.lazy')); | 16 | lazyLoad($('img.lazy')); |
@@ -50,6 +52,10 @@ refSwiper = new Swiper('#reference-swiper-container',{ | @@ -50,6 +52,10 @@ refSwiper = new Swiper('#reference-swiper-container',{ | ||
50 | slidesPerView: 'auto' | 52 | slidesPerView: 'auto' |
51 | }); | 53 | }); |
52 | 54 | ||
55 | +handleHelper = Handlebars.registerHelper('addOne', function(index) { | ||
56 | + return index + 1; | ||
57 | +}); | ||
58 | + | ||
53 | // $('#iframe').load(function() { | 59 | // $('#iframe').load(function() { |
54 | // var mainheight = $(this).contents().find('body').height() + 30; | 60 | // var mainheight = $(this).contents().find('body').height() + 30; |
55 | // $(this).height(mainheight); | 61 | // $(this).height(mainheight); |
@@ -14,7 +14,7 @@ $basicBtnC:#eb0313; | @@ -14,7 +14,7 @@ $basicBtnC:#eb0313; | ||
14 | border-bottom: 2px solid $borderC; | 14 | border-bottom: 2px solid $borderC; |
15 | border-top: 1px solid $borderC; | 15 | border-top: 1px solid $borderC; |
16 | padding: 0 pxToRem(28px); | 16 | padding: 0 pxToRem(28px); |
17 | - .title{ | 17 | + >.title{ |
18 | min-height: pxToRem(88px); | 18 | min-height: pxToRem(88px); |
19 | line-height: pxToRem(88px); | 19 | line-height: pxToRem(88px); |
20 | color: $mainFontC; | 20 | color: $mainFontC; |
@@ -420,6 +420,56 @@ $basicBtnC:#eb0313; | @@ -420,6 +420,56 @@ $basicBtnC:#eb0313; | ||
420 | } | 420 | } |
421 | } | 421 | } |
422 | 422 | ||
423 | + .measurement-method{ | ||
424 | + .detail{ | ||
425 | + width: 100%; | ||
426 | + height: pxToRem(300px); | ||
427 | + img{ | ||
428 | + float:left; | ||
429 | + width: pxToRem(270px); | ||
430 | + height: pxToRem(239px); | ||
431 | + margin-top: pxToRem(18px); | ||
432 | + margin-right: pxToRem(28px); | ||
433 | + } | ||
434 | + .right-part{ | ||
435 | + float:left; | ||
436 | + .title{ | ||
437 | + >h1{ | ||
438 | + margin-top: pxToRem(10px); | ||
439 | + display: inline-block; | ||
440 | + padding-right: pxToRem(10px); | ||
441 | + border-right: 1px solid $borderC; | ||
442 | + line-height: 100%; | ||
443 | + } | ||
444 | + >span{ | ||
445 | + font-size: pxToRem(12px); | ||
446 | + } | ||
447 | + } | ||
448 | + ul.items{ | ||
449 | + margin-top: pxToRem(20px); | ||
450 | + padding: 0; | ||
451 | + line-height: pxToRem(30px); | ||
452 | + font-size: pxToRem(13px); | ||
453 | + li{ | ||
454 | + span{ | ||
455 | + display: inline-block; | ||
456 | + width: pxToRem(15px); | ||
457 | + height: pxToRem(15px); | ||
458 | + background-color: $basicBtnC; | ||
459 | + border-radius: 50%; | ||
460 | + color:white; | ||
461 | + text-align: center; | ||
462 | + line-height: pxToRem(15px); | ||
463 | + font-size: pxToRem(13px); | ||
464 | + margin-right: pxToRem(12px); | ||
465 | + vertical-align: text-bottom; | ||
466 | + } | ||
467 | + } | ||
468 | + } | ||
469 | + } | ||
470 | + clear:both; | ||
471 | + } | ||
472 | + } | ||
423 | .cart-bar{ | 473 | .cart-bar{ |
424 | position: relative; | 474 | position: relative; |
425 | box-sizing:border-box; | 475 | box-sizing:border-box; |
@@ -178,15 +178,32 @@ | @@ -178,15 +178,32 @@ | ||
178 | 178 | ||
179 | <div class="gap-block"></div> | 179 | <div class="gap-block"></div> |
180 | 180 | ||
181 | - <div class="size-info page-block"> | 181 | + {{#measurementMethod}} |
182 | + <div class="measurement-method page-block"> | ||
182 | <h1 class="title"> | 183 | <h1 class="title"> |
183 | - 测量方式 | ||
184 | - <span class="en-title">SIZE INFO</span> | 184 | + {{title}} |
185 | + <span class="en-title">{{enTitle}}</span> | ||
185 | </h1> | 186 | </h1> |
186 | - <div class="detail"> | ||
187 | - | 187 | + {{#detail}} |
188 | + <div class="detail" style="width:100%"> | ||
189 | + <img src="{{img}}" alt=""> | ||
190 | + <div class="right-part"> | ||
191 | + <div class="title"> | ||
192 | + <h1 >{{sort}}</h1> | ||
193 | + <span>{{enSort}}</span> | ||
194 | + </div> | ||
195 | + <ul class="items"> | ||
196 | + {{#each items}} | ||
197 | + <li> | ||
198 | + <span>{{@index}}</span> | ||
199 | + {{this}}</li> | ||
200 | + {{/items}} | ||
201 | + </ul> | ||
202 | + </div> | ||
188 | </div> | 203 | </div> |
204 | + {{/detail}} | ||
189 | </div> | 205 | </div> |
206 | + {{/measurementMethod}} | ||
190 | 207 | ||
191 | <div class="gap-block"></div> | 208 | <div class="gap-block"></div> |
192 | 209 |
@@ -145,13 +145,20 @@ SHOE BQT KEN BLOCK', | @@ -145,13 +145,20 @@ SHOE BQT KEN BLOCK', | ||
145 | 145 | ||
146 | 'measurementMethod'=>array( | 146 | 'measurementMethod'=>array( |
147 | 'title' => '测量方式', | 147 | 'title' => '测量方式', |
148 | - 'enTitle' =>'SIZE INFO', | 148 | + 'enTitle' =>'MEASUREMENT METHOD', |
149 | 149 | ||
150 | 'detail'=>array( | 150 | 'detail'=>array( |
151 | - 'kind' =>'上衣' , | ||
152 | - 'enKind'=>'TOPS', | ||
153 | - | ||
154 | - 'img' =>'' | 151 | + 'sort' =>'上衣' , |
152 | + 'enSort'=>'TOPS', | ||
153 | + 'img' =>'http://static.dev.yohobuy.com/img/product/tops.png', | ||
154 | + 'items'=>array( | ||
155 | + '肩宽(两端肩线间的直线长度)', | ||
156 | + '胸围(两端肩线间的直线长度)', | ||
157 | + '肩宽(两端肩线间的直线长度)', | ||
158 | + '肩宽(两端肩线间的直线长度)', | ||
159 | + '肩宽(两端肩线间的直线长度)', | ||
160 | + '肩宽(两端肩线间的直线长度)' | ||
161 | + ) | ||
155 | ) | 162 | ) |
156 | ), | 163 | ), |
157 | 164 |
-
Please register or login to post a comment