<template>
	<view class="recharge">
		<view class="mine">
			我的余额（元）
		</view>
		<view class="money">
			500.00
		</view>
		<view class="to-withdrawal">
			<AllRight name='去提现' :withdrawal="true" @toDetail="toWithdrawal" />
		</view>
		<view class="select-money">
			<view class="title">
				余额账户充值
			</view>
			<!-- 选择充值金额 -->
			<view class="select-recharge">
				<view class="recharge-money" :class="{'back-red':backgroundRed==1}" @click="selectMoney(1)">
					<text>￥</text>100
				</view>
				<view class="recharge-money" :class="{'back-red':backgroundRed==2}" @click="selectMoney(2)">
					<text>￥</text>200
				</view>
				<view class="recharge-money" :class="{'back-red':backgroundRed==3}" @click="selectMoney(3)">
					<text>￥</text>300
				</view>
				<view class="recharge-money" :class="{'back-red':backgroundRed==4}" @click="selectMoney(4)">
					<text>￥</text>600
				</view>
				<view class="recharge-money" :class="{'back-red':backgroundRed==5}" @click="selectMoney(5)">
					<text>￥</text>800
				</view>
				<view class="recharge-money" :class="{'back-red':backgroundRed==6}" @click="selectMoney(6)">
					<text>￥</text>1000
				</view>
			</view>
			<!-- 选择充值金额 -->
			<u--input placeholder="输入自定义金额" prefixIcon="rmb"
				prefixIconStyle="font-size: 36rpx;color: #000;font-weight:600"></u--input>

			<view class="payment">
				<view class="title">
					支付方式
				</view>
				<view class="wx-pay">
					<view class="logo">
						<image src="../../static/mine/323.png" class="wx-logo" mode=""></image>
						微信支付
					</view>

				</view>
			</view>
			<button class="recharge-btn">充值</button>
		</view>

	</view>
</template>

<script>
	import AllRight from '../mineComponent/allRight/allRight.vue'

	export default {
		components: {
			AllRight
		},
		data() {
			return {
				backgroundRed: 1
			}
		},
		methods: {
			selectMoney(num) {
				this.backgroundRed = num
			},
			toWithdrawal() {
				uni.navigateTo({
					url: '/pageC/withdrawal/withdrawal'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.recharge {
		height: 100vh;
		background-color: #fff;

		.mine {
			padding-top: 63rpx;
			text-align: center;
			color: #222;
			font-size: 28rpx;
			border-top: 1px solid #ccc;
		}

		.money {
			font-size: 84rpx;
			text-align: center;
			color: #222;
			font-weight: 600;
			margin-top: 28rpx;
			margin-bottom: 20rpx;
		}

		.to-withdrawal {
			display: flex;
			justify-content: center;
		}

		.select-money {
			padding-top: 42rpx;
			border-top: 1px solid #ccc;
			margin: 0 auto;
			margin-top: 64rpx;
			width: 94%;

			.title {
				font-size: 32rpx;
				color: #222;
				font-weight: 500;
				margin-bottom: 36rpx;
			}

			.payment {
				margin-top: 46rpx;

				.wx-pay {
					height: 100rpx;
					background-color: #f4f4f4;
					width: 94%;
					display: flex;
					justify-content: space-between;
					align-items: center;
					padding: 0 20rpx;
					font-size: 32rpx;

					.logo {
						display: flex;
						align-items: center;
					}

					.wx-logo {
						width: 39rpx;
						height: 34rpx;
						margin-right: 18rpx;
					}
				}
			}

			.recharge-btn {
				background-color: #f83224;
				border-radius: 44rpx;
				color: #fff;
				margin-top: 150rpx;
			}

			.select-recharge {
				display: flex;
				justify-content: space-between;
				flex-wrap: wrap;

				.recharge-money {
					width: 210rpx;
					height: 120rpx;
					border: 1px solid #f83224;
					border-radius: 16rpx;
					text-align: center;
					line-height: 120rpx;
					font-size: 40rpx;
					font-weight: 600;
					margin-bottom: 26rpx;

					text {
						font-size: 24rpx;
					}
				}

				.back-red {
					background-color: #f83224;
					color: #fff;
				}
			}
		}
	}

	/deep/.u-input {
		background-color: #f4f4f4;
		height: 80rpx;
	}
</style>