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