• This project
    • Loading...
  • Sign in

fe / yohoblk-wap · 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
  • yohoblk-wap
  • apps
  • product
  • controllers
  • list.js
  • product
    4f056341
    by 陈轩
    2016-07-19 17:18:08 +0800  
    Browse Files
list.js 357 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
/**
 *  商品列表页
 *  @author  chen xuan <xuan.chen@yoho.cn>
 */
const listModel = require('../models/list');

exports.index = (req, res) =>{
    res.render('list');
};

/*
 * 获取 商品列表
 */
exports.getProducts = (req, res, next)=>{
    listModel.search()
        .then(data=>{
            res.json(data);
        })
        .catch(next);
};