家庭积分

This commit is contained in:
liuye
2023-07-17 17:06:35 +08:00
parent 9e1ae78371
commit f301c9c0cd
5 changed files with 174 additions and 67 deletions

View File

@@ -1,31 +1,21 @@
<template>
<div class="page">
<div class="user-list">
<div class="item">
<div class="user-list" v-if="list.length">
<div class="item" v-for="(item, index) in list" :key="index">
<div class="item-left">
<img src="https://cdn.cunwuyun.cn/wxmp/mine/wodejiating.png" alt="">
<img :src="item.avatarUrl" alt="">
<div class="user-info">
<h3>代玲昌</h3>
<p>积玉桥社区</p>
<h3>{{item.nickName}}</h3>
<p>{{item.girdName || ''}}</p>
</div>
</div>
<div class="item-right">
<div @click="toTransfer">转积分</div>
</div>
</div>
<div class="item">
<div class="item-left">
<img src="https://cdn.cunwuyun.cn/wxmp/mine/wodejiating.png" alt="">
<div class="user-info">
<h3>代玲昌</h3>
<p>积玉桥社区</p>
</div>
</div>
<div class="item-right">
<div>转积分</div>
<div @click="toTransfer(item)">转积分</div>
</div>
</div>
</div>
<AiEmpty v-else/>
<p class="bottom-text">如果绑定错误请联系网格员解绑</p>
</div>
</template>
<script>
@@ -38,28 +28,24 @@ export default {
},
data() {
return {
info: {}
list: []
}
},
onLoad() {
this.$dict.load('householdRelation').then(() => {
this.$nextTick(() => {
this.getUser()
})
})
this.getList()
},
methods: {
getUser() {
// this.$instance.post(`/app/appresident/detailForWx?id=${this.user.residentId}`).then(res => {
// if (res.code === 0) {
// this.info = res.data
// }
// })
getList() {
this.$instance.post(`/app/appwechatuserrelation/list`).then(res => {
if (res.code === 0 && res.data) {
this.list = res.data
}
})
},
toTransfer() {
uni.navigateTo({url: `./transferIntrgral`})
toTransfer(row) {
uni.navigateTo({url: `./transferIntrgral?openId=${row.openId}&nickName=${row.nickName}&avatarUrl=${row.avatarUrl}`})
}
}
},
}
</script>
<style scoped lang="scss">
@@ -67,10 +53,13 @@ export default {
.page {
width: 100%;
height: 100vh;
background-color: #f3f6f9;
.user-list {
padding: 32px 32px 0;
height: calc(100% - 180px);
overflow-y: scroll;
.item {
padding: 26px;
background-color: #fff;
@@ -119,5 +108,15 @@ export default {
}
}
}
.bottom-text {
line-height: 34px;
font-family: PingFangSC-Regular;
font-size: 24px;
color: #999;
position: fixed;
bottom: 92px;
left: 180px;
}
}
</style>