绿满眶商城微信小程序-uniapp
zxl
4 天以前 c9928dd4f6d25e2339ea1400f59ec58674a927a7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<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">
        <div>你的可用积分:<span class="point">{{userInfo.point || 0}}</span></div>
      </div>
    </div>
  </div>
</template>
<script>
import '@/components/uview-components/uview-ui'
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;
  height: 300rpx;
  background: url("/static/point-bg.png") no-repeat;
  background-size: 100%;
}
.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>