...
|
...
|
@@ -47,12 +47,25 @@ exports.index = (req, res, next) => { |
|
|
* 潮流优选首页-资源位
|
|
|
*/
|
|
|
exports.resourcesTemplate = (req, res, next) => {
|
|
|
let code = req.query.code || '';
|
|
|
let isApp = req.query.app_version || req.query.appVersion || false;
|
|
|
let uid = '';
|
|
|
let param = {};
|
|
|
|
|
|
plusstarModel.getResources({
|
|
|
content_code: code
|
|
|
}, {
|
|
|
if (req.yoho.isApp) {
|
|
|
uid = req.query.uid;
|
|
|
} else {
|
|
|
uid = req.user.uid;
|
|
|
}
|
|
|
|
|
|
if (uid) {
|
|
|
param.uid = uid;
|
|
|
}
|
|
|
|
|
|
param.content_code = req.query.code || '';
|
|
|
param.yh_channel = req.query.yh_channel || 1;
|
|
|
|
|
|
|
|
|
plusstarModel.getResourcesData(param, {
|
|
|
isApp: isApp
|
|
|
}).then(result => {
|
|
|
res.render('plusstar/resources-template', {
|
...
|
...
|
|