You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

126 lines
2.3 KiB

2 years ago
<template>
<view class="detail">
<view class="card">
<view>{{info.accountName}}</view>
<view>{{handlerNumber(info.balance)}}</view>
<view>账户总余额()</view>
</view>
<view class="card-sec">
<view class="second">
<view class="sepcial">
<view>{{handlerNumber(info.rechargeBalance)}}</view>
<view>账户充值余额</view>
</view>
<view class="sepcial">
<view>{{handlerNumber(info.rechargeRebateBalance)}}</view>
<view>充值返利余额</view>
</view>
<view class="sepcial">
<view>{{handlerNumber(info.consumeRebateBalance)}}</view>
<view>消费返利余额</view>
</view>
2 years ago
<view class="sepcial">
<view>{{handlerNumber(info.calibrationBalance)}}</view>
<view>校准金额</view>
</view>
2 years ago
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
info: {}
}
},
onLoad(options) {
if (options.item) {
this.info = JSON.parse(decodeURI(options.item))
}
},
methods: {
handlerNumber(number) {
console.log(number)
if (number == 0) return number
if (!number) {
return '--'
}
return +number.toFixed(2)
},
}
}
</script>
<style>
.detail {
padding: 100rpx 35rpx 0;
}
.sepcial {
padding-top: 13rpx !important;
}
.sepcial view:nth-of-type(1) {
font-size: 38rpx;
}
.card {
padding: 50rpx 40rpx 0;
wdith: 100%;
height: 285rpx;
background: url('https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/oms-card-bg.png') #fff 100%/100% no-repeat;
border-radius: 30rpx;
}
.card view {
color: #fff;
}
.card view:nth-of-type(2) {
margin-top: 60rpx;
font-size: 44rpx;
}
.card view:nth-of-type(1),
.card view:nth-of-type(3) {
font-size: 26rpx;
/* margin-top: 10rpx; */
}
.card-sec {
width: 100%;
/* min-height: 500rpx; */
padding: 35rpx;
background: #FAEBD770;
border-radius: 30rpx;
}
.card-sec .second {
display: flex;
flex-wrap: wrap;
margin-top: 20rpx;
}
.card-sec .second>view {
padding-top: 20rpx;
padding-left: 5rpx;
width: 33.3%;
height: 120rpx;
}
.card-sec .second>view view:nth-of-type(1) {
2 years ago
overflow: hidden;
text-overflow: ellipsis;
2 years ago
color: #333;
}
.card-sec .second>view view:nth-of-type(2) {
color: #696969;
font-size: 24rpx;
}
</style>