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