Browse Source

2021-11-15

hwq 4 years ago
parent
commit
83a6ec7ff4
1 changed files with 22 additions and 10 deletions
  1. 22 10
      pages/user/scoreAccumulate.vue

+ 22 - 10
pages/user/scoreAccumulate.vue

@@ -6,7 +6,7 @@
 		<view class="header">
 			<image src="../../static/img/i-bg.png" mode=""></image>
 			<view class="integral">
-				{{ integral || '0.00' }}
+				{{ money || '0.00' }}
 			</view>
 			<navigator url="/pages/money/conversionIntegral"><view class="right">转换USDT</view></navigator>
 		</view>
@@ -45,7 +45,7 @@
 </template>
 
 <script>
-	
+import { moneyLog, recharge, wallet } from '@/api/finance.js';
 import { integrallist } from '@/api/functionalUnit.js';
 import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
 import empty from '@/components/empty';
@@ -62,7 +62,7 @@ export default {
 			tabCurrentIndex: 0,
 			navList: [
 				{
-					state: 0,
+					state: 1,
 					text: '收入',
 					loadingType: 'more',
 					orderList: [],
@@ -70,7 +70,7 @@ export default {
 					limit: 10 //每次信息条数
 				},
 				{
-					state: 1,
+					state: 0,
 					text: '支出',
 					loadingType: 'more',
 					orderList: [],
@@ -78,9 +78,20 @@ export default {
 					limit: 10 //每次信息条数
 				},
 			],
+			money:'',
 		};
 	},
 	onShow() {
+		wallet({}).then(({ data }) => {
+			const obj = this
+			const arr = Object.keys(data.back);
+			console.log(arr);
+			arr.forEach(e => {
+				if(e == 'SCJF'){
+					obj.money = (data.back[e].money.money*1)
+				}
+			});
+		});
 		// 载入积分数据
 		this.loadData();
 	},
@@ -108,19 +119,20 @@ export default {
 			// 修改当前对象状态为加载中
 			navItem.loadingType = 'loading';
 
-			integrallist(
+			moneyLog(
 				{
 					page: navItem.page,
-					limit: navItem.limit
+					limit: navItem.limit,
+					pm:navItem.state
 				},
-				state
+				'SCJF'
 			)
 				.then(({ data }) => {
-					if (data.length > 0) {
-						navItem.orderList = navItem.orderList.concat(data);
+					if (data.list.length > 0) {
+						navItem.orderList = navItem.orderList.concat(data.list);
 						navItem.page++;
 					}
-					if (navItem.limit == data.length) {
+					if (navItem.limit == data.list.length) {
 						//判断是否还有数据, 有改为 more, 没有改为noMore
 						navItem.loadingType = 'more';
 						return;