diff --git a/static/package.json b/static/package.json index d23a941..d895cfc 100644 --- a/static/package.json +++ b/static/package.json @@ -1,6 +1,6 @@ { "name": "yohobuy", - "version": "0.0.6", + "version": "0.0.8", "description": "yohobuy statics", "keywords": [], "homepage": "", diff --git a/template/m.yohobuy.com/actions/index/search/index.phtml b/template/m.yohobuy.com/actions/index/search/index.phtml index 6d8944c..9d9c4b7 100644 --- a/template/m.yohobuy.com/actions/index/search/index.phtml +++ b/template/m.yohobuy.com/actions/index/search/index.phtml @@ -5,6 +5,7 @@ <form id="search-form" action={{url}} method="get"> <i class="search-icon iconfont"></i> <input type="text" placeholder="搜索商品" name="query"> + <input type="hidden" name="from" value="search"> <i class="clear-input iconfont hide"></i> <button id="search" class="search" type="submit">搜索</button> </form> diff --git a/template/m.yohobuy.com/partials/product/list.phtml b/template/m.yohobuy.com/partials/product/list.phtml index ab80dba..aacc226 100644 --- a/template/m.yohobuy.com/partials/product/list.phtml +++ b/template/m.yohobuy.com/partials/product/list.phtml @@ -3,7 +3,7 @@ <div id="search-input" class="search-input"> <form id="search-form" action={{url}} method="get"> <i class="search-icon iconfont"></i> - <input type="text" value={{default}} name="query"> + <input type="text" value="{{default}}" name="query"> <i class="clear-input iconfont hide"></i> <button id="search" class="search" type="submit">搜索</button> </form> diff --git a/yohobuy/m.yohobuy.com/application/controllers/Search.php b/yohobuy/m.yohobuy.com/application/controllers/Search.php index e66881a..d6d78b0 100644 --- a/yohobuy/m.yohobuy.com/application/controllers/Search.php +++ b/yohobuy/m.yohobuy.com/application/controllers/Search.php @@ -141,14 +141,14 @@ class SearchController extends AbstractAction } // 搜索其它内容 else { - if ($haveQuery) { - $data['goodList']['search']['default'] = $query; + $from = $this->get('from'); + if ($haveQuery || $from) { + $data['goodList']['search']['default'] = empty($query) ? false : $query; $data['goodList']['search']['url'] = Helpers::url('', null, 'search'); } $this->setTitle('搜索'); $this->setNavHeader('搜索', true, SITE_MAIN); } - // 右下角的购物车链接 $data['goodList']['cartUrl'] = Helpers::url('/cart/index/index', null); diff --git a/yohobuy/m.yohobuy.com/configs/application.developer.ini b/yohobuy/m.yohobuy.com/configs/application.developer.ini index 7fd9040..d0df480 100644 --- a/yohobuy/m.yohobuy.com/configs/application.developer.ini +++ b/yohobuy/m.yohobuy.com/configs/application.developer.ini @@ -50,7 +50,7 @@ application.template.ext = ".phtml" application.assets.path = ROOT_PATH "/assets" ; 应用的版本号 -application.version = "0.0.7" +application.version = "0.0.8" ; 网站SEO信息 application.seo.title = "Yoho!Buy有货" diff --git a/yohobuy/m.yohobuy.com/configs/application.preview.ini b/yohobuy/m.yohobuy.com/configs/application.preview.ini index 348bb1e..1c1181b 100644 --- a/yohobuy/m.yohobuy.com/configs/application.preview.ini +++ b/yohobuy/m.yohobuy.com/configs/application.preview.ini @@ -50,7 +50,7 @@ application.template.ext = ".phtml" application.assets.path = ROOT_PATH "/assets" ; 应用的版本号 -application.version = "0.0.7" +application.version = "0.0.8" ; 网站SEO信息 application.seo.title = "Yoho!Buy有货" diff --git a/yohobuy/m.yohobuy.com/configs/application.production.ini b/yohobuy/m.yohobuy.com/configs/application.production.ini index e7453e7..3c2dcaa 100644 --- a/yohobuy/m.yohobuy.com/configs/application.production.ini +++ b/yohobuy/m.yohobuy.com/configs/application.production.ini @@ -50,7 +50,7 @@ application.template.ext = ".phtml" application.assets.path = ROOT_PATH "/assets" ; 应用的版本号 -application.version = "0.0.7" +application.version = "0.0.8" ; 网站SEO信息 application.seo.title = "Yoho!Buy有货" diff --git a/yohobuy/m.yohobuy.com/configs/application.testing.ini b/yohobuy/m.yohobuy.com/configs/application.testing.ini index 14ef9d0..6387db7 100644 --- a/yohobuy/m.yohobuy.com/configs/application.testing.ini +++ b/yohobuy/m.yohobuy.com/configs/application.testing.ini @@ -50,7 +50,7 @@ application.template.ext = ".phtml" application.assets.path = ROOT_PATH "/assets" ; 应用的版本号 -application.version = "0.0.7" +application.version = "0.0.8" ; 网站SEO信息 application.seo.title = "Yoho!Buy有货"