• This project
    • Loading...
  • Sign in

fe / yohobuy-node · Files

Go to a project

GitLab

  • Go to group
  • Project
  • Activity
  • Files
  • Commits
  • Pipelines 0
  • Builds 0
  • Graphs
  • Milestones
  • Issues 1
  • Merge Requests 0
  • Members
  • Labels
  • Wiki
  • Forks
  • Network
  • Create a new issue
  • yohobuy-node
  • apps
  • passport
  • models
  • cart-api.js
  • fix
    9e66c157
    by htoooth
    2017-09-19 16:52:56 +0800  
    Browse Directory »
cart-api.js 472 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
/**
 * Created by TaoHuang on 2016/9/28.
 */

'use strict';

module.exports = class extends global.yoho.BaseModel {
    constructor(ctx) {
        super(ctx);
    }

    goodsCount(uid, shoppingKey) {
        let params = {
            method: 'app.Shopping.count'
        };

        if (uid) {
            params.uid = uid;
        }

        if (shoppingKey) {
            params.shopping_key = shoppingKey;
        }

        return this.get({data: params});
    }
};