fix
13404089107
2025-07-28 2e90f57e7d28d6a949247ef39b487d3e75b56683
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<template>
  <view class="content">
    <view class="header" v-if="!loading">
      <view class="header-card">
        <view class="header-card-title">总饮水币</view>
        <view class="header-card-number">{{userInfo.ysb }}</view>
        <view class="header-card-illustrate" @click="$navTo('/pages/user/setup/documentDisplay?t=16&title=饮水币使用说明')">
          <image class="illustrate-icon" src="/static/icon/icon_info_circle.png" mode="widthFix"></image>
          <text class="illustrate-text">饮水币使用说明</text>
        </view>
      </view>
    </view>
    <view class="cell" v-if="!loading">
      <view class="cell-item" @click="$navTo('/pages/user/money/record?t=1&title=饮水币记录')">
        <view class="cell-item-text">饮水币记录</view>
        <image class="cell-item-icon" src="/static/icon/icon_arraw.png" mode="widthFix"></image>
      </view>
      <view class="cell-item" @click="$navTo('/pages/user/money/record?t=2&title=充值记录')">
        <view class="cell-item-text">充值记录</view>
        <image class="cell-item-icon" src="/static/icon/icon_arraw.png" mode="widthFix"></image>
      </view>
    </view>
    <button class="button button-topup" v-if="!loading" @click="$navTo('/pages/user/money/topup')">充值</button>
    <u-loading-page :loading="loading"></u-loading-page>
  </view>
</template>
 
<script>
  import {
    mapState,
    mapMutations
  } from 'vuex'
  export default {
    data() {
      return {
        loading:true,
        userInfo:{}
      };
    },
    onLoad() {
      this.init()
    },
    onShow() {
      this.init()
    },
    methods:{
      ...mapMutations(['setUserInfo']),
      init(){
        this.$apis.user.getUserInfo().then(res=>{
          this.loading = false
          this.userInfo = res.data
          this.setUserInfo(this.userInfo)
        })
      }
    }
  }
</script>
 
<style lang="scss">
.content{
  .header{
    height: 163rpx;
    background-color: #FB282A;
    position: relative;
    padding-top: 38rpx;
    .header-card{
      margin: 0 auto;
      width: 694rpx;
      height: 260rpx;
      background: #FFFFFF;
      border-radius: 20rpx;
      box-shadow: 4rpx 4rpx 12rpx rgba(0, 0, 0, 0.05);
      padding: 19rpx;
      display: flex;
      flex-direction: column;
      .header-card-title{
        font-size: 27rpx;
        color: rgba(0, 0, 0, 0.6);
        line-height: 27rpx;
        text-align: left;
        font-style: normal;
      }
      .header-card-number{
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 58rpx;
        color: #FF2729;
        line-height: 58rpx;
      }
      .header-card-illustrate{
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 12rpx;
        .illustrate-icon{
          width: 27rpx;
        }
        .illustrate-text{
          padding-left: 16rpx;
          font-size: 24rpx;
          color: rgba(0, 0, 0, 0.6);
          line-height: 24rpx;
        }
      }
    }
  }
  .cell{
    margin: 0 auto;
    margin-top: 180rpx;
    width: 694rpx;
    .cell-item{
      height: 108rpx;
      display: flex;
      align-items: center;
      padding: 0 19rpx;
      & + .cell-item{
        border-top: 2rpx solid #D9D9D9;
      }
      .cell-item-text{
        flex: 1;
        font-size: 32rpx;
        color: #000000;
        line-height: 32rpx;
      }
      .cell-item-icon{
        width: 14rpx;
        height: 24rpx;
      }
    }
  }
  .button-topup{
    margin: 0 auto;
    margin-top: 100rpx;
    width: 635rpx;
    height: 96rpx;
    background: #FF2729;
    border-radius: 58rpx;
    font-weight: 700;
    font-size: 35rpx;
    color: #FFFFFF;
    line-height: 35rpx;
  }
}
</style>