<!-- 任务中心 -->
<template>
	<view class="container">
		<u-navbar :background="background" :is-back="true" :title="title" :border-bottom="false"></u-navbar>
		<view style="width: 100%;position: absolute;">
			<image class="task_bg" src="../../static/images/task/prize_bg.png" mode="widthFix"></image>
		</view>
		<view class="content u-relative" v-if="list.length">
			
			<view class="cell flex justify-between" v-for="(item,index) in list" :key="index"  >
				<image class="cell_icon" :src="item.url"></image>
				<view class="name u-font-24 text-bold ">{{item.name}}</view>
			</view>

		</view>
	
	</view>
</template>

<script>
	export default {
		
		data() {
			return {
				title: '',
				background: {
					backgroundImage: 'linear-gradient(to right, #F0987B 0%, #F0987B 49%, #F0987B 100%)'
				},
				list: [],
				source: null
			}
		},
		onLoad(options) {
			console.log(options)
			if ( options.source ) {
				this.source = options.source
			}
			this.getList()
		},
		methods: {
			
			/**
			 * 获取列表
			 */
			getList() {
				this.$Request.getT('app/discSpinning/selectDiscSpinning', {source:this.source}).then(res => {
					if (res.code == 0 ) {
						this.list = res.data.records
					}
				})
			},
			
		}
	}
</script>

<style lang="scss">
	page{
		background-color: #FAF8F3;
	}
	.container{
		width: 100%;
		min-height: 100vh;
		// display: flex;
		// flex-direction: column;
		.task_bg{
			width: 100%;
			// height: 100%;
			// position: absolute;
			// top: 88rpx;
			// background: url('../../static/images/task/prize_bg.png') no-repeat top center / cover;
			
		}
		
		.content{
			z-index: 9;
			padding: 282rpx 28rpx 0 28rpx;
			display: flex;
			flex-direction: row;
			flex-wrap: wrap;
			justify-content: space-between;
			.cell{
				display: flex;
				flex-direction: column;
				align-items: center;
				background: linear-gradient( 315deg, #FFFFFF 0%, #F9E3D9 100%);
				border-radius: 32rpx 32rpx 32rpx 32rpx;
				border: 4rpx solid #FFFFFF;
				margin-bottom: 48rpx;
				padding: 36rpx 28rpx;
				.cell_icon{
					width: 244rpx!important;
					height: 198rpx!important;
					border-radius: 16rpx!important;
					margin-bottom: 32rpx;
				}
				
				.name{
					font-weight: bold;
					font-size: 28rpx;
					color: #333333;
				}
				
			}
		
		}
	
	}
	

</style>