index.vue
2.07 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<template>
<div>
<!-- H5唤起App组件 -->
<call-app-box v-if="!isCNLive.value"
:callApps="$parent.callApps">
</call-app-box>
<div class="box">
<div class="btn_box">
<div @click="link(1)" class="btn">
</div>
<div @click="link(2)" class="btn">
</div>
<!--<div class="text">-->
<!--</div>-->
</div>
<div class="bottom_box">
<div class="bottom_backg">
</div>
</div>
</div>
</div>
</template>
<script>
import callAppBox from "@/components/callAppBox/callAppBox";
export default {
name: 'index',
data () {
return {
}
},
components: {
callAppBox
},
created(){
document.title = "大众体育"
},
mounted(){
// 获取并设置分享参数
this.$parent.getShareData({
type: 23,
id: 1,
url: ""
});
},
methods: {
link(index){
// 区分app内点击还是app外点击
if(!this.isCNLive.value){
// 提示app内打开
this.$parent.callApp()
}else {
var items;
if(index==1){
items={
"title": "线上赛事",
"type": "29",
"shop_type": "",
"to": "0"
}
}else if(index==2){
items={
"title": "线下赛事",
"type": "30",
"shop_type": "{\"id\":\"3\",\"title\":\"\\u7ebf\\u4e0b\\u8d5b\\u4e8b\"}",
"to": this.getParams(this.mode).shop.apiAddress + "/html/sports-china/1/#/",
}
}
this.$parent.gotoDetail(items)
}
}
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style rel="stylesheet/less" lang="less" scoped>
@import "./index";
</style>