Authored by biao

Merge branch 'release/1.0' of http://git.yoho.cn/fe/yoho-blk into release/1.0

... ... @@ -82,7 +82,7 @@ const favorite = {
p.stateText = '已售罄';
}
p.url = `/product/pro_${p.productId}_${p.goodsId}/${p.cnAlphabet}.html`;
p.imageUrl = p.image;
p.imageUrl = p.image.replace('imageMogr2', 'imageMogr1');
});
ret.content.favorite.data = retData;
... ...
... ... @@ -127,16 +127,18 @@ const ShopService = {
brandId: domainInfo.id,
shopId: ''
};
let brandId = domainInfo.id;
if (domainInfo.shopId) {
let shopId = domainInfo.shopId;
let shopIntro = yield ShopService.getShopIntro(shopId, uid);
let brandInfo = yield BrandService.getBrandInfo(brandId, uid);
info.shopId = shopId;
info.name = shopIntro.shopName;
info.info = shopIntro.shopIntro;
info.btnName = '品牌介绍';
info.isFavorite = shopIntro.isFavorite === 'Y';
info.isFavorite = brandInfo.isFavorite === 'Y';
let shopData = yield Promise.all([ShopService.getShopDecorator(shopId),
ShopService.getShopSecondSorts(domainInfo.id, shopId)]);
... ... @@ -152,7 +154,6 @@ const ShopService = {
info.resources = resources;
info.menus = shopMenu(domain, resources.navigationBar);
} else {
let brandId = domainInfo.id;
let brandInfo = yield BrandService.getBrandInfo(brandId, uid);
info.name = brandInfo.brandName;
... ...
... ... @@ -12,11 +12,11 @@ function _favBack(data) {
}
}
function _favShop(shopId, isAdd) {
$.post('/product/shop/togglecollect', {shopId: shopId, type: isAdd ? '' : 'add'}, function(data) {
_favBack(data);
});
}
// function _favShop(shopId, isAdd) {
// $.post('/product/shop/togglecollect', {shopId: shopId, type: isAdd ? '' : 'add'}, function(data) {
// _favBack(data);
// });
// }
function _favBrand(brandId, isAdd) {
$.post('/product/brand/togglecollect', {brandId: brandId, type: isAdd ? '' : 'add'}, function(data) {
... ... @@ -26,13 +26,8 @@ function _favBrand(brandId, isAdd) {
$('#brand-fav').click(function() {
var $banner = $(this).parents('.brand-banner');
var shopId = $banner.data('shop');
var brandId = $banner.data('brand');
var isAdd = $(this).hasClass('coled');
if (shopId) {
_favShop(shopId, isAdd);
} else if (brandId) {
_favBrand(brandId, isAdd);
}
_favBrand(brandId, isAdd);
});
... ...
... ... @@ -22,6 +22,7 @@
width: 100%;
height: 100%;
margin-top: -1px;
margin-left: 0.1px;
}
}
... ...