Authored by hf

do merge develop code to version 0.0.8

1 { 1 {
2 "name": "yohobuy", 2 "name": "yohobuy",
3 - "version": "0.0.6", 3 + "version": "0.0.8",
4 "description": "yohobuy statics", 4 "description": "yohobuy statics",
5 "keywords": [], 5 "keywords": [],
6 "homepage": "", 6 "homepage": "",
@@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
5 <form id="search-form" action={{url}} method="get"> 5 <form id="search-form" action={{url}} method="get">
6 <i class="search-icon iconfont">&#xe60f;</i> 6 <i class="search-icon iconfont">&#xe60f;</i>
7 <input type="text" placeholder="搜索商品" name="query"> 7 <input type="text" placeholder="搜索商品" name="query">
  8 + <input type="hidden" name="from" value="search">
8 <i class="clear-input iconfont hide">&#xe626;</i> 9 <i class="clear-input iconfont hide">&#xe626;</i>
9 <button id="search" class="search" type="submit">搜索</button> 10 <button id="search" class="search" type="submit">搜索</button>
10 </form> 11 </form>
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <div id="search-input" class="search-input"> 3 <div id="search-input" class="search-input">
4 <form id="search-form" action={{url}} method="get"> 4 <form id="search-form" action={{url}} method="get">
5 <i class="search-icon iconfont">&#xe60f;</i> 5 <i class="search-icon iconfont">&#xe60f;</i>
6 - <input type="text" value={{default}} name="query"> 6 + <input type="text" value="{{default}}" name="query">
7 <i class="clear-input iconfont hide">&#xe61a;</i> 7 <i class="clear-input iconfont hide">&#xe61a;</i>
8 <button id="search" class="search" type="submit">搜索</button> 8 <button id="search" class="search" type="submit">搜索</button>
9 </form> 9 </form>
@@ -141,14 +141,14 @@ class SearchController extends AbstractAction @@ -141,14 +141,14 @@ class SearchController extends AbstractAction
141 } 141 }
142 // 搜索其它内容 142 // 搜索其它内容
143 else { 143 else {
144 - if ($haveQuery) {  
145 - $data['goodList']['search']['default'] = $query; 144 + $from = $this->get('from');
  145 + if ($haveQuery || $from) {
  146 + $data['goodList']['search']['default'] = empty($query) ? false : $query;
146 $data['goodList']['search']['url'] = Helpers::url('', null, 'search'); 147 $data['goodList']['search']['url'] = Helpers::url('', null, 'search');
147 } 148 }
148 $this->setTitle('搜索'); 149 $this->setTitle('搜索');
149 $this->setNavHeader('搜索', true, SITE_MAIN); 150 $this->setNavHeader('搜索', true, SITE_MAIN);
150 } 151 }
151 -  
152 // 右下角的购物车链接 152 // 右下角的购物车链接
153 $data['goodList']['cartUrl'] = Helpers::url('/cart/index/index', null); 153 $data['goodList']['cartUrl'] = Helpers::url('/cart/index/index', null);
154 154
@@ -50,7 +50,7 @@ application.template.ext = ".phtml" @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
50 application.assets.path = ROOT_PATH "/assets" 50 application.assets.path = ROOT_PATH "/assets"
51 51
52 ; 应用的版本号 52 ; 应用的版本号
53 -application.version = "0.0.7" 53 +application.version = "0.0.8"
54 54
55 ; 网站SEO信息 55 ; 网站SEO信息
56 application.seo.title = "Yoho!Buy有货" 56 application.seo.title = "Yoho!Buy有货"
@@ -50,7 +50,7 @@ application.template.ext = ".phtml" @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
50 application.assets.path = ROOT_PATH "/assets" 50 application.assets.path = ROOT_PATH "/assets"
51 51
52 ; 应用的版本号 52 ; 应用的版本号
53 -application.version = "0.0.7" 53 +application.version = "0.0.8"
54 54
55 ; 网站SEO信息 55 ; 网站SEO信息
56 application.seo.title = "Yoho!Buy有货" 56 application.seo.title = "Yoho!Buy有货"
@@ -50,7 +50,7 @@ application.template.ext = ".phtml" @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
50 application.assets.path = ROOT_PATH "/assets" 50 application.assets.path = ROOT_PATH "/assets"
51 51
52 ; 应用的版本号 52 ; 应用的版本号
53 -application.version = "0.0.7" 53 +application.version = "0.0.8"
54 54
55 ; 网站SEO信息 55 ; 网站SEO信息
56 application.seo.title = "Yoho!Buy有货" 56 application.seo.title = "Yoho!Buy有货"
@@ -50,7 +50,7 @@ application.template.ext = ".phtml" @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
50 application.assets.path = ROOT_PATH "/assets" 50 application.assets.path = ROOT_PATH "/assets"
51 51
52 ; 应用的版本号 52 ; 应用的版本号
53 -application.version = "0.0.7" 53 +application.version = "0.0.8"
54 54
55 ; 网站SEO信息 55 ; 网站SEO信息
56 application.seo.title = "Yoho!Buy有货" 56 application.seo.title = "Yoho!Buy有货"