Authored by 梁志锋

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

... ... @@ -8,13 +8,13 @@ var $ = require('jquery'),
lazyLoad = require('yoho.lazyload'),
Hammer = require('yoho.hammer');
var chosePanel = require('./chose-panel'),
cartInfo = require('./cart-info').cartInfo;
var chosePanel = require('./chose-panel');
var $cartContent = $('.cart-content');
var navHammer,
cartType = 'ordinary';
cartType = 'ordinary',
cartInfo;
require('./good');
... ... @@ -28,6 +28,12 @@ navHammer.on('tap', function(e) {
return;
}
if (cartType === 'ordinary') {
cartType = 'advance';
} else {
cartType = 'ordinary';
}
$this.siblings('.active').removeClass('active');
$this.addClass('active');
... ... @@ -41,7 +47,7 @@ navHammer.on('tap', function(e) {
$('.btn-balance').on('touchend', function() {
window.location.href = '/shoppingCart/orderEnsure?cartType=' + cartType;
window.location.href = '/cart/index/orderEnsure?cartType=' + cartType;
});
//$('.advance-buy').on('touchend', function() {
... ... @@ -66,4 +72,4 @@ $('.chose').on('touchend', function() {
cartInfo = 0;
\ No newline at end of file
cartInfo = 0;
... ...
... ... @@ -44,7 +44,7 @@ $('.cart-goods').on('touchstart', '.checkbox', function() {
$.ajax({
type: 'GET',
url: '/shoppingCart/select',
url: '/cart/index/select',
data: {
id: id
}
... ... @@ -58,7 +58,7 @@ $('.cart-goods').on('touchstart', '.checkbox', function() {
}
$.ajax({
type: 'GET',
url: '/shoppingCart/getCartData',
url: '/cart/index/getCartData',
data: {
id: id
},
... ... @@ -120,7 +120,7 @@ $('.cart-goods').on('touchstart', '.checkbox', function() {
$.ajax({
method: 'post',
url: '/shoppingCart/del',
url: '/cart/index/del',
data: {
id: id
}
... ... @@ -167,11 +167,6 @@ $('.cart-goods').on('touchstart', '.checkbox', function() {
// });
//})
$('.btn-balance').on('touchend', function() {
window.location.href = '/shoppingCart/orderEnsure?cartType=' + 'ordinary';
});
$('.down').on('touchend', function() {
chosePanel.show();
});
... ... @@ -180,7 +175,7 @@ $('.cut').on('touchend', function() {
$.ajax({
type: 'GET',
url: '/shoppingCart/modify',
url: '/cart/index/modify',
data: {
old_product_sku: id,
new_product_sku: id,
... ...
... ... @@ -17,7 +17,8 @@ var dispatchModeHammer,
$invoice = $('.invoice'),
$price = $('.price-cal'),
payType,
priceTmpl = Handlebars.compile($('#tmpl-price').html());
priceTmpl = Handlebars.compile($('#tmpl-price').html()),
queryString = $.queryString();
lazyLoad();
... ... @@ -101,7 +102,7 @@ function submitOrder() {
url: '/cart/index/orderSub',
data: {
addressId: orderInfo('addressId'),
cartType: orderInfo('cartType'),
cartType: queryString.cartType || queryString.carttype || 'ordinary',
deliveryId: orderInfo('deliveryId'),
deliveryTimeId: orderInfo('deliveryTimeId'),
invoiceText: $invoice.find('[name="invoice-title"]').val() || orderInfo('invoiceText'),
... ... @@ -132,7 +133,7 @@ function submitOrder() {
window.location.href = url;
} else {
loading.hideLoadingMask();
tip.show(res.messege || '网络出错');
tip.show(res.message || '网络出错');
}
}).fail(function() {
loading.hideLoadingMask();
... ...
... ... @@ -167,7 +167,6 @@ class DetailModel
$colorStorageNum = 0;
$totalStorageNum = 0; // 总库存数
foreach ($baseInfo['goodsList'] as $value) {
$sizeList = array();
$colorStorageNum = 0;
$sizeStorageStr = '';
... ...