奖金账户新增佣金发放和待发放及标签

This commit is contained in:
2023-02-13 15:24:34 +08:00
parent 8d8c14ec66
commit df9e850637
2 changed files with 67 additions and 15 deletions

View File

@@ -2,11 +2,17 @@
<view class="content">
<!-- 账户余额 -->
<view class="total" :style="'background-image: url(' + require('@/static/imgs/bonus_back.png') + ');'">
<view class="total-left">
<view class="total-value nowrap">{{total}}</view>
<view class="total-text nowrap">{{ type === 'balance' ? '账户余额': '已提现总金额'}}</view>
<view class="total-item-1">
<view class="total-left">
<view class="total-value nowrap">{{total}}</view>
<view class="total-text nowrap">{{ type === 'balance' ? '账户余额': '已提现总金额'}}</view>
</view>
<view class="total-btn" @click="$Router.push({name: 'Withdraws'})">提现</view>
</view>
<view class="total-btn" @click="$Router.push({name: 'Withdraws'})">提现</view>
<view class="total-item-2">
<view> 佣金(已发放) :<span>{{sended}}</span></view>
<view> 佣金(待发放) :<span>{{frozen}}</span></view>
</view>
</view>
<!-- 账户记录 -->
<view class="tabs">
@@ -23,7 +29,10 @@
<view class="log-flex" v-for="(item, index) in list" :key="index">
<block v-if="type === 'balance'">
<view class="text">
<view class="type nowrap">{{item.remark || '-'}}</view>
<view class="type nowrap">
{{item.remark || '-'}}
<span :class="item.frozen.value == 0?'':'active'">{{item.frozen.text}}</span>
</view>
<view class="time nowrap">{{item.created_at}}</view>
</view>
<view class="price nowrap">{{item.amount}}</view>
@@ -64,6 +73,8 @@
{ name: '提现记录', value: 'withdraws' },
],
total : '0.00',
sended : '0.00',
frozen : '0.00',
list : [],
page : {
current : 1,
@@ -90,6 +101,8 @@
}
this.list = []
this.total = '0.00'
this.sended = '0.00'
this.frozen = '0.00'
this.getList()
},
// 获取账户余额
@@ -106,9 +119,11 @@
balance({
page: this.page.current
}).then(res => {
let { balance, logs } = res;
let { balance, logs ,sended,frozen } = res;
let atList = logs.page.current == 1 ? [] : this.list
this.total = balance
this.sended = sended
this.frozen = frozen
this.list = atList.concat(logs.data)
this.page = logs.page
this.pagesShow = false
@@ -171,9 +186,31 @@
background-position: top center;
padding: 50rpx 30rpx 170rpx;
color: white;
display: flex;
justify-content: space-between;
align-items: center;
.total-item-1{
display: flex;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
}
.total-item-2{
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
// margin-top: $margin;
position: relative;
top: $margin ;
padding-bottom: 20rpx;
font-size: 30rpx;
view{
opacity: 0.9;
font-size: 26rpx;
}
span{
font-size:32rpx;
}
}
.total-left{
width: calc( 100% - 200rpx );
}
@@ -183,17 +220,17 @@
font-family: Arial, Helvetica, sans-serif;
}
.total-text{
font-size: 30rpx;
opacity: .7;
font-size: 26rpx;
opacity: .9;
line-height: 40rpx;
padding-top: 20rpx;
}
.total-btn{
background: white;
color: #8E6AFF;
line-height: 80rpx;
line-height: 70rpx;
border-radius: 40rpx;
width: 170rpx;
width: 200rpx;
font-weight: bold;
text-align: center;
}
@@ -241,6 +278,20 @@
padding-right: 10rpx;
color: $main-color;
}
span{
font-size: 22rpx;
font-weight: normal;
background-color: rgba(green, 0.4);
padding: 2rpx 20rpx;
border-radius: 40rpx;
color: #fff;
position: relative;
left: 20rpx;
top: -6rpx;
}
.active{
background-color: rgba(red, 0.4);
}
}
.remark{
font-size: 28rpx;