163 lines
4.5 KiB
Vue
163 lines
4.5 KiB
Vue
<template>
|
|
<view class="commission-details" ref="container">
|
|
<view class="promoterHeader bg-color-red">
|
|
<view class="headerCon acea-row row-between-wrapper">
|
|
<view>
|
|
<view class="name">提现记录</view>
|
|
<view class="money">
|
|
¥
|
|
<text class="num">{{ force2Decimal(commission) }}</text>
|
|
</view>
|
|
</view>
|
|
<view class="iconfont icon-jinbi1"></view>
|
|
</view>
|
|
</view>
|
|
<view class="sign-record" ref="content">
|
|
<view class="list">
|
|
<view class="item">
|
|
<view class="listn" v-for="(item, infoIndex) in info" :key="infoIndex">
|
|
<view class="itemn acea-row row-column row-center">
|
|
<view class="acea-row row-middle row-between">
|
|
<view class="txt">提现金额:<text class="font-color-red">{{ force2Decimal(item.extractPrice) }}</text></view>
|
|
<view class="txt">手续费:<text class="font-color-red">{{ force2Decimal(item.extractSxf) }}</text></view>
|
|
</view>
|
|
<view class="txt" v-if="item.status==-1">失败原因:{{item.failMsg}}</view>
|
|
<view class="acea-row row-middle row-between row-center">
|
|
<view class="txt">{{item.createTime}}</view>
|
|
<view class="txt font-color-green">{{item.statusText}}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- <view class="sign-record" ref="content">
|
|
<view class="list">
|
|
<view class="item" v-for="(item, infoIndex) in info" :key="infoIndex">
|
|
<view class="data">{{ item.time }}</view>
|
|
<view class="listn" v-for="(val, indexn) in item.list" :key="indexn">
|
|
<view class="itemn acea-row row-between-wrapper">
|
|
<view>
|
|
<view class="name line1">{{ val.title }}</view>
|
|
<view>{{ val.addTime }}</view>
|
|
</view>
|
|
<view class="num" v-if="val.pm == 1">+{{ force2Decimal(val.number) }}</view>
|
|
<view class="num font-color-red" v-if="val.pm == 0">-{{ force2Decimal(val.number) }}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view> -->
|
|
<Loading :loaded="loaded" :loading="loading"></Loading>
|
|
</view>
|
|
</template>
|
|
<script>
|
|
import { getCommissionInfo, getSpreadInfo,getWithdrawalRecordList } from "@/api/user";
|
|
import Loading from "@/components/Loading";
|
|
import { formatDateTime,isNullOrEmpty} from "@/utils";
|
|
|
|
export default {
|
|
name: "CashRecord",
|
|
components: {
|
|
Loading
|
|
},
|
|
props: {},
|
|
data: function() {
|
|
return {
|
|
info: [],
|
|
commission: 0,
|
|
where: {
|
|
page: 1,
|
|
limit: 10
|
|
},
|
|
types: 4,
|
|
loaded: false,
|
|
loading: false
|
|
};
|
|
},
|
|
mounted: function() {
|
|
this.getCommission();
|
|
this.getIndex();
|
|
},
|
|
onReachBottom() {
|
|
this.loading === false && this.getIndex();
|
|
},
|
|
methods: {
|
|
fitDateString(str,format){
|
|
return formatDateTime(str,format);
|
|
},
|
|
force2Decimal(v){
|
|
return this.$force2Decimal(v);
|
|
},
|
|
getIndex: function() {
|
|
let that = this;
|
|
if (that.loading == true || that.loaded == true) return;
|
|
that.loading = true;
|
|
|
|
getWithdrawalRecordList(that.where).then(
|
|
//getCommissionInfo(that.where, that.types).then(
|
|
res => {
|
|
that.loading = false;
|
|
that.loaded = res.data.length < that.where.limit;
|
|
that.where.page = that.where.page + 1;
|
|
that.info.push.apply(that.info, res.data.map((item)=>{
|
|
switch (item.status){
|
|
case -1:
|
|
item.statusText = "提现未通过";
|
|
break;
|
|
case 0:
|
|
item.statusText = "提现审核中";
|
|
break;
|
|
case 1:
|
|
item.statusText = "提现已完成";
|
|
break;
|
|
case 2:
|
|
item.statusText = "提现待打款";
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
return item;
|
|
}));
|
|
},
|
|
err => {
|
|
uni.showToast({
|
|
title: err.msg || err.response.data.msg|| err.response.data.message,
|
|
icon: 'none',
|
|
duration: 2000
|
|
});
|
|
}
|
|
);
|
|
},
|
|
getCommission: function() {
|
|
let that = this;
|
|
getSpreadInfo().then(
|
|
res => {
|
|
that.commission = res.data.commissionCount;
|
|
},
|
|
err => {
|
|
uni.showToast({
|
|
title: err.msg || err.response.data.msg|| err.response.data.message,
|
|
icon: "none",
|
|
duration: 2000
|
|
});
|
|
}
|
|
);
|
|
}
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style>
|
|
.txt{
|
|
font-size: 28rpx;
|
|
color: #282828;
|
|
margin-bottom: 10rpx;
|
|
}
|
|
|
|
.sign-record .list .item .listn .itemn{
|
|
height: auto;
|
|
padding-top: 10rpx;
|
|
}
|
|
</style>
|