<template>
	<view style="position: relative;height: 100%;">
		<view style="width: 100%;">
			<image src="/static/rank_bg.png" style="width: 100%;position: relative;top: -80rpx;"></image>
		</view>
		<view class="box">
			<view style="margin-top: 15rpx;">
				<u-row gutter="16" justify="center">
					<u-col span="2" text-align="center">
						<view class="r_t1" >
							我的<br>
							成绩
						</view>
					</u-col>
					<u-col span="5">
						<view style="vertical-align: middle;display: flex;">
							<image src="/static/avatar.png" style="width: 80rpx;height: 80rpx;"></image>
							<view class="r_t2">李宏杰</view>
						</view>
					</u-col>
					<u-col span="5">
						<view style="color: #0183FE;font-size: 28rpx;">
							<view style="line-height: 80rpx;">
								<text>第15名</text>
								<text style="margin-left: 30rpx;">12h</text>
							</view>
						</view>
					</u-col>
				</u-row>
			</view>
			<view >
				<view>
					<u-tabs :list="list" font-size="24"  :current="current" @change="change" active-color="#32467B"></u-tabs>
				</view>
				<view >
					<u-row >
						<u-col span="2" text-align="center">
							<view class="rank_t3">排名</view>
						</u-col>
						<u-col span="8" >
							<view class="rank_t3">姓名</view>
						</u-col>
						<u-col span="2" >
							<view class="rank_t3">时长</view>
						</u-col>
					</u-row>
				</view>
				<scroll-view class='main-scroll' scroll-y  >
					<view v-for="(item,index) in list2" :key="index" class="rank_item">
						<u-row >
							<u-col span="2" text-align="center">
								<view class="rank_t3">
									<image src="/static/sort_1.png" class="rank_img" v-if="index==0"></image>
									<image src="/static/sort_2.png" class="rank_img" v-if="index==1"></image>
									<image src="/static/sort_3.png" class="rank_img" v-if="index==2"></image>
									<view v-if="index>2" class="rank_t5">{{index+1}}</view>
								</view>
							</u-col>
							<u-col span="8" >
								<view style="vertical-align: middle;display: flex;">
									<image src="/static/avatar.png" style="width: 80rpx;height: 80rpx;"></image>
									<view class="rank_t4" style="padding-left: 30rpx;">陈政</view>
								</view>
							</u-col>
							<u-col span="2" text-align="left">
								<view class="rank_t4">72h</view>
							</u-col>
						</u-row>
					</view>
					
				</scroll-view>
				
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [{
					name: '日榜'
				}, {
					name: '总榜'
				}],
				current: 0,
				list2:[1,1,1,1,1,1,1,1,1,1,1],
			}
		},
		onLoad(option) {
			
		},
		onShow(){
		},
		methods: {
			change(index) {
				this.current = index;
			}
		
		},
		
	}
</script>

<style scope>
	.main-scroll{
	  position: absolute;
	  left: 0;
	  right: 0;
	  top: 300rpx;
	  bottom: 0;
	}
	.rank_t5{
		color: #AAB1B9;
		text-align: center;
	}
	.rank_t3{
		line-height: 80rpx;
	}
	.rank_t4{
		line-height: 80rpx;
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: bold;
		color: #32467B;
	}
	.rank_item{
		height: 100rpx;
		vertical-align: middle;
		padding: 0 25rpx;
	}
	.rank_img{
		width: 54rpx;
		height: 54rpx;
	}
	.rank_list{
		width: 100%;
		height: 100%;
		position: relative;

	}
	.rank_t3{
		font-size: 28rpx;
		font-family: PingFang SC;
		font-weight: 400;
		color: #959EA8;
	}
	.r_t2{
		font-size: 32rpx;
		font-family: PingFang SC;
		font-weight: bold;
		color: #32467B;
		line-height: 80rpx;
		margin-left: 30rpx;
	}
	.r_t1{
		font-size: 32rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #0183FE;
	}
	
page {
		background: #FFFFFF;
		height: 100%;
		
	}
	.box{
		height: 75%;
		width: 100%;
		border-top-right-radius: 32rpx;
		border-top-left-radius: 32rpx;
		z-index: 999;
		background-color: #FFFFFF;
		position: fixed;
		bottom: 0;
		padding: 25rpx;
	}
</style>
