Authored by 毕凯

不支持顺丰 提示

... ... @@ -17,6 +17,7 @@ var dispatchModeHammer,
$invoice = $('.invoice'),
$price = $('.price-cal'),
$couponUse = $('.coupon-use.used'),
$addressWrap = $('.address-wrap'),
payType,
priceTmpl = Handlebars.compile($('#tmpl-price').html()),
queryString = $.queryString(),
... ... @@ -184,12 +185,21 @@ function submitOrder() {
// 界面点击,状态存 cookie
if (!orderInfo('addressId')) {
orderInfo('addressId', $('.address-wrap').data('id'));
orderInfo('addressId', $addressWrap.data('id'));
}
$('.dispatch-mode').on('touchend', 'li', function() {
orderInfo('deliveryId', $(this).data('id'));
orderCompute();
$('.dispatch-mode').on('touchstart', 'li', function() {
var $defaultMode = $('.dispatch-mode [data-id="1"]');
if (!$addressWrap.data('support') && $(this).data('id') === 2) {
dispacthTapEvt({
target: $defaultMode
});
tip.show('当前地址不支持顺丰快递');
} else {
orderInfo('deliveryId', $(this).data('id'));
orderCompute();
}
});
$('.dispatch-time').on('touchend', 'li', function() {
... ...
{{> layout/header}}
<div class="order-ensure-page yoho-page">
{{# orderEnsure}}
<a class="address-wrap block" data-id="{{addressId}}" href="/cart/index/selectAddress">
<a class="address-wrap block" data-id="{{addressId}}" data-support="{{isSupport}}" href="/cart/index/selectAddress">
<p class="infos">
收货地址
<span class="per-info">{{name}} {{phoneNum}}</span>
... ... @@ -41,6 +41,7 @@
<section class="block">
<ul class="sale-invoice">
{{#if isOrdinaryCart}}
<li class="coupon">
<a href="/cart/index/selectCoupon">
<span class="title">优惠券</span>
... ... @@ -63,6 +64,7 @@
{{/coupon}}
</a>
</li>
{{/if}}
<li class="coin" data-yoho-coin="{{yohoCoin}}">
<span class="title">YOHO币</span>
... ...
... ... @@ -79,7 +79,7 @@ class IndexController extends AbstractAction
$result = array();
if ($this->isAjax()) {
$uid = $this->getUid(false);
$uid = $this->getUid(true);
$shoppingKey = Helpers::getShoppingKeyByCookie();
$result = CartModel::getCartCount($uid, $shoppingKey);
}
... ... @@ -286,6 +286,7 @@ class IndexController extends AbstractAction
$uid = $this->getUid(true);
$data = array(
'orderEnsurePage' => true,
'isOrdinaryCart' => ($cartType !== 'advance'),
'orderEnsure' => CartModel::cartPay($uid, $cartType, $cookieData)
);
... ...