...
|
...
|
@@ -9,12 +9,13 @@ const crypto = global.yoho.crypto; |
|
|
const shopIndex = (req, res) => {
|
|
|
let isApp = req.query.app_version || req.query.appVersion || false;
|
|
|
let uid = req.user.uid || req.query.uid;
|
|
|
let contentCode = req.query.content_code || 'ec9eb72eae121fcd6c1b7d1de75caff1';
|
|
|
let parameter = {};
|
|
|
|
|
|
if (!isApp) {
|
|
|
parameter = {
|
|
|
pageHeader: headerModel.setNav({
|
|
|
navTitle: '店铺收藏'
|
|
|
navTitle: req.query.title || '店铺收藏'
|
|
|
})
|
|
|
};
|
|
|
} else {
|
...
|
...
|
@@ -32,12 +33,12 @@ const shopIndex = (req, res) => { |
|
|
}
|
|
|
}
|
|
|
|
|
|
shopModel.banner().then((result) => {
|
|
|
shopModel.banner(contentCode).then((result) => {
|
|
|
res.render('shop-collect/index', Object.assign({
|
|
|
module: 'activity',
|
|
|
page: 'shop-collect',
|
|
|
wechatShare: true,
|
|
|
title: '店铺收藏',
|
|
|
title: req.query.title || '店铺收藏',
|
|
|
width750: true,
|
|
|
shopCollect: {
|
|
|
bannerTop: result
|
...
|
...
|
@@ -47,8 +48,9 @@ const shopIndex = (req, res) => { |
|
|
};
|
|
|
|
|
|
const shopNav = (req, res, next) => {
|
|
|
let channelId = req.query.channel_id;
|
|
|
|
|
|
shopModel.shopNav().then((result) => {
|
|
|
shopModel.shopNav(channelId).then((result) => {
|
|
|
res.json(result);
|
|
|
}).catch(next);
|
|
|
};
|
...
|
...
|
@@ -57,8 +59,9 @@ const shopNav = (req, res, next) => { |
|
|
const shopList = (req, res, next) => {
|
|
|
let uid = _.trim(crypto.decrypt('', req.query.uid)) || req.user.uid;
|
|
|
let tabName = req.query.tabName;
|
|
|
let channelId = req.query.channel_id;
|
|
|
|
|
|
shopModel.shopList(uid, tabName).then((result) => {
|
|
|
shopModel.shopList(uid, tabName, channelId).then((result) => {
|
|
|
res.json(result);
|
|
|
}).catch(next);
|
|
|
};
|
...
|
...
|
|