Authored by 毕凯

Merge branch 'fetaure/orderPayType' into 'release/6.0'

货到付款提示取接口字段



See merge request !747
... ... @@ -31,7 +31,7 @@
{{#each paymentWay}}
{{#if isSupport}}
<li {{#if recommend}}class="chosed"{{/if}}>
<span>{{name}}</span>
<span {{#if isSupportMessage}}data-message="{{isSupportMessage}}"{{/if}}>{{name}}</span>
<i class="right iconfont {{#if recommend}}icon-cb-radio{{else}}icon-radio{{/if}}" data-id="{{id}}" data-payment-type="{{paymentType}}"></i>
</li>
{{/if}}
... ...
... ... @@ -31,7 +31,7 @@
{{#each paymentWay}}
{{#if isSupport}}
<li {{#if recommend}}class="chosed"{{/if}}>
<span>{{name}}</span>
<span {{#if isSupportMessage}}data-message="{{isSupportMessage}}"{{/if}}>{{name}}</span>
<i class="right iconfont {{#if recommend}}icon-cb-radio{{else}}icon-radio{{/if}}" data-id="{{id}}" data-payment-type="{{paymentType}}"></i>
</li>
{{/if}}
... ...
... ... @@ -452,10 +452,10 @@ $subBlock.on('touchstart', 'li', function() {
});
let self = $(this);
if (self.find('i').data('payment-type') === 2 && delivery === 0) {
if (self.find('span').data('message') && delivery === 0) {
dialog.showDialog({
hasHeader: '温馨提示',
dialogText: '货到付款订单是否支持刷卡以当地快递公司为准',
dialogText: self.find('span').data('message'),
hasFooter: {
centerBtnText: '我知道了'
}
... ...
... ... @@ -431,9 +431,10 @@ $subBlock.on('touchstart', 'li', function() {
});
let self = $(this);
if (self.find('i').data('payment-type') === 2 && delivery === 0) {
if (self.find('span').data('message') && delivery === 0) {
dialog.showDialog({
dialogText: '货到付款订单是否支持刷卡以当地快递公司为准',
hasHeader: '温馨提示',
dialogText: self.find('span').data('message'),
hasFooter: {
centerBtnText: '我知道了'
}
... ...
... ... @@ -227,6 +227,7 @@ function tranformPayment(data, orderInfo, cartType, skuList, orderComputeData) {
obj.paymentType = way.payment_type;
obj.name = way.payment_type_name;
obj.isSupport = way.is_support === 'Y';
obj.isSupportMessage = way.payment_type === 2 ? _.get(way, 'is_support_message', false) : false;
return obj;
});
... ...