Authored by yyq

店铺首页链接

@@ -136,14 +136,14 @@ const shopTopBannerBase = (data) => { @@ -136,14 +136,14 @@ const shopTopBannerBase = (data) => {
136 * @param data 装修数据 136 * @param data 装修数据
137 * @returns {{}} 137 * @returns {{}}
138 */ 138 */
139 -const navigationBar = (data, shopId, params) => { 139 +const navigationBar = (data, shopId, params, domain) => {
140 params = params || {}; 140 params = params || {};
141 141
142 const gender = params.gender ? `&gender=${params.gender}` : ''; 142 const gender = params.gender ? `&gender=${params.gender}` : '';
143 let shopNav = [ 143 let shopNav = [
144 { 144 {
145 name: '店铺首页', 145 name: '店铺首页',
146 - url: `/?navBar=0&shopId=${shopId}${gender}` 146 + url: `/shop/${domain || ''}-${shopId}.html`
147 }, 147 },
148 { 148 {
149 name: '全部商品', 149 name: '全部商品',
@@ -399,7 +399,7 @@ exports.getShopDecorator = (data, params, shopId, base) => { @@ -399,7 +399,7 @@ exports.getShopDecorator = (data, params, shopId, base) => {
399 Object.assign(dest, shopTopBanner(info)); 399 Object.assign(dest, shopTopBanner(info));
400 }, 400 },
401 navigationBar(info) { 401 navigationBar(info) {
402 - Object.assign(dest, navigationBar(info, shopId, params)); 402 + Object.assign(dest, navigationBar(info, shopId, params, data.domain));
403 }, 403 },
404 largeSlideImg(info) { 404 largeSlideImg(info) {
405 Object.assign(dest, largeSlideImg(info, shopId)); 405 Object.assign(dest, largeSlideImg(info, shopId));
@@ -79,6 +79,7 @@ function _getShopData(channel, params, shopInfo) { @@ -79,6 +79,7 @@ function _getShopData(channel, params, shopInfo) {
79 79
80 // 店铺装修 80 // 店铺装修
81 if (result.decorator.code === 200) { 81 if (result.decorator.code === 200) {
  82 + _.set(result, 'decorator.data.domain', shopInfo.shop_domain);
82 Object.assign(resData, shopHandler.getShopDecorator(result.decorator.data, params, shopId)); 83 Object.assign(resData, shopHandler.getShopDecorator(result.decorator.data, params, shopId));
83 84
84 _.set(resData, 'shopTopBanner.brandIntro', { 85 _.set(resData, 'shopTopBanner.brandIntro', {
@@ -404,6 +405,7 @@ function getShopListInfoAsync(channel, params) { @@ -404,6 +405,7 @@ function getShopListInfoAsync(channel, params) {
404 405
405 // 店铺装修 406 // 店铺装修
406 if (result.decorator.code === 200) { 407 if (result.decorator.code === 200) {
  408 + _.set(result, 'decorator.data.domain', _.get(result, 'shopInfo.data.shop_domain'));
407 Object.assign(resData, shopHandler.getShopDecorator(result.decorator.data, params, shopId)); 409 Object.assign(resData, shopHandler.getShopDecorator(result.decorator.data, params, shopId));
408 410
409 // 设置shop nav选中状态 411 // 设置shop nav选中状态