Authored by yyq

店铺首页链接

... ... @@ -136,14 +136,14 @@ const shopTopBannerBase = (data) => {
* @param data 装修数据
* @returns {{}}
*/
const navigationBar = (data, shopId, params) => {
const navigationBar = (data, shopId, params, domain) => {
params = params || {};
const gender = params.gender ? `&gender=${params.gender}` : '';
let shopNav = [
{
name: '店铺首页',
url: `/?navBar=0&shopId=${shopId}${gender}`
url: `/shop/${domain || ''}-${shopId}.html`
},
{
name: '全部商品',
... ... @@ -399,7 +399,7 @@ exports.getShopDecorator = (data, params, shopId, base) => {
Object.assign(dest, shopTopBanner(info));
},
navigationBar(info) {
Object.assign(dest, navigationBar(info, shopId, params));
Object.assign(dest, navigationBar(info, shopId, params, data.domain));
},
largeSlideImg(info) {
Object.assign(dest, largeSlideImg(info, shopId));
... ...
... ... @@ -79,6 +79,7 @@ function _getShopData(channel, params, shopInfo) {
// 店铺装修
if (result.decorator.code === 200) {
_.set(result, 'decorator.data.domain', shopInfo.shop_domain);
Object.assign(resData, shopHandler.getShopDecorator(result.decorator.data, params, shopId));
_.set(resData, 'shopTopBanner.brandIntro', {
... ... @@ -404,6 +405,7 @@ function getShopListInfoAsync(channel, params) {
// 店铺装修
if (result.decorator.code === 200) {
_.set(result, 'decorator.data.domain', _.get(result, 'shopInfo.data.shop_domain'));
Object.assign(resData, shopHandler.getShopDecorator(result.decorator.data, params, shopId));
// 设置shop nav选中状态
... ...