Files
temple-h5/src/components/user-merit/index.vue
T
2026-02-06 15:02:34 +08:00

91 lines
2.2 KiB
Vue

<template>
<div class="user-merit border-bottom" v-if="data">
<img :src="avatar" alt="" />
<div class="profile">
<div>
<div class="name">
<span>{{ data.merit_name || data.nickname || data.user_info.nickname }}</span>
<!-- <span>{{data.user_info.region}}</span>-->
</div>
<p class="goods_name">{{ data.goods_name }}</p>
</div>
</div>
<div class="result">
<p class="money">已参与</p>
<span class="date">{{ data.paid_at }}</span>
</div>
</div>
</template>
<script>
export default {
name: "user-merit",
props: ["data"],
data() {
return {
avatar: "/touxiang.png",
};
},
};
</script>
<style lang="scss" scoped>
.user-merit {
display: flex;
padding: 0.27rem 0.4rem;
img {
width: 1.17rem;
height: 1.17rem;
border-radius: 1.17rem;
margin-right: 0.4rem;
}
.profile {
flex: 1;
padding-top: 0.13rem;
.name {
display: flex;
align-items: flex-end;
margin-bottom: 0.27rem;
span:first-child {
font-size: 0.4rem;
color: #222;
vertical-align: top;
display: inline-block;
margin-right: 0.4rem;
line-height: 1.3;
}
span:last-child {
font-size: 0.32rem;
color: #666;
vertical-align: text-bottom;
display: inline-block;
}
}
p.goods_name {
font-size: 0.32rem;
max-width: 4rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.result {
font-size: 0.32rem;
display: flex;
justify-content: space-between;
flex-direction: column;
padding: 0.13rem 0;
text-align: right;
.money {
font-size: 0.37rem;
color: #cf9e3b;
font-weight: bold;
}
.date {
font-size: 0.3rem;
color: #888;
}
}
}
</style>