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
whb
10 years ago
Commit
973b80dcb57717fe4fce7bff84308d3507f15b76
1 parent
63628fc9
fixed bug
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
8 deletions
website/controller/News.class.php
website/controller/Show.class.php
website/lib/utils/cache/Data.class.php
website/view/script/news/detailmobile.php
website/controller/News.class.php
View file @
973b80d
...
...
@@ -10,7 +10,8 @@ class Controller_News extends Controller_Abstract
$requestTag
=
trim
(
$this
->
_request
->
tag
);
//标签
$limit
=
40
;
$tag
=
$requestTag
;
if
(
$this
->
_platform
==
'android'
||
$this
->
_platform
==
'iphone'
)
$exceptTags
=
array
(
'手机视频'
);
/*if($this->_platform == 'android' || $this->_platform == 'iphone')
{
$exceptTags = array('视频');
if($requestTag == '视频')
...
...
@@ -21,7 +22,7 @@ class Controller_News extends Controller_Abstract
else
{
$exceptTags = array('手机视频');
}
}
*/
$total
=
Facade_News
::
getTotal
(
$tag
,
$exceptTags
);
$page
=
new
Lib_Helper_Pagination
(
$total
,
$limit
);
if
(
$tag
)
...
...
@@ -67,7 +68,8 @@ class Controller_News extends Controller_Abstract
public
function
indexMobileAction
()
{
$requestTag
=
$tag
=
trim
(
$this
->
_request
->
tag
);
//标签
$exceptTags
=
array
(
'视频'
);
// $exceptTags = array('视频');
$exceptTags
=
array
(
'手机视频'
);
$limit
=
8
;
$total
=
Facade_News
::
getTotal
(
$tag
,
$exceptTags
);
$page
=
new
Lib_Helper_Pagination
(
$total
,
$limit
);
...
...
@@ -89,7 +91,7 @@ class Controller_News extends Controller_Abstract
$tags
[
$tagKey
]
=
$temp
[
$tagKey
];
}
}
$tags
[
'视频'
]
=
$temp
[
'手机视频'
];
//
$tags['视频'] = $temp['手机视频'];
$this
->
_view
[
'tags'
]
=
$tags
;
foreach
(
$this
->
_view
[
'tags'
]
as
$val
)
{
...
...
@@ -202,7 +204,8 @@ EOT;
}
if
(
$this
->
_platform
==
'android'
||
$this
->
_platform
==
'iphone'
)
{
$exceptTags
=
array
(
'视频'
);
//$exceptTags = array('视频');
$exceptTags
=
array
(
'手机视频'
);
$temp
=
Facade_News
::
getSameNewsById
(
$id
,
$exceptTags
);
$temp2
=
Facade_News
::
getLatestNews
(
array
(),
0
,
5
,
$exceptTags
);
unset
(
$temp2
[
$id
]);
...
...
@@ -211,6 +214,7 @@ EOT;
$news
=
array
(
$temp
[
'id'
]
=>
$temp
);
}
$news
=
array_slice
(
array_filter
(
$news
+
$temp2
),
0
,
3
);
$this
->
_view
[
'wechat'
]
=
array
();
//Lib_Wechat_JSSDK::getSignPackage();
}
$info
[
'title'
]
=
strip_tags
(
$info
[
'title'
]);
$info
[
'pics'
]
=
array_filter
(
explode
(
'|'
,
$info
[
'pics'
]));
...
...
website/controller/Show.class.php
View file @
973b80d
...
...
@@ -72,7 +72,7 @@ class Controller_Show extends Controller_Abstract
'offset'
=>
$offset
,
'limit'
=>
$limit
,
);
$data
=
Util_Curl
::
get
(
'http://
www.yohoshow.com
/api/yohood/topic?'
.
http_build_query
(
$params
));
$data
=
Util_Curl
::
get
(
'http://
show.test.yoho.cn
/api/yohood/topic?'
.
http_build_query
(
$params
));
$data
=
json_decode
(
$data
,
true
);
if
(
!
empty
(
$data
[
'data'
]))
{
...
...
website/lib/utils/cache/Data.class.php
View file @
973b80d
...
...
@@ -11,7 +11,7 @@ class Lib_Utils_Cache_Data
{
private
static
$_key
=
'yh_cache_data_'
;
private
static
$_cache
=
null
;
private
static
$_options
=
array
(
'domain'
=>
'
wwww
'
,
'class'
=>
'text'
);
private
static
$_options
=
array
(
'domain'
=>
'
yoho
'
,
'class'
=>
'text'
);
/**
* @return object 缓存操作对象
...
...
website/view/script/news/detailmobile.php
View file @
973b80d
...
...
@@ -70,7 +70,7 @@
<div
id=
"share"
class=
"share"
cover-url=
"
<?php
$thumb
=
empty
(
$this
->
view
->
info
[
'client_thumb'
])
?
$this
->
view
->
info
[
'thumb'
]
:
$this
->
view
->
info
[
'client_thumb'
];
echo
Lib_Images
::
getImageUrl
(
$thumb
,
'source'
,
'fragmentimg'
);
?>
"
data-link=
"
<?php
echo
SITE_MAIN
.
'/news/detail/id/'
.
$this
->
view
->
info
[
'id'
];
?>
"
>
data-link=
"
<?php
echo
SITE_MAIN
.
'/news/detail/id/'
.
$this
->
view
->
info
[
'id'
];
?>
"
wechatAppId=
""
wechatTimestamp=
""
wechatNonceStr=
""
wechatSignature=
""
>
<ul
class=
"clearfix"
>
<li
class=
"yohoo-share-button-sina"
><a
href=
"javascript:;"
></a></li>
<li
class=
"yohoo-share-button-qq"
><a
href=
"javascript:;"
></a></li>
...
...
Please
register
or
login
to post a comment