fanfan 5 months ago
parent ff7604a3d6
commit c36c15e931
  1. 8
      pages/shopList/shopPage.vue

@ -58,8 +58,10 @@
<view class="first-cate">
<scroll-view class="first-cate-tabs" scroll-y>
<view v-for="(item, index) in goodsCate" :key="index" class="cate-item" :class="{
active: firstCate === item.category_id
}" @click="firstCate = item.category_id">
active: firstCate === item.category_id,
prev: goodsCate[index + 1] && goodsCate[index + 1].category_id === firstCate,
next: goodsCate[index - 1] && goodsCate[index - 1].category_id === firstCate,
}" @click="firstCate = item.category_id;secondCate = '';">
{{ item.name }}
</view>
</scroll-view>
@ -282,7 +284,7 @@
const param = {
sortType: this.activeFilter,
sortPrice: this.filterDirection === 'DESC' ? 1 : 0,
categoryId: this.firstCate>0?this.firstCate:'',
categoryId: this.firstCate > 0 ? this.firstCate : '',
merchantId: this.id,
page: this.page++,
}

Loading…
Cancel
Save