修改首页视频跳转问题

This commit is contained in:
cc_zbp 2023-06-05 15:05:31 +08:00
parent b4caf3d5f9
commit 9d9762bd80

View File

@ -183,13 +183,21 @@
} }
}) })
}, },
getGoods: function() { getGoods: function(item) {
graphicLstApi(this.where).then(res => { graphicLstApi(this.where).then(res => {
this.cateGoods.push(...res.data.list) this.cateGoods.push(...res.data.list)
if (res.data.list.length < this.where.limit) { if (res.data.list.length < this.where.limit) this.status = 'nomore'
this.status = 'nomore'
}
if (this.where.page == 1 && res.data.list.length <= 0) this.emptyShow = true if (this.where.page == 1 && res.data.list.length <= 0) this.emptyShow = true
if (item.index == 1) {
uni.navigateTo({
// #ifdef MP || H5
url: '/pages/short_video/nvueSwiper/index?id=' + this.cateGoods[0].community_id
// #endif
// #ifdef APP
url: `/pages/short_video/appSwiper/index?id=${this.cateGoods[0].community_id}`
// #endif
})
}
}) })
}, },
/*获取分类列表*/ /*获取分类列表*/
@ -208,19 +216,10 @@
this.cateGoods = [] this.cateGoods = []
this.where.category_id = item.category_id this.where.category_id = item.category_id
this.where.page = 1 this.where.page = 1
this.getGoods() this.getGoods(item)
this.street_id = item.id this.street_id = item.id
this.tabsData.tabsActive = item.index this.tabsData.tabsActive = item.index
if (item.index == 1) {
uni.navigateTo({
// #ifdef MP || H5
url: '/pages/short_video/nvueSwiper/index?id=' + this.cateGoods[0].community_id
// #endif
// #ifdef APP
url: `/pages/short_video/appSwiper/index?id=${this.cateGoods[0].community_id}`
// #endif
})
}
}, },
selfLocation() { selfLocation() {
const that = this const that = this