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
王水玲
8 years ago
Commit
12ce7d34387a58b924e9c441917485eca6857e7b
1 parent
5aeb3fea
帮助中心修改
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
27 deletions
apps/help/controllers/help.js
apps/help/models/help.js
apps/help/views/partial/common-problem.hbs
public/scss/help/_detail.css
public/scss/help/_help.css
public/scss/help/_index.css
apps/help/controllers/help.js
View file @
12ce7d3
...
...
@@ -12,6 +12,10 @@ const index = (req, res, next) => {
let
channel
=
req
.
query
.
channel
?
req
.
query
.
channel
:
'boys'
;
helpModel
.
helpData
(
channel
).
then
(
result
=>
{
if
(
result
.
content
.
menuData
.
length
===
0
)
{
return
next
();
}
res
.
render
(
'help'
,
Object
.
assign
({
module
:
'help'
,
page
:
'help-index'
,
...
...
@@ -59,6 +63,10 @@ const detail = (req, res, next) => {
let
newData
=
result
.
newData
;
let
headerData
=
result
.
headerData
;
if
(
result
.
newData
.
data
.
menuData
.
length
===
0
)
{
return
next
();
}
if
(
!
(
typeof
(
newData
.
nav
)
===
'undefined'
))
{
nav
=
nav
.
concat
(
newData
.
nav
);
}
...
...
apps/help/models/help.js
View file @
12ce7d3
...
...
@@ -221,7 +221,7 @@ const _processSearch = (list, params) => {
const
_processDetailData
=
(
result
,
params
)
=>
{
let
menuData
=
[];
let
contData
=
false
;
let
data
=
result
[
2
].
data
||
{}
;
let
data
=
_
.
get
(
result
,
'[2].data'
,
{})
;
let
nav
=
[];
// 常见问题
...
...
@@ -237,7 +237,7 @@ const _processDetailData = (result, params) => {
id
:
1
,
commonProblem
:
true
,
faqs
:
data
.
faqs
,
allQa
:
result
[
3
].
data
allQa
:
_
.
get
(
result
,
'[3].data'
,
[])
};
}
}
...
...
@@ -289,14 +289,14 @@ const helpData = (channel) => {
helpApi
.
getSelfService
()
]).
then
(
result
=>
{
return
{
headerData
:
result
[
0
]
,
headerData
:
_
.
get
(
result
,
'[0]'
,
{})
,
content
:
_
.
assign
({
hotSearch
:
_
.
slice
(
result
[
1
].
data
,
0
,
5
),
hotSearch
:
_
.
slice
(
_
.
get
(
result
,
'[1].data'
,
[])
,
0
,
5
),
selfService
:
{
categoryName
:
'自助服务'
,
list
:
result
[
3
].
data
list
:
_
.
get
(
result
,
'[3].data'
,
[])
}
},
_processHomeCategoryFaq
(
result
[
2
].
data
))
},
_processHomeCategoryFaq
(
_
.
get
(
result
,
'[2].data'
,
{})
))
};
});
};
...
...
@@ -316,9 +316,9 @@ const detailData = (params) => {
return
Promise
.
all
(
promiseData
).
then
(
result
=>
{
let
newData
=
_processDetailData
(
result
,
params
);
_
.
set
(
newData
,
'data.hotSearch'
,
_
.
slice
(
_
.
get
(
result
,
'[1].data'
,
{}
),
0
,
5
));
_
.
set
(
newData
,
'data.hotSearch'
,
_
.
slice
(
_
.
get
(
result
,
'[1].data'
,
[]
),
0
,
5
));
return
{
headerData
:
result
[
0
]
,
headerData
:
_
.
get
(
result
,
'[0]'
,
{})
,
newData
:
newData
};
});
...
...
@@ -336,11 +336,7 @@ const searchData = (params) => {
// 在线客服
const
onlineService
=
()
=>
{
return
helpApi
.
onlineService
().
then
(
result
=>
{
if
(
result
.
code
===
200
)
{
return
result
.
data
.
url
;
}
else
{
return
''
;
}
return
_
.
get
(
result
,
'data.url'
,
''
);
});
};
...
...
apps/help/views/partial/common-problem.hbs
View file @
12ce7d3
...
...
@@ -10,7 +10,7 @@
{{#
allQa
}}
<li
class=
"problem-li"
>
<p
class=
"title"
>
{{
caption
}}
</p>
<
p
class=
"cont"
>
{{{
content
}}}
</p
>
<
div
class=
"cont"
>
{{{
content
}}}
</div
>
</li>
{{/
allQa
}}
</ul>
...
...
public/scss/help/_detail.css
View file @
12ce7d3
...
...
@@ -73,6 +73,8 @@
.cont
{
color
:
#989898
;
margin-top
:
15px
;
font-size
:
14px
;
line-height
:
20px
;
}
.show-all
{
...
...
public/scss/help/_help.css
View file @
12ce7d3
...
...
@@ -18,12 +18,11 @@
}
.iconfont
{
font-size
:
1
8
px
;
font-size
:
1
6
px
;
color
:
#3a3a3a
;
padding
:
0
5px
;
cursor
:
pointer
;
position
:
relative
;
top
:
3
px
;
top
:
2
px
;
}
}
...
...
@@ -71,7 +70,7 @@
}
.notice
{
margin
-top
:
5px
;
margin
:
3px
0
5px
;
height
:
30px
;
overflow
:
hidden
;
...
...
public/scss/help/_index.css
View file @
12ce7d3
...
...
@@ -130,7 +130,7 @@
width
:
610px
;
height
:
350px
;
background-color
:
#000
;
opacity
:
0.
5
;
opacity
:
0.
4
;
position
:
absolute
;
}
...
...
@@ -147,18 +147,18 @@
height
:
220px
;
margin
:
60px
auto
;
overflow
:
auto
;
width
:
5
30
px
;
width
:
5
58
px
;
}
.a-area
,
.q-area
{
width
:
46
5
px
;
width
:
46
0
px
;
position
:
relative
;
font-size
:
14px
;
color
:
#
1b1b1b
;
color
:
#
444
;
min-height
:
20px
;
margin-top
:
15px
;
padding-left
:
3
6px
;
padding-left
:
6
6px
;
&:before
{
content
:
""
;
...
...
@@ -166,12 +166,19 @@
height
:
18px
;
display
:
block
;
position
:
absolute
;
left
:
5px
;
left
:
26px
;
top
:
3px
;
}
}
.a-area
{
margin-top
:
10px
;
font-size
:
18px
;
color
:
#000
;
}
.q-area
{
line-height
:
24px
;
}
.a-area
:before
{
...
...
@@ -184,10 +191,10 @@
.iconfont
{
position
:
absolute
;
right
:
20px
;
top
:
20px
;
right
:
35px
;
top
:
25px
;
cursor
:
pointer
;
font-size
:
26
px
;
font-size
:
30
px
;
z-index
:
4
;
}
}
...
...
Please
register
or
login
to post a comment