2020-08-13 08:12:57 +00:00
|
|
|
<template>
|
|
|
|
<view>
|
|
|
|
<view class='commission-details'>
|
|
|
|
<view class='promoterHeader bg-color'>
|
|
|
|
<view class='headerCon acea-row row-between-wrapper'>
|
|
|
|
<view>
|
|
|
|
<view class='name'>{{name}}</view>
|
|
|
|
<view class='money' v-if="recordType == 4">¥<text class='num'>{{extractCount}}</text></view>
|
2021-06-11 09:41:16 +00:00
|
|
|
<view class='money' v-else>¥<text class='num'>{{commissionCount}}</text></view>
|
2020-08-13 08:12:57 +00:00
|
|
|
</view>
|
|
|
|
<view class='iconfont icon-jinbi1'></view>
|
|
|
|
</view>
|
|
|
|
</view>
|
2020-11-05 08:21:06 +00:00
|
|
|
<view class='sign-record' v-if="recordType == 4">
|
|
|
|
<block v-for="(item,index) in recordList" :key="index" v-if="recordList.length>0">
|
2021-06-11 09:41:16 +00:00
|
|
|
<view class='list pad30'>
|
2020-11-05 08:21:06 +00:00
|
|
|
<view class='item'>
|
|
|
|
<view class='data'>{{item.date}}</view>
|
2021-06-11 09:41:16 +00:00
|
|
|
<view class='listn borRadius14'>
|
2020-11-05 08:21:06 +00:00
|
|
|
<block v-for="(child,indexn) in item.list" :key="indexn">
|
|
|
|
<view class='itemn acea-row row-between-wrapper'>
|
|
|
|
<view>
|
2021-06-11 09:41:16 +00:00
|
|
|
<view class='name line1'>{{child.status | statusFilter}}</view>
|
2020-11-05 08:21:06 +00:00
|
|
|
<view>{{child.createTime}}</view>
|
|
|
|
</view>
|
2021-06-11 09:41:16 +00:00
|
|
|
<view class='num font-color' v-if="child.status == 1">+{{child.extractPrice}}
|
|
|
|
</view>
|
2020-11-05 08:21:06 +00:00
|
|
|
<view class='num' v-else>-{{child.extractPrice}}</view>
|
2021-06-11 09:41:16 +00:00
|
|
|
<!-- <view>
|
|
|
|
<view class='name line1'>{{child.status === -1 ? '提现失败' : '提现成功'}}<span
|
|
|
|
v-show="child.status === -1"
|
|
|
|
style="font-size: 12px;color: red;">{{'('+child.failMsg+')'}}</span>
|
|
|
|
</view>
|
|
|
|
<view>{{child.createTime}}</view>
|
|
|
|
</view>
|
|
|
|
<view class='num font-color' v-if="child.status == -1">+{{child.extractPrice}}
|
|
|
|
</view>
|
|
|
|
<view class='num' v-else>-{{child.extractPrice}}</view> -->
|
2020-11-05 08:21:06 +00:00
|
|
|
</view>
|
|
|
|
</block>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</block>
|
|
|
|
<view v-if="recordList.length == 0">
|
|
|
|
<emptyPage title='暂无提现记录~'></emptyPage>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class='sign-record' v-else>
|
2020-08-13 08:12:57 +00:00
|
|
|
<block v-for="(item,index) in recordList" :key="index" v-if="recordList.length>0">
|
2021-06-11 09:41:16 +00:00
|
|
|
<view class='list pad30'>
|
2020-08-13 08:12:57 +00:00
|
|
|
<view class='item'>
|
|
|
|
<view class='data'>{{item.date}}</view>
|
2021-06-11 09:41:16 +00:00
|
|
|
<view class='listn borRadius14'>
|
2020-08-13 08:12:57 +00:00
|
|
|
<block v-for="(child,indexn) in item.list" :key="indexn">
|
|
|
|
<view class='itemn acea-row row-between-wrapper'>
|
|
|
|
<view>
|
|
|
|
<view class='name line1'>{{child.title}}</view>
|
2021-03-19 10:26:43 +00:00
|
|
|
<view>{{child.updateTime}}</view>
|
2020-08-13 08:12:57 +00:00
|
|
|
</view>
|
2021-06-11 09:41:16 +00:00
|
|
|
<view class='num font-color' v-if="child.type == 1">+{{child.price}}
|
|
|
|
</view>
|
2021-02-06 09:25:18 +00:00
|
|
|
<view class='num' v-else>-{{child.price}}</view>
|
2020-08-13 08:12:57 +00:00
|
|
|
</view>
|
|
|
|
</block>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</block>
|
|
|
|
<view v-if="recordList.length == 0">
|
2021-06-11 09:41:16 +00:00
|
|
|
<emptyPage title='暂无佣金记录~'></emptyPage>
|
2020-08-13 08:12:57 +00:00
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<home></home>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2023-09-03 13:21:54 +00:00
|
|
|
import { getCommissionInfo, getRecordApi } from '@/api/user.js';
|
2020-08-13 08:12:57 +00:00
|
|
|
import {
|
|
|
|
toLogin
|
|
|
|
} from '@/libs/login.js';
|
|
|
|
import {
|
|
|
|
mapGetters
|
|
|
|
} from "vuex";
|
|
|
|
import emptyPage from '@/components/emptyPage.vue'
|
|
|
|
import home from '@/components/home';
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
emptyPage,
|
|
|
|
home
|
|
|
|
},
|
2021-06-11 09:41:16 +00:00
|
|
|
filters: {
|
|
|
|
statusFilter(status) {
|
|
|
|
const statusMap = {
|
|
|
|
'-1': '未通过',
|
|
|
|
'0': '审核中',
|
|
|
|
'1': '已提现'
|
|
|
|
}
|
|
|
|
return statusMap[status]
|
|
|
|
}
|
|
|
|
},
|
2020-08-13 08:12:57 +00:00
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
name: '',
|
|
|
|
type: 0,
|
|
|
|
page: 1,
|
|
|
|
limit: 10,
|
|
|
|
recordList: [],
|
|
|
|
recordType: 0,
|
2021-06-11 09:41:16 +00:00
|
|
|
statuss: false,
|
2020-08-13 08:12:57 +00:00
|
|
|
isAuto: false, //没有授权的不会自动授权
|
2021-06-11 09:41:16 +00:00
|
|
|
isShowAuth: false, //是否隐藏授权
|
|
|
|
extractCount: 0
|
2020-08-13 08:12:57 +00:00
|
|
|
};
|
|
|
|
},
|
|
|
|
computed: mapGetters(['isLogin']),
|
|
|
|
onLoad(options) {
|
|
|
|
if (this.isLogin) {
|
|
|
|
this.type = options.type;
|
2021-06-11 09:41:16 +00:00
|
|
|
this.extractCount = options.extractCount;
|
|
|
|
this.commissionCount = options.commissionCount;
|
2020-08-13 08:12:57 +00:00
|
|
|
} else {
|
|
|
|
toLogin();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
onShow: function() {
|
|
|
|
let type = this.type;
|
|
|
|
if (type == 1) {
|
|
|
|
uni.setNavigationBarTitle({
|
|
|
|
title: "提现记录"
|
|
|
|
});
|
|
|
|
this.name = '提现总额';
|
|
|
|
this.recordType = 4;
|
2020-11-05 08:21:06 +00:00
|
|
|
this.getList();
|
2020-08-13 08:12:57 +00:00
|
|
|
} else if (type == 2) {
|
|
|
|
uni.setNavigationBarTitle({
|
|
|
|
title: "佣金记录"
|
|
|
|
});
|
|
|
|
this.name = '佣金明细';
|
|
|
|
this.recordType = 3;
|
|
|
|
this.getRecordList();
|
|
|
|
} else {
|
|
|
|
uni.showToast({
|
|
|
|
title: '参数错误',
|
|
|
|
icon: 'none',
|
|
|
|
duration: 1000,
|
|
|
|
mask: true,
|
|
|
|
success: function(res) {
|
|
|
|
setTimeout(function() {
|
|
|
|
// #ifndef H5
|
|
|
|
uni.navigateBack({
|
|
|
|
delta: 1,
|
|
|
|
});
|
|
|
|
// #endif
|
|
|
|
// #ifdef H5
|
|
|
|
history.back();
|
|
|
|
// #endif
|
|
|
|
|
|
|
|
}, 1200)
|
|
|
|
},
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
methods: {
|
2020-11-05 08:21:06 +00:00
|
|
|
getList: function() {
|
|
|
|
let that = this;
|
|
|
|
let recordList = that.recordList;
|
|
|
|
let recordListNew = [];
|
2021-06-11 09:41:16 +00:00
|
|
|
if (that.statuss == true) return;
|
2020-11-05 08:21:06 +00:00
|
|
|
getRecordApi({
|
|
|
|
page: that.page,
|
|
|
|
limit: that.limit
|
|
|
|
}).then(res => {
|
2021-06-11 09:41:16 +00:00
|
|
|
let len = res.data.list ? res.data.list.length : 0;
|
|
|
|
let recordListData = res.data.list || [];
|
2020-11-05 08:21:06 +00:00
|
|
|
recordListNew = recordList.concat(recordListData);
|
2021-06-11 09:41:16 +00:00
|
|
|
that.statuss = that.limit > len;
|
2020-11-05 08:21:06 +00:00
|
|
|
that.page = that.page + 1;
|
|
|
|
that.$set(that, 'recordList', recordListNew);
|
|
|
|
});
|
|
|
|
},
|
2020-08-13 08:12:57 +00:00
|
|
|
getRecordList: function() {
|
|
|
|
let that = this;
|
|
|
|
let page = that.page;
|
|
|
|
let limit = that.limit;
|
2021-06-11 09:41:16 +00:00
|
|
|
let statuss = that.statuss;
|
2020-08-13 08:12:57 +00:00
|
|
|
let recordList = that.recordList;
|
|
|
|
let recordListNew = [];
|
2021-06-11 09:41:16 +00:00
|
|
|
if (statuss == true) return;
|
2020-08-13 08:12:57 +00:00
|
|
|
getCommissionInfo({
|
|
|
|
page: page,
|
|
|
|
limit: limit
|
2021-02-06 09:25:18 +00:00
|
|
|
}).then(res => {
|
2021-06-11 09:41:16 +00:00
|
|
|
if (res.data.list) {
|
|
|
|
let len = res.data.list ? res.data.list.length : 0;
|
|
|
|
let recordListData = res.data.list || [];
|
2020-12-23 07:56:45 +00:00
|
|
|
recordListNew = recordList.concat(recordListData);
|
2021-06-11 09:41:16 +00:00
|
|
|
that.statuss = limit > len;
|
2020-12-23 07:56:45 +00:00
|
|
|
that.page = page + 1;
|
|
|
|
that.$set(that, 'recordList', recordListNew);
|
|
|
|
}
|
2020-08-13 08:12:57 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
},
|
|
|
|
onReachBottom: function() {
|
|
|
|
this.getRecordList();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
|
|
.commission-details .promoterHeader .headerCon .money {
|
|
|
|
font-size: 36rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
.commission-details .promoterHeader .headerCon .money .num {
|
|
|
|
font-family: 'Guildford Pro';
|
|
|
|
}
|
|
|
|
</style>
|