Authored by 梁志锋

购物车修改

@@ -30,6 +30,7 @@ var $chosePanel = $('#chose-panel'), @@ -30,6 +30,7 @@ var $chosePanel = $('#chose-panel'),
30 cbFn, 30 cbFn,
31 cartType, 31 cartType,
32 $allChoseItems, 32 $allChoseItems,
  33 + queryString,
33 $yohoPage = $('.yoho-page'); 34 $yohoPage = $('.yoho-page');
34 35
35 //初始化购物车面板显示 36 //初始化购物车面板显示
@@ -39,6 +40,7 @@ function init() { @@ -39,6 +40,7 @@ function init() {
39 hasChooseColor = false; 40 hasChooseColor = false;
40 hasChooseSize = false; 41 hasChooseSize = false;
41 $curSizeBlock = null; 42 $curSizeBlock = null;
  43 + queryString = $.queryString();
42 $imgsThumb = $('.chose-panel').find('.thumb'); 44 $imgsThumb = $('.chose-panel').find('.thumb');
43 $allChoseItems = $('.chose-items'); 45 $allChoseItems = $('.chose-items');
44 $sizeRowList = $('.size-list ul'); 46 $sizeRowList = $('.size-list ul');
@@ -167,7 +169,7 @@ $yohoPage.on('touchstart', '.color-list .block', function(e) { @@ -167,7 +169,7 @@ $yohoPage.on('touchstart', '.color-list .block', function(e) {
167 $preSiblingBlock.removeClass('chosed'); 169 $preSiblingBlock.removeClass('chosed');
168 curSizeBlock = $curSizeRow.children().get(scindex); 170 curSizeBlock = $curSizeRow.children().get(scindex);
169 } 171 }
170 - 172 +
171 // 当前选中颜色对应的尺码行,其对应的尺码加上勾选样式 (前提是要判断下这个尺码是否存在) 173 // 当前选中颜色对应的尺码行,其对应的尺码加上勾选样式 (前提是要判断下这个尺码是否存在)
172 if (curSizeBlock) { 174 if (curSizeBlock) {
173 curGoodNum = $(curSizeBlock).data('num'); 175 curGoodNum = $(curSizeBlock).data('num');
@@ -324,7 +326,7 @@ $yohoPage.on('touchstart', '.btn-minus', function() { @@ -324,7 +326,7 @@ $yohoPage.on('touchstart', '.btn-minus', function() {
324 buyNumber: buyNumber, 326 buyNumber: buyNumber,
325 promotionId: promotionId, 327 promotionId: promotionId,
326 isEdit: isEdit, 328 isEdit: isEdit,
327 - cartType: cartType 329 + cartType: queryString.cartType
328 } 330 }
329 }).done(function(res) { 331 }).done(function(res) {
330 loading.hideLoadingMask(); 332 loading.hideLoadingMask();
@@ -26,7 +26,7 @@ function getProductInfo(skn, promotionId) { @@ -26,7 +26,7 @@ function getProductInfo(skn, promotionId) {
26 return; 26 return;
27 } 27 }
28 chosePanel.show(html, function() { 28 chosePanel.show(html, function() {
29 - window.location.href = '/cart/index/orderEnsure?cartType=' + queryString.cartType; 29 + window.location.href = '/cart/index/index?cartType=' + queryString.cartType;
30 }); 30 });
31 }, function() { 31 }, function() {
32 tip.show('网络错误'); 32 tip.show('网络错误');