expert.vue
1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<template>
<view>
<view :style="'height:' + common.statusBarH + 'px;'"></view>
<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>
<customWebview :src="tabsUrl[current]" :top="webview_top" :height="webview_height" ref="Webview">
</customWebview>
</z-swiper>
</view>
</template>
<script>
import customWebview from '../../components/customWebview.vue'
import common from '@/utils/common.js'
export default {
components: {
customWebview
},
data() {
return {
common,
tabs: ["快乐8", "福彩3D", "排列3", "双色球", "大乐透", "排列5", "足球"],
current: 0,
webview_top: 0,
webview_height: uni.getSystemInfoSync().windowHeight,
tabsUrl: [
'https://app.ydniu.com/experts/kl8?zqe&app_header=true',
'https://app.ydniu.com/experts/sd?zqe&app_header=true',
'https://app.ydniu.com/experts/pl3?zqe&app_header=true',
'https://app.ydniu.com/experts/ssq?zqe&app_header=true',
'https://app.ydniu.com/experts/dlt?zqe&app_header=true',
'https://app.ydniu.com/experts/pl5?zqe&app_header=true',
'https://app.ydniu.com/experts/zq?zqe&app_header=true'
]
}
},
onLoad() {
this.webview_top = 88
this.webview_height = uni.getSystemInfoSync().safeArea.bottom - this.webview_top
},
methods: {
changeTab(index) {
console.log('当前选中的项:' + index)
var ref = this.$refs.Webview
this.current = index
console.log(this.$refs.Webview)
ref.onRefreshInfo(this.tabsUrl[this.current])
}
}
}
</script>
<style>
.tab_c {
/* position: fixed; */
z-index: 999;
}
</style>