Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
王水玲
6 years ago
Commit
c22fa74c8227370bc391601e0cfa9f609d0efd0a
1 parent
0b8bd822
协议修改链接
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
apps/help/controllers/help.js
apps/help/views/partial/help-detail.hbs
apps/help/controllers/help.js
View file @
c22fa74
...
...
@@ -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
,
...
...
apps/help/views/partial/help-detail.hbs
View file @
c22fa74
...
...
@@ -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>
...
...
Please
register
or
login
to post a comment