mycollect.vue
2.7 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
87
88
89
90
91
92
93
94
95
96
97
98
99
<template>
<div class="container">
<div class="coursenav collectnav flexone">
<div
class="coursenavleft"
:class="selnav == 0 ? 'selactive' : ''"
:data-id="0"
@click="selectnav"
>帖子</div>
<div
class="coursenavleft"
:class="selnav == 1 ? 'selactive' : ''"
:data-id="1"
@click="selectnav"
>课程</div>
<div
class="coursenavleft"
:class="selnav == 2 ? 'selactive' : ''"
:data-id="2"
@click="selectnav"
>活动</div>
</div>
<!-- 课程 -->
<div class="coursebox" v-if="selnav ==1">
<div class="courseboxitem">
<div class="coursenameimg">
<img src="../../../assets/course.png" alt />
</div>
<div class="coursetext">
<div class="coursename">一个月减重20斤,健康减重没有副作用</div>
<div class="courseteacher">讲师:孙俪</div>
</div>
</div>
<div class="courseboxitem">
<div class="coursenameimg">
<img src="../../../assets/course.png" alt />
</div>
<div class="coursetext">
<div class="coursename">一个月减重20斤,健康减重没有副作用</div>
<div class="courseteacher">讲师:孙俪</div>
</div>
</div>
<div class="courseboxitem">
<div class="coursenameimg">
<img src="../../../assets/course.png" alt />
</div>
<div class="coursetext">
<div class="coursename">一个月减重20斤,健康减重没有副作用</div>
<div class="courseteacher">讲师:孙俪</div>
</div>
</div>
<div class="courseboxitem">
<div class="coursenameimg">
<img src="../../../assets/course.png" alt />
</div>
<div class="coursetext">
<div class="coursename">一个月减重20斤,健康减重没有副作用</div>
<div class="courseteacher">讲师:孙俪</div>
</div>
</div>
</div>
<!-- 活动 -->
<div class="activitybox" v-if="selnav ==2">
<div class="activityimg">
<img src="../../../assets/spring.png" alt />
</div>
<div class="activityimg">
<img src="../../../assets/spring.png" alt />
</div>
<div class="activityimg">
<img src="../../../assets/spring.png" alt />
</div>
<div class="activityimg">
<img src="../../../assets/spring.png" alt />
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
selnav: 0
}
},
methods: {
selectnav(e) {
this.selnav = e.currentTarget.dataset.id;
}
}
}
</script>
<style scoped>
@import "../../../style/usercenter.css";
</style>