Authored by 毕凯

Merge remote-tracking branch 'origin/feature/supportShipment' into release/6.0.1

... ... @@ -50,8 +50,8 @@
<ul class="dispatch-mode">
{{#each dispatchMode}}
<li {{#if isSelected}}class="chosed"{{/if}} data-id="{{id}}">
<span>{{name}}:运费¥{{cost}}</span>
<i class="right iconfont {{#if isSelected}}icon-cb-radio{{else}}icon-radio{{/if}}" data-id="{{id}}"></i>
<span>{{name}}:运费¥{{cost}} {{#if is_support_message}}({{is_support_message}}){{/if}}</span>
<i class="right iconfont {{#if isSelected}}icon-cb-radio{{else}}icon-radio{{/if}}{{#if is_support_message}} no-support{{/if}}" data-id="{{id}}"></i>
</li>
{{/each}}
</ul>
... ...
... ... @@ -50,8 +50,8 @@
<ul class="dispatch-mode">
{{#each dispatchMode}}
<li {{#if isSelected}}class="chosed"{{/if}} data-id="{{id}}">
<span>{{name}}:运费¥{{cost}}</span>
<i class="right iconfont {{#if isSelected}}icon-cb-radio{{else}}icon-radio{{/if}}" data-id="{{id}}"></i>
<span>{{name}}:运费¥{{cost}} {{#if is_support_message}}({{is_support_message}}){{/if}}</span>
<i class="right iconfont {{#if isSelected}}icon-cb-radio{{else}}icon-radio{{/if}}{{#if is_support_message}} no-support{{/if}}" data-id="{{id}}"></i>
</li>
{{/each}}
</ul>
... ...
... ... @@ -343,6 +343,10 @@ if (!orderInfo('address_id')) {
}
$('.delivery-id').on('touchend', 'li', function(event) {
if ($(this).find('i').hasClass('no-support')) {
return false;
}
orderInfo('delivery_way', $(this).data('id'));
// 实付金额发生变化,使用有货币为0
... ... @@ -448,6 +452,10 @@ $subBlock.on('touchstart', 'li', function() {
return true;
}
if ($(this).find('i').hasClass('no-support')) {
return false;
}
$.each($(this).parents('ul').find('i'), function() {
$(this).parents('ul').find('i').removeClass('icon-cb-radio').addClass('icon-radio');
});
... ...
... ... @@ -324,6 +324,10 @@ if (!orderInfo('addressId')) {
}
$('.delivery-id').on('touchend', 'li', function(event) {
if ($(this).find('i').hasClass('no-support')) {
return false;
}
orderInfo('deliveryId', $(this).data('id'));
// 实付金额发生变化,使用有货币为0
... ... @@ -425,11 +429,16 @@ $('.dispatch').on('touchend', 'h3', function() {
});
$subBlock.on('touchstart', 'li', function() {
// 送货时间提示语li,不响应事件
if ($(this).hasClass('dispatch-time-info')) {
return true;
}
if ($(this).find('i').hasClass('no-support')) {
return false;
}
$.each($(this).parents('ul').find('i'), function() {
$(this).parents('ul').find('i').removeClass('icon-cb-radio').addClass('icon-radio');
});
... ...
... ... @@ -196,7 +196,7 @@
height: auto;
overflow: hidden;
line-height: 80px;
font-size: 28px;
font-size: 26px;
background: #e0e0e0;
display: none;
... ...
... ... @@ -97,7 +97,7 @@ function tranformPayment(data, orderInfo, cartType, skuList, orderComputeData) {
if (data.hasOwnProperty('delivery_address') && !_.isEmpty(data.delivery_address)) {
let cookieAddress = orderInfo.address;
let addressData = data.delivery_address;
let isSupport = cookieAddress ? cookieAddress.is_support : addressData.is_support;
let isSupport = cookieAddress ? cookieAddress.is_support : '';
result.name = cookieAddress ? cookieAddress.consignee : addressData.consignee;
result.phoneNum = cookieAddress ? cookieAddress.mobile : addressData.mobile;
... ... @@ -107,8 +107,7 @@ function tranformPayment(data, orderInfo, cartType, skuList, orderComputeData) {
cookieAddress.address_info : [addressData.area, addressData.address].join(' ');
result.addressId = crypto.encryption(null, result.addressId + '');
isSunfengSupport = isSupport === 'Y';
isSunfengSupport = isSupport === 'N';
}
// delivery_way 配送信息
... ... @@ -120,7 +119,7 @@ function tranformPayment(data, orderInfo, cartType, skuList, orderComputeData) {
let defaultKey = 0;
deliveryWay.forEach((way, index) => {
if (way.delivery_way_name === '顺丰速运' && !isSunfengSupport) {
if (way.delivery_way_name === '顺丰速运' && isSunfengSupport) {
return;
}
... ... @@ -138,6 +137,8 @@ function tranformPayment(data, orderInfo, cartType, skuList, orderComputeData) {
id: way.delivery_way_id,
name: way.delivery_way_name,
cost: way.delivery_way_cost,
is_support_message: (way.is_support === 'N' && way.is_support_message !== '') ?
way.is_support_message : ''
}, obj)
);
});
... ...