Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-blk
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
1
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
yyq
9 years ago
Commit
2870d5ddd9b50dd32fc60d73fe1447895a1b729d
2 parents
898626c1
fa1010ab
Merge branch 'release/1.0' of git.yoho.cn:fe/yoho-blk into release/1.0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
14 deletions
apps/editorial/models/editorial.js
apps/editorial/views/action/detail.hbs
config/common.js
public/js/editorial/detail.page.js
public/scss/editorial/_detail.css
apps/editorial/models/editorial.js
View file @
2870d5d
...
...
@@ -246,6 +246,7 @@ const _getRelatedData = (idList) => {
const
_processContentData
=
(
list
)
=>
{
list
=
list
||
[];
list
=
camelCase
(
list
);
// console.log(list)
let
contentData
=
{
contents
:
[]
...
...
@@ -284,12 +285,12 @@ const _processContentData = (list) => {
let
idList
=
''
;
let
recoLength
=
''
;
let
related
=
{
relatedReco
:
[],
relatedGroup
:
[]
};
_
.
forEach
(
contentData
.
contents
,
function
(
value
)
{
if
(
value
.
goods
)
{
...
...
@@ -319,7 +320,6 @@ const _processContentData = (list) => {
return
_getRelatedData
(
idList
).
then
((
result
)
=>
{
if
(
related
.
relatedReco
)
{
_
.
forEach
(
related
.
relatedReco
,
function
(
data
,
key
)
{
...
...
@@ -362,11 +362,16 @@ const _processContentData = (list) => {
});
}
return
related
;
if
(
related
.
relatedReco
.
length
===
0
&&
related
.
relatedGroup
.
length
===
0
)
{
return
null
;
}
else
{
return
related
;
}
}).
then
((
result
)
=>
{
}).
then
(()
=>
{
contentData
.
contents
.
push
({
related
:
re
lated
related
:
re
sult
});
return
contentData
;
...
...
apps/editorial/views/action/detail.hbs
View file @
2870d5d
...
...
@@ -10,7 +10,7 @@
<div
class=
"article-author"
>
<div
class=
"author-avatar"
>
<a
href=
"
{{
authorUrl
}}
"
target=
"_blank"
>
<img
src
=
"
{{
avatar
}}
"
>
<img
class=
"lazy"
data-original
=
"
{{
avatar
}}
"
>
</a>
</div>
</div>
...
...
@@ -30,14 +30,14 @@
{{#
singleImage
}}
<span
class=
"article-pic"
>
{{#
data
}}
<img
src
=
"
{{
image
src
930
660
1
}}
"
>
<img
class=
"lazy"
data-original
=
"
{{
image
src
930
660
1
}}
"
>
{{/
data
}}
</span>
{{/
singleImage
}}
{{#
smallPic
}}
<span
class=
"article-pictwo"
>
{{#
data
}}
<img
src
=
"
{{
image
src
460
660
1
}}
"
>
<img
class=
"lazy"
data-original
=
"
{{
image
src
460
660
1
}}
"
>
{{/
data
}}
</span>
{{/
smallPic
}}
...
...
@@ -49,7 +49,8 @@
</div>
{{/
text
}}
{{#
related
}}
{{#
related
}}
<div
class=
"related-reco related-collo"
>
<div
class=
"article-title"
>
<div
class=
"title-line"
></div>
...
...
config/common.js
View file @
2870d5d
...
...
@@ -22,10 +22,10 @@ module.exports = {
},
cookieDomain
:
'yohoblk.com'
,
domains
:
{
singleApi
:
'http://single.yoho.cn/'
,
api
:
'http://api.yoho.yohoops.org/'
,
service
:
'http://service.yoho.yohoops.org/'
,
search
:
'http://search.yohoops.org/yohosearch/'
// singleApi: 'http://192.168.102.31:8092/brower',
api
:
'http://testapi.yoho.cn:28078/'
,
service
:
'http://testservice.yoho.cn:28077/'
,
singleApi
:
'http://192.168.102.31:8092/'
},
useOneapm
:
false
,
useCache
:
false
,
...
...
public/js/editorial/detail.page.js
View file @
2870d5d
...
...
@@ -6,6 +6,8 @@
var
$
=
require
(
'yoho-jquery'
),
dialog
=
require
(
'../plugins/dialog'
);
var
lazyLoad
=
require
(
'yoho-jquery-lazyload'
);
var
$commentArea
=
$
(
'#comment-area'
),
articleId
=
$
(
'.detail-body'
).
data
(
'id'
);
...
...
@@ -26,6 +28,8 @@ var $commentList = $commentArea.find('.comments-wrap'),
require
(
'../plugins/share'
);
require
(
'../common/header'
);
lazyLoad
(
$
(
'img'
));
// require('yoho-unslider');
$
(
'#prise-btn'
).
click
(
function
()
{
...
...
public/scss/editorial/_detail.css
View file @
2870d5d
...
...
@@ -79,7 +79,7 @@
margin
:
0
auto
;
}
.article-pic
t
{
.article-pic
{
max-width
:
930px
;
margin
:
0
auto
;
overflow
:
hidden
;
...
...
Please
register
or
login
to post a comment