|
@@ -38,8 +38,8 @@
|
|
|
<view class="core-category">
|
|
|
<swiper class="core-category-swiper" :autoplay="false">
|
|
|
<swiper-item class="swiper-item" v-for="(item, index) in classifyIndex == 0 ? classifyListFilter : classifyList[classifyIndex].list" :key="index">
|
|
|
- <view class="swiper-item__content" v-for="(items, indexs) in item" :key="indexs" @click="toTagGoods(items)">
|
|
|
- <image :src="items.picUrl" mode="aspectFit"></image>
|
|
|
+ <view class="swiper-item__content" v-for="(items, indexs) in item" :key="indexs">
|
|
|
+ <image :src="items.picUrl" mode="aspectFit" @click="toCategoryGoods(index, indexs)"></image>
|
|
|
<view class="name">{{ items.name }}</view>
|
|
|
</view>
|
|
|
</swiper-item>
|
|
@@ -289,7 +289,16 @@
|
|
|
// 商品标签
|
|
|
toTagGoods(item) {
|
|
|
uni.navigateTo({
|
|
|
- url: `/packageGoods/goods/list?name=${ item.name }&tagIds=${ item.tagId ? item.tagId : '' }&categoryId=${ item.categoryId ? item.categoryId : '' }`
|
|
|
+ url: `/packageGoods/goods/list?name=${ item.name }&tagIds=${ item.tagId ? item.tagId : '' }`
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ // 商品分类
|
|
|
+ toCategoryGoods(index, indexs) {
|
|
|
+ let list = this.classifyIndex == 0 ? this.classifyListFilter : this.classifyList[this.classifyIndex].list
|
|
|
+ let item = list[index][indexs]
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/packageGoods/goods/list?name=${ item.name }&categoryId=${ item.categoryId ? item.categoryId : '' }`
|
|
|
})
|
|
|
},
|
|
|
},
|