center.vue
3.92 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
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<template>
<div class="user_center">
<div class="header">
<div class="header_left"></div>
<div class="header_right">
<div class="right_txt">
<div class="nick">凝视你的目光</div>
<div class="phone">183****8924</div>
</div>
<div class="iconfont iconright"></div>
</div>
</div>
<div class="center_menu_list">
<van-cell title="我的消息" center is-link to="/user/message" :icon="imgList.user" value-class="right_content">
<template #default>
<div class="dot" v-if="GIsLogin"></div>
</template>
</van-cell>
<van-cell title="我的收藏" center is-link to="/user/collect" :icon="imgList.user" />
<van-cell title="我的学习" center is-link @click="jumpStudyPage" :icon="imgList.user" value-class="right_content" />
<van-cell title="常见问题" center is-link to="/user/question" :icon="imgList.user" />
<van-cell title="意见反馈" center is-link to="/user/feedback" :icon="imgList.user" />
<van-cell title="关于协会" center is-link to="/user/about" :icon="imgList.user" value-class="right_content">
<template #default>
<div v-if="GIsLogin">版本2.1</div>
</template>
</van-cell>
<van-cell title="设置" center is-link to="/user/setting" :icon="imgList.user" />
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
export default {
name: 'Center',
data() {
return {
imgList: {
user: require('@/assets/icon/user_question.png')
},
menuList: [
{
icon: require('@/assets/icon/user_question.png'),
title: '我的收藏',
url: '/user/collect'
},
{
icon: require('@/assets/icon/user_question.png'),
title: '我的学习',
url: '/user/message'
},
{
icon: require('@/assets/icon/user_question.png'),
title: '我的浏览',
url: '/message'
},
{
icon: require('@/assets/icon/user_question.png'),
title: '常见问题',
url: '/collect'
},
{
icon: require('@/assets/icon/user_question.png'),
title: '关于协会',
url: '/user/about'
},
{
icon: require('@/assets/icon/user_question.png'),
title: '设置',
url: '/user/setting'
},
]
}
},
methods: {
// 跳转到我到学习页面
jumpStudyPage() {
}
},
computed: {
...mapGetters('user', ['GIsLogin'])
}
}
</script>
<style lang="less">
@import "~@/assets/css/variable.less";
.user_center {
background-color: #fafafa;
height: 100vh;
}
.header {
background: @theme;
padding: 60px 25px;
display: flex;
justify-content: space-between;
align-items: center;
.header_left {
background: red;
width: 120px;
height: 120px;
border-radius: 50%;
margin-right: 30px;
}
.header_right {
display: flex;
justify-content: space-between;
align-items: center;
flex: 1;
color: @colorfff;
.phone {
margin-top: 10px;
}
}
}
.center_menu_list {
background-color: #fff;
.right_content {
display: flex;
align-items: center;
justify-content: flex-end;
}
.dot {
width: 15px;
height: 15px;
background: #ff4038;
border-radius: 50%;
}
}
.van-cell:not(:last-child)::after {
right: 16px;
}
// .center_menu_list {
// padding: 0 25px;
// .li {
// display: flex;
// justify-content: space-between;
// align-items: center;
// border-bottom: 1px solid #ccc;
// height: 95px;
// .menu_left {
// color: #333;
// display: flex;
// justify-content: space-between;
// align-items: center;
// img {
// margin-right: 20px;
// width: 35px;
// height: 35px;
// }
// }
// .menu_right {
// color: #ccc;
// }
// }
// }
</style>