<template>
	<view class="">
		<navigator :url="'/party/pages/party-meeting/detail?id='+item.id" class="card" v-for="(item,index) in list" :key="index">
			<view class="title text-cut-2">
				<image v-if="item.hitStatus==1" src="../../../static/icon/hot1.png" style="width: 55rpx;height: 34rpx;margin: 6rpx 6rpx 0 0;display: block;"></image>
				<text>{{item.name}}</text>
			</view>
			<view class="bottom">
				<view class="flex">
					<text v-text="item1.label" v-for="(item1,index) in partyMeetingClass" :key="index" v-if="item1.value==item.classId"></text>
					<text class="padding-left-30" style="margin-top:6rpx">{{item.updateTime}}</text>
				</view>
				<text class="text-pass" style="margin-top:6rpx">已开始</text>
			</view>
		</navigator>
	</view>
</template>

<script>
export default {
	props:{
		list:Array
	},
	data() {
		return {
			partyMeetingClass:[]
		}
	},
	created() {
		this.getDict()
	},
	methods: {
		getDict(){
			let dict=this.$cache.get('dict')
			if (dict&&!this.$isEmpty(dict.partyMeetingClass)) {
				//缓存中有字典值
				this.partyMeetingClass=dict.partyMeetingClass
				return
			}
			this.$api.dict({code:'party_meeting_class'}).then(res=>{
				res.data.forEach((item)=>{
					let tmp={
						value:item.dictKey,
						label:item.dictValue
					}
					this.partyMeetingClass.push(tmp)
				})
			})
		}
	},
}
</script>

<style lang="scss">
	.card{
		background-color: #FFFFFF;
		padding:45rpx 30rpx;
		border-bottom: 1rpx dashed #DDDDDD;
		
		.title{
			display: flex;
			font-size: 32rpx;
			color: #000;
			font-weight: 800;
			padding-bottom: 40rpx;
		}
		
		.bottom{
			display: flex;
			justify-content: space-between;
			color: #868686;
			font-size: 24rpx;
		}
	}
	
	.card:last-child{
		border: none;
	}
</style>