...
|
...
|
@@ -50,22 +50,11 @@ const invoiceController = require(`${cRoot}/invoice`); |
|
|
|
|
|
const meGiftController = require(`${cRoot}/me-gift`);
|
|
|
|
|
|
const checkLogin = (req, res, next) => {
|
|
|
if (req.user.uid) {
|
|
|
return next();
|
|
|
} else {
|
|
|
if (res.xhr) {
|
|
|
res.json({code: 401, message: '未登录!'});
|
|
|
} else {
|
|
|
res.redirect('/login.html');
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
|
|
|
// 首页
|
|
|
router.get(['/index', '/'], tabsMiddleware.getCommonHeaderNew, indexController.index);
|
|
|
router.get('/index/newsAvatar', checkLogin, indexController.newsAvatar);
|
|
|
router.get('/index/async', checkLogin, indexController.asyncData);
|
|
|
router.get('/index/newsAvatar', indexController.newsAvatar);
|
|
|
router.get('/index/async', indexController.asyncData);
|
|
|
|
|
|
// 查看二维码
|
|
|
router.get('/QRcode', tabsMiddleware.getCommonHeader, personalController.QRcode);
|
...
|
...
|
|