Authored by Rock Zhang

修改一些模板变量以及模板文件命名

... ... @@ -74,6 +74,9 @@ class FloorProcess
$one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);
unset($one['src']);
}
$data['is_show_name'] = $data['title']['is_show'];
$data['name'] = $data['title']['title'];
unset($data['title']);
$result = $data;
return $result;
... ... @@ -88,6 +91,7 @@ class FloorProcess
{
$result = array();
$data['is_show_name'] = $data['is_show_name'] == 'Y' ? 1 : 0;
$data['name'] = $data['title']['title'];
unset($data['title']);
foreach ($data['list'] as &$one) {
... ... @@ -152,6 +156,9 @@ class FloorProcess
$one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);
unset($one['src']);
}
$data['banner']['list'] = $data['big_image'];
unset($data['big_image']);
foreach ($data['list'] as &$one) {
$one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);
unset($one['src']);
... ... @@ -170,10 +177,14 @@ class FloorProcess
{
$result = array();
$data['banner'] = array();
foreach ($data['big_image'] as &$one) {
$one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);
unset($one['src']);
}
$data['banner']['list'] = $data['big_image'];
unset($data['big_image']);
foreach ($data['list'] as &$one) {
$one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);
unset($one['src']);
... ... @@ -200,4 +211,22 @@ class FloorProcess
return $result;
}
/**
* 也许喜欢数据处理方法
* @param array $data 也许喜欢数据
* @return array 处理之后的也许喜欢数据
*/
public static function maybeLike($data)
{
$result = array();
foreach ($data as &$one) {
$one['img'] = Helpers::getImageUrl($one['src'], 235, 314, 1);
unset($one['src']);
}
$result = $data;
return $result;
}
}
... ...
{{# title}}
<div class="floor-header-more">
<h2>{{name}}</h2>
{{# more}}
<a class="more-btn iconfont" href="{{.}}">&#xe606;</a>
{{/ more}}
</div>
\ No newline at end of file
<h2>{{title}}</h2>
<a class="more-btn iconfont" href="{{more_url}}">{{more_name}}</a>
</div>
{{/ title}}
\ No newline at end of file
... ...
... ... @@ -6,7 +6,7 @@
{{# list}}
<li class="swiper-slide">
<a href="{{url}}">
<img class="lazy" src="{{img}}" alt="">
<img class="lazy" src="{{img}}" alt="{{title}}">
</a>
</li>
{{/ list}}
... ...
{{> common/floor_header}}
<ul class="hot-brands clearfix">
{{# brands}}
{{# list}}
<li class="brand">
<a href="{{url}}">
<div class="brand-logo">
... ... @@ -9,7 +9,7 @@
<p class="brand-name">{{name}}</p>
</a>
</li>
{{/ brands}}
{{/ list}}
<li class="more">
<a href="{{more}}"></a>
</li>
... ...
<div class="icons-wrapper">
<ul class="icons-list clearfix">
{{#list}}
<li class="icons-item"><a href="{{url}}" class="imagebar"><img class="lazy" data-original="{{img}}" alt=""></a><a href="{{url}}" class="linkbar">{{text}}</a></li>
<li class="icons-item"><a href="{{url}}" class="imagebar"><img class="lazy" data-original="{{img}}" alt=""></a><a href="{{url}}" class="linkbar">{{title}}</a></li>
{{/list}}
</ul>
</div>
\ No newline at end of file
... ...
... ... @@ -13,7 +13,7 @@
<p class="title">{{title}}</p>
<p class="time">
<span class="iconfont time-icon">&#xe603;</span>
<span>{{time}}</span>
<span>{{publish_time}}</span>
</p>
</div>
</a>
... ...
<div class="trend-coll-wrapper">
{{> common/floor_header_more}}
<div class="trend-coll-content clearfix">
{{#leftspan}}
{{# article}}
<div class="lspan">
<a href="{{url}}"><img class="lazy rspanimg" data-original="{{img}}" ></a>
</div>
{{/leftspan}}
{{#rightspan}}
<div class="rspan">
<a href="{{url}}"><img class="lazy lspanimg" data-original="{{img}}" ></a>
</div>
{{/rightspan}}
{{/ article}}
</div>
<div class="trend-coll-tail">
<h3 class="recommend-title">推荐搭配</h3>
<div class="recommend-swiper">
<ul class="recommend-list clearfix">
{{# recommendlist}}
{{# recommend_collocation}}
<li class="recommend-item swiper-slide"><a href="{{url}}"><img class="lazy" src="{{img}}" alt="" /></a></li>
{{/ recommendlist}}
{{/ recommend_collocation}}
</ul>
</div>
</div>
... ...
<div class="hot-brands girls">
{{> common/floor_header_more}}
{{> common/floor_header}}
<div class="brands-swiper">
<ul class="brands-list swiper-wrapper clearfix">
{{# list}}
... ...
... ... @@ -2,6 +2,7 @@
use Action\AbstractAction;
use LibModels\Wap\Home\IndexData;
use LibModels\Wap\Product\RecomData;
use Plugin\Helpers;
use Plugin\FloorProcess;
/**
... ... @@ -18,8 +19,8 @@ class GirlsController extends AbstractAction
$data = array(
'headerDownload' => $this->getHeaderDownload(),
'homeHeader' => array(
'bgColor' => '#FF88AE',
'searchUrl' => ''
'bgColor' => '#FF88AE',
'searchUrl' => ''
),
'searchUrl' => '',
'sideNav' => array(),
... ... @@ -42,7 +43,7 @@ class GirlsController extends AbstractAction
$iconsEnter = array();
$singleImage = array();
$hotCategory = array();
$hotBrandsScroll = array();
$hotBrands = array();
$trendColloaction = array();
$trendTopics = array();
$goodsCategory = array();
... ... @@ -72,7 +73,7 @@ class GirlsController extends AbstractAction
break;
case 'app_hot_brands': // 推荐品牌
$oneHotBrand = FloorProcess::$template($floorData);
$hotBrandsScroll[] = $oneHotBrand;
$hotBrands[] = $oneHotBrand;
break;
case 'trendsetter_collocation': // 潮人·搭配
$oneTrendSetter = FloorProcess::$template($floorData);
... ... @@ -103,7 +104,7 @@ class GirlsController extends AbstractAction
'bannerTop' => $bannerTop,
'iconsEnter' => $iconsEnter,
'hotCategory' => $hotCategory,
'hotBrandsScroll' => $hotBrandsScroll,
'hotBrands' => $hotBrands,
'trendColloaction' => $trendColloaction,
'trendTopics' => $trendTopics,
'goodsCategory' => $goodsCategory
... ... @@ -111,10 +112,16 @@ class GirlsController extends AbstractAction
$data['content'] = $content;
}
echo '<pre>';
print_r($data);exit;
$data = array(
// 也许喜欢
$maybeLikeData = RecomData::mayLike('2,3', 2);
$maybeLike = array();
if($maybeLike['code'] == 200)
{
$maybeLike = $maybeLike['data']['product_list'];
}
/*$data = array(
'headerDownload' => array(
'img' => 'http://img11.static.yhbimg.com/adpic/2015/02/28/18/01d83bfad41c8fca8fd1ad334216d7d733.jpg?imageView/2/w/640/h/480',
'url' => 'http://www.baidu.com'
... ... @@ -592,7 +599,7 @@ class GirlsController extends AbstractAction
'url' => ''
)
));
));*/
$this->_view->assign('title', 'YOHO!有货');
$this->_view->display('index', $data);
... ...