<template>
	<view>
		<view class="list">
			<view class="item" v-for="(item,index) in list" :key="index" @click="go_detail(item.id,item.title)">
				<view class="line">
					<!-- <view class="tip">未举办</view> -->
					<!-- <view class="tip" style="background-color: #009FE8;">开会中</view> -->
					<!-- <view class="tip" style="background-color: #BEBEBE;">已过期</view> -->
					<view class="title">{{item.title}}</view>
				</view>
				<view class="text">时间：{{item.time}}</view>
				<view class="text">地点：{{item.place}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[]
			};
		},
		onLoad() {
			this.get_list()
		},
		methods:{
			// 会议列表
			get_list(){
				this.$api.conference_list({
					
				}).then((res)=>{
					console.log(res.data.data)
					
					this.list = res.data.data
					
					if(this.list.length == 0){
						uni.showToast({
							icon:"none",
							title:"暂无会议"
						})
						setTimeout(()=>{
							uni.navigateBack()
						},1500)
					}
				})
			},
			go_detail(id,title){
				uni.navigateTo({
					url:"./detail/detail?id=" + id + "&title=" + title
				})
			}
		}
	}
</script>

<style lang="scss">
	page{
		box-sizing: border-box;
		padding: 25rpx;
	}
	.list{
		.item{
			margin-bottom: 20rpx;
			
			padding-bottom: 20rpx;
			border-bottom: 1rpx solid #F0F0F0;
			.line{
				display: flex;
				align-items: center;
				
				height: 60rpx;
				.tip{
					width: 100rpx;
					text-align: center;
					color: #FFFFFF;
					font-size: 26rpx;
					
					background-color: #2ABD62;
					border-radius: 10rpx;
				}
				.title{
					margin-left: 20rpx;
					font-size: 34rpx;
				}
			}
			.text{
				// margin-left: 120rpx;
				margin-left: 20rpx;
				font-size: 26rpx;
				color: #666;
			}
		}
	}
</style>
