Authored by hf

modify search url to config

... ... @@ -131,6 +131,7 @@ class FloorProcess
/**
* 女生品类
* 推荐(1T-12F)
*/
private static function recommend_content_three($data, $type)
{
... ... @@ -138,7 +139,7 @@ class FloorProcess
$build = array();
if (!empty($data['big_image'][0])) {
$build['img'] = Helpers::getImageUrl($data['big_image'][0]['src'], 640, 198);
$build['img'] = Helpers::getImageUrl($data['big_image'][0]['src'], 640, 200);
$build['url'] = Helpers::getFilterUrl($data['big_image'][0]['url']);
$result['hotCategory']['banner'] = $build;
}
... ... @@ -228,7 +229,7 @@ class FloorProcess
foreach($data as $key=>&$value){
if($key == 'title'){
$value['more_url'] = Helpers::url('', array('id' => 2, 'gender' => self::$channel[$type]), 'guang');
$value['more_url'] = Helpers::url('', array('id' => 3, 'gender' => self::$channel[$type]), 'guang');
}
if($key == 'article'){
foreach($value as &$one){
... ... @@ -266,7 +267,7 @@ class FloorProcess
foreach($data as $key=>&$value){
if($key == 'title'){
$value['more_url'] = Helpers::url('', array('id' => 1, 'gender' => self::$channel[$type]), 'guang');
$value['more_url'] = Helpers::url('', array('id' => 4, 'gender' => self::$channel[$type]), 'guang');
}
if($key == 'list'){
foreach ($value as &$one) {
... ... @@ -300,7 +301,7 @@ class FloorProcess
$one['img'] = Helpers::getImageUrl($one['src'], 640, 403);
unset($one['src']);
}
$data['banner']['list'] = $data['big_image'];
$result['big_image']['list'] = $data['big_image'];
foreach ($data['list'] as $kk => &$one) {
if ($kk == 0) {
... ... @@ -337,7 +338,6 @@ class FloorProcess
{
$result = array();
$data['banner'] = array();
foreach ($data['big_image'] as &$one) {
if (isset($one['url'])) {
$one['url'] = Helpers::getFilterUrl($one['url']);
... ...
... ... @@ -188,7 +188,7 @@ function tsAnimate() {
window.setTimeout(tsAnimate, 3000);
} else {
if (start % 360 === 0) {
window.setTimeout(tsAnimate, 3 * 60 * 1000);
window.setTimeout(tsAnimate, 60 * 1000);
} else {
requestFrame(function () {
tsAnimate();
... ...
... ... @@ -56,7 +56,7 @@ $clear.bind('tap', function() {
continue;
}
html += '<li><a href="?query=' + history + '">' + history + '</li>';
html += '<li><a href="/?query=' + history + '">' + history + '</li>';
}
$history.html(html);
... ...
... ... @@ -88,15 +88,38 @@
background-color: #000000;
.index-channel-list {
padding-top: 50%;
width: 100%;
position: absolute;
top: 0;
padding-top: 50%;
width: 100%;
position: absolute;
top: -230rem / $pxConvertRem;
.homestyle {
.list-item {
display: block;
position: relative;
margin: 0 auto 50rem / $pxConvertRem;
width: 444rem / $pxConvertRem;
height: 110rem / $pxConvertRem;
text-align: center;
font-size: 30rem / $pxConvertRem;
line-height: 110rem / $pxConvertRem;
color: #fff;
background: #000;
border: 5rem / $pxConvertRem solid #fff;
font-weight: bold;
}
.lighter {
font-weight: lighter;
}
.right-icon {
position: absolute;
right: 10rem / $pxConvertRem;
top: 0;
font-weight: bold;
}
.homestyle {
margin-bottom: 50rem / $pxConvertRem;
width: 287.3rem / $pxConvertRem;
}
}
}
}
}
... ...
{{>layout/header}}
<div class="index-page yoho-page">
<div class="index-container">
<div class="index-header clearfix">
... ... @@ -13,15 +12,16 @@
</div>
</form>
</div>
<div class="index-channel">
<img class="img" src="{{background}}" alt="">
<div class="index-channel-list">
<a href="/boys"><img class="homestyle" src="http://img10.static.yhbimg.com/adpic/2015/09/28/18/01bdbd27952eb5f780ac23641e70fd6e12.png"></a>
<a href="/girls"><img class="homestyle" src="http://img13.static.yhbimg.com/adpic/2015/09/28/18/025a4056cad1c2b6704a5d7c83066a2d25.png"></a>
<a href="/boys" class="list-item">男生 <span class="lighter">BOYS</span> <span class="iconfont right-icon">&#xe614;</span></a>
<a href="/girls" class="list-item">女生 <span class="lighter">GIRLS</span> <span class="iconfont right-icon">&#xe614;</span></a>
<a href="/kids" class="list-item">潮童 <span class="lighter">KIDS</span> <span class="iconfont right-icon">&#xe614;</span></a>
<a href="/lifestyle" class="list-item">创意生活 <span class="lighter">LIFESTYLE</span> <span class="iconfont right-icon">&#xe614;</span></a>
</div>
</div>
</div>
</div>
</div>
{{>layout/footer}}
{{> layout/download_app}}
\ No newline at end of file
... ...
{{> layout/page_footer}}
{{> layout/download_app}}
{{#if rlsEnv}}
<script src="http://cdn.yoho.cn/myohobuy/{{version}}/lib.js"></script>
<script src="http://cdn.yoho.cn/myohobuy/{{version}}/index.js"></script>
... ...
... ... @@ -26,7 +26,6 @@ class BoysController extends AbstractAction
// 渲染模板并输出
$this->_view->display('index', array(
'boysHomePage' => true,
'showDownloadApp'=>true,
'showFooterTab'=>true,
'maybeLike' => true,
'content' => Index\HomeModel::getBoysFloor()
... ...
... ... @@ -26,7 +26,6 @@ class GirlsController extends AbstractAction
// 渲染模板并输出
$this->_view->display('index', array(
'grilsHomePage' => true,
'showDownloadApp'=>true,
'showFooterTab'=>true,
'maybeLike' => true,
'content' => Index\HomeModel::getGirlsFloor()
... ...
... ... @@ -26,7 +26,6 @@ class KidsController extends AbstractAction
// 渲染模板并输出
$this->_view->display('index', array(
'kidsHomePage' => true,
'showDownloadApp'=>true,
'showFooterTab'=>true,
'maybeLike' => true,
'content' => Index\HomeModel::getKidsFloor()
... ...
... ... @@ -26,7 +26,6 @@ class LifestyleController extends AbstractAction
// 渲染模板并输出
$this->_view->display('index', array(
'lifestyleHomePage' => true,
'showDownloadApp'=>true,
'showFooterTab'=>true,
'maybeLike' => true,
'content' => Index\HomeModel::getLifestyleFloor()
... ...
... ... @@ -16,8 +16,10 @@ class SearchController extends AbstractAction
*/
public function indexAction()
{
$this->_view->html('search');
$this->_view->display('index', array(
'search' => array('url' => Helpers::url('', null, 'search')),
'showDownloadApp' => true,
'searchPage' => true,
'pageFooter' => true
));
... ... @@ -41,7 +43,7 @@ class SearchController extends AbstractAction
'discount' => FILTER_DEFAULT,
'gender' => FILTER_DEFAULT,
'p_d' => FILTER_DEFAULT,), false);
$query = isset($condition['query']) ? strtolower(trim($condition['query'])) : null;
if (isset($condition['discount'])) {
$condition['p_d'] = rawurldecode($condition['discount']);
... ...
... ... @@ -55,6 +55,8 @@ class BrandModel
// 模板中的使用JS标识
$result['brandPage'] = true;
// 是否显示app下载浮层标识
$result['showDownloadApp'] = true;
/* 顶部的轮翻广告列表 */
if (!empty($brand['brandTop'][0]['data'])) {
... ...
... ... @@ -213,7 +213,7 @@ class NewsaleModel
if (isset($data['code']) && $data['code'] === 200) {
foreach ($data['data']['product_list'] as $val) {
$result['goods'][] = Helpers::formatProduct($val);
$result['goods'][] = Helpers::formatProduct($val, true, false, false);
}
}
... ...
... ... @@ -22,6 +22,7 @@ class ClassController extends AbstractAction
$data = array(
'categoryPage' => true,
'showDownloadApp' => true,
'category' => array(
'class' => $classes,
'searchUrl' => Helpers::url('/search.html', null, 'search'),
... ...
... ... @@ -57,6 +57,7 @@ class IndexController extends AbstractAction
}
$this->_view->display('index', array(
'goodListPage' => true,
'showDownloadApp' => true,
'goodList' => $goodList,
));
}
... ... @@ -113,6 +114,7 @@ class IndexController extends AbstractAction
}
$data['goodListPage'] = true;
$data['showDownloadApp'] = true;
// 从搜索页过来的,显示搜索框, 和进入品牌引导信息
if ($from === 'search') {
$data['goodList'] = Product\ListModel::getBrandData($condition, $title);
... ...
... ... @@ -32,6 +32,7 @@ class NewsaleController extends AbstractAction
}
// 设置一些筛选的默认参数
$data += array(
'showDownloadApp'=>true,
'brand' => '0',
'sort' => '0',
'gender' => Helpers::getGenderByCookie(),
... ... @@ -65,6 +66,7 @@ class NewsaleController extends AbstractAction
}
// 设置一些筛选的默认参数
$data += array(
'showDownloadApp'=>true,
'brand' => '0',
'sort' => '0',
'gender' => Helpers::getGenderByCookie(),
... ...
... ... @@ -13,11 +13,11 @@ routes.error.route.controller = Error
routes.error.route.action = Index
; 搜索页
routes.reg.type = "rewrite"
routes.reg.match = "/search.html"
routes.reg.route.module = Index
routes.reg.route.controller = Search
routes.reg.route.action = Index
routes.search.type = "rewrite"
routes.search.match = "/search.html"
routes.search.route.module = Index
routes.search.route.controller = Search
routes.search.route.action = Index
; 注册页
routes.reg.type = "rewrite"
... ...