Showing
6 changed files
with
93 additions
and
25 deletions
@@ -92,22 +92,22 @@ function dispacthTapEvt(e) { | @@ -92,22 +92,22 @@ function dispacthTapEvt(e) { | ||
92 | $('.checkbox').on('touchstart', function() { | 92 | $('.checkbox').on('touchstart', function() { |
93 | var $this = $(this); | 93 | var $this = $(this); |
94 | 94 | ||
95 | - if ($this.hasClass('icon-cb-checked')) { | ||
96 | - $this.removeClass('icon-cb-checked').addClass('icon-checkbox'); | 95 | + if ($this.hasClass('icon-cb-radio')) { |
96 | + $this.removeClass('icon-cb-radio').addClass('icon-radio'); | ||
97 | return; | 97 | return; |
98 | } | 98 | } |
99 | - if ($this.hasClass('icon-checkbox')) { | ||
100 | - $this.removeClass('icon-checkbox').addClass('icon-cb-checked'); | 99 | + if ($this.hasClass('icon-radio')) { |
100 | + $this.removeClass('icon-radio').addClass('icon-cb-radio'); | ||
101 | } | 101 | } |
102 | }); | 102 | }); |
103 | 103 | ||
104 | $invoice.on('touchend', '.checkbox', function() { | 104 | $invoice.on('touchend', '.checkbox', function() { |
105 | var $this = $(this); | 105 | var $this = $(this); |
106 | 106 | ||
107 | - if ($this.hasClass('icon-cb-checked')) { | 107 | + if ($this.hasClass('icon-cb-radio')) { |
108 | $invoice.addClass('focus'); | 108 | $invoice.addClass('focus'); |
109 | } | 109 | } |
110 | - if ($this.hasClass('icon-checkbox')) { | 110 | + if ($this.hasClass('icon-radio')) { |
111 | $invoice.removeClass('focus'); | 111 | $invoice.removeClass('focus'); |
112 | } | 112 | } |
113 | }); | 113 | }); |
@@ -251,7 +251,7 @@ $('.dispatch-time').on('touchend', 'li', function() { | @@ -251,7 +251,7 @@ $('.dispatch-time').on('touchend', 'li', function() { | ||
251 | $('.coin').on('touchend', function() { | 251 | $('.coin').on('touchend', function() { |
252 | var $this = $(this); | 252 | var $this = $(this); |
253 | 253 | ||
254 | - if ($this.find('.checkbox').hasClass('icon-cb-checked')) { | 254 | + if ($this.find('.checkbox').hasClass('icon-cb-radio')) { |
255 | orderInfo('yohoCoin', $this.data('yoho-coin')); | 255 | orderInfo('yohoCoin', $this.data('yoho-coin')); |
256 | $this.find('.can-use').hide(); | 256 | $this.find('.can-use').hide(); |
257 | } else { | 257 | } else { |
@@ -266,7 +266,7 @@ $('.coin').on('touchend', function() { | @@ -266,7 +266,7 @@ $('.coin').on('touchend', function() { | ||
266 | $invoice.on('touchend', '.checkbox', function(e) { | 266 | $invoice.on('touchend', '.checkbox', function(e) { |
267 | var $this = $(this); | 267 | var $this = $(this); |
268 | 268 | ||
269 | - orderInfo('invoice', $this.hasClass('icon-cb-checked')); | 269 | + orderInfo('invoice', $this.hasClass('icon-cb-radio')); |
270 | e.preventDefault(); | 270 | e.preventDefault(); |
271 | e.stopPropagation(); | 271 | e.stopPropagation(); |
272 | }); | 272 | }); |
@@ -306,16 +306,17 @@ $('.dispatch').on('touchend', 'h3', function() { | @@ -306,16 +306,17 @@ $('.dispatch').on('touchend', 'h3', function() { | ||
306 | } | 306 | } |
307 | }); | 307 | }); |
308 | 308 | ||
309 | -$subBlock.on('touchstart', 'i', function() { | 309 | +$subBlock.on('touchstart', 'li', function() { |
310 | + console.log($(this).hasClass('icon-radio')); | ||
310 | $.each($(this).parents('ul').find('i'), function() { | 311 | $.each($(this).parents('ul').find('i'), function() { |
311 | - $(this).removeClass('icon-cb-radio').addClass('icon-radio'); | 312 | + $(this).parents('ul').find('i').removeClass('icon-cb-radio').addClass('icon-radio'); |
312 | }); | 313 | }); |
313 | - dispatchInfo = $(this).siblings('span').html(); | 314 | + dispatchInfo = $(this).find('span').html(); |
314 | $(this).parents('.sub-block').find('h3 span').html(dispatchInfo); | 315 | $(this).parents('.sub-block').find('h3 span').html(dispatchInfo); |
315 | - if ($(this).hasClass('icon-cb-radio')) { | ||
316 | - $(this).addClass('icon-radio'); | ||
317 | - } else if ($(this).hasClass('icon-radio')) { | ||
318 | - $(this).addClass('icon-cb-radio'); | 316 | + if ($(this).find('i').hasClass('icon-cb-radio')) { |
317 | + $(this).find('i').addClass('icon-radio'); | ||
318 | + } else if ($(this).find('i').hasClass('icon-radio')) { | ||
319 | + $(this).find('i').addClass('icon-cb-radio'); | ||
319 | } | 320 | } |
320 | }); | 321 | }); |
321 | 322 | ||
@@ -332,3 +333,9 @@ function phoneHidden(phone) { | @@ -332,3 +333,9 @@ function phoneHidden(phone) { | ||
332 | 333 | ||
333 | $('.info-phone').html(phoneHidden($('.info-phone').html())); | 334 | $('.info-phone').html(phoneHidden($('.info-phone').html())); |
334 | 335 | ||
336 | +$subBlock.each(function() { | ||
337 | + if ($('ul li', this).length === 1) { | ||
338 | + $('h3 i', this).hide(); | ||
339 | + } | ||
340 | +}); | ||
341 | + |
@@ -46,5 +46,5 @@ function phoneHidden(phone) { | @@ -46,5 +46,5 @@ function phoneHidden(phone) { | ||
46 | } | 46 | } |
47 | 47 | ||
48 | $('.tel').each(function(index) { | 48 | $('.tel').each(function(index) { |
49 | - $('.tel').eq(index).html(phoneHidden($('.tel').html())); | 49 | + $('.tel').eq(index).html(phoneHidden($('.tel').eq(index).html())); |
50 | }); | 50 | }); |
@@ -79,3 +79,11 @@ $action.on('touchstart', 'a,span', function() { | @@ -79,3 +79,11 @@ $action.on('touchstart', 'a,span', function() { | ||
79 | }).on('touchend touchcancel', 'a,span', function() { | 79 | }).on('touchend touchcancel', 'a,span', function() { |
80 | $(this).css('background', 'transparent'); | 80 | $(this).css('background', 'transparent'); |
81 | }); | 81 | }); |
82 | + | ||
83 | +function phoneHidden(phone) { | ||
84 | + return phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2'); | ||
85 | +} | ||
86 | + | ||
87 | +$('.tel').each(function(index) { | ||
88 | + $('.tel').eq(index).html(phoneHidden($('.tel').eq(index).html())); | ||
89 | +}); |
@@ -87,3 +87,10 @@ optHammer.on('tap', function(e) { | @@ -87,3 +87,10 @@ optHammer.on('tap', function(e) { | ||
87 | }); | 87 | }); |
88 | } | 88 | } |
89 | }); | 89 | }); |
90 | + | ||
91 | +function phoneHidden(phone) { | ||
92 | + return phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2'); | ||
93 | +} | ||
94 | + | ||
95 | +$('.name-phone span').html(phoneHidden($('.name-phone span').html())); | ||
96 | + |
@@ -26,6 +26,28 @@ | @@ -26,6 +26,28 @@ | ||
26 | .lifeStyle{ | 26 | .lifeStyle{ |
27 | background:image-url('shopping-cart/lifeStyle.png') bottom left repeat-x #fff; | 27 | background:image-url('shopping-cart/lifeStyle.png') bottom left repeat-x #fff; |
28 | } | 28 | } |
29 | + .not-address{ | ||
30 | + position: relative; | ||
31 | + i{ | ||
32 | + position: absolute; | ||
33 | + left: 20rem / $pxConvertRem; | ||
34 | + top: 28rem / $pxConvertRem; | ||
35 | + font-size: 32rem / $pxConvertRem; | ||
36 | + } | ||
37 | + .choose{ | ||
38 | + display: block; | ||
39 | + color: #000; | ||
40 | + position: static; | ||
41 | + padding-left:40rem / $pxConvertRem; | ||
42 | + font-size: 32rem / $pxConvertRem; | ||
43 | + span{ | ||
44 | + position: absolute; | ||
45 | + right: 20rem / $pxConvertRem; | ||
46 | + top: 28rem / $pxConvertRem; | ||
47 | + font-size: 32rem / $pxConvertRem; | ||
48 | + } | ||
49 | + } | ||
50 | + } | ||
29 | .address{ | 51 | .address{ |
30 | display: block; | 52 | display: block; |
31 | position: relative; | 53 | position: relative; |
@@ -45,13 +67,17 @@ | @@ -45,13 +67,17 @@ | ||
45 | i{ | 67 | i{ |
46 | position: absolute; | 68 | position: absolute; |
47 | left: 0; | 69 | left: 0; |
48 | - top: 20%; | 70 | + top: 16rem / $pxConvertRem; |
49 | font-size: 48rem / $pxConvertRem; | 71 | font-size: 48rem / $pxConvertRem; |
50 | } | 72 | } |
51 | } | 73 | } |
52 | .info-name{ | 74 | .info-name{ |
53 | width: 48%; | 75 | width: 48%; |
76 | + height: 40rem / $pxConvertRem; | ||
54 | font-size: 32rem / $pxConvertRem; | 77 | font-size: 32rem / $pxConvertRem; |
78 | + overflow: hidden; | ||
79 | + text-overflow:ellipsis; | ||
80 | + white-space:nowrap; | ||
55 | } | 81 | } |
56 | .info-phone{ | 82 | .info-phone{ |
57 | width: 48%; | 83 | width: 48%; |
@@ -63,7 +89,7 @@ | @@ -63,7 +89,7 @@ | ||
63 | font-size: 24rem / $pxConvertRem; | 89 | font-size: 24rem / $pxConvertRem; |
64 | line-height: 38rem / $pxConvertRem; | 90 | line-height: 38rem / $pxConvertRem; |
65 | } | 91 | } |
66 | - > a{ | 92 | + .rest{ |
67 | position: absolute; | 93 | position: absolute; |
68 | right: 32rem / $pxConvertRem; | 94 | right: 32rem / $pxConvertRem; |
69 | bottom:20rem / $pxConvertRem; | 95 | bottom:20rem / $pxConvertRem; |
@@ -92,16 +118,29 @@ | @@ -92,16 +118,29 @@ | ||
92 | border-bottom:1px solid #e0e0e0; | 118 | border-bottom:1px solid #e0e0e0; |
93 | p{ | 119 | p{ |
94 | display: inline-block; | 120 | display: inline-block; |
121 | + height: 80rem / $pxConvertRem; | ||
122 | + overflow: hidden; | ||
123 | + text-overflow:ellipsis; | ||
124 | + white-space:nowrap; | ||
95 | } | 125 | } |
96 | i{ | 126 | i{ |
97 | font-size: 36rem / $pxConvertRem; | 127 | font-size: 36rem / $pxConvertRem; |
98 | margin-left: 8rem / $pxConvertRem; | 128 | margin-left: 8rem / $pxConvertRem; |
129 | + height: 80rem / $pxConvertRem; | ||
130 | + display: inline-block; | ||
131 | + overflow: hidden; | ||
132 | + text-overflow:ellipsis; | ||
133 | + white-space:nowrap; | ||
99 | } | 134 | } |
100 | span{ | 135 | span{ |
101 | display: inline-block; | 136 | display: inline-block; |
102 | width: 65%; | 137 | width: 65%; |
138 | + height: 80rem / $pxConvertRem; | ||
103 | text-align: right; | 139 | text-align: right; |
104 | font-size: 28rem / $pxConvertRem; | 140 | font-size: 28rem / $pxConvertRem; |
141 | + overflow: hidden; | ||
142 | + text-overflow:ellipsis; | ||
143 | + white-space:nowrap; | ||
105 | } | 144 | } |
106 | } | 145 | } |
107 | ul{ | 146 | ul{ |
1 | {{> layout/header}} | 1 | {{> layout/header}} |
2 | <div class="order-ensure-page yoho-page"> | 2 | <div class="order-ensure-page yoho-page"> |
3 | {{# orderEnsure}} | 3 | {{# orderEnsure}} |
4 | + {{#if addressInfo}} | ||
4 | <div class="address block address-wrap {{#if pageHeader.boys}} boys{{/if}}{{#if pageHeader.girls}} girls{{/if}}{{#if pageHeader.kids}} kids{{/if}}{{#if pageHeader.lifeStyle}} life-style{{/if}}" data-id ="{{addressId}}"> | 5 | <div class="address block address-wrap {{#if pageHeader.boys}} boys{{/if}}{{#if pageHeader.girls}} girls{{/if}}{{#if pageHeader.kids}} kids{{/if}}{{#if pageHeader.lifeStyle}} life-style{{/if}}" data-id ="{{addressId}}"> |
5 | <div class="info"> | 6 | <div class="info"> |
6 | <span class="info-name">{{name}}</span> | 7 | <span class="info-name">{{name}}</span> |
7 | <span class="info-phone">{{phoneNum}}</span> | 8 | <span class="info-phone">{{phoneNum}}</span> |
8 | - <span class="info-address">{{addressInfo}}</span> | 9 | + <a href="/cart/index/selectAddress"><span class="info-address">{{addressInfo}}</span></a> |
9 | <i class="iconfont"></i> | 10 | <i class="iconfont"></i> |
10 | </div> | 11 | </div> |
11 | - <a href="/cart/index/selectAddress">其他地址<span class="iconfont"></span></a> | 12 | + <a class="rest" href="/cart/index/selectAddress">其他地址<span class="iconfont"></span></a> |
12 | </div> | 13 | </div> |
14 | + {{^}} | ||
15 | + <div class="address block address-wrap not-address"> | ||
16 | + <i class="iconfont"></i> | ||
17 | + <a class="choose" href="/cart/index/selectAddress">请选择收获地址<span class="iconfont"></span></a> | ||
18 | + </div> | ||
19 | + {{/if}} | ||
13 | <section class="dispatch block"> | 20 | <section class="dispatch block"> |
14 | <div class="sub-block payment-type"> | 21 | <div class="sub-block payment-type"> |
15 | <h3> | 22 | <h3> |
@@ -18,10 +25,10 @@ | @@ -18,10 +25,10 @@ | ||
18 | <i class="iconfont"></i> | 25 | <i class="iconfont"></i> |
19 | </h3> | 26 | </h3> |
20 | <ul> | 27 | <ul> |
21 | - {{#each dispatchMode}} | 28 | + {{#each paymentWay}} |
22 | <li {{#if isSelected}}class="chosed"{{/if}}> | 29 | <li {{#if isSelected}}class="chosed"{{/if}}> |
23 | <span>{{name}}</span> | 30 | <span>{{name}}</span> |
24 | - <i class="right iconfont {{#if isSelected}}icon-cb-radio{{else}}icon-radio{{/if}}" data-id="{{id}}"></i> | 31 | + <i class="right iconfont {{#if recommend}}icon-cb-radio{{else}}icon-radio{{/if}}" data-id="{{paymentType}}"></i> |
25 | </li> | 32 | </li> |
26 | {{/each}} | 33 | {{/each}} |
27 | </ul> | 34 | </ul> |
@@ -146,13 +153,13 @@ | @@ -146,13 +153,13 @@ | ||
146 | {{/cartPayData}} | 153 | {{/cartPayData}} |
147 | </ul> | 154 | </ul> |
148 | <div class="price-cost"> | 155 | <div class="price-cost"> |
149 | - 实付金额: | 156 | + 实付金额 |
150 | <span>¥{{price}}</span> | 157 | <span>¥{{price}}</span> |
151 | </div> | 158 | </div> |
152 | </section> | 159 | </section> |
153 | <div class="bill"> | 160 | <div class="bill"> |
154 | - 您需要支付<span>¥{{price}}</span> | ||
155 | - <a href="#">结算</a> | 161 | + 您需要支付:<span>¥{{price}}</span> |
162 | + <a href="#">提交</a> | ||
156 | </div> | 163 | </div> |
157 | {{/ orderEnsure}} | 164 | {{/ orderEnsure}} |
158 | </div> | 165 | </div> |
-
Please register or login to post a comment