Authored by 周少峰

Merge branch 'hotfix/brandList'

@@ -173,16 +173,33 @@ const getBrandViewList = (channel, start, length) => { @@ -173,16 +173,33 @@ const getBrandViewList = (channel, start, length) => {
173 let listTmp = []; 173 let listTmp = [];
174 174
175 _.forEach(subValue, ssubValue => { 175 _.forEach(subValue, ssubValue => {
  176 + let extQs = {};
  177 +
176 // 为品牌名称 178 // 为品牌名称
177 let href; 179 let href;
178 180
179 if (switchParams.channelType === 1) { 181 if (switchParams.channelType === 1) {
180 - href = helpers.urlFormat('', {gender: '1,3'}, ssubValue.brand_domain); 182 + Object.assign(extQs, {gender: '1,3'});
181 } else if (switchParams.channelType === 2) { 183 } else if (switchParams.channelType === 2) {
182 - href = helpers.urlFormat('', {gender: '2,3'}, ssubValue.brand_domain);  
183 - } else {  
184 - href = helpers.urlFormat('', '', ssubValue.brand_domain); 184 + Object.assign(extQs, {gender: '2,3'});
  185 + }
  186 +
  187 + switch (ssubValue.type * 1) {
  188 + case 1:
  189 + extQs = {query: ssubValue.brand_domain};
  190 + ssubValue.brand_domain = 'search';
  191 + break;
  192 + case 2:
  193 + if (ssubValue.shop_id) {
  194 + Object.assign(extQs, {shopId: ssubValue.shop_id});
  195 + }
  196 + break;
  197 + default:
  198 + break;
185 } 199 }
  200 +
  201 + href = helpers.urlFormat('', extQs, ssubValue.brand_domain);
  202 +
186 let brandItem = { 203 let brandItem = {
187 name: ssubValue.brand_name, 204 name: ssubValue.brand_name,
188 key: ssubValue.id, 205 key: ssubValue.id,