Authored by 王水玲

Merge branch 'feature/protocol' into 'release/6.8.4'

隐私政策添加下载按钮



See merge request !415
... ... @@ -66,6 +66,15 @@ exports.detail = (req, res, next) => {
req.ctx(helpModel).detailData(params).then(result => {
let newData = result.newData;
let headerData = result.headerData;
let protocolUrl = '';
if (+req.query.id === 254) {
protocolUrl = 'https://cdn.yoho.cn/yohobuy/pdf/YOHO!BUY有货用户服务协议2.pdf';
}
if (+req.query.id === 256) {
protocolUrl = 'https://cdn.yoho.cn/yohobuy/pdf/YOHO!BUY有货隐私条款.pdf';
}
if (result.newData.data.menuData.length === 0) {
return next();
... ... @@ -80,7 +89,7 @@ exports.detail = (req, res, next) => {
res.render('detail', Object.assign({
module: 'help',
page: 'help',
isProtocol: +req.query.contId === 197,
protocolUrl: protocolUrl,
content: Object.assign({
isHelp: true,
pathNav: nav,
... ...
... ... @@ -10,7 +10,9 @@
<div class="help-cont">
{{#cont}}
<h2 class="nav-title">{{caption}} {{#if @root.isProtocol}}<a class="download-protocol" href="https://cdn.yoho.cn/yohobuy/pdf/YOHO!BUY有货用户服务协议2.pdf">下载</a>{{/if}}</h2>
<h2 class="nav-title">
{{caption}} {{#if @root.protocolUrl}}<a class="download-protocol" href="{{@root.protocolUrl}}">下载</a>{{/if}}
</h2>
<div class="cont">{{{content}}}</div>
{{/cont}}
</div>
... ...