60 lines
1.2 KiB
Vue
Raw Normal View History

2025-03-14 16:27:50 +08:00
<template>
<div class="user-point">
<!-- <div class="point-rule">积分规则</div> -->
<div class="point-wrapper">
<u-image shape="circle" :lazy-load="true" width="100" height="100"
:src="userInfo.face || '/static/missing-face.png'"></u-image>
<div class="whether-point">
2025-04-25 18:20:19 +08:00
<div>积分<span class="point">{{userInfo.point || 0}}</span></div>
2025-03-14 16:27:50 +08:00
</div>
</div>
</div>
</template>
<script>
import { getUserInfo } from "@/api/members";
export default {
data() {
return {
userInfo: {},
};
},
mounted() {
this.init();
},
methods: {
async init() {
let res = await getUserInfo();
if (res.data.success) {
this.userInfo = res.data.result;
}
},
},
};
</script>
<style lang="scss" scoped>
.user-point {
padding: 0 20rpx;
2025-04-25 18:20:19 +08:00
height: 200px;
2025-03-14 16:27:50 +08:00
background: url("/static/point-bg.png") no-repeat;
2025-04-25 18:20:19 +08:00
background-size: 100% 100%;
2025-03-14 16:27:50 +08:00
}
.point {
font-size: 40rpx;
}
.point-rule {
color: #fff;
display: flex;
justify-content: flex-end;
padding: 20rpx 0;
}
.point-wrapper {
padding-top: 80rpx;
display: flex;
}
.whether-point {
color: #fff;
margin-left: 30rpx;
font-size: 36rpx;
font-weight: bold;
}
</style>