Authored by 李靖

未登录

... ... @@ -56,9 +56,17 @@ const checkTickets = (req, res) => {
useYohoCoin: req.body.useYohoCoin
};
indexModel.checkTickets(params).then(result => {
res.json(result);
});
// 未登录
if (!req.user.uid) {
return res.json({
code: 401,
redirect: '/signin.html'
});
} else {
indexModel.checkTickets(params).then(result => {
res.json(result);
});
}
};
module.exports = {
... ...