<template>
	<view class="activity">
		<statusBar :item="navBarData"></statusBar>
		<viewX-Case class="mid">
			<template #title>
				<view class="title three-font">活动直播</view>
			</template>
			<template #lookMore>
				<view class="lookMore fz-font">
					查看更多
				</view>
			</template>
			<template #activeBlock>
				<view class="activeData" v-for="(item,index) in liveList" :key="index">
					<!-- <image src="http://43.139.158.220:5007/img/static/activity/bg1.png" mode="aspectFill"></image> -->
					<image :src="liveList[index].img" mode="aspectFill"></image>

					<view class="liveBroadcast">
						<view class="title">
							<view class="tag bqZ-font">类型</view>
							<text three-font>{{ item.className }}</text>
						</view>

						<view class="operate">
							<view class="left">
								<view class="img">
									<image :src="liveList[index].imgName"></image>
								</view>
								<view class="user fwb-font">{{ item.name }}</view>
							</view>
							<view class="collection">

								<!-- <view class="" style="display: flex;margin-right: 10rpx;align-items: center;"> -->
								<view class="img">
									<image src="http://43.139.158.220:5007/img/static/yym/Vector (Stroke) (2).png" mode="aspectFill"></image>
								</view>
								<text class="fz-font">收藏</text>

							</view>
						</view>
					</view>
				</view>
			</template>
		</viewX-Case>

		<viewX-Case style="margin-top: 10px;">
			<template #title>
				<view class="title three-font">活动推荐</view>
			</template>
			<template #lookMore>
				<view class="lookMore fz-font" @click="lookMore">查看更多</view>
			</template>
			<template #activeBlock>
				<!-- <activity-case v-for="i in 10" :key="i"></activity-case> -->
				<teaching-case v-for="(item,index) in activeList" :item="actData" :key="index"
					:activeList="item"></teaching-case>
			</template>
		</viewX-Case>



		<!-- 		<uni-fab ref="fab" 
		:pattern="pattern" 
		:horizontal="horizontal" 
		:vertical="vertical"
		:direction="direction"
		buttonColor="#0056a8"
		@fabClick="fabClick" /> -->
<view class="" style="height: 30rpx;width: 100%;">
	
</view>
		<view class="qiu" @click="fabClick">
			<image src="/static/yym/jia.png" mode="aspectFill"></image>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				navBarData: {
					title: '活动', //导航栏标题
					btn: 0 //是否显示返回按钮 0不显示  1 显示
				},
				actData: {
					btn: 1
				},
				title: 'uni-fab',
				liveList: [{
						img: "http://43.139.158.220:5007/img/static/mine/img1.jpg",
						className: "创业者管理能力训练基础",
						imgName: "http://43.139.158.220:5007/img/static/activity/Name1.png",
						name: "李芳"
					},
					{
						img: "http://43.139.158.220:5007/img/static/mine/img2.jpg",
						className: '创业融资实务',
						imgName: "http://43.139.158.220:5007/img/static/activity/Name2.png",
						name: "郑秀"
					},
					{
						img: 'http://43.139.158.220:5007/img/static/mine/img3.jpg',
						className: '创业基础',
						imgName: "http://43.139.158.220:5007/img/static/activity/Name3.png",
						name: "杨哲旗"
					},
					{
						img: "http://43.139.158.220:5007/img/static/mine/img4.jpg",
						className: "打造无敌商业计划书",
						imgName: "http://43.139.158.220:5007/img/static/activity/Name2.png",
						name: "杨广"
					}
				],
				activeList: [{
						img: 'http://43.139.158.220:5007/img/static/mine/img10.jpg',
						count: '1790',
						className: '创新思维开发与落地',
						intro: '《暂无简介》'
					},
					{
						img: 'http://43.139.158.220:5007/img/static/mine/img11.jpg',
						count: '3842',
						className: '创业意识与商机识别',
						intro: '在创新创业的大氛围下，课堂上常常强调要以项目为中心，你却苦于迟迟无法最终确定具体的项目？那么，《创业意识与商机识别》这门课程可以帮助你。'
					},
					{
						img: 'http://43.139.158.220:5007/img/static/mine/img12.png',
						count: '701',
						className: '机电（机械）技术创新创业实务',
						intro: '该课程是针对机电、机械行业、企业用户的一门关于创新创业的培训类课程。在国家“大众创业、万众创新”的新时代背景下，创新是引领一个企业发展的第一动力。为推动科技不断进步、促进企业快速健康发展，开发了《机电（机械）技术创新创业实务》课程。计划为36学时，理论讲授30学时，实践案例分析和操作6学时'
					},
					{
						img: 'http://43.139.158.220:5007/img/static/mine/img13.jpg',
						count: '823',
						className: '打造黄金创始人团队',
						intro: '如何摆正自己的工作态度和位置，清醒认识到自己的职责，学会选人用人，努力提高领导力和执行力，带好团队，并最终成为一个卓越的管理者呢？本课程提供给你建议'
					},
					{
						img: 'http://43.139.158.220:5007/img/static/mine/img14.jpg',
						count: '2287',
						className: '创业素质测评与团队组建',
						intro: '本课程采取案例分析、研讨、游戏的方式使同学们的聪明才智能够有发挥的空间，话语权能够得到满足。通过完成团队任务的方式使大家逐渐与陌生人建立良好沟通关系，掌握沟通技巧，使自己具有使命感、懂得感恩。'
					},
				],
			};
		},
		methods: {
			lookMore() {
				uni.navigateTo({
					url: '/pages/activityList/activityList'
				})
			},
			fabClick() {
				// console.log(111);
				uni.navigateTo({
					url: '/pages/publish/publish'
				})
			},
			onChange: function(e) {
				this.old.x = e.detail.x
				this.old.y = e.detail.y
			}
		}
	}
