108 lines
2.1 KiB
Vue
108 lines
2.1 KiB
Vue
<!-- 任务中心 -->
|
|
<template>
|
|
<view class="container">
|
|
<!-- <u-navbar :background="background" :is-back="false" :title="title" :border-bottom="false"></u-navbar> -->
|
|
<view class="task_bg u-relative"></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, #DDEAFC 0%, #C8DBFA 49%, #AFC9F6 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">
|
|
.container{
|
|
width: 100%;
|
|
height: 100vh;
|
|
// display: flex;
|
|
// flex-direction: column;
|
|
.task_bg{
|
|
width: 100%;
|
|
height: 100%;
|
|
position: absolute;
|
|
top: 0;
|
|
background: url('../../static/images/task/prize_bg.png') no-repeat top center / cover;
|
|
|
|
}
|
|
|
|
.content{
|
|
z-index: 9;
|
|
padding: 370rpx 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> |