Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop
Showing
11 changed files
with
29 additions
and
11 deletions
static/img/lazy-failure/order-good.jpg
0 → 100644
2.37 KB
@@ -12,7 +12,9 @@ var orderId = $('#order-detail').data('id'); | @@ -12,7 +12,9 @@ var orderId = $('#order-detail').data('id'); | ||
12 | 12 | ||
13 | var optHammer; | 13 | var optHammer; |
14 | 14 | ||
15 | -lazyLoad(); | 15 | +lazyLoad({ |
16 | + try_again_css: 'order-failure' | ||
17 | +}); | ||
16 | 18 | ||
17 | //订单删除 | 19 | //订单删除 |
18 | optHammer = new Hammer(document.getElementsByClassName('opt')[0]); | 20 | optHammer = new Hammer(document.getElementsByClassName('opt')[0]); |
@@ -58,13 +58,17 @@ function getOrders(option) { | @@ -58,13 +58,17 @@ function getOrders(option) { | ||
58 | 58 | ||
59 | if (opt.page === 1) { | 59 | if (opt.page === 1) { |
60 | $curContainer.html(data); | 60 | $curContainer.html(data); |
61 | - lazyLoad($curContainer.find('.lazy')); | 61 | + lazyLoad($curContainer.find('.lazy'), { |
62 | + try_again_css: 'order-failure' | ||
63 | + }); | ||
62 | } else { | 64 | } else { |
63 | num = $curContainer.children('.order').length; | 65 | num = $curContainer.children('.order').length; |
64 | $curContainer.append(data); | 66 | $curContainer.append(data); |
65 | 67 | ||
66 | //lazyload | 68 | //lazyload |
67 | - lazyLoad($curContainer.children('.order:gt(' + (num - 1) + ')').find('.lazy')); | 69 | + lazyLoad($curContainer.children('.order:gt(' + (num - 1) + ')').find('.lazy'), { |
70 | + try_again_css: 'order-failure' | ||
71 | + }); | ||
68 | } | 72 | } |
69 | 73 | ||
70 | window.rePosFooter(); //重新计算底部位置 | 74 | window.rePosFooter(); //重新计算底部位置 |
@@ -78,7 +82,9 @@ function getOrders(option) { | @@ -78,7 +82,9 @@ function getOrders(option) { | ||
78 | }); | 82 | }); |
79 | } | 83 | } |
80 | 84 | ||
81 | -lazyLoad(); | 85 | +lazyLoad({ |
86 | + try_again_css: 'order-failure' | ||
87 | +}); | ||
82 | 88 | ||
83 | //初始化导航 | 89 | //初始化导航 |
84 | (function() { | 90 | (function() { |
@@ -21,7 +21,7 @@ | @@ -21,7 +21,7 @@ | ||
21 | "yoho.iswiper": "3.0.1", | 21 | "yoho.iswiper": "3.0.1", |
22 | "iscroll": "5.1.2", | 22 | "iscroll": "5.1.2", |
23 | "import-style": "1.0.0", | 23 | "import-style": "1.0.0", |
24 | - "yoho.lazyload": "1.1.2", | 24 | + "yoho.lazyload": "1.1.3", |
25 | "yoho.handlebars": "3.0.3", | 25 | "yoho.handlebars": "3.0.3", |
26 | "yoho.hammer": "2.0.4" | 26 | "yoho.hammer": "2.0.4" |
27 | }, | 27 | }, |
static/sass/_lazy-failure.scss
0 → 100644
@@ -77,6 +77,14 @@ | @@ -77,6 +77,14 @@ | ||
77 | 77 | ||
78 | .hot-brands { | 78 | .hot-brands { |
79 | padding-top: 178rem / $pxConvertRem; | 79 | padding-top: 178rem / $pxConvertRem; |
80 | + | ||
81 | + .floor-header { | ||
82 | + padding: 0; | ||
83 | + } | ||
84 | + | ||
85 | + .brands-swiper { | ||
86 | + border-top: 0; | ||
87 | + } | ||
80 | } | 88 | } |
81 | 89 | ||
82 | .hot-brand { | 90 | .hot-brand { |
@@ -143,6 +143,7 @@ a { | @@ -143,6 +143,7 @@ a { | ||
143 | @import "layout/footer"; | 143 | @import "layout/footer"; |
144 | @import "layout/footer_tab"; | 144 | @import "layout/footer_tab"; |
145 | @import "good"; | 145 | @import "good"; |
146 | +@import "lazy-failure"; | ||
146 | @import "filter"; | 147 | @import "filter"; |
147 | @import "loading"; | 148 | @import "loading"; |
148 | @import "passport/index"; | 149 | @import "passport/index"; |
@@ -48,8 +48,7 @@ $basicBtnC:#eb0313; | @@ -48,8 +48,7 @@ $basicBtnC:#eb0313; | ||
48 | //padding: pxToRem(20px) pxToRem(12px); | 48 | //padding: pxToRem(20px) pxToRem(12px); |
49 | padding: pxToRem(6px) 3%; | 49 | padding: pxToRem(6px) 3%; |
50 | width: 49.9%; | 50 | width: 49.9%; |
51 | - border-bottom: pxToRem(4px) solid #fff; | ||
52 | - border-right: pxToRem(4px) solid #fff; | 51 | + border: 1px solid #fff; |
53 | font-size: pxToRem(24px); | 52 | font-size: pxToRem(24px); |
54 | background-color: $tableCellC; | 53 | background-color: $tableCellC; |
55 | word-wrap: break-word; | 54 | word-wrap: break-word; |
@@ -69,8 +68,7 @@ $basicBtnC:#eb0313; | @@ -69,8 +68,7 @@ $basicBtnC:#eb0313; | ||
69 | width: 49.9%; | 68 | width: 49.9%; |
70 | background-color: $tableCellC; | 69 | background-color: $tableCellC; |
71 | box-sizing: border-box; | 70 | box-sizing: border-box; |
72 | - border-bottom: 1px solid #fff; | ||
73 | - border-right: 1px solid #fff; | 71 | + border: 1px solid #fff; |
74 | width: 49.9%; | 72 | width: 49.9%; |
75 | height: 100%; | 73 | height: 100%; |
76 | float: left; | 74 | float: left; |
1 | <div class="hot-brands"> | 1 | <div class="hot-brands"> |
2 | - {{^ brandPage}} | ||
3 | {{> home/floor_header}} | 2 | {{> home/floor_header}} |
4 | - {{/ brandPage}} | ||
5 | <div class="brands-swiper"> | 3 | <div class="brands-swiper"> |
6 | <ul class="brands-list swiper-wrapper clearfix"> | 4 | <ul class="brands-list swiper-wrapper clearfix"> |
7 | {{# list}} | 5 | {{# list}} |
-
Please register or login to post a comment