奖金账户新增佣金发放和待发放及标签
This commit is contained in:
@@ -10,8 +10,8 @@ import router from '../router'
|
|||||||
|
|
||||||
// 基础配置
|
// 基础配置
|
||||||
const config = {
|
const config = {
|
||||||
apiUrl : 'https://douhuo.douhuofalv.com/api/',
|
// apiUrl : 'https://douhuo.douhuofalv.com/api/',
|
||||||
// apiUrl : 'https://api.douhuotest.douhuofalv.com/api/', //测试环境
|
apiUrl : 'https://api.douhuotest.douhuofalv.com/api/', //测试环境
|
||||||
timeout : 60000
|
timeout : 60000
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,6 +47,7 @@ const request = (parameter, hideLoding = true) => {
|
|||||||
data : parameter.data || {},
|
data : parameter.data || {},
|
||||||
method : parameter.method || 'GET',
|
method : parameter.method || 'GET',
|
||||||
success : res => {
|
success : res => {
|
||||||
|
console.log(res)
|
||||||
if (res.header.Authorization){
|
if (res.header.Authorization){
|
||||||
updateToken('token', res.header.Authorization)
|
updateToken('token', res.header.Authorization)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,11 +2,17 @@
|
|||||||
<view class="content">
|
<view class="content">
|
||||||
<!-- 账户余额 -->
|
<!-- 账户余额 -->
|
||||||
<view class="total" :style="'background-image: url(' + require('@/static/imgs/bonus_back.png') + ');'">
|
<view class="total" :style="'background-image: url(' + require('@/static/imgs/bonus_back.png') + ');'">
|
||||||
<view class="total-left">
|
<view class="total-item-1">
|
||||||
<view class="total-value nowrap">{{total}}</view>
|
<view class="total-left">
|
||||||
<view class="total-text nowrap">{{ type === 'balance' ? '账户余额': '已提现总金额'}}</view>
|
<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>
|
||||||
<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>
|
||||||
<!-- 账户记录 -->
|
<!-- 账户记录 -->
|
||||||
<view class="tabs">
|
<view class="tabs">
|
||||||
@@ -23,7 +29,10 @@
|
|||||||
<view class="log-flex" v-for="(item, index) in list" :key="index">
|
<view class="log-flex" v-for="(item, index) in list" :key="index">
|
||||||
<block v-if="type === 'balance'">
|
<block v-if="type === 'balance'">
|
||||||
<view class="text">
|
<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 class="time nowrap">{{item.created_at}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="price nowrap">{{item.amount}}</view>
|
<view class="price nowrap">{{item.amount}}</view>
|
||||||
@@ -64,6 +73,8 @@
|
|||||||
{ name: '提现记录', value: 'withdraws' },
|
{ name: '提现记录', value: 'withdraws' },
|
||||||
],
|
],
|
||||||
total : '0.00',
|
total : '0.00',
|
||||||
|
sended : '0.00',
|
||||||
|
frozen : '0.00',
|
||||||
list : [],
|
list : [],
|
||||||
page : {
|
page : {
|
||||||
current : 1,
|
current : 1,
|
||||||
@@ -90,6 +101,8 @@
|
|||||||
}
|
}
|
||||||
this.list = []
|
this.list = []
|
||||||
this.total = '0.00'
|
this.total = '0.00'
|
||||||
|
this.sended = '0.00'
|
||||||
|
this.frozen = '0.00'
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
// 获取账户余额
|
// 获取账户余额
|
||||||
@@ -106,9 +119,11 @@
|
|||||||
balance({
|
balance({
|
||||||
page: this.page.current
|
page: this.page.current
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
let { balance, logs } = res;
|
let { balance, logs ,sended,frozen } = res;
|
||||||
let atList = logs.page.current == 1 ? [] : this.list
|
let atList = logs.page.current == 1 ? [] : this.list
|
||||||
this.total = balance
|
this.total = balance
|
||||||
|
this.sended = sended
|
||||||
|
this.frozen = frozen
|
||||||
this.list = atList.concat(logs.data)
|
this.list = atList.concat(logs.data)
|
||||||
this.page = logs.page
|
this.page = logs.page
|
||||||
this.pagesShow = false
|
this.pagesShow = false
|
||||||
@@ -171,9 +186,31 @@
|
|||||||
background-position: top center;
|
background-position: top center;
|
||||||
padding: 50rpx 30rpx 170rpx;
|
padding: 50rpx 30rpx 170rpx;
|
||||||
color: white;
|
color: white;
|
||||||
display: flex;
|
.total-item-1{
|
||||||
justify-content: space-between;
|
display: flex;
|
||||||
align-items: center;
|
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{
|
.total-left{
|
||||||
width: calc( 100% - 200rpx );
|
width: calc( 100% - 200rpx );
|
||||||
}
|
}
|
||||||
@@ -183,17 +220,17 @@
|
|||||||
font-family: Arial, Helvetica, sans-serif;
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
}
|
}
|
||||||
.total-text{
|
.total-text{
|
||||||
font-size: 30rpx;
|
font-size: 26rpx;
|
||||||
opacity: .7;
|
opacity: .9;
|
||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
padding-top: 20rpx;
|
padding-top: 20rpx;
|
||||||
}
|
}
|
||||||
.total-btn{
|
.total-btn{
|
||||||
background: white;
|
background: white;
|
||||||
color: #8E6AFF;
|
color: #8E6AFF;
|
||||||
line-height: 80rpx;
|
line-height: 70rpx;
|
||||||
border-radius: 40rpx;
|
border-radius: 40rpx;
|
||||||
width: 170rpx;
|
width: 200rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
@@ -241,6 +278,20 @@
|
|||||||
padding-right: 10rpx;
|
padding-right: 10rpx;
|
||||||
color: $main-color;
|
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{
|
.remark{
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
|
|||||||
Reference in New Issue
Block a user