<template>
	<view>
		<view class="top-bg"></view>
		<view class="top-box">
			<view class="top">
				<text class="num">{{account.activeMoney}}</text>
				<text class="p">账户余额</text>
			</view>
			<view class="bottom">
				<view class="t">
					<view class="p">账户:</view>
					<view class="num">{{account.accountNo}}</view>
				</view>
				<view class="b">
					<view class="item">
						<view class="num">{{account.totalMoney}}</view>
						<view class="p">总金额</view>
					</view>
					<view class="item">
						<view class="num">{{account.deposit}}</view>
						<view class="p">保证金</view>
					</view>
				</view>
			</view>
		</view>
		<view class="btn-box">
			<view class="btn t" @click="chargeFn">立即充值</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				account: {
					totalMoney: 0,
					lockMoney: 0,
					activeMoney: 0,
					deposit: 0
				},
				info: {
					saleCount: 0,
					buyCount: 0
				}
			}
		},
		onShow() {
			
		},
		methods: {
			chargeFn(){
				
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #fff;
	}

	.top-bg {
		width: 100%;
		height: 400rpx;
		position: absolute;
		z-index: 0;
		background-image: linear-gradient(0deg, #fff 0%, #0080ff 40%);
	}

	.top-box {
		position: relative;
		z-index: 1;

		.top {
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;

			.num {
				color: #fff;
				font-size: 60rpx;
				margin-top: 50rpx;
			}

			.p {
				color: rgba(255, 255, 255, .7);
				margin-top: 10rpx;
			}
		}

		.bottom {
			display: flex;
			background-color: #fff;
			border-radius: 20rpx;
			margin: 40rpx;
			flex-direction: column;
			align-items: center;
			justify-content: center;

			.t {
				display: flex;
				width: 100%;
				padding: 40rpx 30rpx;
				box-sizing: border-box;
				border-bottom: 1px solid #eee;

				.p,
				.num {
					font-size: 30rpx;
					color: #191919;
				}

				.num {
					margin-left: auto;
				}
			}

			.b {
				display: flex;
				width: 100%;
				padding-bottom: 60rpx;

				.item {
					flex: 1;
					display: flex;
					flex-direction: column;
					align-items: center;
					justify-content: center;
					box-sizing: border-box;

					.num {
						color: #191919;
						font-size: 40rpx;
						margin-top: 50rpx;
						font-weight: bold;
					}

					.p {
						color: #999;
						margin-top: 10rpx;
					}
				}
			}
		}
	}

	.center-box {
		position: relative;
		z-index: 1;
		background-color: #fff;
		display: flex;
		border-radius: 20rpx;
		display: flex;
		margin: 30rpx 40rpx;
		padding: 15rpx;
		box-shadow: 0 0 50rpx rgba(0, 0, 0, 0.07);

		.item {
			flex: 1;
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;
			min-height: 150rpx;
			border-radius: 999px;
			margin: 15rpx;

			.p {
				color: #191919;
				font-size: 32rpx;
			}

			.num {
				font-size: 36rpx;
				color: #0080ff;
				margin-top: 10rpx;
			}
		}

		.l {
			background-color: #fff8f5;
		}

		.r {
			background-color: #fffcf0;
		}
	}

	.btn-box {
		position: relative;
		z-index: 1;
		display: flex;
		border-radius: 20rpx;
		display: flex;
		margin: 30rpx;
		padding: 30rpx;
		flex-direction: column;

		.btn {
			height: 88rpx;
			width: 70%;
			color: #fff;
			margin: 20rpx auto;
			display: flex;
			align-items: center;
			justify-content: center;
			border-radius: 10rpx;
		}

		.t {
			background-color: #0080ff;
		}

		.b {
			background-color: #ffb400;
		}
	}
</style>
