Authored by Rock Zhang

Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into feature/cart

framework @ 75bbc3b0
Subproject commit e9d066dd88a8e7e37103021c427a205a5cfcdcec
Subproject commit 75bbc3b075de19f239532f60c5995d06c5f814e2
... ...
... ... @@ -98,8 +98,8 @@ function submitOrder() {
data: {
addressId: orderInfo('addressId'),
cartType: orderInfo('cartType'),
deliveryId: orderInfo('deliveryId'),
deliveryTimeId: orderInfo('deliveryTimeId'),
deliveryId: orderInfo('deliveryId') || 1,
deliveryTimeId: orderInfo('deliveryTimeId') || 1,
invoiceText: orderInfo('invoiceText'),
invoiceType: orderInfo('invoiceType'),
msg: orderInfo('msg'),
... ... @@ -109,13 +109,24 @@ function submitOrder() {
yohoCoin: orderInfo('yohoCoin')
}
}).then(function(res) {
console.log(res);
if (!res) {
tip.show('网络出错');
}
if (res.code !== 200) {
tip.show(res.message || '网络出错');
} else {
console.log(1);
}
}).fail(function() {
tip.show('网络出错');
});
}
// 界面点击,状态存 cookie
if (!orderInfo('addressId')) {
orderInfo('addressId', $('.address-wrap').data('address-id'));
}
$('.dispatch-mode').on('touchend', 'li', function() {
orderInfo('deliveryId', $(this).data('id'));
orderCompute();
... ...
... ... @@ -22,6 +22,7 @@ try {
invoiceType: null,
msg: null
};
window.setCookie('order-info', JSON.stringify(info));
}
exports.orderInfo = function(key, value) {
... ...
{{> layout/header}}
<div class="order-ensure-page yoho-page">
{{# orderEnsure}}
<a class="address-wrap block" href="/shoppingCart/selectAddress">
<a class="address-wrap block" href="/shoppingCart/selectAddress" data-address-id="{{addressId}}">
<p class="infos">
收货地址
<span class="per-info">{{name}} {{phoneNum}}</span>
... ...
... ... @@ -195,7 +195,7 @@ class ShoppingCartController extends AbstractAction
'orderEnsurePage' => true,
'orderEnsure' => CartModel::cartPay($uid, $cartType, $cookieData)
);
// var_dump($data);
$this->_view->display('order-ensure', $data);
}
... ...