Authored by tmq

yohood页面修改

... ... @@ -666,7 +666,7 @@ define('yohood', function(require, exports) {
$.each(data.data.lastNews, function(i, v) {
isTitleStyle = (v.main_title_type == 1) ? 1 : 0;
lastNews += template(tools.limitWords(v.title, 52), common.getImages(v.thumb, '0230x0230', 'blogimg', '1'),
'/news/detail/id/' + v.id, 2, isTitleStyle, v.title, '');
'/news/detail/id/' + v.id, isVideo, isTitleStyle, v.title, '');
});
$(".post-list").html(recom);
$(".side-related-list").eq(0).html(hotVideo);
... ...
... ... @@ -7,7 +7,7 @@ class Controller_Brand extends Controller_Abstract
public function indexAction()
{
$banners = Facade_Index::getIndex(3);
$banners = Facade_Index::getIndex(1);
$this->_view['banners'] = $banners;
$this->_view['brandTotal'] = Facade_Brand::getBrandTotal(1);
}
... ...
... ... @@ -149,11 +149,10 @@
</ul>
</div>
</div>
<div class="bd clearfix">
<div class="wrapper">
<div class="bd">
<?php $this->_block('main');
$this->_endblock();?>
</div>
</div>
<div class="return-top" style="display:none;">
<a href="javascript:void(0);" id="toTop" class="ifont" style="display: inline;">
... ...
... ... @@ -38,7 +38,7 @@
</ul>
</div>
<?php else: //不存在,显示coming soon?>
<img src="<?php echo SITE_RES.'/images/yohood/comingsoon.jpg';?>" style="width:100%;"/>
<img src="<?php echo SITE_RES.'/images/yohood/comingsoon.jpg';?>" style="width:100%;"/>
<?php endif;?>
</div>
<div id="brand_detail">
... ... @@ -51,5 +51,8 @@
seajs.use('yohood',function(yohood){
yohood.brand();
})
seajs.use('yohood',function(yohood){
yohood.index();
})
</script>
<?php $this->_endblock();?>
... ...
... ... @@ -37,4 +37,21 @@
<p>Email:haizheng.zhao@yoho.cn</p>
</div>
</div>
<!-- 公众号信息 start -->
<div class="info-list public-number-info">
<h1 class="info-title public-number-title">在这可以找到我们</h1>
<div class="info-section public-number-section">
<h2>新浪微博</h2>
<p>@YOHO有货</p>
</div>
<div class="info-section public-number-section">
<h2>微信公众平台</h2>
<p>"yohobuy4008899646"</p>
</div>
<div class="info-section public-number-section">
<h2>或者扫描下面的二维码</h2>
<img src="http://cmsimg01.qiniudn.com/contentimg/2015/05/04/10/014aba20f78c3417e86b1b83b894a13f53.jpg" src="http://cmsimg01.qiniudn.com/contentimg/2015/05/04/10/014aba20f78c3417e86b1b83b894a13f53.jpg" alt="微信公众号二维码">
</div>
</div>
<!-- 公众号信息 end -->
<?php $this->_endblock();?>
\ No newline at end of file
... ...
<?php $this->_extends('layout/default_layout');?>
<?php $this->_block('main');?>
<div class="slide-main">
<div class="slide-box">
<div class="slide-main clearfix">
<div class="slide-box-warp">
<div class="slide-box">
<div class="slide-wrap clearfix">
<?php foreach($this->view->banners as $banner):?>
<div class="box">
... ... @@ -11,6 +12,7 @@
</div>
<?php endforeach;?>
</div>
</div>
</div>
<div class="slide-navigator">
<div class="dib clearfix">
... ... @@ -31,27 +33,29 @@
</div>
<div id="pageContent" style="text-align: center;" class="pagination">
<?php $this->_component('Common_Pagination',array(
'pagination' => $this->view->pagination,'next_label' => '>>','prev_label' => '<<','current_class' => 'current',
'pagination' => $this->view->pagination,'next_label' => 'NEXT>>','prev_label' => '<<','current_class' => 'current',
'page_class'=>'pagination-inner', 'id'=>'img_page'
));?>
</div>
</div>
</div>
<?php if(count($this->view->partnerList)):?>
<div class="cooperation clearfix">
<div class="cooperation-slide-box">
<div class="slide-wrap clearfix">
<?php
<!-- 合作商等信息滑动条 start -->
<div class="cooperation clearfix">
<div class="cooperation-slide-warp">
<div class="cooperation-slide-box">
<div class="slide-wrap clearfix">
<?php
$partnerGroups = array();
foreach($this->view->partnerList as $partner)
{
foreach($this->view->partnerTypes as $key => $type)
{
if($partner['type'] == $key)
{
$partnerGroups[$type][] = $partner;
}
}
foreach($this->view->partnerTypes as $key => $type)
{
if($partner['type'] == $key)
{
$partnerGroups[$type][] = $partner;
}
}
}
$groupNum = 0;
$groupLen = 0;
... ... @@ -62,85 +66,87 @@
foreach ($group as $key => $partner)
{
$pic = Lib_Images::getImageUrl($partner['pic'], 'source','fragmentimg');
$html.= <<<EOL
$html.= <<<EOL
<li>
<a href="{$partner['url']}" title="{$partner['name']}" target="_blank">
<img src="{$pic}" alt="" style="width:70px;"/>
</a>
</li>
EOL;
$groupLen ++;
if($groupLen>= 6)
{
$templates[] ='<div class="{class}"><h2>'.$type.'</h2><ul class="clearfix">'.$html.'</ul></div>';
$html = '';
$groupLen = 0;
$groupNum = 0;
}
}
if(!empty($html))
{
$templates[] ='<div class="{class}"><h2>'.$type.'</h2><ul class="clearfix">'.$html.'</ul></div>';
$html = '';
}
$groupNum ++;
if($groupNum == 2 && !empty($html))
{
$templates[] ='<div class="{class}"><h2>'.$type.'</h2><ul class="clearfix">'.$html.'</ul></div>';
$html = '';
$groupNum = 0;
$groupLen = 0;
}
}
$pos = 0;
foreach($templates as $temp)
{
if($pos % 2 == 0)
{
$temp = str_replace('{class}','partner', $temp);
}
else
{
$temp = str_replace('{class}','media', $temp);
}
preg_match_all("/<li>/i", $temp, $liLen, PREG_SET_ORDER);
if(count($liLen) >= 6)
{
$temp = preg_replace('@<div class="(\w+)">(.+)<\/div>@isU', "\\2", $temp);
$template .='<div class="box clearfix">'.$temp.'</div>';
$pos = -1;
$groupLen ++;
if($groupLen>= 6)
{
$templates[] ='<div class="{class}"><h2>'.$type.'</h2><ul class="clearfix">'.$html.'</ul></div>';
$html = '';
$groupLen = 0;
$groupNum = 0;
}
}
if(!empty($html))
{
$templates[] ='<div class="{class}"><h2>'.$type.'</h2><ul class="clearfix">'.$html.'</ul></div>';
$html = '';
}
$groupNum ++;
if($groupNum == 2 && !empty($html))
{
$templates[] ='<div class="{class}"><h2>'.$type.'</h2><ul class="clearfix">'.$html.'</ul></div>';
$html = '';
$groupNum = 0;
$groupLen = 0;
}
}
else
$pos = 0;
foreach($templates as $temp)
{
if($pos % 2 == 0)
{
$template .='<div class="box clearfix">';
$temp = str_replace('{class}','partner', $temp);
}
else
{
$temp = str_replace('{class}','media', $temp);
}
preg_match_all("/<li>/i", $temp, $liLen, PREG_SET_ORDER);
if(count($liLen) >= 6)
{
$temp = preg_replace('@<div class="(\w+)">(.+)<\/div>@isU', "\\2", $temp);
$template .='<div class="box clearfix">'.$temp.'</div>';
$pos = -1;
}
$template .= $temp;
if(($pos+1) % 2 == 0)
else
{
$template .='</div>';
if($pos % 2 == 0)
{
$template .='<div class="box clearfix">';
}
$template .= $temp;
if(($pos+1) % 2 == 0)
{
$template .='</div>';
}
}
$pos++;
}
$pos++;
}
if($pos % 2 == 1)
{
$template .='</div>';
}
echo $template;
?>
</div>
</div>
<div class="cooperation-slide-control">
<a class="cooperation-slide-prev iconfont" href="javascript:void(0);">&#xe600;</a>
<a class="cooperation-slide-next iconfont" href="javascript:void(0);">&#xe602;</a>
</div>
</div>
<?php endif;?>
if($pos % 2 == 1)
{
$template .='</div>';
}
echo $template;
?>
</div>
</div>
<div class="cooperation-slide-control">
<a class="cooperation-slide-prev iconfont" href="javascript:void(0);">&#xe600;</a>
<a class="cooperation-slide-next iconfont" href="javascript:void(0);">&#xe602;</a>
</div>
</div>
</div>
<?php endif;?>
<!-- 合作商等信息滑动条 end -->
<div id="right_banner" style="display:none;" num="<?php echo count($this->view->rightBanners);?>">
<div class="fluid-item layout-item tiled">
<div class="right-banner fluid-item layout-item tiled">
<?php
$banners = $this->view->rightBanners;
$temp = array();
... ... @@ -163,7 +169,7 @@ EOL;
}
$width = 308;
?>
<div class="image-box" style="padding-bottom: 30px;">
<div class="image-box" style="padding-bottom: 39px;">
<a href="<?php echo $banner['url']?>" target="_blank" style="<?php echo sprintf("height:%spx;width:%spx;overflow:hidden;", $height, $width);?>">
<img disopen="1" src="<?php echo Lib_Images::getImageUrl($banner['res'], 'source','fragmentimg');?>" style="<?php echo sprintf("height:%spx;width:%spx;", $height, $width);?>"/>
</a>
... ...
... ... @@ -5,7 +5,7 @@
<h2><?php echo $this->view->info['title']?></h2>
<!-- <h3>潮流嘉年华</h3> -->
<div class="item-info">
<a class="fluid-tag item-tag brand-info" href="javascript:;">品牌资讯</a>
<a class="fluid-tag item-tag brand-info" href="/news/index/tag/<?php echo $this->view->info['tag']?>"><?php echo $this->view->info['tag']?></a>
<span class="item-time"><?php echo date('Y.m.d', $this->view->info['create_time']);?></span>
</div>
</div>
... ...
... ... @@ -12,32 +12,32 @@ else
{
$thumb = SITE_IMG.'/pic01.png';
}
if($thumb_size['height']!=0 && $thumb_size['width']!=0) {
$height = ceil($thumb_size['height'] * (308 / $thumb_size['width']));
}
// if($thumb_size['height']!=0 && $thumb_size['width']!=0) {
// $height = ceil($thumb_size['height'] * (308 / $thumb_size['width']));
// }
$height=193;
$width = 308;
?>
<div class="<?php !isset($video) ?'fluid-item':'';?>layout-item tiled">
<div class="fluid-item layout-item tiled">
<div class="image-box">
<a href="<?php echo url('news/detail' ,array('id' => $news['id']))?>" target="_blank" title="<?php echo Lib_Utils_StringHelper::stripTags($news['title']);?>"
<?php echo $video !=1 ? sprintf("style=\"height:%spx;width:%spx;overflow: hidden;\"", $height, $width):''; ?>>
<img src="<?php echo $thumb;?>" alt="" <?php echo $video !=1 ? sprintf("style=\"height:%spx;width:%spx;\"", $height, $width):''; ?>>
<?php if(trim($news['tag']) == '视频'):?>
<i class="play-icon"></i>
<?php endif;?>
<img src="<?php echo $thumb;?>" alt="" <?php echo $video !=1 ? sprintf("style=\"height:%spx;width:%spx;overflow: hidden;\"", $height, $width):''; ?>>
</a>
<a class="item-tag" href="<?php echo url('news/index',array('tag' => $news['tag']))?>"><?php echo $news['tag'];?></a>
</div>
<div class="item-info">
<a class="fluid-tag item-tag brand-info" href="/news/index/tag/<?php echo $news['tag']?>"><?php echo $news['tag']?></a>
<span class="item-time"><?php echo date('Y.m.d', $news['create_time']);?></span>
</div>
<div class="content">
<h2 <?php echo $news['main_title_type'] == 1 ? 'class="volupia"':'';?>>
<h2 <?php echo $news['main_title_type'] == 1 ? 'class="volupia"':'';?> style="white-space:nowrap;text-overflow:ellipsis;overflow: hidden;">
<a href="<?php echo url('news/detail' ,array('id' => $news['id']))?>" target="_blank">
<?php
<?php
echo $video ? Lib_Utils_StringHelper::substr_full_en($news['title'], 88) : $news['title'];
?>
?>
</a>
</h2>
<p class="text-content"><a href="<?php echo url('news/detail' ,array('id' => $news['id']))?>" target="_blank"><?php echo $description;?></a></p>
<p class="time"><?php echo date('Y.m.d', $news['create_time']);?></p>
</div>
</div>
<?php endforeach;?>
... ...