Authored by 王水玲

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

隐私政策添加下载按钮



See merge request !415
@@ -66,6 +66,15 @@ exports.detail = (req, res, next) => { @@ -66,6 +66,15 @@ exports.detail = (req, res, next) => {
66 req.ctx(helpModel).detailData(params).then(result => { 66 req.ctx(helpModel).detailData(params).then(result => {
67 let newData = result.newData; 67 let newData = result.newData;
68 let headerData = result.headerData; 68 let headerData = result.headerData;
  69 + let protocolUrl = '';
  70 +
  71 + if (+req.query.id === 254) {
  72 + protocolUrl = 'https://cdn.yoho.cn/yohobuy/pdf/YOHO!BUY有货用户服务协议2.pdf';
  73 + }
  74 +
  75 + if (+req.query.id === 256) {
  76 + protocolUrl = 'https://cdn.yoho.cn/yohobuy/pdf/YOHO!BUY有货隐私条款.pdf';
  77 + }
69 78
70 if (result.newData.data.menuData.length === 0) { 79 if (result.newData.data.menuData.length === 0) {
71 return next(); 80 return next();
@@ -80,7 +89,7 @@ exports.detail = (req, res, next) => { @@ -80,7 +89,7 @@ exports.detail = (req, res, next) => {
80 res.render('detail', Object.assign({ 89 res.render('detail', Object.assign({
81 module: 'help', 90 module: 'help',
82 page: 'help', 91 page: 'help',
83 - isProtocol: +req.query.contId === 197, 92 + protocolUrl: protocolUrl,
84 content: Object.assign({ 93 content: Object.assign({
85 isHelp: true, 94 isHelp: true,
86 pathNav: nav, 95 pathNav: nav,
@@ -10,7 +10,9 @@ @@ -10,7 +10,9 @@
10 10
11 <div class="help-cont"> 11 <div class="help-cont">
12 {{#cont}} 12 {{#cont}}
13 - <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> 13 + <h2 class="nav-title">
  14 + {{caption}} {{#if @root.protocolUrl}}<a class="download-protocol" href="{{@root.protocolUrl}}">下载</a>{{/if}}
  15 + </h2>
14 <div class="cont">{{{content}}}</div> 16 <div class="cont">{{{content}}}</div>
15 {{/cont}} 17 {{/cont}}
16 </div> 18 </div>