<template>
	<view class="records">
		<view class="r-wrap">
			<view class="r-inner" v-for="(item,index) in fxlogList" :key="index">
				<view class="r-inner-t">
					<view class="r-gx">
						贡献用户：{{item.fromname}}
					</view>
					<view class="r-sum">
						+ {{item.fxyj}}元
					</view>
				</view>
				<view class="r-inner-t" style="font-size: 28rpx;">
					<view class="r-gx" style="color: #747474;">
						订单号：{{item.ordernum}}
					</view>
					<view class="r-gx1" style="color: #747474;">
						消费：{{item.fxprice}}元
					</view>
				</view>
				<view class="r-inner-b">
					{{$u.timeFormat(item.ctime,'yyyy.mm.dd:hh:MM')}}
				</view>
				
			</view>
		</view>
		<u-empty margin-top="60" style="height: 0% !important;width: 100vw;" v-if="fxlogList.length==0" text="暂无更多数据" mode="list"></u-empty>
	</view>
</template>

<script>
	import mineApi from '@/api/mine/index.js'
	export default {
		data() {
			return {
				primary:this.$theme.primary,
				settingFile:getApp().globalData.siteinfo,
				fxlogList:[]
			};
		},
		methods:{
			getPolicy() {
				let that=this
				mineApi.fxlog().then(ret=>{
					if(ret.status==200){
						this.fxlogList=ret.data
					}else{
						this.$u.toast(ret.msg)
					}
				})
			},
		},
		onLoad(){
			this.getPolicy()
		},
		onPullDownRefresh() {
			this.getPolicy()
			setTimeout(()=>{
				uni.stopPullDownRefresh()
			},500)
		}
	}
</script>

<style lang="scss">
	page{
		background-color: #F1f1f1;
	}
	.records{
		width: 100%;
		height: 100%;
		.r-wrap{
			width: 100%;
			padding: 15rpx 15rpx 40rpx 15rpx;
			box-sizing: border-box;
			.r-inner{
				width: 100%;
				margin-bottom: 15rpx;
				background-color: white;
				border-radius: 15rpx;
				padding: 20rpx 30rpx 25rpx 20rpx;
				box-sizing: border-box;
				.r-inner-t{
					display: flex;
					justify-content: space-between;
					margin-bottom: 15rpx;
				}
				.r-inner-b{
					display: flex;
					justify-content: right;
					font-size: 28rpx;
					color:#474747;
				}
				.r-sum{
					font-weight: bold;
					color: $tab-color-1;
				}
				.r-gx{
					width: 500rpx;
					line-height: 40rpx;
				}
			}
		}
	}
</style>
