Authored by Rock Zhang

修改结算页顺丰地址不支持地区的判定逻辑

Code Review By Rock Zhang
framework @ e9d066dd
Subproject commit 75bbc3b075de19f239532f60c5995d06c5f814e2
Subproject commit e9d066dd88a8e7e37103021c427a205a5cfcdcec
... ...
... ... @@ -96,12 +96,6 @@ function orderCompute() {
if ($.type(res) !== 'object') {
window.location.reload();
} else {
/*if (res.order_amount) {
res.order_amount = (+res.order_amount).toFixed(2);
}
if (res.discount_amount) {
res.discount_amount = (+res.discount_amount).toFixed(2);
}*/
if (res.last_order_amount) {
res.last_order_amount = (+res.last_order_amount).toFixed(2);
}
... ... @@ -127,6 +121,10 @@ function submitOrder() {
var invoiceText = $invoice.find('[name="invoice-title"]').val() || orderInfo('invoiceText'),
msg = $('#msg').find('input').val() || orderInfo('msg');
if (orderInfo('deliveryId') === 2 && !$addressWrap.data('support')) {
tip.show('当前地址不支持顺丰快递');
return;
}
if (orderInfo('invoice')) {
if (!invoiceText) {
tip.show('请输入发票抬头');
... ...
... ... @@ -346,7 +346,8 @@ class CartModel
$result['phoneNum'] = isset($address['mobile']) ? $address['mobile'] : $payReturn['delivery_address']['mobile'];
$result['area'] = isset($address['area']) ? $address['area'] : $payReturn['delivery_address']['area'];
$result['address'] = isset($address['address']) ? $address['address'] : $payReturn['delivery_address']['address'];
$result['isSupport'] = ($payReturn['delivery_address']['is_support'] === 'Y');
$isSupport = isset($address['is_support']) ? $address['is_support'] : $payReturn['delivery_address']['is_support'];
$result['isSupport'] = $isSupport === 'Y';
}
// 配送方式
... ...