<template>
	<view class="content">
		<view class="content-money">
			<view class="money-box">
				<view class="goback-box" @click="toBack"><image class="goback" src="../../static/img/fanhui.png" mode=""></image></view>
				<view class="header">金豆池</view>
				<image class="money_bg" src="../../static/img/anchor8.png"></image>
				<view class="money">100</view>
				<view class="tip">
					金豆数量
				</view>
			</view>
		</view>
		<view class="title">
			- 实时瓜分 -
		</view>
		<scroll-view class="swiper-box" scroll-y>
			<!-- 空白页 -->
			<!-- <empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty> -->
			<!-- 订单列表 -->
			<template>
				<view v-for="(item, i) in 10" class="order-item flex">
					<view class="left flex">
						<view class="avator">
							<image src="" mode=""></image>
						</view>
						<view class="order-font">
							御风获得<text>20</text>个金豆
						</view>
					</view>
					<view class="time">
						2019-12-02 12:00:00
					</view>
				</view>
			</template>
			<!-- <uni-load-more :status="tabItem.loadingType"></uni-load-more> -->
		</scroll-view>
	</view>
</template>

<script>
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
import empty from '@/components/empty';
export default {
	components: {
		empty,
		uniLoadMore
	},
	onReady(res) {
		// 初始化获取页面宽度
		var _this = this;
		uni.getSystemInfo({
			success: resu => {
				const query = uni.createSelectorQuery();
				query.select('.swiper-box').boundingClientRect();
				query.exec(function(res) {
					_this.maxheight = resu.windowHeight - res[0].top + 'px';
					console.log('打印页面的剩余高度', _this.height);
				});
			},
			fail: res => {}
		});
	},
	methods:{
		toBack() {
			uni.switchTab({
				url: '/pages/user/user'
			});
		}
	}
};
</script>

<style lang="scss">
page {
	background: #ffffff;
	height: 100%;
}
.content-money {
	background: $page-color-base;
	// border: 2px solid #ffffff;
	// padding-top: var(--status-bar-height);
	.moneyTx {
		position: absolute;
		top: 120rpx;
		right: 0rpx;
		// width: 150rpx;
		padding: 10rpx 10rpx;
		border: 2px solid #ffffff;
		border-top-left-radius: 15rpx;
		border-bottom-left-radius: 15rpx;
		line-height: 1;
		font-size: $font-base;
		background: #ffffff;
	}
	.buttom-box {
		background-color: #ffffff;
		text-align: center;
		margin: 0 30rpx;
		padding: 20rpx 0;
		border-radius: $border-radius-sm;
		margin-top: -60rpx;
		.buttom {
			font-size: $font-lg;
			flex-grow: 1;
		}
		.interval {
			width: 2px;
			height: 60rpx;
			background-color: #eeeeee;
		}
		.icon {
			height: 36rpx;
			width: 36rpx;
			margin: 0 auto;
			.icon-img {
				width: 100%;
				height: 100%;
			}
		}
	}
}
.money-box {
	height: 430rpx;
	color: #ffffff;
	text-align: center;
	position: relative;
	background-color: pink;
	.header {
		position: absolute;
		left: 0;
		top: 0;
		width: 100%;
		height: 80rpx;
		font-size: 32rpx;
		font-weight: 700;
		z-index: 99;
		display: flex;
		justify-content: center;
		align-items: center;
	}
	.goback-box {
		position: absolute;
		left: 18rpx;
		top: 0;
		height: 80rpx;
		display: flex;
		align-items: center;
	}
	.goback {
		z-index: 100;
		width: 34rpx;
		height: 34rpx;
	}
	.money_bg {
		width: 100%;
		height: 430rpx;
		display: block;
	}
	.text {
		padding-top: 80rpx;
		font-size: $font-lg;
	}
	.money {
		position: absolute;
		top: 0;
		width: 100%;
		padding-top: 186rpx;
		font-size: 84rpx;
		font-weight: bold;
	}
	.tip {
		position: absolute;
		top: 0;
		width: 100%;
		text-align: center;
		padding-top: 304rpx;
		font-size: 26rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #FFFFFF;
	}
}

.title {
	height: 82rpx;
	line-height: 82rpx;
	text-align: center;
	font-size: 30rpx;
	font-family: PingFang SC;
	font-weight: 500;
	color: #333333;
	border-bottom: 1px solid #f0f0f0;
}

// 列表
.swiper-box {
	.order-item {
		padding: 18rpx 24rpx 14rpx;
		border-bottom: 1px solid #f0f0f0;
		.left {
			justify-content: flex-start;
			.avator {
				width: 70rpx;
				height: 70rpx;
				border-radius: 50rpx;
				background: #03A9F4;
				image {
					width: 70rpx;
					height: 70rpx;
					border-radius: 50rpx;
				}
			}
			.order-font {
				margin-left: 10rpx;
				font-size: 30rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #3F454B;
				text {
					color: #FF4D4C;
				}
			}
		}
		.time {
			font-size: 22rpx;
			font-family: PingFang SC;
			font-weight: 400;
			color: #999999;
		}
		
	}
}
.content {
	height: 100%;
	.empty-content {
		background-color: #ffffff;
	}
}
</style>
