Authored by whb

fixed bug

... ... @@ -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']));
... ...
... ... @@ -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']))
{
... ...
... ... @@ -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 缓存操作对象
... ...
... ... @@ -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>
... ...