...
|
...
|
@@ -5,8 +5,8 @@ |
|
|
var $ = require('yoho-jquery');
|
|
|
var dialog = require('../common/dialog');
|
|
|
var Alert = dialog.Alert,
|
|
|
CART_ITEM_DEL_URL = '/cart/index/remove',
|
|
|
CART_ITEM_FAV_URL = '/cart/index/fav';
|
|
|
CART_ITEM_DEL_URL = '/newcart/index/remove',
|
|
|
CART_ITEM_FAV_URL = '/newcart/index/fav';
|
|
|
|
|
|
// checkbox提交ajax
|
|
|
function choiceOut(items) {
|
...
|
...
|
@@ -25,7 +25,7 @@ function choiceOut(items) { |
|
|
return $.ajax({
|
|
|
type: 'POST',
|
|
|
dataType: 'json',
|
|
|
url: '/cart/index/select',
|
|
|
url: '/newcart/index/select',
|
|
|
data: {
|
|
|
skuList: JSON.stringify(skuList),
|
|
|
hasPromotion: hasPromotion
|
...
|
...
|
@@ -110,7 +110,7 @@ var cartItemNumChg = (function() { |
|
|
$.ajax({
|
|
|
type: 'POST',
|
|
|
dataType: 'json',
|
|
|
url: '/cart/index/modifyNum',
|
|
|
url: '/newcart/index/modifyNum',
|
|
|
data: data
|
|
|
}).then(function(d) {
|
|
|
|
...
|
...
|
@@ -127,7 +127,7 @@ var cartItemNumChg = (function() { |
|
|
function getProductInfo(pid, skn) {
|
|
|
return $.ajax({
|
|
|
type: 'GET',
|
|
|
url: '/cart/index/getProductData', // '/product/item/getProductInfo',
|
|
|
url: '/newcart/index/getProductData', // '/product/item/getProductInfo',
|
|
|
data: {
|
|
|
productId: pid,
|
|
|
skn: skn
|
...
|
...
|
@@ -141,7 +141,7 @@ function getProductInfo(pid, skn) { |
|
|
function addcart(data, cookieList) {
|
|
|
$.ajax({
|
|
|
type: 'POST',
|
|
|
url: '/cart/index/add',
|
|
|
url: '/newcart/index/add',
|
|
|
data: data
|
|
|
}).then(function(d) {
|
|
|
if (d.code === 200) {
|
...
|
...
|
@@ -242,7 +242,7 @@ function updateCartItem(newSku, oldSku) { |
|
|
|
|
|
$.ajax({
|
|
|
type: 'POST',
|
|
|
url: '/cart/index/updateProduct',
|
|
|
url: '/newcart/index/updateProduct',
|
|
|
data: {
|
|
|
swapData: JSON.stringify([{
|
|
|
buy_number: '1',
|
...
|
...
|
@@ -264,7 +264,7 @@ function updateCartGiftItem(promotionId, newSkn, newSku) { |
|
|
|
|
|
$.ajax({
|
|
|
type: 'POST',
|
|
|
url: '/cart/index/swapGift',
|
|
|
url: '/newcart/index/swapGift',
|
|
|
data: {
|
|
|
promotionId: promotionId,
|
|
|
newSkn: newSkn,
|
...
|
...
|
@@ -282,7 +282,7 @@ function updateCartGiftItem(promotionId, newSkn, newSku) { |
|
|
function getProductByPromotionId(promotionId) {
|
|
|
return $.ajax({
|
|
|
type: 'GET',
|
|
|
url: '/cart/index/queryPromotionGift',
|
|
|
url: '/newcart/index/queryPromotionGift',
|
|
|
data: {
|
|
|
promotionId: promotionId
|
|
|
}
|
...
|
...
|
@@ -297,7 +297,7 @@ function getFineProduct(page) { |
|
|
return $.ajax({
|
|
|
type: 'GET',
|
|
|
dataType: 'json',
|
|
|
url: '/cart/data/recommendProduct',
|
|
|
url: '/newcart/data/recommendProduct',
|
|
|
data: {
|
|
|
page: page
|
|
|
}
|
...
|
...
|
@@ -338,7 +338,7 @@ function getTogetherProduct(page) { |
|
|
return $.ajax({
|
|
|
type: 'GET',
|
|
|
dataType: 'json',
|
|
|
url: '/cart/data/togetherProduct',
|
|
|
url: '/newcart/data/togetherProduct',
|
|
|
data: page
|
|
|
}).then(function(d) {
|
|
|
return d;
|
...
|
...
|
|