Authored by hf

Merge branch 'develop' into test

... ... @@ -310,7 +310,7 @@ $yohoPage.on('touchstart', '.btn-minus', function() {
if (2 === $chosed.length && 0 === $chosed.closest('.zero-stock').length) {
productSku = $curSizeBlock.data('skuid');
promotionId = $('[data-id="' + productSku + '"]').closest('.advance-block').data('promotion-id');
promotionId = $('#promotionId').val();
if (confirming) {
return false;
}
... ...
... ... @@ -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(),
... ... @@ -26,6 +27,7 @@ lazyLoad();
if (window.getUid() !== orderInfo('uid')) {
order.init();
window.location.reload();
}
if ($couponUse.data('name') !== orderInfo('couponName')) {
... ... @@ -183,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>
... ...
... ... @@ -67,4 +67,5 @@
</div>
</div>
</div>
{{/cartInfo}}
\ No newline at end of file
{{/cartInfo}}
<input id="promotionId" type="hidden" value="{{promotionId}}">
\ No newline at end of file
... ...
... ... @@ -243,7 +243,6 @@ class CartModel
$product = CartData::giftProductData($skn, $promotionId);
if (isset($product['code']) && $product['code'] === 200) {
$result['code'] = 200;
$result['data'] = self::procGoodsDetail($product['data']);
}
... ...
... ... @@ -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);
}
... ... @@ -216,6 +216,7 @@ class IndexController extends AbstractAction
}
$this->_view->display('gift-info', array(
'promotionId' => $promotionId,
'cartInfo' => $result['data']
));
}
... ... @@ -286,6 +287,7 @@ class IndexController extends AbstractAction
$uid = $this->getUid(true);
$data = array(
'orderEnsurePage' => true,
'isOrdinaryCart' => ($cartType !== 'advance'),
'orderEnsure' => CartModel::cartPay($uid, $cartType, $cookieData)
);
... ...