Authored by 郝肖肖

Merge branch 'release/4.4' of http://git.dev.yoho.cn/web/yohobuy into release/4.4

1 -{{# shopEntry}}  
2 - <div class="shop-entry clearfix">  
3 - <a class="pull-left" href="{{home}}">  
4 - <img class="logo" src="{{logo}}">  
5 - </a> 1 +<div class="shop-entry-area">
  2 + {{# shopEntry}}
  3 + <div class="shop-entry clearfix">
  4 + <a class="pull-left" href="{{home}}">
  5 + <img class="logo" src="{{logo}}">
  6 + </a>
6 7
7 - <div class="name pull-left">  
8 - <a class="shop-name" href="{{home}}">{{shopName}}</a>  
9 - <p class="sorts">  
10 - {{#each sort}}  
11 - <a href="{{href}}">{{name}}</a> 8 + <div class="name pull-left">
  9 + <a class="shop-name" href="{{home}}">{{shopName}}</a>
  10 + <p class="sorts">
  11 + {{#each sort}}
  12 + <a href="{{href}}">{{name}}</a>
12 13
13 - {{#unless @last}}  
14 - /  
15 - {{/unless}}  
16 - {{/each}}  
17 - </p>  
18 - </div> 14 + {{#unless @last}}
  15 + /
  16 + {{/unless}}
  17 + {{/each}}
  18 + </p>
  19 + </div>
19 20
20 - <a class="entry-btn pull-right" href="{{home}}">  
21 - 进入品牌店铺  
22 - <span class="iconfont">&#xe601;</span>  
23 - </a>  
24 - </div>  
25 -{{/ shopEntry}} 21 + <a class="entry-btn pull-right" href="{{home}}">
  22 + 进入品牌店铺
  23 + <span class="iconfont">&#xe601;</span>
  24 + </a>
  25 + </div>
  26 + {{/ shopEntry}}
  27 +</div>
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.

48.3 KB | W: | H:

48.3 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

8.64 KB | W: | H:

8.64 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
@@ -15,15 +15,15 @@ var accMul = function(arg1, arg2) { @@ -15,15 +15,15 @@ var accMul = function(arg1, arg2) {
15 s2 = arg2.toString(); 15 s2 = arg2.toString();
16 16
17 try { 17 try {
18 - m += s1.split(".")[1].length 18 + m += s1.split('.')[1].length;
19 } catch (e) { 19 } catch (e) {
20 } 20 }
21 try { 21 try {
22 - m += s2.split(".")[1].length 22 + m += s2.split('.')[1].length;
23 } catch (e) { 23 } catch (e) {
24 } 24 }
25 - return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m)  
26 -} 25 + return Number(s1.replace('.', '')) * Number(s2.replace('.', '')) / Math.pow(10, m);
  26 +};
27 27
28 var Order = { 28 var Order = {
29 /*业务数据(人民币)*/ 29 /*业务数据(人民币)*/
@@ -45,6 +45,7 @@ var Order = { @@ -45,6 +45,7 @@ var Order = {
45 $cancel: $('.cancel', '.btn-group'), 45 $cancel: $('.cancel', '.btn-group'),
46 $total: $('em', '.to-play'), 46 $total: $('em', '.to-play'),
47 $tbody: $('table tbody', '.pay-wapper'), 47 $tbody: $('table tbody', '.pay-wapper'),
  48 +
48 //请填写并核对一下信息 49 //请填写并核对一下信息
49 $orderSelectionSave: $('.address-list h2 span'), 50 $orderSelectionSave: $('.address-list h2 span'),
50 $addAddress: $('.add-address'), 51 $addAddress: $('.add-address'),
@@ -213,6 +214,7 @@ var Order = { @@ -213,6 +214,7 @@ var Order = {
213 } 214 }
214 }); 215 });
215 }, 216 },
  217 +
216 //渲染价格明细 218 //渲染价格明细
217 render: function(data, tips) { 219 render: function(data, tips) {
218 220
@@ -365,7 +367,7 @@ var Order = { @@ -365,7 +367,7 @@ var Order = {
365 function getSelectData(callback) { 367 function getSelectData(callback) {
366 368
367 var $juangroupInput = $('.play-juan.is-select input[name="juangroup"]:checked'); 369 var $juangroupInput = $('.play-juan.is-select input[name="juangroup"]:checked');
368 - var expressVal = $('.express-list input[name="carriagegroup"]').val(); 370 + var expressVal = $('.express-list input[name="carriagegroup"]:checked').val();
369 var biVal = $('#biprice.is-select').val(); 371 var biVal = $('#biprice.is-select').val();
370 var codeVal = $juangroupInput.val(); 372 var codeVal = $juangroupInput.val();
371 var cartType = $('.address-manage').attr('cart-type'); 373 var cartType = $('.address-manage').attr('cart-type');
@@ -24,6 +24,31 @@ lazyLoad($('img.lazy')); @@ -24,6 +24,31 @@ lazyLoad($('img.lazy'));
24 * @num 每列存放商品的个数 24 * @num 每列存放商品的个数
25 */ 25 */
26 exports.init = function(num) { 26 exports.init = function(num) {
  27 + var $shopEntry = $('.shop-entry'),
  28 + $shopEntryArea = $('.shop-entry-area'),
  29 + shopEntryLen = $shopEntry.length;
  30 +
  31 + if (shopEntryLen > 0) {
  32 + if (shopEntryLen % 3 === 1) {
  33 + $shopEntry.eq(shopEntryLen - 1).css({
  34 + width: '100%'
  35 + });
  36 + } else if (shopEntryLen % 3 === 2) {
  37 + $shopEntry.eq(shopEntryLen - 1).css({
  38 + width: '49%'
  39 + });
  40 +
  41 + $shopEntry.eq(shopEntryLen - 2).css({
  42 + width: '49%'
  43 + });
  44 + }
  45 +
  46 + $('.shop-entry:nth-child(3n+1)').css({
  47 + marginLeft: 0
  48 + });
  49 +
  50 + $shopEntryArea.show();
  51 + }
27 52
28 productList = null; 53 productList = null;
29 54
  1 +.shop-entry-area {
  2 + width: 100%;
  3 + height: auto;
  4 + overflow: hidden;
  5 + display: none;
  6 +
  7 + .shop-entry:first-child {
  8 + margin-left: 0;
  9 + }
  10 +}
  11 +
1 .shop-entry { 12 .shop-entry {
2 position: relative; 13 position: relative;
3 background: #f5f7f6; 14 background: #f5f7f6;
4 border: 1px solid #eaeceb; 15 border: 1px solid #eaeceb;
5 padding: 12px 15px; 16 padding: 12px 15px;
6 - margin-bottom: 10px; 17 + width: 32%;
  18 + box-sizing: border-box;
  19 + float: left;
  20 + margin: 0 0 10px 2%;
7 21
8 .logo { 22 .logo {
9 width: 80px; 23 width: 80px;
@@ -416,16 +416,18 @@ @@ -416,16 +416,18 @@
416 } 416 }
417 } 417 }
418 } 418 }
  419 +
  420 + .goods-wrap {
  421 + .goods-container {
  422 + .good-info {
  423 + width: 235px;
  424 + height: auto;
  425 + margin-bottom: 35px;
  426 + }
419 427
420 - .goods-container {  
421 - .good-info {  
422 - width: 235px;  
423 - height: auto;  
424 - margin-bottom: 35px;  
425 - }  
426 -  
427 - .good-detail-text {  
428 - text-align: left; 428 + .good-detail-text {
  429 + text-align: left;
  430 + }
429 } 431 }
430 } 432 }
431 433