Authored by 郝肖肖

搜索用品牌域名访问

@@ -244,6 +244,8 @@ class SearchModel @@ -244,6 +244,8 @@ class SearchModel
244 if (isset($val['brand_id'])) { 244 if (isset($val['brand_id'])) {
245 $shopSort = SearchData::getClassesData(array('brand' => $val['brand_id'])); 245 $shopSort = SearchData::getClassesData(array('brand' => $val['brand_id']));
246 } 246 }
  247 + //用品牌域名访问
  248 + $val['brand_domain'] = $data['shop']['brand_domain'];
247 $data['shopData'][] = array( 249 $data['shopData'][] = array(
248 'shop' => $val, 250 'shop' => $val,
249 'shopSort' => empty($shopSort['data']['sort']) ? array() : $shopSort['data']['sort'] 251 'shopSort' => empty($shopSort['data']['sort']) ? array() : $shopSort['data']['sort']
@@ -17,11 +17,6 @@ class IndexController extends WebAction @@ -17,11 +17,6 @@ class IndexController extends WebAction
17 */ 17 */
18 public function brandAction() 18 public function brandAction()
19 { 19 {
20 - $shopId = $this->get('shopId', 0);  
21 - if (!empty($shopId)) {  
22 - $this->shopHome($shopId);  
23 - exit(0);  
24 - }  
25 //品牌域名,没有获取到品牌域名的跳转首页 20 //品牌域名,没有获取到品牌域名的跳转首页
26 $domain = $this->param('named'); 21 $domain = $this->param('named');
27 if (empty($domain)) { 22 if (empty($domain)) {
@@ -36,6 +31,7 @@ class IndexController extends WebAction @@ -36,6 +31,7 @@ class IndexController extends WebAction
36 $type = intval(isset($result['type']) ? $result['type'] : ''); 31 $type = intval(isset($result['type']) ? $result['type'] : '');
37 switch ($type) { 32 switch ($type) {
38 case 1: 33 case 1:
  34 + $shopId = intval($this->get('shopId', 0));
39 if (empty($shopId)) { 35 if (empty($shopId)) {
40 //无单品店有多品店:1--->搜索页 36 //无单品店有多品店:1--->搜索页
41 $this->go('http://search.yohobuy.com/?query=' . $domain); 37 $this->go('http://search.yohobuy.com/?query=' . $domain);