• 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
  • home
  • models
  • coupons.js
  • 优惠券优化
    c35153af
    by 沈志敏
    2017-01-06 15:24:43 +0800  
    Browse Files
coupons.js 343 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
// 优惠券 by acgpiano
'use strict';

const api = global.yoho.API;

const couponData = (params) => {
    return api.get('', params).then(result => {
        if (result && result.data && result.data.info) {
            return result.data.info;
        } else {
            return 0;
        }
    });
};

module.exports = {
    couponData
};