dengjie commit : 代码完善
This commit is contained in:
@@ -64,7 +64,7 @@
|
||||
</view>
|
||||
<scroll-view scroll-y class="goods-list" @scrolltolower="reachGoodsBottom">
|
||||
<block v-for="(item1,index1) in goodsList" :key="index1">
|
||||
<view class="goods-item">
|
||||
<view class="goods-item" @click="toDetailPage(item1)">
|
||||
<view class="left">
|
||||
<view class="image">
|
||||
<image :src="item1.imageF" mode="scaleToFill"
|
||||
@@ -225,6 +225,12 @@
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
//点击goodsItem跳转到详情页
|
||||
toDetailPage(item1) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/detail/productsDetail/productsDetail?id=' + item1.id
|
||||
})
|
||||
},
|
||||
goSearch(param) {
|
||||
this.queryParam = param
|
||||
const index = this.recentRecordList.findIndex(item => {
|
||||
@@ -308,10 +314,11 @@
|
||||
this.$apiServe.getCategories().then(res => {
|
||||
this.categoryList = res.data.data.map((item, index) => {
|
||||
item.icon = this.imgUrl + item.icon
|
||||
if(selectedCategoryId && selectedCategoryId === item.id) {
|
||||
if (selectedCategoryId && selectedCategoryId === item.id) {
|
||||
item.active = true
|
||||
this.selectedCategory = index
|
||||
} else if (selectedCategoryId === null && this.selectedCategory && this.selectedCategory === index) {
|
||||
} else if (selectedCategoryId === null && this.selectedCategory && this
|
||||
.selectedCategory === index) {
|
||||
item.active = true
|
||||
active = true
|
||||
} else if (selectedCategoryId === null && !this.selectedCategory && !index) {
|
||||
|
||||
Reference in New Issue
Block a user