...
|
...
|
@@ -56,7 +56,7 @@ exports.index = (req, res) => { |
|
|
}, processPublicData(req, '星潮教室')));
|
|
|
};
|
|
|
|
|
|
exports.getIndexHtml = (req, res) => {
|
|
|
exports.getIndexHtml = (req, res, next) => {
|
|
|
starModel.getIndexData().then((result) => {
|
|
|
res.render('star/index-html', _.assign({
|
|
|
layout: false,
|
...
|
...
|
@@ -67,7 +67,7 @@ exports.getIndexHtml = (req, res) => { |
|
|
starAvatar: result.starAvatar,
|
|
|
articles: result.articles
|
|
|
}));
|
|
|
});
|
|
|
}).catch(next);
|
|
|
};
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -76,7 +76,7 @@ exports.getIndexHtml = (req, res) => { |
|
|
* @param {[object]} res
|
|
|
* @return {[type]}
|
|
|
*/
|
|
|
exports.special = (req, res) => {
|
|
|
exports.special = (req, res, next) => {
|
|
|
starModel.getSpecialData().then((result) => {
|
|
|
const pageHeadTab = _.cloneDeep(headTab);
|
|
|
|
...
|
...
|
@@ -87,7 +87,7 @@ exports.special = (req, res) => { |
|
|
resources: result,
|
|
|
headTab: pageHeadTab
|
|
|
}));
|
|
|
});
|
|
|
}).catch(next);
|
|
|
};
|
|
|
|
|
|
|
...
|
...
|
@@ -115,7 +115,7 @@ exports.collocation = (req, res) => { |
|
|
* @param {[object]} res
|
|
|
* @return {[type]}
|
|
|
*/
|
|
|
exports.collocationList = (req, res) => {
|
|
|
exports.collocationList = (req, res, next) => {
|
|
|
let params = req.query;
|
|
|
let uid = req.user.uid || 0;
|
|
|
|
...
|
...
|
@@ -126,7 +126,7 @@ exports.collocationList = (req, res) => { |
|
|
list: result,
|
|
|
isApp: req.query.appVersion || false
|
|
|
}));
|
|
|
});
|
|
|
}).catch(next);
|
|
|
};
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -135,7 +135,7 @@ exports.collocationList = (req, res) => { |
|
|
* @param {[type]} res [description]
|
|
|
* @return {[type]}
|
|
|
*/
|
|
|
exports.setFavorite = (req, res) => {
|
|
|
exports.setFavorite = (req, res, next) => {
|
|
|
let params = req.body;
|
|
|
let uid = req.user.uid || 0;
|
|
|
let isApp = req.query.appVersion || false;
|
...
|
...
|
@@ -154,7 +154,7 @@ exports.setFavorite = (req, res) => { |
|
|
}
|
|
|
}
|
|
|
res.json(result);
|
|
|
});
|
|
|
}).catch(next);
|
|
|
};
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -176,7 +176,7 @@ exports.detail = (req, res) => { |
|
|
* @param {[object]} res
|
|
|
* @return {[type]}
|
|
|
*/
|
|
|
exports.detailList = (req, res) => {
|
|
|
exports.detailList = (req, res, next) => {
|
|
|
let params = req.query;
|
|
|
|
|
|
starModel.getDetailData(params).then((result) => {
|
...
|
...
|
@@ -186,5 +186,5 @@ exports.detailList = (req, res) => { |
|
|
list: result,
|
|
|
isApp: req.query.appVersion || false
|
|
|
}));
|
|
|
});
|
|
|
}).catch(next);
|
|
|
}; |
...
|
...
|
|