</script>

<style lang="scss">
	.activity {
		.qiu {
			width: 90rpx;
			height: 90rpx;
			position: fixed;
			z-index: 19;
			right: 30rpx;
			bottom: 10vh;
			border-radius: 50%;
			background-color: rgba(0, 86, 168, 1);
			display: flex;
			justify-content: center;
			align-items: center;

			image {
				position: absolute;

				width: 36rpx;
				height: 36rpx;
			}

		}

		.mid {

			// margin:20px 0;
			.activeData {
				width: 460rpx;
				display: inline-block;
				margin-right: 20px;

				image {
					width: 100%;
					height: 120px;
					border-radius: 10px;
					margin-bottom: 10px;
				}

				.liveBroadcast {
					flex: 1;
					width: 460rpx;
					display: flex;
					flex-direction: column;
					align-content: flex-end;

					.title {
						display: flex;
						align-items: center;
						margin-bottom: 10rpx;

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

						text {
							// display: -webkit-box;//对象作为弹性伸缩盒子模型显示
							// overflow: hidden;//溢出隐藏
							// -webkit-box-orient: vertical;//设置伸缩盒子对象的子元素的排列方式
							// -webkit-line-clamp: 2;//设置 块元素包含的文本行数
							overflow: hidden;
							text-overflow: ellipsis;
							white-space: nowrap;
						}

					}

					.operate {
						display: flex;
						justify-content: space-between;
						align-items: center;
						padding: 20rpx 0;
						color: #666666;

						// margin-bottom: 20rpx;
						// padding-bottom: 20rpx;
						.left {
							display: flex;
							align-items: center;

							.img {
								width: 48rpx;
								height: 48rpx;
								margin-right: 10rpx;

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

							.user {}

						}

						.collection {
							display: flex;
							align-items: center;
							justify-content: space-between;
							width: 88rpx;
							height: 32rpx;
							position: relative;

							.img {
								position: absolute;
								left: 0;
								top: 6rpx;
								transform: translate(-130%, 0);
							}

							image {
								width: 27rpx;
								height: 25rpx;
								display: block;
							}

							// float: right;
							// font-size: 14px;
							// padding-top: 10px;
						}
					}
				}
			}

			.activeData:nth-child(1) {
				margin-left: 15px;
			}
		}

		.title {
			font-weight: bold;
			// color: #999999;
		}

		.lookMore {
			color: #666666;
			// font-size: 14px;
		}
	}
</style>