AdmireMe.vue
2.6 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
<template>
<div class="home">
<div class="header">
<h2 @click="back1"><</h2><h1>心仪我的</h1>
</div>
<router-link to='/xiangQing' class="details1" v-for="item in arr" :key="item.id">
<!-- <div class="details1" v-for="item in arr" :key="item.id" > -->
<div class="details2">
<img :src="item.avatar" alt="" @click="goFangDa">
</div>
<p>{{item.nickname}}</p>
<div class="block">{{item.about_me}}</div>
<!-- </div> -->
</router-link>
</div>
</template>
<script>
export default {
name: 'home',
components: {
},
data () {
return {
arr:[]
}
},
mounted: function(){
this.getData()
},
created () {
},
methods: {
goFangDa () {
this.$router.push("/fangDa");
},
back1 () {
this.$router.go(-1);
},
getData () {
let that = this
this.$axios.post('/api/Center/like_me', {}).then((res) => {
that.arr = res.data
console.log(res.data)
}).catch((error) => {
console.log(error)
})
}
}
}
</script>
<style lang="scss" scoped>
.home{
width:100%;
// height:100%;
background:#11A7FC;
padding-top:10%;
padding-left:5%;
flex-wrap:wrap;
// min-height:0rem;
overflow-y:scroll;
display:flex;
// flex: 1;
.header{
width:90%;
height:.3rem;
// background:red;
margin-bottom:.3rem;
h1{
font-size:.2rem;
line-height:.3rem;
color:#fff;
// text-align:center;
margin-left:35%;
}
h2{
font-size:.2rem;
color:#fff;
// margin-bottom:.5rem;
line-height:.3rem;
float:left;
}
}
.details1{
width:35%;
height:1.4rem;
background:#fff;
border-radius:.25rem;
margin:0.04rem 0.08rem 0.03rem 0rem;
padding:5%;
display:block;
.details2{
width:.4rem;
height:.4rem;
border-radius:.5rem;
// background:red;
float:left;
margin-right:.1rem;
img{
width:100%;
height:100%;
border-radius:.5rem;
float:left;
margin-right:.1rem;
}
}
p{
font-size:.14rem;
line-height:.4rem;
}
.block{
width:1.3rem;
height:1rem;
// background:blue;
font-size:.15rem;
color:#3D444C;
margin-top:.1rem;
}
}
}
</style>