center.vue
2.71 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
<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">
<router-link :to="item.url" class="li" v-for="(item,key) in menuList" :key="key">
<div class="menu_left">
<img :src="item.icon" alt="" />
<span>{{item.title}}</span>
</div>
<div class="menu_right iconfont iconright"></div>
</router-link>
</div>
</div>
</template>
<script>
export default {
name: 'Center',
data() {
return {
menuList: [
{
icon: require('@/assets/icon/user_question.png'),
title: '我的消息',
url: '/user/message'
},
{
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'
},
]
}
}
}
</script>
<style lang="less">
@import "~@/assets/css/variable.less";
.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 {
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>