Authored by yyq

shop query key

@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 <form action="/shoplist" method="get" id="shop-search-form"> 10 <form action="/shoplist" method="get" id="shop-search-form">
11 <span> 11 <span>
12 <input type="hidden" name="shopId" value="{{shopId}}"> 12 <input type="hidden" name="shopId" value="{{shopId}}">
13 - <input id="shop-query-key" type="text" name="query" class="shop-query-key" autocomplete="off" x-webkit-speech="" lang="zh-CN" placeholder="关键词搜索"> 13 + <input id="shop-query-key" type="text" name="query" class="shop-query-key" autocomplete="off" x-webkit-speech="" lang="zh-CN" placeholder="关键词搜索" {{# shopQueryKey}}value="{{.}}"{{/ shopQueryKey}}>
14 </span> 14 </span>
15 <span class="iconfont shop-query-submit">&#xe611;</span> 15 <span class="iconfont shop-query-submit">&#xe611;</span>
16 </form> 16 </form>
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 <form action="/shoplist" method="get" id="shop-search-form"> 10 <form action="/shoplist" method="get" id="shop-search-form">
11 <span> 11 <span>
12 <input type="hidden" name="shopId" value="{{shopId}}"> 12 <input type="hidden" name="shopId" value="{{shopId}}">
13 - <input id="shop-query-key" type="text" name="query" class="shop-query-key" autocomplete="off" x-webkit-speech="" lang="zh-CN" placeholder="关键词搜索"> 13 + <input id="shop-query-key" type="text" name="query" class="shop-query-key" autocomplete="off" x-webkit-speech="" lang="zh-CN" placeholder="关键词搜索" {{# shopQueryKey}}value="{{.}}"{{/ shopQueryKey}}>
14 </span> 14 </span>
15 <span class="iconfont shop-query-submit">&#xe611;</span> 15 <span class="iconfont shop-query-submit">&#xe611;</span>
16 </form> 16 </form>
@@ -489,8 +489,9 @@ class IndexController extends WebAction @@ -489,8 +489,9 @@ class IndexController extends WebAction
489 489
490 $data = array_merge( 490 $data = array_merge(
491 array( 491 array(
492 - 'shopId' => $shopId,  
493 'shopIndexPage' => true, 492 'shopIndexPage' => true,
  493 + 'shopId' => $shopId,
  494 + 'shopQueryKey' => $this->get('query', ''),
494 'pathNav' => false, // pathNav数据结构同其他页面 495 'pathNav' => false, // pathNav数据结构同其他页面
495 'coupon' => false, // 先不做 496 'coupon' => false, // 先不做
496 'trendInfo' => ShopModel::getArticle($shopId), 497 'trendInfo' => ShopModel::getArticle($shopId),
@@ -542,6 +543,7 @@ class IndexController extends WebAction @@ -542,6 +543,7 @@ class IndexController extends WebAction
542 array( 543 array(
543 'shopIndexPage' => true, 544 'shopIndexPage' => true,
544 'shopId' => $shopId, 545 'shopId' => $shopId,
  546 + 'shopQueryKey' => $this->get('query', ''),
545 'pathNav' => false, // pathNav数据结构同其他页面 547 'pathNav' => false, // pathNav数据结构同其他页面
546 'coupon' => false, // 先不做 548 'coupon' => false, // 先不做
547 ), 549 ),