• This project
    • Loading...
  • Sign in

fe / yohobuywap-node · Files

Go to a project

GitLab

  • Go to group
  • Project
  • Activity
  • Files
  • Commits
  • Pipelines 0
  • Builds 0
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Members
  • Labels
  • Wiki
  • Forks
  • Network
  • Create a new issue
  • yohobuywap-node
  • apps
  • cart
  • controllers
  • count.js
  • cartCount
    4228e1bc
    by zhangxiaoru
    2016-10-09 11:47:01 +0800  
    Browse Directory »
count.js 345 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
// 购物车数量

'use strict';

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

let cartCount = (req, res, next) => {

    let uid = req.user.uid;
    let shoppingKey = req.cookies._SPK || '';

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

module.exports = {
    cartCount
};