Authored by whb

去掉推荐

... ... @@ -31,30 +31,6 @@ class Controller_Brand extends Controller_Abstract
$this->_view['info'] = $info;
$this->_view['news'] = $news;
}
/**
* 处理新闻
*/
private function procNews($list, $num1 = 90, $num2 = 100)
{
foreach ($list as $k => $v)
{
if ($v['thumb'])
{
$thumb = Lib_Images::getImageUrl($v['thumb'], 'source','fragmentimg');
}else
{
$thumb = SITE_IMG.'/pic01.png';
}
$list[$k]['thumb'] = $thumb ;
$list[$k]['desc'] = Util_StringHelper::substr_cn( $this->stripTags($v['content']), $num1);
$list[$k]['desc']=str_replace(array("\r\n", "\n", "\r"), "", $list[$k]['desc']);
$list[$k]['type_name'] = $v['tag'] ;
$list[$k]['title'] = Util_StringHelper::substr_cn('['.$v['tag'].'] '.$v['title'], $num2);
}
return $list;
}
/**
* 获取品牌
... ...
... ... @@ -10,102 +10,12 @@ class Controller_Product extends Controller_Abstract
return $this->_forward('news/index');
}
/**
* 详情页
*
*/
public function detailAction()
{
$id = intval($this->_request->id);
if (empty($id))
{
return $this->_redirect('news/index');
}
$info = Facade_News::getOneById($id);
if (!$info)
{
return $this->_redirect('news/index');
}
//增加浏览量
Facade_News::updateHits($id);
//获取上一个
$prev = Facade_News::getPrevNews($id);
if ($prev)
{
if ($prev['thumb'])
{
$thumb = Lib_Images::getImageUrl($prev['thumb'], '0138x0075','fragmentimg');
}else
{
$thumb = SITE_IMG.'/pic01.png';
}
$prev['thumb'] = $thumb ;
$prev['title'] = Util_StringHelper::substr_cn( $this->stripTags($prev['title']),20 );
$prev['desc'] = Util_StringHelper::substr_cn( $this->stripTags($prev['content']),40 );
}
//获取下一个
$next = Facade_News::getNextNews($id);
if ($next)
{
if ($next['thumb'])
{
$thumb = Lib_Images::getImageUrl($next['thumb'], '0138x0075','fragmentimg');
}else
{
$thumb = SITE_IMG.'/pic01.png';
}
$next['thumb'] = $thumb ;
$next['title'] = Util_StringHelper::substr_cn( $this->stripTags($next['title']),20 );
$next['desc'] = Util_StringHelper::substr_cn( $this->stripTags($next['content']),40 );
}
$this->_view['next'] = $next ;
$this->_view['prev'] = $prev ;
$this->_view['info'] = $info ;
}
/**
* 限量推荐
*/
public function recommendAction()
{
/*
* $test = $this->_request->query('test', 1);
if($test)
{
$this->_viewname ='recommend_ad';
}*/
$limit = 10;
$recomStatus = 1;
$total = Facade_Prod::getProdTotal($recomStatus);
$page = new Lib_Helper_Pagination($total, $limit);
list($offset, $limit) = $page->getLimit();
$products = Facade_Prod::getProd($recomStatus, $offset, $limit);
$brands = array();
foreach($products as $product)
{
if(!isset($brands[$product['brand_id']]))
{
$brand = Facade_Brand::getBrandbyID($product['brand_id']);
if ($brand['logo'])
{
$thumb = Lib_Images::getImageUrl($brand['logo'], '0110x0073','fragmentimg');
}
else
{
$thumb = SITE_IMG.'/pic01.png';
}
$brand['logo'] = $thumb;
$brands[$product['brand_id']] = $brand;
}
}
$this->_view['products'] = $products;
$this->_view['brands'] = $brands;
$this->_view['pagination'] = $page->getPagination();
$this->_viewname = '../default/other';
}
/**
... ...
<?php $this->_extends('layout/default_layout');?>
<?php $this->_block('main');?>
<!-- content start -->
<div class="content-wrap clearfix">
<?php foreach($this->view->products as $product):?>
<div class="recommend-item">
<div class="goods-pic">
<img src="<?php $arr = explode('|', $product['pic'] ); echo preg_replace('/-(\w+\d+)-/','-0150x0200-', $arr[0]);?>" width="150" alt=""/>
</div>
<div class="goods-info">
<div class="goods-title">
<h2><?php echo $product['name'];?></h2>
<p class="goods-price clearfix">
<span>RMB <?php echo sprintf("%.2f", $product['price']);?></span>
<a href="<?php echo $product['url'];?>" target="_blank" class="goods-buy"></a>
</p>
<?php
if(empty($product['brand_id']))
{
$url = 'javascript:void(0)';
}
else
{
$url = url('brand/detail', array('id' => $product['brand_id']));
}
?>
<a href="<?php echo $url;?>" class="goods-brand-logo">
<img src="<?php echo $this->view->brands[$product['brand_id']]['logo'];?>" alt="" width="110" height="73"/>
</a>
</div>
<p><?php echo $product['text'];?></p>
</div>
</div>
<?php endforeach;?>
<div id="pageContent" class="pagination">
<?php $this->_component('Common_Pagination',array(
'pagination' => $this->view->pagination,'next_label' => '下一页','prev_label' => '上一页','current_class' => 'current',
'page_class'=>'pagination-inner', 'id'=>'img_page'
));?>
</div>
</div>
<?php $this->_endblock();?>
\ No newline at end of file
<?php $this->_extends('layout/default_layout');?>
<?php $this->_block('main');?>
<!-- content start -->
<div class="content-wrap clearfix">
<div class="recommend-top">
<div class="recommend-title">
<h2><img src="<?php echo SITE_RES;?>/images/yohood/recommend-title.png"/></h2>
<p>YO'HOOD独家企划——联名产品首度公开</p>
</div>
<div class="recommend-info">由YO'HOOD发起,集合一众来自美国、日本、香港等地的顶尖潮流品牌推出的独家联名产品,在今次发布的独家产品中不乏已是两度与YO'HOOD协作的
品牌,如CLOT, HBA, UNDEFEATED, MEDICOM TOY,HEAD PORTER等,也有许多如Herschel Supply,JOYRICH,Stussy,THE HUNDREDS, VANQUISH,
Subcrew等等的新面孔。YO'HOOD Exclusive与一众潮牌将继续采用各自品牌最标志性的设计元素,推出包括卫衣、T恤、帽子、背包在内的一系列单品,其中一定有你不可错过的新季潮物!</div>
</div>
<div class="recommend-box">
<div class="goods-pic">
<img src="<?php echo SITE_RES;?>/images/yohood/clot_new.png"/>
</div>
<div class="goods-info">
<h4>1.CLOT</h4>
<p class="info">CLOT 继2013年与YO'HOOD 合作推出的限量款卫衣之后,本年度为大家带来新一轮的限量合作款Card Holder,产品选用优质的皮革打造,具有良好的手感,
而CLOT经典logo元素与YO'HOOD的加持让本款单品赋予更多的潮流意义。</p>
<p class="price">印花卡包 RMB 99</p>
</div>
</div>
<div class="recommend-box">
<div class="goods-pic">
<img src="<?php echo SITE_RES;?>/images/yohood/hba.png"/>
</div>
<div class="goods-info">
<h4>2.HBA</h4>
<p class="info">来自美国纽约的高街品牌 Hood By Air 近年来炙手可热, 而此番与国内顶尖潮流平台合作推出的HBA x YO'HOOD限量款卫衣将于2014年度YO'HOOD潮流展
上正式推出,产品保留经典的设计风格,大面积的色块元素与字母印花相信喜欢HBA的朋友一定非常熟悉,经典的连帽卫衣款式也是必备的潮流单品,喜欢的朋友
不可错过。</p>
<p class="price">连帽卫衣 RMB 1749</p>
</div>
</div>
<div class="recommend-box">
<div class="goods-pic">
<img src="<?php echo SITE_RES;?>/images/yohood/head.png"/>
</div>
<div class="goods-info">
<h4>3.HEAD PORTER</h4>
<p class="info">2014年度 HEAD PORTER x YO'HOOD限定款联名钱包, 极具潮流感的迷彩系列单品,精致的外形与迷彩元素的结合,多隔层功能设计保证款式的实用性,制作面
料选用特质的混纺材料,兼备超强耐磨与防水功能,整体细节的把控体现了品牌一贯的态度,潮流包品绝对值得入手。</p>
<p class="price">迷彩钱包 RMB 599</p>
</div>
</div>
<div class="recommend-box">
<div class="goods-pic">
<img src="<?php echo SITE_RES;?>/images/yohood/herschel.png"/>
</div>
<div class="goods-info">
<h4>4.Herschel Supply</h4>
<p class="info">加拿大制包品牌Herschel Supply Co. 与YO'HOOD合作推出最新款双肩背包. 该款背包款式延续Herschel Supply 一贯的经典造型,与众不同的是设计采用了极具
个性的豹纹面料,红色提手点缀及拼接细节让产品有更多层次的变化,浓烈的街头气息展露无遗,至潮单品不容错过!</p>
<p class="price">双肩背包 RMB 899</p>
</div>
</div>
<div class="recommend-box">
<div class="goods-pic">
<img src="<?php echo SITE_RES;?>/images/yohood/joyrich.png"/>
</div>
<div class="goods-info">
<h4>5.JOYRICH</h4>
<p class="info">融合复古与前卫元素的好莱坞时尚潮牌JOYRICH此番秋冬也带来最新YO'HOOD合作产品,此款设计为经典复刻版棒球夹克,正面夸张的logo标示体现品牌一直
以来大胆的作风,黑白的主色调以及红色的点缀细节,展现出极具街头辨识度的风格,喜欢美式风格的朋友值得入手。</p>
<p class="price">棒球夹克 RMB 999</p>
</div>
</div>
<div class="recommend-box">
<div class="goods-pic">
<img src="<?php echo SITE_RES;?>/images/yohood/stussy.png"/>
</div>
<div class="goods-info">
<h4>6.Stussy</h4>
<p class="info">元祖级街头潮牌Stussy此番与YO'HOOD推出最新联名单品Dragon crew Tee ,设计融合了传统的中国元素,标志性的Stussy涂鸦签名与龙的图案结合形成一种新
的文化碰撞和艺术风格。经典的黑白两色选择也非常适合街头的日常搭配,值得推荐。</p>
<p class="price">印花TEE RMB 299</p>
</div>
</div>
<div class="recommend-box">
<div class="goods-pic">
<img src="<?php echo SITE_RES;?>/images/yohood/hundreds.png"/>
</div>
<div class="goods-info">
<h4>7.THE HUNDREDS</h4>
<p class="info">源于南加州西海岸的美式街头潮流品牌 THE HUNDREDS此季同YO'HOOD合作带来全新联名产品,该系类设计虽没有经典的炸弹先生附体,但却体现出品牌最hip-
pop的本质,星条旗和数字等元素的完美结合打造出当下街头最热的Hi-Street风格,同时品牌logo数字印花的融入也极具诚意,值得关注。</p>
<p class="price">圆领卫衣 RMB 449</p>
</div>
</div>
<div class="recommend-box">
<div class="goods-pic">
<img src="<?php echo SITE_RES;?>/images/yohood/undefeated.png"/>
</div>
<div class="goods-info">
<h4>8.UNDEFEATED</h4>
<p class="info">洛杉矶潮流品牌 UNDEFEATED x YO'HOOD 的联名系列,该款棒球衫运用其经典的logo元素,硬朗醒目的几何字体透露着浓厚的美式街头运动感,而最具代表性的
还是了中文字”耍赖”的加入让设计又透露一丝不羁的个性,两种文字的结合让此次联名更具潮流意义。</p>
<p class="price">棒球夹克 RMB 999</p>
</div>
</div>
<div class="recommend-box">
<div class="goods-pic">
<img src="<?php echo SITE_RES;?>/images/yohood/vanquish.png"/>
</div>
<div class="goods-info">
<h4>9.VANQUISH</h4>
<p class="info">由石川凉主理的日本街头时装品牌 VANQUISH 也带来最新联名系列Tee, 设计迎合更多年轻人的喜好,简洁舒适的款式,采用品牌经典的logo元素,却别具创新的镜像
对称表现手法,这和中国传统“倒福”的概念不谋而合,袖口精致的YO'HOOD刺绣logo也增添了更多的细节。</p>
<p class="price">字母TEE RMB 299</p>
</div>
</div>
<div class="recommend-box">
<div class="goods-pic">
<img src="<?php echo SITE_RES;?>/images/yohood/subcrew.png"/>
</div>
<div class="goods-info">
<h4>10.Subcrew</h4>
<p class="info">港产潮牌Subcrew与YO'HOOD跨界合作带来本次联名系列Hoodie, 本季设计以校园风为主题,将品牌“Subcrew”以谐音“十八骷髏“转变成极具个性的logo元素,
袖口的骷髅细节也透露品牌的街头态度,港牌代表之作不可错过。</p>
<p class="price">连帽卫衣 RMB 499</p>
</div>
</div>
<div class="recommend-box">
<div class="goods-pic">
<img src="<?php echo SITE_RES;?>/images/yohood/aa.png"/>
</div>
<div class="goods-info">
<h4>11.American Apparel</h4>
<p class="info">American Apparel与伦敦设计师Kesh合作的玩味街头风系列本次为YO'HOOD带来全新独家限量款Zip Hoodie, 设计采用本系列一贯的黑眼图案,满版重复排列的印花极
具个性,实属街头吸睛必备单品!</p>
<p class="price">拉链连帽卫衣 新品未定价</p>
</div>
</div>
<div class="recommend-box">
<div class="goods-pic">
<img src="<?php echo SITE_RES;?>/images/yohood/dpk.png"/>
</div>
<div class="goods-info">
<h4>12.DPK</h4>
<p class="info">由潮流界的Fashion Icon 仓石一树主理打造的全新品牌DPK 於2014秋冬曝光首季產品,品牌将联合YOHO! 打造的世全球潮流新品嘉年华YO'HOOD正式推出,同时也带来
此番联名系列条纹衬衫,以box logo 等印花元素运用到衬衫上独具特色,而左右袖不对称的设计也让人眼前一亮。</p>
</div>
</div>
<div class="recommend-box">
<div class="goods-pic">
<img src="<?php echo SITE_RES;?>/images/yohood/medicom.png"/>
</div>
<div class="goods-info">
<h4>13.MEDICOM TOY</h4>
<p class="info">继上一年与MEDICOM TOY合作推出了限定版本BE@RBRICK后,今年再接再厉推出SERIES 28 特别版白色BE@RBRICK。CLOT 与 BE@RBRICK 合作的SERIES 28系列以黑色 BE@R
BRICK配合极为稀少的红色 BE@RBRICK为卖点,发售之后便引发一众爱好 BE@RBRICK 的潮流人士抢购,随机发售的红色BE@RBRICK更是令人需要在购买时试试运气才能有机会
获得,如今YO'HOOD 推出的同款白色限量版本 BE@RBRICK,你不用试试运气,只要来到 YO'HOOD现场 就能拥有!</p>
<p class="price">拉链连帽卫衣 新品未定价</p>
</div>
</div>
<div class="recommend-box">
<div class="goods-pic">
<img src="<?php echo SITE_RES;?>/images/yohood/hallfame.png"/>
</div>
<div class="goods-info">
<h4>14.HALL OF FAME</h4>
<p class="info">创立于 2007 年的加州街头品牌 HALL OF FAME,也是全球顶尖棒球帽品牌,凭借其现代化的设计思路和高质素的产品质量,迅速积攒了一大批忠实拥趸。本次与YO'HOOD推
出的合作款产品当然是以最拿手的棒球帽最为主打,结合了绝对经典的美式元素,相信是潮流人士下一季的败物首选。</p>
<p class="price">LOGO棒球帽 新品未定价</p>
</div>
</div>
</div>
<?php $this->_endblock();?>
\ No newline at end of file