Commit d98137e4 authored by 张伯涛's avatar 张伯涛

首页轮播图点击事件

parent 4c87b98a
......@@ -9,12 +9,14 @@
<!-- </view>-->
<!-- </u-col>-->
<u-col>
<view bindtap="navigateToPage">
<u-swiper
:list="topicList"
indicator
indicatorMode="line"
circular
></u-swiper>
</view>
</u-col>
</u-row>
<view style="padding-bottom: 30rpx;">
......@@ -141,6 +143,16 @@ import USwiper from "../../uview-ui/components/u-swiper/u-swiper.vue";
this.queryVideo()
this.queryTopic();
},
navigateToPage(e) {
// 获取点击的u-swiper组件的索引
const index = e.currentTarget.dataset.index;
// 根据索引或其他逻辑确定跳转的页面
const link = this.topicList[index].url;
// 执行页面跳转
wx.navigateTo({
url: link,
});
},
sectionChange(index) {
this.curNow = index;
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment