diff --git a/api/user.js b/api/user.js index 229ca81..febb0fe 100644 --- a/api/user.js +++ b/api/user.js @@ -74,8 +74,8 @@ export function getAdminApplyAPI(merId, data) { /** * 提现记录 */ -export function getAdminApplyListAPI(merId) { - return request.get(`admin/${merId}/lis_apply`); +export function getAdminApplyListAPI(merId, data) { + return request.get(`admin/${merId}/lis_apply`, data); } /** * 获取用户信息 diff --git a/pages/users/gather_list/index.vue b/pages/users/gather_list/index.vue index b211b52..eab6331 100644 --- a/pages/users/gather_list/index.vue +++ b/pages/users/gather_list/index.vue @@ -1,68 +1,67 @@ @@ -78,160 +77,189 @@ // +---------------------------------------------------------------------- import { getAdminApplyListAPI - } from '@/api/user.js' + } from '@/api/user.js'; + import Loading from '@/components/Loading/index.vue'; export default { + components: { + Loading + }, data() { return { sum: 0, - count:0, + count: 0, scrollTop: 0, - endDate: '', + endDate: '', merId: '', - UserApplylist:[] + UserApplylist: [], + + + loaded: false, + loading: false, + loadTitle: '加载更多', + where: { + page: 1, + limit: 15, + keyword: '', + start_time: '' + }, + all_extract: 0, + all_count: 0, + extractSum: 0, + + value1: Number(new Date()) } }, computed: { - sumTofixed(){ - return this.returnFloat(this.sum) + sumTofixed() { + return this.returnFloat(this.all_extract) } }, - watch: { - }, onLoad(option) { - this.merId = option.mer_id - let date = new Date(); - this.endDate = `${date.getFullYear()}-${date.getMonth()+1}-01` - console.log(this.endDate); - // console.log(this.merId); + this.merId = option.mer_id; + let date = new Date(); + this.endDate = `${date.getFullYear()}-${date.getMonth()+1}-01` this.ApplyList() - // this.UserApplylist.forEach((item)=>{ - // console.log(item.extract_money); - // }) - }, - methods: { - changeDate(e){ - console.log(e.detail.value); - }, - /**数字强制转为两位小数*/ - returnFloat(value){ - var value=Math.round(parseFloat(value)*100)/100; - var xsd=value.toString().split("."); - if(xsd.length==1){ - value=value.toString()+".00"; - return value; - } - if(xsd.length>1){ - if(xsd[1].length<2){ - value=value.toString()+"0"; - } - return value; - } - }, - tixian() { - uni.navigateBack({ - delta: 1 - }); - }, - ApplyList(){ - getAdminApplyListAPI(this.merId).then(res=>{ - console.log(res); - this.UserApplylist=res.data.list - this.count=this.UserApplylist.length - this.UserApplylist.forEach(item=>{ - item.financial_account.bank_code=item.financial_account.bank_code.substr(-4) - console.log(item.financial_account.bank_code); - // item.create_time=item.create_time.substr(0,10) - // console.log(parseInt(item.extract_money)); - }) - for(let i =0; i{ - console.log(err); - }) - } }, + // 下拉到底部 + onReachBottom() { + this.ApplyList(); + }, + + methods: { + + formatter(type, value) { + if (type === 'year') { + return `${value}年` + } + if (type === 'month') { + return `${value}月` + } + if (type === 'day') { + return `${value}日` + } + return value + }, + // 查看 + handleView(item) { + if (!item.image || item.length == 0) return; + uni.previewImage({ + urls: [...item.image] + }) + }, + + ApplyList() { + var that = this; + if (that.loading || that.loaded) return; + that.loading = true; + that.loadTitle = ''; + + getAdminApplyListAPI(this.merId, this.where).then(res => { + that.loading = false; + that.loaded = res.data.list.length < that.where.limit; + that.UserApplylist.push.apply(that.UserApplylist, res.data.list); + that.where.page = that.where.page + 1; + that.loadTitle = that.loaded ? '已全部加载' : '加载更多'; + + //截取银行卡后四位 + this.UserApplylist.forEach(item => { + item.financial_account.bank_code = item.financial_account.bank_code.substr(-4) + }); + + this.count = res.data.count; + this.extractSum = res.data.extractSum || 0; //已提现金额 + this.all_count = res.data.all_count || 0; + this.all_extract = res.data.all_extract || 0; + }).catch(err => { + that.loading = false; + that.loadTitle = '加载更多'; + }) + }, + + /**数字强制转为两位小数*/ + returnFloat(value) { + var value = Math.round(parseFloat(value) * 100) / 100; + var xsd = value.toString().split("."); + if (xsd.length == 1) { + value = value.toString() + ".00"; + return value; + } + if (xsd.length > 1) { + if (xsd[1].length < 2) { + value = value.toString() + "0"; + } + return value; + } + }, + }, } \ No newline at end of file diff --git a/pages/users/gather_list/index1.vue b/pages/users/gather_list/index1.vue new file mode 100644 index 0000000..3808729 --- /dev/null +++ b/pages/users/gather_list/index1.vue @@ -0,0 +1,390 @@ + + + + + \ No newline at end of file diff --git a/pages/withdrawal/add.vue b/pages/withdrawal/add.vue index 0981ad5..9ea77c0 100644 --- a/pages/withdrawal/add.vue +++ b/pages/withdrawal/add.vue @@ -201,7 +201,7 @@ 认证失败 - 请检查“姓名”,“身份证”,“银行卡”,“手机号码”是否正确 + 请检查“姓名”“身份证”“银行卡”“手机号码”是否正确 当日剩余认证次数({{errorCount}})次 diff --git a/pages/withdrawal/index.vue b/pages/withdrawal/index.vue index 8dbbae3..2eec8b4 100644 --- a/pages/withdrawal/index.vue +++ b/pages/withdrawal/index.vue @@ -35,7 +35,7 @@ - 银行卡 + 开户银行 {{bankInfo.financial_account.bank}} @@ -77,6 +77,10 @@ + + 开户银行 + {{bankInfo.financial_account.bank}} + 对公账户 {{bankInfo.financial_account.name}} @@ -85,10 +89,6 @@ 银行账号 {{bankInfo.financial_account.bank_code}} - - 开户银行 - {{bankInfo.financial_account.bank}} - 开户网点 {{bankInfo.financial_account.bank_branch}} @@ -356,7 +356,7 @@ this.$util.Tips({ title: "提现申请成功,请等待审核!" }, () => { - uni.navigateBack() + this.payForm.extract_money = ''; }) }).catch(err => { uni.hideLoading();