Authored by hf

fixes bug to search nav bar

... ... @@ -32,7 +32,7 @@
</header>
<div class="search-page yoho-page">
<div id="search-input" class="search-input">
<form id="search-form" action=http://search.dev.yohobuy.com method="get">
<form id="search-form" action=http://search.test.yoho.cn method="get">
<i class="search-icon iconfont">&#xe60f;</i>
<input type="text" placeholder="搜索商品" name="query">
<i class="clear-input iconfont hide">&#xe626;</i>
... ...
... ... @@ -30,7 +30,7 @@ class BoysController extends AbstractAction
// 渲染模板并输出
$this->_view->display('index', array(
'boysHomePage' => true,
'homeHeader' => array('searchUrl' => Helpers::url('/search.html', null, 'search')),
'homeHeader' => array('searchUrl' => Helpers::url('/search', null, 'search')),
'showFooterTab' => false,
'maybeLike' => true,
'content' => Index\HomeModel::getBoysFloor(),
... ...
... ... @@ -25,7 +25,7 @@ class GirlsController extends AbstractAction
// 渲染模板并输出
$this->_view->display('index', array(
'grilsHomePage' => true,
'homeHeader' => array('searchUrl' => Helpers::url('/search.html', null, 'search')),
'homeHeader' => array('searchUrl' => Helpers::url('/search', null, 'search')),
'showFooterTab' => false,
'maybeLike' => true,
'content' => Index\HomeModel::getGirlsFloor(),
... ...
... ... @@ -25,7 +25,7 @@ class KidsController extends AbstractAction
// 渲染模板并输出
$this->_view->display('index', array(
'kidsHomePage' => true,
'homeHeader' => array('searchUrl' => Helpers::url('/search.html', null, 'search')),
'homeHeader' => array('searchUrl' => Helpers::url('/search', null, 'search')),
'showFooterTab' => false,
'maybeLike' => true,
'content' => Index\HomeModel::getKidsFloor(),
... ...
... ... @@ -25,7 +25,7 @@ class LifestyleController extends AbstractAction
// 渲染模板并输出
$this->_view->display('index', array(
'lifestyleHomePage' => true,
'homeHeader' => array('searchUrl' => Helpers::url('/search.html', null, 'search')),
'homeHeader' => array('searchUrl' => Helpers::url('/search', null, 'search')),
'showFooterTab' => false,
'maybeLike' => true,
'content' => Index\HomeModel::getLifestyleFloor(),
... ...
... ... @@ -17,8 +17,8 @@ class SearchController extends AbstractAction
public function indexAction()
{
$this->setNavHeader('搜索', true, SITE_MAIN);
$this->_view->html('search');
//$this->_view->html('search');
$this->_view->display('index', array(
'search' => array('url' => Helpers::url('', null, 'search')),
'showDownloadApp' => true,
... ... @@ -125,6 +125,9 @@ class SearchController extends AbstractAction
}
$data = array();
$data['goodListPage'] = true;
$data['goodList'] = $condition;
$data['query'] = $query;
// 搜索是一级品类
if ($isQueryFirstClass) {
$this->setTitle('全部' . $query);
... ... @@ -139,16 +142,12 @@ class SearchController extends AbstractAction
else {
if ($haveQuery) {
$data['goodList']['search']['default'] = $query;
$data['goodList']['search']['default'] = $query;
$data['goodList']['search']['url'] = Helpers::url('', null, 'search');
}
$this->setTitle('搜索');
$this->setNavHeader('搜索', true, SITE_MAIN);
}
$data['goodListPage'] = true;
$data['goodList'] = $condition;
$data['query'] = $query;
// // 查询数据
// if (!isset($condition['query'])) {
// $data['goodList'] += Product\ListModel::getClassData($condition);
... ...