mirror of
https://gitee.com/ZhongBangKeJi/crmeb_java.git
synced 2026-04-23 20:08:35 +08:00
全新UI视觉体验,移动端API优化降低重复调用,提高并发6倍,修复N多Bug
This commit is contained in:
@@ -6,25 +6,36 @@
|
||||
<view>
|
||||
<view class='name'>{{name}}</view>
|
||||
<view class='money' v-if="recordType == 4">¥<text class='num'>{{extractCount}}</text></view>
|
||||
<view class='money' v-else>¥<text class='num'>{{recordCount}}</text></view>
|
||||
<view class='money' v-else>¥<text class='num'>{{commissionCount}}</text></view>
|
||||
</view>
|
||||
<view class='iconfont icon-jinbi1'></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='sign-record' v-if="recordType == 4">
|
||||
<block v-for="(item,index) in recordList" :key="index" v-if="recordList.length>0">
|
||||
<view class='list'>
|
||||
<view class='list pad30'>
|
||||
<view class='item'>
|
||||
<view class='data'>{{item.date}}</view>
|
||||
<view class='listn'>
|
||||
<view class='listn borRadius14'>
|
||||
<block v-for="(child,indexn) in item.list" :key="indexn">
|
||||
<view class='itemn acea-row row-between-wrapper'>
|
||||
<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 class='name line1'>{{child.status | statusFilter}}</view>
|
||||
<view>{{child.createTime}}</view>
|
||||
</view>
|
||||
<view class='num font-color' v-if="child.status == -1">+{{child.extractPrice}}</view>
|
||||
<view class='num font-color' v-if="child.status == 1">+{{child.extractPrice}}
|
||||
</view>
|
||||
<view class='num' v-else>-{{child.extractPrice}}</view>
|
||||
<!-- <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> -->
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
@@ -37,17 +48,18 @@
|
||||
</view>
|
||||
<view class='sign-record' v-else>
|
||||
<block v-for="(item,index) in recordList" :key="index" v-if="recordList.length>0">
|
||||
<view class='list'>
|
||||
<view class='list pad30'>
|
||||
<view class='item'>
|
||||
<view class='data'>{{item.date}}</view>
|
||||
<view class='listn'>
|
||||
<view class='listn borRadius14'>
|
||||
<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>
|
||||
<view>{{child.updateTime}}</view>
|
||||
</view>
|
||||
<view class='num font-color' v-if="child.type == 1">+{{child.price}}</view>
|
||||
<view class='num font-color' v-if="child.type == 1">+{{child.price}}
|
||||
</view>
|
||||
<view class='num' v-else>-{{child.price}}</view>
|
||||
</view>
|
||||
</block>
|
||||
@@ -56,12 +68,12 @@
|
||||
</view>
|
||||
</block>
|
||||
<view v-if="recordList.length == 0">
|
||||
<emptyPage title='暂无提现记录~'></emptyPage>
|
||||
<emptyPage title='暂无佣金记录~'></emptyPage>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- #ifdef MP -->
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
||||
<!-- #endif -->
|
||||
<home></home>
|
||||
</view>
|
||||
@@ -70,9 +82,7 @@
|
||||
<script>
|
||||
import {
|
||||
getCommissionInfo,
|
||||
getSpreadInfo,
|
||||
getRecordApi,
|
||||
getCountApi
|
||||
} from '@/api/user.js';
|
||||
import {
|
||||
toLogin
|
||||
@@ -93,6 +103,16 @@
|
||||
emptyPage,
|
||||
home
|
||||
},
|
||||
filters: {
|
||||
statusFilter(status) {
|
||||
const statusMap = {
|
||||
'-1': '未通过',
|
||||
'0': '审核中',
|
||||
'1': '已提现'
|
||||
}
|
||||
return statusMap[status]
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
name: '',
|
||||
@@ -101,25 +121,20 @@
|
||||
limit: 10,
|
||||
recordList: [],
|
||||
recordType: 0,
|
||||
recordCount: 0,
|
||||
status: false,
|
||||
statuss: false,
|
||||
isAuto: false, //没有授权的不会自动授权
|
||||
isShowAuth: false ,//是否隐藏授权
|
||||
extractCount:0
|
||||
isShowAuth: false, //是否隐藏授权
|
||||
extractCount: 0
|
||||
};
|
||||
},
|
||||
computed: mapGetters(['isLogin']),
|
||||
onLoad(options) {
|
||||
if (this.isLogin) {
|
||||
this.type = options.type;
|
||||
this.extractCount = options.extractCount;
|
||||
this.commissionCount = options.commissionCount;
|
||||
} else {
|
||||
// #ifdef H5 || APP-PLUS
|
||||
toLogin();
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
this.isAuto = true;
|
||||
this.$set(this, 'isShowAuth', true);
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
onShow: function() {
|
||||
@@ -131,7 +146,6 @@
|
||||
this.name = '提现总额';
|
||||
this.recordType = 4;
|
||||
this.getList();
|
||||
this.getCount();
|
||||
} else if (type == 2) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: "佣金记录"
|
||||
@@ -139,7 +153,6 @@
|
||||
this.name = '佣金明细';
|
||||
this.recordType = 3;
|
||||
this.getRecordList();
|
||||
this.getRecordListCount();
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '参数错误',
|
||||
@@ -166,7 +179,6 @@
|
||||
methods: {
|
||||
onLoadFun() {
|
||||
this.getRecordList();
|
||||
this.getRecordListCount();
|
||||
},
|
||||
// 授权关闭
|
||||
authColse: function(e) {
|
||||
@@ -176,58 +188,41 @@
|
||||
let that = this;
|
||||
let recordList = that.recordList;
|
||||
let recordListNew = [];
|
||||
if (that.status == true) return;
|
||||
if (that.statuss == true) return;
|
||||
getRecordApi({
|
||||
page: that.page,
|
||||
limit: that.limit
|
||||
}).then(res => {
|
||||
let len = res.data.list.length;
|
||||
let recordListData = res.data.list;
|
||||
let len = res.data.list ? res.data.list.length : 0;
|
||||
let recordListData = res.data.list || [];
|
||||
recordListNew = recordList.concat(recordListData);
|
||||
that.status = that.limit > len;
|
||||
that.statuss = that.limit > len;
|
||||
that.page = that.page + 1;
|
||||
that.$set(that, 'recordList', recordListNew);
|
||||
});
|
||||
},
|
||||
getCount: function() {
|
||||
let that = this;
|
||||
if (status == true) return;
|
||||
getCountApi({
|
||||
page: that.page,
|
||||
limit: that.limit
|
||||
}).then(res => {
|
||||
that.extractCount = res.data.count;
|
||||
});
|
||||
},
|
||||
getRecordList: function() {
|
||||
let that = this;
|
||||
let page = that.page;
|
||||
let limit = that.limit;
|
||||
let status = that.status;
|
||||
let statuss = that.statuss;
|
||||
let recordType = that.recordType;
|
||||
let recordList = that.recordList;
|
||||
let recordListNew = [];
|
||||
if (status == true) return;
|
||||
if (statuss == true) return;
|
||||
getCommissionInfo({
|
||||
page: page,
|
||||
limit: limit
|
||||
}).then(res => {
|
||||
if(res.data.list){
|
||||
let len = res.data.list.length;
|
||||
let recordListData = res.data.list;
|
||||
if (res.data.list) {
|
||||
let len = res.data.list ? res.data.list.length : 0;
|
||||
let recordListData = res.data.list || [];
|
||||
recordListNew = recordList.concat(recordListData);
|
||||
that.status = limit > len;
|
||||
that.statuss = limit > len;
|
||||
that.page = page + 1;
|
||||
that.$set(that, 'recordList', recordListNew);
|
||||
}
|
||||
});
|
||||
},
|
||||
getRecordListCount: function() {
|
||||
let that = this;
|
||||
getSpreadInfo().then(res => {
|
||||
that.recordCount = res.data.commissionCount;
|
||||
that.extractCount = res.data.extractCount;
|
||||
});
|
||||
}
|
||||
},
|
||||
onReachBottom: function() {
|
||||
|
||||
Reference in New Issue
Block a user