Files
dvcp_v2_wxcp_app/src/apps/AppVillageDiscuss/userList.vue

119 lines
2.3 KiB
Vue
Raw Normal View History

2022-01-07 18:13:17 +08:00
<template>
2022-01-07 18:16:28 +08:00
<div class="userList">
2022-01-07 18:49:50 +08:00
<div v-if="data.votes && data.votes.length > 0">
<div class="datas" v-for="(item, index) in data.votes" :key="index">
<div class="avatLeft">{{ item.userName.substring(item.userName.length, item.userName.length - 2) }}</div>
2022-01-07 18:13:17 +08:00
2022-01-07 18:49:50 +08:00
<div class="right">
<div class="top">
<span class="names" v-if="anonymous && anonymous == 1">{{ item.userName }}</span>
<span v-else>匿名用户</span>
2022-01-07 18:31:24 +08:00
2022-01-07 18:49:50 +08:00
<span class="times">{{ item.createTime }}</span>
</div>
2022-01-07 18:31:24 +08:00
2022-01-07 18:49:50 +08:00
<div class="bottom">选择了选择了{{ item.item }}</div>
</div>
2022-01-07 18:31:24 +08:00
</div>
2022-01-07 18:13:17 +08:00
</div>
2022-01-07 18:49:50 +08:00
<AiEmpty description="暂无数据" v-else></AiEmpty>
2022-01-07 18:13:17 +08:00
</div>
</template>
<script>
export default {
2022-01-07 18:16:28 +08:00
name: 'userList',
2022-01-07 18:13:17 +08:00
components: {},
props: {},
data() {
return {
data: [],
2022-01-07 18:49:50 +08:00
id: '',
anonymous: '',
2022-01-07 18:13:17 +08:00
}
},
computed: {},
watch: {},
2022-01-07 18:49:50 +08:00
onLoad(o) {
console.log(o)
this.anonymous = o.anonymous
this.id = o.id
this.getDetail()
},
2022-01-07 18:16:28 +08:00
onShow() {
document.title = '投票详情'
},
2022-01-07 18:49:50 +08:00
methods: {
getDetail() {
this.$loading()
this.$http
.post(`/app/appvillagediscuss/queryDetailById?id=${this.id}`)
.then((res) => {
if (res?.data) {
this.data = res.data
this.$hideLoading()
} else {
this.$hideLoading()
}
})
.catch(() => {
this.$hideLoading()
})
},
},
2022-01-07 18:13:17 +08:00
}
</script>
<style scoped lang="scss">
uni-page-body {
2022-01-07 18:49:50 +08:00
height: 100%;
background: #fff;
2022-01-07 18:13:17 +08:00
}
2022-01-07 18:16:28 +08:00
.userList {
2022-01-07 18:13:17 +08:00
// height: 100%;
2022-01-07 18:49:50 +08:00
2022-01-07 18:13:17 +08:00
.datas {
display: flex;
2022-01-07 18:31:24 +08:00
padding: 20px 32px 0 32px;
.avatLeft {
width: 80px;
height: 80px;
line-height: 80px;
text-align: center;
border-radius: 50%;
background: #4e8eee;
font-size: 28px;
font-weight: 500;
color: #ffffff;
}
.right {
border-bottom: 1px solid #ddd;
width: 100%;
margin: 10px 0 0 16px;
padding-bottom: 32px;
.top {
.names {
font-size: 32px;
color: #333333;
}
.times {
margin-left: 16px;
font-size: 28px;
color: #999999;
}
}
.bottom {
margin-top: 6px;
font-size: 30px;
color: #666666;
}
}
2022-01-07 18:13:17 +08:00
}
}
</style>