Authored by 姜枫

fix bugs

... ... @@ -142,13 +142,17 @@ const favorite = {
if (retData.brandList) {
retData.brandList.forEach(b => {
b.newProduct.forEach(p => {
p.url = `${config.siteUrl}/product/pro_${p.productId}_${p.goods[0].id}/${p.cnAlphabet}.html`; // eslint-disable-line
});
b.newProduct.push({
more: true
});
b.newProduct = _.chunk(b.newProduct, 4);
if (b.newProduct && b.newProduct.length > 0) {
b.newProduct.forEach(p => {
p.url = `${config.siteUrl}/product/pro_${p.productId}_${p.goods[0].id}/${p.cnAlphabet}.html`; // eslint-disable-line
});
b.newProduct.push({
more: true
});
b.newProduct = _.chunk(b.newProduct, 4);
} else {
b.noNewProduct = true;
}
});
}
ret.content.favorite.data = retData;
... ...
... ... @@ -17,49 +17,58 @@
{{brandName}}
</div>
<div class="tool-area clearfix">
<a class="btn white" href="/product/shop/{{brandDomain}}{{#if shopId}}?shopId={{shopId}}{{/if}}" target="_blank">去店铺页</a>
<a class="btn white"
href="/product/shop/{{brandDomain}}{{#if shopId}}?shopId={{shopId}}{{/if}}"
target="_blank">去店铺页</a>
<span class="btn white cancel">取消收藏</span>
</div>
</div>
<div class="brand-products slide-container">
<div class="slide-switch">
<a class="prev" href="javascript:;">
<span class="iconfont">&#xe62c;</span>
</a>
<a class="next" href="javascript:;">
<span class="iconfont">&#xe629;</span>
</a>
</div>
<div class="slide-wrap">
<ul>
{{#each newProduct}}
<li class="clearfix">
{{#each this}}
{{#if more}}
<div class="goods-more">
<a href="/product/shop/{{../../brandDomain}}{{#if ../../shopId}}?shopId={{../../shopId}}{{/if}}" target="_blank">
<div class="more-text">MORE</div>
<p>查看更多</p>
</a>
</div>
{{^}}
<div class="goods-info">
<a href="{{url}}" target="_blank">
<img class="lazy thumb"
src="{{image defaultImages 148 196}}"
style="display: block;">
<div class="desc">
<span class="name">{{productName}}</span>
<p class="price">¥{{round salesPrice 2}}</p>
</div>
</a>
</div>
{{/if}}
{{/each}}
</li>
{{/each}}
</ul>
</div>
{{#if noNewProduct}}
<p class="no-product-info">
暂无新品, 去<a href="/{{siteUrl}}/brand" target="_blank">名牌频道</a>看看吧
</p>
{{^}}
<div class="slide-switch">
<a class="prev" href="javascript:;">
<span class="iconfont">&#xe62c;</span>
</a>
<a class="next" href="javascript:;">
<span class="iconfont">&#xe629;</span>
</a>
</div>
<div class="slide-wrap">
<ul>
{{#each newProduct}}
<li class="clearfix">
{{#each this}}
{{#if more}}
<div class="goods-more">
<a href="/product/shop/{{../../brandDomain}}{{#if ../../shopId}}?shopId={{../../shopId}}{{/if}}"
target="_blank">
<div class="more-text">MORE</div>
<p>查看更多</p>
</a>
</div>
{{^}}
<div class="goods-info">
<a href="{{url}}" target="_blank">
<img class="lazy thumb"
src="{{image defaultImages 148 196}}"
style="display: block;">
<div class="desc">
<span class="name">{{productName}}</span>
<p class="price">¥{{round salesPrice 2}}</p>
</div>
</a>
</div>
{{/if}}
{{/each}}
</li>
{{/each}}
</ul>
</div>
{{/if}}
</div>
</div>
{{/each}}
... ...
... ... @@ -161,6 +161,7 @@ const ShopService = {
let brandInfo = yield BrandService.getBrandInfo(info.brandId, uid);
info.name = brandInfo.brandName;
// info.info = brandInfo.brandIntro;
info.btnName = '品牌介绍';
info.isFavorite = brandInfo.isFavorite === 'Y';
... ...
... ... @@ -304,7 +304,6 @@ var YohoListPage = {
});
},
openBrandMulitChoose: function() {
console.log(1);
$('.yoho-product-list .mulit-choose').hide();
$('.input-radio', this.brandsDoc).check({
type: 'checkbox'
... ... @@ -361,7 +360,6 @@ var YohoListPage = {
first = first.toLowerCase();
if (letter === '0-9') {
console.log(first);
if ((first >= 'a' && first <= 'z') || (first >= 'A' && first <= 'Z')) {
$(this).hide();
} else {
... ...
... ... @@ -72,6 +72,15 @@
width: 685px;
position: relative;
}
.no-product-info {
text-align: center;
margin-top: 65px;
a {
color: #379ed6;
}
}
}
.goods-info {
... ...