Merge remote-tracking branch 'origin/feature/supportShipment' into release/6.0.1
Showing
6 changed files
with
27 additions
and
9 deletions
@@ -50,8 +50,8 @@ | @@ -50,8 +50,8 @@ | ||
50 | <ul class="dispatch-mode"> | 50 | <ul class="dispatch-mode"> |
51 | {{#each dispatchMode}} | 51 | {{#each dispatchMode}} |
52 | <li {{#if isSelected}}class="chosed"{{/if}} data-id="{{id}}"> | 52 | <li {{#if isSelected}}class="chosed"{{/if}} data-id="{{id}}"> |
53 | - <span>{{name}}:运费¥{{cost}}</span> | ||
54 | - <i class="right iconfont {{#if isSelected}}icon-cb-radio{{else}}icon-radio{{/if}}" data-id="{{id}}"></i> | 53 | + <span>{{name}}:运费¥{{cost}} {{#if is_support_message}}({{is_support_message}}){{/if}}</span> |
54 | + <i class="right iconfont {{#if isSelected}}icon-cb-radio{{else}}icon-radio{{/if}}{{#if is_support_message}} no-support{{/if}}" data-id="{{id}}"></i> | ||
55 | </li> | 55 | </li> |
56 | {{/each}} | 56 | {{/each}} |
57 | </ul> | 57 | </ul> |
@@ -50,8 +50,8 @@ | @@ -50,8 +50,8 @@ | ||
50 | <ul class="dispatch-mode"> | 50 | <ul class="dispatch-mode"> |
51 | {{#each dispatchMode}} | 51 | {{#each dispatchMode}} |
52 | <li {{#if isSelected}}class="chosed"{{/if}} data-id="{{id}}"> | 52 | <li {{#if isSelected}}class="chosed"{{/if}} data-id="{{id}}"> |
53 | - <span>{{name}}:运费¥{{cost}}</span> | ||
54 | - <i class="right iconfont {{#if isSelected}}icon-cb-radio{{else}}icon-radio{{/if}}" data-id="{{id}}"></i> | 53 | + <span>{{name}}:运费¥{{cost}} {{#if is_support_message}}({{is_support_message}}){{/if}}</span> |
54 | + <i class="right iconfont {{#if isSelected}}icon-cb-radio{{else}}icon-radio{{/if}}{{#if is_support_message}} no-support{{/if}}" data-id="{{id}}"></i> | ||
55 | </li> | 55 | </li> |
56 | {{/each}} | 56 | {{/each}} |
57 | </ul> | 57 | </ul> |
@@ -343,6 +343,10 @@ if (!orderInfo('address_id')) { | @@ -343,6 +343,10 @@ if (!orderInfo('address_id')) { | ||
343 | } | 343 | } |
344 | 344 | ||
345 | $('.delivery-id').on('touchend', 'li', function(event) { | 345 | $('.delivery-id').on('touchend', 'li', function(event) { |
346 | + if ($(this).find('i').hasClass('no-support')) { | ||
347 | + return false; | ||
348 | + } | ||
349 | + | ||
346 | orderInfo('delivery_way', $(this).data('id')); | 350 | orderInfo('delivery_way', $(this).data('id')); |
347 | 351 | ||
348 | // 实付金额发生变化,使用有货币为0 | 352 | // 实付金额发生变化,使用有货币为0 |
@@ -448,6 +452,10 @@ $subBlock.on('touchstart', 'li', function() { | @@ -448,6 +452,10 @@ $subBlock.on('touchstart', 'li', function() { | ||
448 | return true; | 452 | return true; |
449 | } | 453 | } |
450 | 454 | ||
455 | + if ($(this).find('i').hasClass('no-support')) { | ||
456 | + return false; | ||
457 | + } | ||
458 | + | ||
451 | $.each($(this).parents('ul').find('i'), function() { | 459 | $.each($(this).parents('ul').find('i'), function() { |
452 | $(this).parents('ul').find('i').removeClass('icon-cb-radio').addClass('icon-radio'); | 460 | $(this).parents('ul').find('i').removeClass('icon-cb-radio').addClass('icon-radio'); |
453 | }); | 461 | }); |
@@ -324,6 +324,10 @@ if (!orderInfo('addressId')) { | @@ -324,6 +324,10 @@ if (!orderInfo('addressId')) { | ||
324 | } | 324 | } |
325 | 325 | ||
326 | $('.delivery-id').on('touchend', 'li', function(event) { | 326 | $('.delivery-id').on('touchend', 'li', function(event) { |
327 | + if ($(this).find('i').hasClass('no-support')) { | ||
328 | + return false; | ||
329 | + } | ||
330 | + | ||
327 | orderInfo('deliveryId', $(this).data('id')); | 331 | orderInfo('deliveryId', $(this).data('id')); |
328 | 332 | ||
329 | // 实付金额发生变化,使用有货币为0 | 333 | // 实付金额发生变化,使用有货币为0 |
@@ -425,11 +429,16 @@ $('.dispatch').on('touchend', 'h3', function() { | @@ -425,11 +429,16 @@ $('.dispatch').on('touchend', 'h3', function() { | ||
425 | }); | 429 | }); |
426 | 430 | ||
427 | $subBlock.on('touchstart', 'li', function() { | 431 | $subBlock.on('touchstart', 'li', function() { |
432 | + | ||
428 | // 送货时间提示语li,不响应事件 | 433 | // 送货时间提示语li,不响应事件 |
429 | if ($(this).hasClass('dispatch-time-info')) { | 434 | if ($(this).hasClass('dispatch-time-info')) { |
430 | return true; | 435 | return true; |
431 | } | 436 | } |
432 | 437 | ||
438 | + if ($(this).find('i').hasClass('no-support')) { | ||
439 | + return false; | ||
440 | + } | ||
441 | + | ||
433 | $.each($(this).parents('ul').find('i'), function() { | 442 | $.each($(this).parents('ul').find('i'), function() { |
434 | $(this).parents('ul').find('i').removeClass('icon-cb-radio').addClass('icon-radio'); | 443 | $(this).parents('ul').find('i').removeClass('icon-cb-radio').addClass('icon-radio'); |
435 | }); | 444 | }); |
@@ -196,7 +196,7 @@ | @@ -196,7 +196,7 @@ | ||
196 | height: auto; | 196 | height: auto; |
197 | overflow: hidden; | 197 | overflow: hidden; |
198 | line-height: 80px; | 198 | line-height: 80px; |
199 | - font-size: 28px; | 199 | + font-size: 26px; |
200 | background: #e0e0e0; | 200 | background: #e0e0e0; |
201 | display: none; | 201 | display: none; |
202 | 202 |
@@ -97,7 +97,7 @@ function tranformPayment(data, orderInfo, cartType, skuList, orderComputeData) { | @@ -97,7 +97,7 @@ function tranformPayment(data, orderInfo, cartType, skuList, orderComputeData) { | ||
97 | if (data.hasOwnProperty('delivery_address') && !_.isEmpty(data.delivery_address)) { | 97 | if (data.hasOwnProperty('delivery_address') && !_.isEmpty(data.delivery_address)) { |
98 | let cookieAddress = orderInfo.address; | 98 | let cookieAddress = orderInfo.address; |
99 | let addressData = data.delivery_address; | 99 | let addressData = data.delivery_address; |
100 | - let isSupport = cookieAddress ? cookieAddress.is_support : addressData.is_support; | 100 | + let isSupport = cookieAddress ? cookieAddress.is_support : ''; |
101 | 101 | ||
102 | result.name = cookieAddress ? cookieAddress.consignee : addressData.consignee; | 102 | result.name = cookieAddress ? cookieAddress.consignee : addressData.consignee; |
103 | result.phoneNum = cookieAddress ? cookieAddress.mobile : addressData.mobile; | 103 | result.phoneNum = cookieAddress ? cookieAddress.mobile : addressData.mobile; |
@@ -107,8 +107,7 @@ function tranformPayment(data, orderInfo, cartType, skuList, orderComputeData) { | @@ -107,8 +107,7 @@ function tranformPayment(data, orderInfo, cartType, skuList, orderComputeData) { | ||
107 | cookieAddress.address_info : [addressData.area, addressData.address].join(' '); | 107 | cookieAddress.address_info : [addressData.area, addressData.address].join(' '); |
108 | 108 | ||
109 | result.addressId = crypto.encryption(null, result.addressId + ''); | 109 | result.addressId = crypto.encryption(null, result.addressId + ''); |
110 | - isSunfengSupport = isSupport === 'Y'; | ||
111 | - | 110 | + isSunfengSupport = isSupport === 'N'; |
112 | } | 111 | } |
113 | 112 | ||
114 | // delivery_way 配送信息 | 113 | // delivery_way 配送信息 |
@@ -120,7 +119,7 @@ function tranformPayment(data, orderInfo, cartType, skuList, orderComputeData) { | @@ -120,7 +119,7 @@ function tranformPayment(data, orderInfo, cartType, skuList, orderComputeData) { | ||
120 | let defaultKey = 0; | 119 | let defaultKey = 0; |
121 | 120 | ||
122 | deliveryWay.forEach((way, index) => { | 121 | deliveryWay.forEach((way, index) => { |
123 | - if (way.delivery_way_name === '顺丰速运' && !isSunfengSupport) { | 122 | + if (way.delivery_way_name === '顺丰速运' && isSunfengSupport) { |
124 | return; | 123 | return; |
125 | } | 124 | } |
126 | 125 | ||
@@ -138,6 +137,8 @@ function tranformPayment(data, orderInfo, cartType, skuList, orderComputeData) { | @@ -138,6 +137,8 @@ function tranformPayment(data, orderInfo, cartType, skuList, orderComputeData) { | ||
138 | id: way.delivery_way_id, | 137 | id: way.delivery_way_id, |
139 | name: way.delivery_way_name, | 138 | name: way.delivery_way_name, |
140 | cost: way.delivery_way_cost, | 139 | cost: way.delivery_way_cost, |
140 | + is_support_message: (way.is_support === 'N' && way.is_support_message !== '') ? | ||
141 | + way.is_support_message : '' | ||
141 | }, obj) | 142 | }, obj) |
142 | ); | 143 | ); |
143 | }); | 144 | }); |
-
Please register or login to post a comment