|
|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <block v-if="!$util.isEmpty(list.data)">
|
|
|
+ <block v-if="!$util.isEmpty(list)">
|
|
|
<t-table :headerBackgroundColor="'#F0F2F6'">
|
|
|
<t-tr header>
|
|
|
<t-th v-for="(item, index) in columns" :key="index" :align="item.align">
|
|
|
@@ -29,44 +29,71 @@
|
|
|
|
|
|
<script>
|
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
+import { withdrawCashList } from '@/api/store'
|
|
|
+import list from '@/mixins/list'
|
|
|
export default {
|
|
|
name: "withDraw", //提现记录
|
|
|
components: {
|
|
|
AppWrapperEmpty
|
|
|
},
|
|
|
+ mixins:[list],
|
|
|
data() {
|
|
|
return {
|
|
|
columns: [
|
|
|
{
|
|
|
- name: "事项",
|
|
|
- dataIndex: "typeName",
|
|
|
+ name: "提现时间",
|
|
|
+ dataIndex: "time",
|
|
|
color: "info",
|
|
|
align: "center"
|
|
|
},
|
|
|
{
|
|
|
- name: "提现记录",
|
|
|
- dataIndex: "typeName",
|
|
|
- color: "info",
|
|
|
- align: "center"
|
|
|
- },
|
|
|
- {
|
|
|
- name: "余额",
|
|
|
- dataIndex: "typeName",
|
|
|
+ name: "提现金额",
|
|
|
+ dataIndex: "amount",
|
|
|
color: "info",
|
|
|
align: "center"
|
|
|
},
|
|
|
{
|
|
|
name: "状态",
|
|
|
- dataIndex: "typeName",
|
|
|
+ dataIndex: "statusText",
|
|
|
color: "info",
|
|
|
align: "center"
|
|
|
}
|
|
|
],
|
|
|
- list: [{ time: "1221", typeName: "hahah", stock: "121255" }]
|
|
|
};
|
|
|
},
|
|
|
- methods: {},
|
|
|
- onPullDownRefresh() {}
|
|
|
+ methods: {
|
|
|
+ async init(){
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中'
|
|
|
+ });
|
|
|
+ try {
|
|
|
+ const res = await withdrawCashList({
|
|
|
+ page:this.list.page
|
|
|
+ })
|
|
|
+ res.data = res.data.list.map(i=>({
|
|
|
+ ...i,
|
|
|
+ statusText: i.status ==1?'待处理':i.status ==2?'处理中':'已完成'
|
|
|
+ }))
|
|
|
+ completes(res)
|
|
|
+ } finally {
|
|
|
+ uni.hideLoading();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async onPullDownRefresh() {
|
|
|
+ this.resetList();
|
|
|
+ await this.init()
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ },
|
|
|
+ async onReachBottom() {
|
|
|
+ if (!this.list.finished) {
|
|
|
+ await this.init()
|
|
|
+ uni.stopPullDownRefresh();;
|
|
|
+ } else {
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
};
|
|
|
</script>
|
|
|
|