<template>
	<view style="background-color: #fff;">
		<u-icon name="arrow-left" color="#646668" size="28" style="float: left;margin-top:2%;" @click="gotoBack" />
		<view :style="{ paddingTop: safeAreaInsets.top + 'px' }" class="page-navbar">充值</view>
	</view>
	<u-line></u-line>
	<view class="recharge">
		<view class="balance">
			<span style="font-size: 14;font-weight: 600;">{{'余额'}}</span>
			<span style="font-size: 22px; font-weight: 600;">{{'剩余金币: 0.00奖门令'}}</span>
		</view>
		<view class="setMeal">
			<view v-for="(item,index) in setMealList" :key="index" class="grid-item"
				:class="listClickColor === index ? 'clickColor': ''">
				<view class="content" @click="ListBtn(index)">
					<span style="font-size: 18px; font-weight: 600;">{{item.money}}</span>
					<span style="font-size: 14px; font-weight: 600;">{{item.content}}</span>
				</view>
			</view>
		</view>
		<view class="rechargeBtn">
			<view class="rechargeBtn-text">
				<span style="font-weight: 600;">{{'套餐充值'}}</span>
				<span style="font-size: 10px; font-weight: 600; color: #c6c6c6;">{{'1人民币/1奖门令'}}</span>
			</view>
			<!-- <u-button text="雪月夜"></u-button> -->
			<u-button size="large" shape="circle" color="linear-gradient(to bottom, #555555, rgba(0, 0, 0))">
				<span style="color: #e4b698;">立即充值</span>
			</u-button>
		</view>
		<view class="hintInfo">
			<span style="font-size: 16px; font-weight: 600; color: #e4b698;">温馨提示:</span>
			<p style="font-size: 12px;margin-top: 3%;">
				&nbsp;&nbsp;1、足球奖门人非购彩平台，奖门令充值成功后，只可用于购买专家方案、购买套餐等。
				不支持提现、购彩等操作;<br>
				2、支付成功后，奖门令将会在1-5分钟内到账，请合理安排充值时间；<br>
				3、奖门令充值和消费过程中遇到问题，请及时联系奖门人客服;<br>
				4、客服微信号：130000000000;<br>
				5、一经充值不予退换；<br>
				6、本商城的全部方案仅供参考,投注需谨慎,如需购彩请前往彩票店<br>
			</p>
		</view>
	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue'
	const {
		safeAreaInsets
	} = uni.getSystemInfoSync();
	const listClickColor = ref(0)
	const setMealList = ref([{
			money: '199元',
			content: '200奖门令增199积分'
		},
		{
			money: '599元',
			content: '600奖门令增599积分'
		},
		{
			money: '999元',
			content: '1038奖门令增999积分'
		},
		{
			money: '2024元',
			content: '2188奖门令增2024积分'
		},
		{
			money: '5000元',
			content: '5388奖门令增5000积分'
		},
	])

	const src = ref('https://cdn.uviewui.com/uview/album/1.jpg');
	const gotoBack = () => {
		uni.navigateBack({
			delta: 1
		})
	}
	const ListBtn = (index) => {
		listClickColor.value = index
	}
</script>

<style lang="scss" scoped>
	.recharge {
	    width: 94%;
	    height: 85vh;
		padding: 3%;

		.balance {
			width: 100%;
			height: 15vh;
			background-image: linear-gradient(to bottom, #555555, rgba(0, 0, 0));
			border-radius: 5px 40px 5px 5px;
			box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.6);
			color: #e4b698;
			display: flex;
			flex-direction: column;
			justify-content: space-evenly;

			span {
				margin-left: 10%;
			}
		}

		.setMeal {
			margin: 5% 0;
			height: 20vh;
			width: 100%;
			display: grid;
			grid-template-columns: repeat(3, 1fr);
			/* 创建两列 */
			grid-gap: 10px;

			/* 列间隔 */
			.grid-item {
				padding: 5%;
				color: #e4b698;
				background-color: #fcf9f4;
				border: 1px solid #e7dad0;
				border-radius: 5px;
			}

			.content {
				width: 100%;
				height: 100%;
				display: flex;
				flex-direction: column;
				justify-content: space-evenly;
			}
		}
	}

	.clickColor {
		background-image: linear-gradient(to bottom, #555555, rgba(0, 0, 0));
	}

	.rechargeBtn {
		width: 100%;
		height: 13vh;
		display: flex;
		flex-direction: column;
		justify-content: space-around;

		.rechargeBtn-text {
			width: 50%;
			display: flex;
			justify-content: space-between;
			align-items: center;
		}
	}
	.hintInfo{
		width: 100%;
		height: 20vh;
	}
</style>