Blame view

apps/cart/controllers/count.js 345 Bytes
zhangxiaoru authored
1
// 购物车数量
zhangxiaoru authored
2 3 4 5 6 7 8

'use strict';

const countModel = require('../models/count');

let cartCount = (req, res, next) => {
zhangxiaoru authored
9
    let uid = req.user.uid;
zhangxiaoru authored
10 11 12 13 14 15 16 17
    let shoppingKey = req.cookies._SPK || '';

    countModel.cartCount(uid, shoppingKey).then((result) => {
        res.json(result);
    }).catch(next);
};

module.exports = {
zhangxiaoru authored
18 19
    cartCount
};