Authored by 周少峰

add brand search

@@ -162,6 +162,8 @@ class BrandModel @@ -162,6 +162,8 @@ class BrandModel
162 $list['isHot'] = ($row['is_hot'] === 'Y') ? true : false; 162 $list['isHot'] = ($row['is_hot'] === 'Y') ? true : false;
163 $list['isNew'] = ($row['is_show_new'] === 'Y') ? true : false; 163 $list['isNew'] = ($row['is_show_new'] === 'Y') ? true : false;
164 $list['url'] = Helpers::url('', null, $row['brand_domain']); 164 $list['url'] = Helpers::url('', null, $row['brand_domain']);
  165 + $list['brandId'] = $row['id'];
  166 + $list['brandDomain'] = Helpers::url('', null, $row['brand_domain']);
165 $build[] = $list; 167 $build[] = $list;
166 } 168 }
167 $result[$char] = $build; 169 $result[$char] = $build;
@@ -83,11 +83,13 @@ class BrandController extends AbstractAction @@ -83,11 +83,13 @@ class BrandController extends AbstractAction
83 $result = array(); 83 $result = array();
84 $uid = $this->getUid(); 84 $uid = $this->getUid();
85 $brandName = $this->get('brandNme'); 85 $brandName = $this->get('brandNme');
  86 + $brandDomain = $this->get('brandDomain');
  87 + $brandId = $this->get('brandId');
86 do { 88 do {
87 if (!$this->isAjax() || empty($brandId)) { 89 if (!$this->isAjax() || empty($brandId)) {
88 break; 90 break;
89 } 91 }
90 - $records = time().'_'.$brandName; 92 + $records = time().'_'.$brandName.'_'.$brandDomain.'_'.$brandId;
91 $result = BrandData::branchSearchHistory($uid, $records); 93 $result = BrandData::branchSearchHistory($uid, $records);
92 94
93 } while(false); 95 } while(false);