fuwei 5 年 前
コミット
dc21e09bcf

+ 4 - 0
ghs/src/api/store/index.js

@@ -3,6 +3,10 @@ import https from '@/plugins/luch-request_0.0.7/request'
 export const applyList = data => {
 	return https.get('/apply/list', data)
 }
+export const withdrawCashList = data => {
+	return https.get('/cash/list', data)
+}
+
 // export const mainMy = async (data) => {
 // 	return https.get("/main/my", data);
 // };

+ 5 - 3
ghs/src/pagesStore/me/incomeExpenses.vue

@@ -44,7 +44,7 @@ export default {
 					align: "center"
 				},
 				{
-					name: "提现记录",
+					name: "收支金额",
 					dataIndex: "typeName",
 					color: "info",
 					align: "center"
@@ -56,7 +56,7 @@ export default {
 					align: "center"
 				},
 				{
-					name: "状态",
+					name: "操作",
 					dataIndex: "typeName",
 					color: "info",
 					align: "center"
@@ -66,7 +66,9 @@ export default {
 		};
 	},
 	methods: {},
-	onPullDownRefresh() {}
+	onPullDownRefresh() {
+
+	}
 };
 </script>
 

+ 42 - 15
ghs/src/pagesStore/me/withdraw.vue

@@ -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>