<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>
|