<template>
	<view class="all" >
		<view class="list" v-for="item in 12" :key="item" :style="{color: item.status === '待开奖' ? 'green' : item.status === '已中奖' ? 'red' : 'yellow'}">
			<view class="listO">
				<view class="li">{{$t('set.a7')}}2022010223{{$t('set.a8')}}</view>
				<view class="lis">
					<view class="liss">{{$t('gameList.a1')}}</view>
				</view>
			</view>
			<view class="listT">
				<view class="TT">
					<view class="lsT">{{$t('gameList.a2')}}：</view>
					<view class="lisT">{{$t('gameList.a3')}}</view>
				</view>
				<view class="TT">
					<view class="lsT">{{$t('gameList.a4')}}：</view>
					<view class="lisT">10.00U</view>
				</view>
				<view class="TT">
					<view class="lsT">{{$t('gameList.a5')}}：</view>
					<view class="lisT">2023/3/18 12:00</view>
				</view>
			</view>
		</view>
	</view>
</template>
<script>
	import {getGame,test } from '@/api/game.js'
	export default {
		data() {
			return {
				item: [
					{
						status: '待开奖'
					}
				]
			};
		},
		onLoad() {
			this.getGame()
			
			uni.setNavigationBarTitle({
				title: this.$t("tab.a9"),
			});
		},
		//下拉刷新
		onPullDownRefresh() {
			let obj = this;
			//监听下拉刷新动作的执行方法，每次手动下拉刷新都会执行一次
			setTimeout(function() {
				obj.loadCodeList();
				uni.stopPullDownRefresh(); //停止下拉刷新动画
			}, 1000);
		},
		methods: {
			// 互娱记录
			async getGame() {
			  try {
			    const res = await getGame();
			    console.log('12312', res);
			  } catch (error) {
			    console.error('请求出错', error);
			  }
			}

		}
	};
</script>

<style lang="scss">
	.all {
		width: 750rpx;
		min-height: 100vh;
		background-color: $page-color-base;
	}
	.list {
		width: 710rpx;
		height: 300rpx;
		background: #191A1F;
		box-shadow: 0rpx 5rpx 24rpx 0rpx rgba(4,0,0,0.06);
		border-radius: 15rpx;
		margin-left: 20rpx;
		margin-top: 30rpx;
	}
	.listO {
		display: flex;
		justify-content: space-between;
	}
	.li {
		height: 31rpx;
		font-size: 32rpx;
		font-weight: bold;
		color: #FFFFFF;
		line-height: 47rpx;
		margin-left: 26rpx;
		margin-top: 35rpx;
	}
	.lis {
		width: 97rpx;
		height: 38rpx;
		background: #008001;
		border-radius: 5rpx;
		margin-top: 35rpx;
		margin-right: 30rpx;
	}
	.liss {
		height: 21rpx;
		font-size: 22rpx;
		font-weight: 500;
		color: #FFFFFF;
		line-height: 37rpx;
		margin-left: 13rpx;
	}
	.TT {
		display: flex;
		justify-content: start;
	}
	.lsT {
		// height: 100rpx;
		font-size: 28rpx;
		font-weight: 500;
		color: #999999;
		line-height: 47rpx;
		margin-left: 28rpx;
		margin-top: 20rpx;
	}
	.lisT {
		font-size: 32rpx;
		font-weight: bold;
		color: #FFFFFF;
		line-height: 47rpx;
		margin-top: 20rpx;
	}
</style>