followList.vue
1.93 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
<template>
<div class="follow-list-page">
<template v-for="(item, key) in followList" :key="key">
<div class="info van-hairline--bottom">
<van-row>
<van-col>
<van-image round width="50" height="50" :src="item.avatar" style="padding-right: 1rem;" />
</van-col>
<van-col class="text-wrapper" span="18">
<div>
<div class="username">{{ item.name }}</div>
<div class="user-status">已关注</div>
</div>
<div class="address">{{ item.kg_name }}</div>
</van-col>
</van-row>
</div>
</template>
</div>
<div style="height: 2rem;"></div>
</template>
<script setup>
import { ref, reactive, onMounted } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import axios from '@/utils/axios';
import { Toast } from 'vant';
// 关注列表联调
const followList = ref([])
axios.get('/srv/?a=my_follow')
.then(res => {
if (res.data.code === 1) {
followList.value = res.data.data;
} else {
console.warn(res);
Toast({
icon: 'close',
message: res.data.msg
});
}
})
.catch(err => {
console.error(err);
})
</script>
<script>
import mixin from 'common/mixin';
export default {
mixins: [mixin.init],
data () {
return {
}
},
mounted () {
},
methods: {
}
}
</script>
<style lang="less" scoped>
.follow-list-page {
.info {
padding: 2rem;
padding-right: 0;
.text-wrapper {
line-height: 1.5;
.username {
display: inline-block;
overflow: auto;
font-size: 1.15rem;
color: #222222;
}
.user-status {
float: right;
font-size: 0.8rem;
background-color: white;
border-radius: 15px;
padding: 5px 10px;
color: #999999;
border: 1px solid #EEEDED;
}
}
.address {
font-size: 0.85rem;
color: #999999;
}
}
}
</style>