<template>
	<view class="container">
		<uni-card is-full padding>
			<uni-section title="彩票" type="line" padding title-font-size="48upx">
				<uni-grid :column="4" border-color="#03a9f4" @change="change">
					<uni-grid-item :index="0">
						<view class="grid-item-box">
							<image class="image" src="/static/img/lottory/ssq.png" mode="aspectFill" />
						</view>
					</uni-grid-item>
					<uni-grid-item :index="1">
						<view class="grid-item-box">
							<image class="image" src="/static/img/lottory/kl8.png" mode="aspectFill" />
						</view>
					</uni-grid-item>
					<uni-grid-item :index="2">
						<view class="grid-item-box">
							<image class="image" src="/static/c3.png" mode="aspectFill" />
						</view>
					</uni-grid-item>
					<uni-grid-item :index="3">
						<view class="grid-item-box">
							<image class="image" src="/static/c4.png" mode="aspectFill" />
						</view>
					</uni-grid-item>
				</uni-grid>
			</uni-section>
		</uni-card>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				selectedIndex: -1
			}
		},
		onLoad() {

		},
		methods: {
			viewMoreInfo(i) {
				const url = './lottoryDetail' + i;
				uni.navigateTo({
					url: url
				});
			},
			change(e) {
				let {
					index
				} = e.detail
				this.viewMoreInfo(index);
			}
		}
	}
</script>

<style>
	.container {
		padding: 20upx;
	}

	.list-text {
		font-size: 48upx;
		font-weight: bold;
	}

	.image {
		width: 100%;
		height: 100%;
	}

	.text {
		font-size: 14px;
		margin-top: 5px;
	}


	.grid-dynamic-box {
		margin-bottom: 15px;
	}

	.grid-item-box {
		flex: 1;
		position: relative;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.grid-item-box-row {
		flex: 1;
		position: relative;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: center;
		padding: 15px 0;
	}
</style>