Authored by 姜枫

fix shop index

... ... @@ -374,7 +374,7 @@ const helpers = {
goodsList.forEach(o => {
o.url = `${config.siteUrl}/product/pro_${g.productId}_${o.goodsId}/${o.cnAlphabet}.html`;
if (q.color && q.color === o.colorId) {
if (q && q.color && q.color === o.colorId) {
defaultImages = o.imagesUrl;
}
});
... ...
... ... @@ -40,6 +40,12 @@ function _paramHanlde(obj) {
}
const Search = {
/**
* 搜索接口调用
* @param params
* @returns {*}
*/
queryProduct(params) {
let finalParams = {
... ...
... ... @@ -133,8 +133,8 @@ const ShopService = {
info.sorts = sorts;
if (resources.shopTopBanner_base && resources.shopTopBanner_base.length > 0) { // eslint-disable-line
info.banner = resources.shopTopBanner_base[0].shopSrc; // eslint-disable-line
if (resources.shopTopBanner) { // eslint-disable-line
info.banner = resources.shopTopBanner.detailSrc; // eslint-disable-line
}
info.resources = resources;
info.menus = shopMenu(domain);
... ...
... ... @@ -12,24 +12,20 @@
{{# banner.resources}}
{{#if newProducts}}
{{#if largeSlideImg}}
<div class="center-content clearfix slide-warp">
{{#each largeSlideImg}}
{{#each data}}
<div class="slide-left">
<a href="{{url}}">
<img src="{{src}}" alt="">
</a>
</div>
{{/each}}
<div class="slide-left">
<a href="{{url}}">
<img src="{{src}}" alt="">
</a>
</div>
{{/each}}
<div class="slide-right">
{{#each oneRowTwoColImages}}
{{#each data}}
<a href="{{url}}">
<img src="{{src}}" alt="">
</a>
{{/each}}
<a href="{{url}}">
<img src="{{src}}" alt="">
</a>
{{/each}}
</div>
</div>
... ... @@ -116,15 +112,16 @@
<div class="editorial-wrap clearfix">
{{#each editorial}}
<div class="editorial-info">
<a href="{{url}}" target="_blank">
<img class="lazy thumb" alt="{{title}}" data-original="{{image src 368 340}}" width="368" height="340" style="display: block;">
</a>
<div class="desc">
<a class="name" href="{{url}}" target="_blank">{{title}}</a>
<p class="intro">{{intro}}</p>
<div class="editorial-info">
<a href="{{url}}" target="_blank">
<img class="lazy thumb" alt="{{title}}" data-original="{{image src 368 340}}" width="368"
height="340" style="display: block;">
</a>
<div class="desc">
<a class="name" href="{{url}}" target="_blank">{{title}}</a>
<p class="intro">{{intro}}</p>
</div>
</div>
</div>
{{/each}}
</div>
</div>
... ...