Browse Source

Update basket-proxy.js

ipaddr
Başak ERDEM 5 years ago
parent
commit
50ca331b9f
  1. 26
      apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/client-proxies/basket-proxy.js

26
apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/client-proxies/basket-proxy.js

@ -11,27 +11,13 @@
abp.utils.createNamespace(window, 'eShopOnAbp.basketService.basket'); abp.utils.createNamespace(window, 'eShopOnAbp.basketService.basket');
eShopOnAbp.basketService.basket.get = function(ajaxParams) { eShopOnAbp.basketService.basket.get = function(anonymousUserId, ajaxParams) {
return abp.ajax($.extend(true, { return abp.ajax($.extend(true, {
url: abp.appPath + 'api/basket/basket', url: abp.appPath + 'api/basket/basket' + abp.utils.buildQueryString([{ name: 'anonymousUserId', value: anonymousUserId }]) + '',
type: 'GET' type: 'GET'
}, ajaxParams)); }, ajaxParams));
}; };
eShopOnAbp.basketService.basket.getByAnonymousUserId = function(id, ajaxParams) {
return abp.ajax($.extend(true, {
url: abp.appPath + 'api/basket/basket/' + id + '/by-anonymous-user-id',
type: 'GET'
}, ajaxParams));
};
eShopOnAbp.basketService.basket.mergeBaskets = function(ajaxParams) {
return abp.ajax($.extend(true, {
url: abp.appPath + 'api/basket/basket/merge-baskets',
type: 'POST'
}, ajaxParams));
};
eShopOnAbp.basketService.basket.addProduct = function(input, ajaxParams) { eShopOnAbp.basketService.basket.addProduct = function(input, ajaxParams) {
return abp.ajax($.extend(true, { return abp.ajax($.extend(true, {
url: abp.appPath + 'api/basket/basket/product', url: abp.appPath + 'api/basket/basket/product',
@ -47,14 +33,6 @@
}, ajaxParams)); }, ajaxParams));
}; };
eShopOnAbp.basketService.basket.purchase = function(ajaxParams) {
return abp.ajax($.extend(true, {
url: abp.appPath + 'api/basket/basket/purchase',
type: 'POST',
dataType: null
}, ajaxParams));
};
})(); })();
})(); })();

Loading…
Cancel
Save