Authored by ccbikai(👎🏻🍜)

原有自定义页面使用死数据

... ... @@ -16,13 +16,21 @@ let index = (req, res, next) => {
module: 'channel',
page: 'custom',
content: result,
title: req.query.title || 'Yoho!Buy 有货',
content_code: req.params.id, // 这是位置码,后边去调用资源位,渲染页面
downloadLink: 'http://union.yoho.cn/union/downapp.html?union_type=100000000000081'
title: req.query.title || 'Yoho!Buy 有货'
});
}).catch(next);
};
let zhihui = (req, res) => {
res.render('zhihui', {
module: 'channel',
page: 'custom',
title: req.query.title || 'Yoho!Buy 有货',
downloadLink: 'http://union.yoho.cn/union/downapp.html?union_type=100000000000081'
});
};
module.exports = {
index
index,
zhihui
};
... ...
... ... @@ -36,6 +36,10 @@ router.get('/brands/delBrandHistory', brandController.delBrandHistory); // 删
router.post('/channel/shopRecom', channel.shopRecom); // 店铺推荐收藏状态
router.post('/channel/userVip', channel.userVip);
// 自定义频道,市场推广-智汇
// 此页面做的早,写死发给市场,与自定义的不兼容,所以需要写死
router.get('/channel/2fb054e8315300a1ae1f80c3a4fda862.html', custom.zhihui);
// 自定义频道
router.get('/channel/:id.html', custom.index);
... ...
... ... @@ -2,73 +2,3 @@
<div class="resource-content">
{{> channel/content}}
</div>
{{!-- 临时方案
<style>
html,body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
div {
margin: 0;
padding: 0;
}
.wrapper {
position: relative;
width: 100%;
}
.container {
position: relative;
margin: 0 auto;
}
img {
width:100%;
float: left;
}
ul {
list-style: none;
overflow: hidden;
margin: 0;
padding: 0;
}
ul li {
position: relative;
width:100%;
overflow: hidden;
}
#btn_download {
position: absolute;
width: 73%;
height: 14%;
top: 75.5%;
left: 13%;
}
</style>
<div class="wrapper">
<div class="container">
<ul>
<li>
<img src="https://feature.yoho.cn/0113/images/01ff33cffc05e280bd701b90801835ad51.jpg?imageView2/2/q/75/">
<a id="btn_download" href="{{downloadLink}}" target="_blank"></a>
</li>
<li>
<img src="https://feature.yoho.cn/0113/images/015d6241108a4db156d4153a5645bd283e.jpg?imageView2/2/q/75/">
</li>
<li>
<img src="https://feature.yoho.cn/0113/images/01651b926f5f22f4b00b6809925e4388a3.jpg?imageView2/2/q/75/">
</li>
<li>
<img src="https://feature.yoho.cn/0113/images/0157ad8f797d97f10cc21bd30333c5a7c5.jpg?imageView2/2/q/75/">
</li>
</ul>
</div>
</div>
--}}
... ...
<style>
html,body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
div {
margin: 0;
padding: 0;
}
.wrapper {
position: relative;
width: 100%;
}
.container {
position: relative;
margin: 0 auto;
}
img {
width:100%;
float: left;
}
ul {
list-style: none;
overflow: hidden;
margin: 0;
padding: 0;
}
ul li {
position: relative;
width:100%;
overflow: hidden;
}
#btn_download {
position: absolute;
width: 73%;
height: 14%;
top: 75.5%;
left: 13%;
}
</style>
<div class="wrapper">
<div class="container">
<ul>
<li>
<img src="https://feature.yoho.cn/0113/images/01ff33cffc05e280bd701b90801835ad51.jpg?imageView2/2/q/75/">
<a id="btn_download" href="{{downloadLink}}" target="_blank"></a>
</li>
<li>
<img src="https://feature.yoho.cn/0113/images/015d6241108a4db156d4153a5645bd283e.jpg?imageView2/2/q/75/">
</li>
<li>
<img src="https://feature.yoho.cn/0113/images/01651b926f5f22f4b00b6809925e4388a3.jpg?imageView2/2/q/75/">
</li>
<li>
<img src="https://feature.yoho.cn/0113/images/0157ad8f797d97f10cc21bd30333c5a7c5.jpg?imageView2/2/q/75/">
</li>
</ul>
</div>
</div>
... ...