auth.js 288 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 /** * 登录判断 * @author: leo<qi.li@yoho.cn> * @date: 2017/6/23 */ 'use strict'; module.exports = (req, res, next) => { if (!req.user.uid) { return res.json({ code: 400, message: '抱歉,您暂未登录!' }); } next(); };