<template>
	<view>
		<statusBar :item="navBarData"></statusBar>

		<listBlock1 :classList="activeList"></listBlock1>
		<!-- <view class="activeBox" v-for="(item,index) in activeList" :key="index">
			<view class="teaching_case">
				<view class="img">
					<image :src="activeList[index].pic" mode="aspectFill"></image>

				</view>

				<view class="right">
					<view class="title">
						<view class="tag bqZ-font">类型</view>
						<text class="three-font" style="font-weight: 600;">{{ item.acName }}</text>
					</view>

					<view class="introduce">
						{{ item.brief }}
					</view>

					<view class="operate">
						<view class="left">
							<view class="money fNum-font"><text class="three-font">￥</text> {{ item.cost }}</view>
							<view class="person">已报名{{ item.bnum }}/{{ item.pers }}人</view>
						</view>

						<view class="Oright" @click="gotoDetail" :data-all="item">
							<view class="text">查看详情</view>
							<view class="arrow">
								<image src="https://teacherapi.cocorobo.cn/teaching-file/static/mine/arrow-right-blue.png"
									mode="aspectFill"></image>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view> -->
		<view class="" style="width: 100%;height: 50rpx;">

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

<script>
	export default {
		data() {
			return {
				navBarData: {
					title: '我的活动',
					btn: 1
				},
				activeList: [],
			};
		},
		methods: {
			gotoDetail(e) {
				let data=e.currentTarget.dataset.all
				
				if(data.type<=1){
					uni.navigateTo({
						url: `/pages/activityDetail/activityDetail?acId=${data.acId}`,
					});
				}else{
					uni.navigateTo({
						url: `/pages/teachingDetail/teachingDetail?acId=${data.acId}`
					});
				}
			},
			// 获取数据
			getdata() {
				let data = {
					oid: this.$store.state.user.openid, //用户id
					type: 2
				}
				this.$request('/selectOperator', "POST", data).then(res => {
					console.log('获取数据',res[0]);
					this.activeList = res[0]
				})
			}
		},
		onShow() {
			this.getdata()
		}
	}
</script>

<style lang="scss">
	.activeBox {
		width: 100%;
		background-color: #fff;
		padding: 10px 0;

		.teaching_case {
			display: flex;
			justify-content: space-between;
			padding: 0 15px;

			.img {
				width: 160rpx;
				height: 160rpx;

				image {
					width: 100%;
					height: 100%;
					border-radius: 10rpx;
				}
			}

			.right {
				padding-left: 15px;
				flex: 1;
				display: flex;
				flex-direction: column;
				// align-content: flex-end;
				justify-content: space-between;

				.title {
					display: flex;
					align-items: center;

					margin-bottom: 5px;

					.tag {
						border: 1px #00b2b6 solid;
						// font-size: 20rpx;
						width: 64rpx;
						height: 38rpx;
						display: flex;
						white-space: nowrap;
						justify-content: center;
						align-items: center;
						padding: 1rpx 4rpx;
						border-radius: 3px;
						margin-right: 10rpx;
						color: #00b2b6;
					}

					text {
						width: 180px;
						overflow: hidden;
						text-overflow: ellipsis;
						white-space: nowrap;
					}

				}

				.introduce {
					width: 230px;
					font-size: 28rpx;
					color: #a7a7a7;
					// margin-top: 8px;
					overflow: hidden;
					text-overflow: ellipsis;
					white-space: nowrap;
				}

				.operate {
					display: flex;
					justify-content: space-between;
					align-items: baseline;
					.left {
						display: flex;
						flex-direction: row;
						justify-content: space-between;
						align-items: baseline;
						width: 260rpx;

						.money {
							color: #FFA338;
							font-weight: bold;
							font-size: 36rpx;
							line-height: 20px;
						}

						.person {
							color: #00000099;
							font-size: 24rpx;
							// margin-left: 6px;
						}
					}

					.Oright {
						width: 80px;
						display: flex;
						justify-content: flex-end;
						align-items: center;
						.text {
							font-size: 24rpx;
							color: #3081E8;
						}

						.arrow {
							display: flex;
							justify-content: center;
							margin-top: 5rpx;

							image {
								width: 32rpx;
								height: 32rpx;
							}
						}
					}
				}
			}
		}
	}
</style>