<template>
	<view class="running-water">
		<navbar :title="title[status]" leftClick @leftClick="leftClick" />
		
		<view class="tab-box">
			<view class="tab-box1">
				<uv-cell 
				center 
				border 
				:title="item.title"
				v-for="(item, index) in list"
				:value="x[item.type] + item.intger" 
				:label="item.createTime" />
			</view>
			
			<view 
			style="padding: 100rpx 0;"
			v-if="list.length == 0">
				<uv-empty 
				mode="history"
				textSize="28rpx"
				iconSize="100rpx"/>
			</view>
		</view>
		
	</view>
</template>

<script>
	import mixinsList from '@/mixins/list.js'
	export default {
		mixins: [mixinsList],
		data() {
			return {
				mixinsListApi : 'getWalletFlow',
				title : ['余额记录','积分记录'],
				agentFlow : {
					total : 0,
					records : [
						{
							type : 0,
							money : 100,
							createTime : '2024-04-02 20:00',
							title : "佣金提现",
						},
						{
							type : 0,
							money : 100,
							createTime : '2024-04-02 20:00',
							title : "佣金提现",
						},
						{
							type : 0,
							money : 100,
							createTime : '2024-04-02 20:00',
							title : "佣金提现",
						},
					]
				},
				x : ['+', '-' , '-' , '+'],
				status : 0,
			}
		},
		onLoad(e) {
			this.status = e.status
			this.mixinsListApi = ['getWalletFlow', 'getPointsFlow'][e.status]
		},
		methods: {
			leftClick() {		//返回钱包
				uni.navigateBack(-1)
			},
		}
	}
</script>

<style lang="scss" scoped>
.running-water{
	width: 750rpx;
	background: #F5F5F5;
	margin: 0 auto;
	min-height: 100vh;
	.tab-box{
		margin: 20rpx;
		background-color: #fff;
		border-radius: 20rpx;
		overflow: hidden;
	}
}
</style>
