Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOOD
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
tmq
9 years ago
Commit
8e6dc38b98a38403bd5bc77f1bb47812d07f6b9c
1 parent
b84104f7
添加最新资讯
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
res/js/yohood.js
website/controller/News.class.php
website/view/script/news/detail.php
res/js/yohood.js
View file @
8e6dc38
...
...
@@ -661,15 +661,15 @@ define('yohood', function(require, exports) {
hotVideo
+=
template
(
tools
.
limitWords
(
v
.
title
,
52
),
common
.
getImages
(
v
.
thumb
,
'0230x0230'
,
'blogimg'
,
'1'
),
'/news/detail/id/'
+
v
.
id
,
2
,
isTitleStyle
,
v
.
title
,
''
);
});
//最新视频
$
.
each
(
data
.
data
.
lastVideo
,
function
(
i
,
v
)
{
//最新资讯
$
.
each
(
data
.
data
.
lastNews
,
function
(
i
,
v
)
{
isTitleStyle
=
(
v
.
main_title_type
==
1
)
?
1
:
0
;
last
Video
+=
template
(
tools
.
limitWords
(
v
.
title
,
52
),
common
.
getImages
(
v
.
thumb
,
'0230x0230'
,
'blogimg'
,
'1'
),
last
News
+=
template
(
tools
.
limitWords
(
v
.
title
,
52
),
common
.
getImages
(
v
.
thumb
,
'0230x0230'
,
'blogimg'
,
'1'
),
'/news/detail/id/'
+
v
.
id
,
2
,
isTitleStyle
,
v
.
title
,
''
);
});
$
(
".post-list"
).
html
(
recom
);
$
(
".side-related-list"
).
eq
(
0
).
html
(
hotVideo
);
$
(
".side-related-list"
).
eq
(
1
).
html
(
last
Video
);
$
(
".side-related-list"
).
eq
(
1
).
html
(
last
News
);
if
(
$
(
'.detail-body'
).
outerHeight
()
>
$
(
'.detail-side'
).
outerHeight
()
&&
navigator
.
userAgent
.
indexOf
(
'iPad'
)
===
-
1
)
{
//右侧相关文章定位
...
...
website/controller/News.class.php
View file @
8e6dc38
...
...
@@ -238,7 +238,7 @@ EOT;
public
function
getdetailnewsAction
()
{
$id
=
intval
(
$this
->
_request
->
id
);
$list
=
array
(
'recom'
=>
array
(),
'hotVideo'
=>
array
(),
'last
Video
'
=>
array
());
$list
=
array
(
'recom'
=>
array
(),
'hotVideo'
=>
array
(),
'last
News
'
=>
array
());
$tag
=
'视频'
;
$exceptTags
=
array
(
'手机视频'
);
$recom
=
array
();
...
...
@@ -251,10 +251,10 @@ EOT;
}
$recom
=
array_slice
(
array_filter
(
$recom
+
$temp2
),
0
,
3
);
$hotVideo
=
array_values
(
Facade_News
::
getListByDateHits
(
$tag
,
0
,
5
,
$exceptTags
));
$last
Video
=
array_values
(
Facade_News
::
getLatestNews
(
$tag
,
0
,
5
,
$exceptTags
));
$last
News
=
array_values
(
Facade_News
::
getLatestNews
(
''
,
0
,
5
,
$exceptTags
));
$list
[
'recom'
]
=
$recom
;
$list
[
'hotVideo'
]
=
$hotVideo
;
$list
[
'lastVideo'
]
=
$last
Video
;
$list
[
'lastVideo'
]
=
$last
News
;
foreach
(
$list
as
$key
=>
$listnews
)
{
if
(
!
empty
(
$listnews
))
...
...
website/view/script/news/detail.php
View file @
8e6dc38
...
...
@@ -138,7 +138,7 @@
<div
class=
"side-related-post"
>
<div
class=
"side-related-tab clearfix"
>
<a
class=
"current"
href=
"javascript:;"
>
最热视频
</a>
<a
href=
"javascript:;"
>
最新
宣传片
</a>
<a
href=
"javascript:;"
>
最新
资讯
</a>
</div>
<div
class=
"side-related-wrap"
>
<div
class=
"side-related-list main-layout current"
>
...
...
Please
register
or
login
to post a comment