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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<template>
<div>
<div class="contentBox med" v-if="medList.length>0">
<div class="commonTitle">
<span class="line"></span>
<span class="title">磨耳朵</span>
<span class="tip">每天10分钟 成长看得见</span>
<div class="more"></div>
</div>
<div class="content">
<div class="contentItem" ref="item" v-for="(item,index) in medList" @click="goMed(index)">
<img :src="item.url" alt="">
<div class="white"></div>
<div class="text">
<div class="title">{{item.title}}</div>
<div class="enTitle">{{item.sub_title}}</div>
<div class="lookData"><i class="iconfont icon-yanjing"></i>{{item.watch_num}}人</div>
</div>
</div>
<div class="btn" ref="btn" @click="toOut">
获取更多资源
</div>
</div>
</div>
<audio-page ref="audioPage" v-if="showObj.audio.length>0" sc="1" v-show="showObj.show" :showObj="showObj"/>
</div>
</template>
<script>
import {
bannerListApi
} from "../../service/api";
import audioPage from '../collection/audio'
export default {
name: "med",
components: {
audioPage
},
data(){
return{
medList:[],
showObj:{
audio:[],
audioIndex:0,
show:false
},
}
},
created() {
this.getBannerListApi();
},
methods:{
getBannerListApi() {
let json = {
limit: 999,
page: 1
};
bannerListApi(2,json).then(res=>{
this.medList = res.list
this.showObj.audio = res.list
})
},
goMed(index){
this.showObj.audioIndex = index;
this.showObj.show = true
this.$refs.audioPage.onPlay()
this.$sa.quick('trackHeatMap',this.$refs.item)
},
toOut(){
this.$sa.quick('trackHeatMap',this.$refs.btn)
window.location.href="https://wx840a79781fa6f66d.h5.xiaoe-tech.com/content_page/eyJ0eXBlIjozLCJyZXNvdXJjZV90eXBlIjoiIiwicmVzb3VyY2VfaWQiOiIiLCJwcm9kdWN0X2lkIjoicF81YmExZTc4YTcxODAyX0w4QXZxcGZpIiwiYXBwX2lkIjoiYXBwYU5RTGZrdEgzNzE3In0"
}
}
}
</script>
<style scoped lang="less">
@import "../../util/public";
.contentBox{
padding: 10 * @toVw 20 * @toVw;
background: white;
margin: 10px 0;
.commonTitle{
display: flex;
vertical-align: top;
.line{height: 20px;width: 4px;border-radius:2px;margin-right: 10px;margin:auto 10px auto 0;}
.more{height: 33px;line-height:43px;font-size: 12px;color: #666666;flex:1;text-align:right;overflow: hidden;
.iconfont{font-size: 14px;color: #666666;}
}
.title{font-size: 24px;height: 33px;line-height: 33px;display: inline-block;margin-right: 10px;font-weight: bold;}
.tip{font-size: 12px;color: #999999;height: 33px;display: inline-block;line-height: 43px;overflow: hidden;}
}
.lookData{font-size: 12px;
.iconfont{font-size: 12px;}
}
.btn{
width: 100%;height: 47*@toVw;background:white;color: black;line-height:47*@toVw; border-radius: 4px;border-radius:23*@toVw; margin-top: 27*@toVw;border: 2px solid black;
}
}
.med{
.commonTitle{
.line{
background: #4A90E2;
}
}
.content{
display: flex;
text-align: center;
flex-wrap:wrap;
.contentItem{
width: 50%;
height: 191 * @toVw;
margin-top: 18px;
position: relative;
img{width: 107 * @toVw;height:107 * @toVw;position: absolute;top: 0;left: 27 * @toVw;border-radius:53 * @toVw ; }
.white{position: absolute;background: white;width: 20px;height: 20px;border-radius: 10px;top:43.5 * @toVw ; left: 70.5 * @toVw;}
.text{
width: 161 * @toVw;
height: 161 * @toVw;
margin-top: 30 * @toVw;
color: #999999;
padding-top: 90 * @toVw;
box-shadow: 1px 2px 5px 0px rgba(0,0,0,0.2);
border-radius:16px;
box-sizing: border-box;
.title{font-size: 14px;color: black;}
.enTitle{font-size: 12px;line-height: 17px;}
}
}
}
}
</style>