Authored by 姜枫

fix style

... ... @@ -21,6 +21,7 @@ const shop = {
let domain = req.params.domain;
let uid = req.user.uid;
let shopId = req.query.shopId;
let channel = req.query._Channel || req.cookies._Channel || 'men';
let data = {
module: 'product',
page: 'shop',
... ... @@ -30,7 +31,7 @@ const shop = {
ShopData.getShopHeadData(domain, shopId, uid).then(result => {
if (result.shopId) {
let nav = [DataHelper.getChannelNav()];
let nav = [DataHelper.getChannelNav(channel)];
nav.push({
name: result.name
... ... @@ -104,7 +105,7 @@ const shop = {
q.order = q.order || 's_n_desc';
q.page = parseInt(q.page || 1, 10);
q.yh_channel = channel;
// q.yh_channel = channel;
ShopData.getShopHeadData(domain, shopId, uid).then(result => {
data.banner = result;
... ...
... ... @@ -441,7 +441,7 @@ const helpers = {
goodsId = goodsList[0].goodsId;
goodsList.forEach(o => {
o.url = `${config.siteUrl}/product/pro_${g.productId}_${o.goodsId}/${o.cnAlphabet}.html`;
o.url = `${config.siteUrl}/product/pro_${g.productId}_${o.goodsId}/${g.cnAlphabet}.html`;
if (q && q.color && q.color === o.colorId) {
defaultImages = o.imagesUrl;
}
... ...
... ... @@ -123,6 +123,7 @@ const ShopService = {
getShopHeadData(domain, shopId, uid) {
return co(function*() {
let info = {};
let favType = 'brand';
if (shopId) {
info.shopId = shopId;
... ... @@ -157,6 +158,7 @@ const ShopService = {
}
info.resources = resources;
info.menus = shopMenu(domain, resources.navigationBar);
favType = 'shop';
}
if (info.brandId) {
let brandInfo = yield BrandService.getBrandInfo(info.brandId, uid);
... ... @@ -165,9 +167,13 @@ const ShopService = {
// info.info = brandInfo.brandIntro;
info.btnName = '品牌介绍';
info.isFavorite = info.isFavorite || (brandInfo.isFavorite === 'Y');
if (!info.isFavorite && brandInfo.isFavorite === 'Y') {
favType = 'brand';
}
info.isFavorite = info.isFavorite || (brandInfo.isFavorite === 'Y')
info.banner = info.banner || info.brandBanner;
}
info.favType = favType;
return info;
})();
}
... ...
{{# banner}}
<div class="brand-banner" data-brand="{{brandId}}" data-shop="{{shopId}}">
<div class="brand-banner" data-brand="{{brandId}}" data-shop="{{shopId}}" data-type="{{favType}}">
<div class="brand-img" style="height:150px; background: url('{{image banner 1150 150}}')"></div>
{{#if showShopName}}
... ...
... ... @@ -28,11 +28,14 @@ $('#brand-fav').click(function() {
var $banner = $(this).parents('.brand-banner');
var shopId = $banner.data('shop');
var brandId = $banner.data('brand');
var type = $banner.data('type');
var isAdd = $(this).hasClass('coled');
if (shopId) {
if (type === 'shop') {
_favShop(shopId, isAdd);
} else if (brandId) {
} else if (type === 'brand') {
_favBrand(brandId, isAdd);
} else {
_favBrand(brandId, isAdd);
}
});
... ...
... ... @@ -353,6 +353,11 @@
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
a {
line-height: 17px;
font-size: 12px;
}
}
.goods-price {
... ... @@ -424,7 +429,7 @@
height: 800px;
.tip-search {
margin-top: 100px;
padding-top: 100px;
text-align: center;
.iconfont {
... ...
... ... @@ -54,6 +54,7 @@
a {
font-size: 12px;
font-weight: 500;
}
.iconfont {
... ...