Commit d050f146 吴良建

适配微信小程序

1 个父辈 5c97f905
<template>
<view>
<v-tabs class="tab_c" v-model="current" :tabs="tabs" @change="changeTab"
<v-tabs class="tab_c" v-model="current" :tabs="tabs" @change="changeTab" fixed="true"
line-height="8rpx" line-color="#04764E"
color="#AAAAAA" activeColor="#04764E" height="88rpx"></v-tabs>
<view style="height: 100rpx; width: 100%;">
<text>站位组件</text>
</view>
<z-swiper ref="zSwiper" v-model="tabs" @slideChange="onSwiperChange"
:options="options">
......@@ -19,7 +15,9 @@
</view>
<view style="width: 100vw; height: 80vh; align-items: center; display: flex; justify-content: center;"
v-else>
<text>暂无比赛</text>
<image style="height: 460rpx; width: 460rpx;" src="../../static/pic_zanwushuju@2x.png"></image>
</view>
</z-swiper-item>
......@@ -121,7 +119,6 @@
this.match_map.set("完赛", wancheng)
for (let m of matchs) {
if (m.GameName) {
var list = this.match_map.get(m.GameName)
......@@ -191,7 +188,7 @@
}
},
onSwiperChange(swiper) {
this.current = swiper.activeIndex
this.current = this.$refs.zSwiper.swiper.activeIndex
console.log("---》" + this.tabs[this.current] +"--"+ this.match_map.get(this.tabs[this.current]))
console.log('onSwiperChange:' + swiper.activeIndex)
var ref = this.$refs.MatchListRef[this.current]
......@@ -241,7 +238,7 @@
}
.tab_c {
position: fixed;
/* position: fixed; */
z-index: 4;
}
</style>
......@@ -50,7 +50,9 @@
</view>
<view v-else
style="width: 100%; height: 400px; display: flex; justify-content: center; align-items: center;">
style="width: 100%; height: 400px; display: flex;
justify-content: center; align-items: center;">
<text style="color: #999999; font-size: 16px;">暂无情报</text>
</view>
......@@ -86,11 +88,11 @@
},
methods: {
onSwiperChange(swiper) {
this.select_index = swiper.activeIndex
this.select_index = this.$refs.zSwiper.swiper.activeIndex
this.$refs.zSwiperInfo.swiper.slideTo(this.select_index); //切换到第一个slide,速度为1秒
},
onSwiperInfoChange(swiper) {
this.select_index = swiper.activeIndex
this.select_index = this.$refs.zSwiperInfo.swiper.activeIndex
this.$refs.zSwiper.swiper.slideTo(this.select_index); //切换到第一个slide,速度为1秒
},
deal_match_time(match) {
......
......@@ -15,7 +15,7 @@
<text style="font-size: 36rpx; color: #333333; font-weight: 600;">
{{ this.hasLogin ? this.userName : '登陆/注册' }}</text>
<view style="margin-top: 15rpx;">
<text style="font-size: 26rpx; color: #999999;">欢迎来到千嗨体育</text>
<text style="font-size: 26rpx; color: #999999;">欢迎来到金球体育</text>
</view>
</view>
......
......@@ -69,12 +69,13 @@
},
methods: {
onSwiperChange(swiper) {
this.select_index = swiper.activeIndex
console.log(swiper)
this.select_index = this.$refs.zSwiper.swiper.activeIndex
this.$refs.child[this.select_index].childmethods(this.match_list[this.select_index]) //子组件$on中的名字
this.$refs.zSwiperInfo.swiper.slideTo(this.select_index); //切换到第一个slide,速度为1秒
},
onSwiperInfoChange(swiper) {
this.select_index = swiper.activeIndex
this.select_index = this.$refs.zSwiperInfo.swiper.activeIndex
this.$refs.child[this.select_index].childmethods(this.match_list[this.select_index]) //子组件$on中的名字
this.$refs.zSwiper.swiper.slideTo(this.select_index); //切换到第一个slide,速度为1秒
},
......@@ -138,6 +139,7 @@
this.select_index = 0
}
console.log("==========>>>", JSON.stringify(this.match_list))
this.$refs.zSwiper.swiper
}
}
</script>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!