...
|
...
|
@@ -18,7 +18,6 @@ exports.index = (req, res, next) => { |
|
|
if (result.code === 200) {
|
|
|
|
|
|
res.header('Cache-Control', 'no-store');
|
|
|
|
|
|
res.display('cart', _.merge({
|
|
|
module: 'shopping',
|
|
|
page: 'cart',
|
...
|
...
|
@@ -135,7 +134,7 @@ exports.addToCart = (req, res, next) => { |
|
|
shoppingKey: req.cookies._SPK || null,
|
|
|
uid: req.user.uid
|
|
|
}).then((result) => {
|
|
|
res.cookie('_SPK', result.data.shopping_key, { maxAge: 1000 * 60 * 60 * 24 * 365, httpOnly: true, path: '/'});
|
|
|
res.cookie('_SPK', result.data.shopping_key, {maxAge: 1000 * 60 * 60 * 24 * 365, httpOnly: true, path: '/'});
|
|
|
res.json(result);
|
|
|
}).catch(next);
|
|
|
};
|
...
|
...
|
@@ -147,9 +146,6 @@ exports.toggleSelectGoods = (req, res, next) => { |
|
|
const shoppingKey = req.cookies._SPK;
|
|
|
|
|
|
// 商品sku列表
|
|
|
// skuList:
|
|
|
// [{"goods_type":"advance","buy_number":1,"selected":"Y","product_sku":"1006277","promotion_id":0}, {...}]
|
|
|
// [{"goods_type":"ordinary","buy_number":1,"selected":"Y","product_sku":"1006277","promotion_id":0}, {...}]
|
|
|
const productSkuList = req.body.skuList;
|
|
|
|
|
|
if (uid) {
|
...
|
...
|
|