Files
dvcp_v2_wechat_app/src/project/fengdu/AppMine/myFamily.vue

123 lines
2.7 KiB
Vue
Raw Normal View History

2023-03-16 09:10:17 +08:00
<template>
<div class="page">
2023-07-17 17:06:35 +08:00
<div class="user-list" v-if="list.length">
<div class="item" v-for="(item, index) in list" :key="index">
2023-07-12 10:49:37 +08:00
<div class="item-left">
2023-07-17 17:06:35 +08:00
<img :src="item.avatarUrl" alt="">
2023-07-12 10:49:37 +08:00
<div class="user-info">
2023-07-17 17:06:35 +08:00
<h3>{{item.nickName}}</h3>
<p>{{item.girdName || ''}}</p>
2023-07-12 10:49:37 +08:00
</div>
</div>
<div class="item-right">
2023-07-17 17:06:35 +08:00
<div @click="toTransfer(item)">转积分</div>
2023-07-12 10:49:37 +08:00
</div>
2023-03-16 09:10:17 +08:00
</div>
</div>
2023-07-17 17:06:35 +08:00
<AiEmpty v-else/>
<p class="bottom-text">如果绑定错误请联系网格员解绑</p>
2023-03-16 09:10:17 +08:00
</div>
</template>
<script>
import {mapState} from 'vuex'
export default {
appName: "我的家庭",
computed: {
...mapState(['user', 'token'])
},
data() {
return {
2023-07-17 17:06:35 +08:00
list: []
2023-03-16 09:10:17 +08:00
}
},
onLoad() {
2023-07-17 17:06:35 +08:00
this.getList()
2023-03-16 09:10:17 +08:00
},
methods: {
2023-07-17 17:06:35 +08:00
getList() {
this.$instance.post(`/app/appwechatuserrelation/list`).then(res => {
if (res.code === 0 && res.data) {
this.list = res.data
}
})
2023-07-12 10:49:37 +08:00
},
2023-07-17 17:06:35 +08:00
toTransfer(row) {
uni.navigateTo({url: `./transferIntrgral?openId=${row.openId}&nickName=${row.nickName}&avatarUrl=${row.avatarUrl}`})
2023-03-16 09:10:17 +08:00
}
2023-07-17 17:06:35 +08:00
},
2023-03-16 09:10:17 +08:00
}
</script>
<style scoped lang="scss">
@import "~dvcp-wui/common";
.page {
width: 100%;
2023-07-17 17:06:35 +08:00
height: 100vh;
2023-03-16 09:10:17 +08:00
background-color: #f3f6f9;
2023-07-12 10:49:37 +08:00
.user-list {
padding: 32px 32px 0;
2023-07-17 17:06:35 +08:00
height: calc(100% - 180px);
overflow-y: scroll;
2023-07-12 10:49:37 +08:00
.item {
padding: 26px;
background-color: #fff;
display: flex;
margin-bottom: 24px;
.item-left {
width: calc(100% - 150px);
display: flex;
2023-03-16 09:10:17 +08:00
img {
2023-07-12 10:49:37 +08:00
width: 108px;
height: 108px;
border-radius: 54px;
2023-03-16 09:10:17 +08:00
}
.user-info {
2023-07-12 10:49:37 +08:00
margin-left: 20px;
h3 {
line-height: 42px;
font-family: PingFangSC-Regular;
font-weight: 400;
2023-03-16 09:10:17 +08:00
font-size: 32px;
color: #333;
2023-07-12 10:49:37 +08:00
margin-bottom: 10px;
2023-03-16 09:10:17 +08:00
}
2023-07-12 10:49:37 +08:00
p {
font-family: PingFangSC-Regular;
font-size: 24px;
color: #999;
line-height: 40px;
2023-03-16 09:10:17 +08:00
}
}
}
2023-07-12 10:49:37 +08:00
.item-right {
width: 150px;
div {
width: 126px;
height: 56px;
line-height: 56px;
text-align: center;
background: #2D7DFF;
border-radius: 30px;
font-family: PingFangSC-Regular;
font-size: 26px;
color: #FFF;
margin-top: 26px;
}
}
2023-03-16 09:10:17 +08:00
}
}
2023-07-17 17:06:35 +08:00
.bottom-text {
line-height: 34px;
font-family: PingFangSC-Regular;
font-size: 24px;
color: #999;
position: fixed;
bottom: 92px;
left: 180px;
}
2023-03-16 09:10:17 +08:00
}
</style>