Authored by OF1706

cartAdd mini

... ... @@ -229,7 +229,8 @@ const cartAdd = (req, res) => {
// 设置加入购物车凭证到客户端浏览器
if (!shoppingKey && result && result.data && result.data.shopping_key) {
res.cookie('_SPK', result.data.shopping_key, {
expires: new Date(Date.now() + 86400 * 360)
expires: new Date(Date.now() + 86400 * 360),
domain: config.cookieDomain
});
}
... ...
... ... @@ -274,9 +274,11 @@ function addcart(data, cookieList) {
type: 'POST',
url: '/cart/cart/add',
data: data
}).then(function(d) {
if (d.code === 200) {
// window.history.go(0);
refreshCart(d.data);
if (cookieList) {
window.setCookie('cart-del-list', JSON.stringify(cookieList), {
... ...