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

		<view class="" style="width: 750rpx;height: 60px;">
			<view class="activeTitle">
				<view class="left" @click="phoneLogin" :class="current==0?active:test">
					<text>教研室活动</text>
					<view :class="current==0?yun:test"></view>
				</view>
				<view class="right" @click="accountLogin" :class="current==1?active:test">
					<text class="zw-font">特色活动</text>
					<view :class="current==1?yun:test"></view>
				</view>
			</view>
		</view>

		<swiper class="scroll-view-height" @change="swipeIndex" :current="current" :duration="300">
			<swiper-item>
				<scroll-view scroll-y="true" style="height: 80vh;">
					<view class="activeClass">
						<view class="classBox" @click="gotoWeb(index)" v-for="(item,index) in classList" :key="index">

							<view class="classLeft">
								<view class="class_Img">
									<image :src="classList[index].img" mode="aspectFill"></image>
								</view>
								<view class="class_Text">
									<view class="text_Title">
										<text class="manage">类型</text>
										<text>{{ item.className }}</text>

									</view>
									<view class="text_Intro">
										<text>{{ item.intro }}</text>
									</view>
								</view>
							</view>
							<view class="classright">
								<!-- <image src="../../static/mine/Union.png" mode="aspectFill"></image> -->
								<image src="../../static/mine/Union.png" mode="aspectFill"></image>

							</view>
						</view>
					</view>
				</scroll-view>


			</swiper-item>
			<swiper-item>
				<scroll-view scroll-y="true" style="height: 80vh;">
					<view class="activeClass">
						<view class="classBox" @click="gotoWeb_2(index)" v-for="(item,index) in activeList" :key="index">
							<view class="classLeft">
								<view class="class_Img">
									<image :src="activeList[index].img" mode="aspectFill"></image>
								</view>
								<view class="class_Text">
									<view class="text_Title">
										<text class="manage">类型</text>
										<text>{{ item.className }}</text>
									</view>
									<view class="text_Intro">
										<text>{{ item.intro }}</text>
									</view>
								</view>
							</view>
							<view class="classright">
								<image src="http://43.139.158.220:5007/img/static/mine/Union.png" mode=""></image>
							</view>
						</view>
					</view>
				</scroll-view>
			</swiper-item>
		</swiper>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				navBarData: {
					title: '我的订阅',
					btn: 1
				},
				current: 0, //切换

				aaa: `calc(100vh-60vh)`,

				navheight: this.navheight, //导航栏高度

				active: 'active', //类名
				test: 'test',
				yun: 'yun',
				classList: [{
						img: "http://43.139.158.220:5007/img/static/img/1695656271245-image.png",
						className: "丽湖职教双创教育国际虚拟教研室启动大会暨双创教育国际论坛圆满举行",
						intro: "丽湖职教双创教育国际虚拟教研室为立足全国，辐射海外的国际化教研室，围绕创新创业教育的人才培养与课程建设开展深度研究。教研室以贯彻落实立德树人根本任务，通过加强跨专业、跨校、跨地域的教研交流，推动高校协同打造国际化的精品教学资",
					},
					{
						img: "http://43.139.158.220:5007/img/static/img/img1.png",
						className: "丽湖职教双创教育国际虚拟教研室2023年常规教研活动安排",
						intro: "丽湖职教双创教育国际虚拟教研室为立足全国，辐射海外的国际化教研室，围绕创新创业教育的人才培养与课程建设开展深度研究。教研室以贯彻落实立德树人根本任务，通过加强跨专业、跨校、跨地域的教研交流，推动高校协同打造国际化的精品教学资",
					},
					{
						img: "http://43.139.158.220:5007/img/static/img/img3.png",
						className: "产教融合情境下的双创通识课程建设 | 丽湖职教双创教育国际虚拟教研室常规教研活动第2期顺利举行",
						intro: "【图片】为提升职业院校双创课程建设水平，促进双创课程的改革与发展，丽湖职教双创教育国际虚拟教研室于3月29日组织举办了以“产教融合情境下的双创通识课程建设”为主题的第2期线上教研活动，来自全国各职业院校的60多位教师参会。本",
					},
					{
						img: "http://43.139.158.220:5007/img/static/yym/83b48be81d4ed9c93908737496f2a54.png",
						className: "丽湖职教双创教育国际虚拟教研室 • 常规教研活动 第9期",
						intro: "丽湖职教双创教育国际虚拟教研室 • 常规教研活动 第9期：主题为创新创业在线课程建设与运营。【图片】【图片】【图片】【图片】【图片】"
					},
				],
				activeList: [{
						img: "http://43.139.158.220:5007/img/static/img/img1.png",
						count: "17",
						price: "188",
						className: "丽湖职教双创教育国际虚拟教研室2023年常规教研活动安排",
						intro: "丽湖职教双创教育国际虚拟教研室为立足全国，辐射海外的国际化教研室，围绕创新创业教育的人才培养与课程建设开展深度研究。教研室以贯彻落实立德树人根本任务，通过加强跨专业、跨校、跨地域的教研交流，推动高校协同打造国际化的精品教学资",
					},
					{
						img: "http://43.139.158.220:5007/img/static/img/img2.png",
						count: "6",
						price: "188",
						className: "赛创融合、协同育人—高职院校双创大赛赛事组织| 丽湖职教双创教育国际虚拟教研室常规教研活动第3期顺利举",
						intro: " 为全面落实双创教育“以赛促教、以赛促学、以赛促创”，提升学校双创大赛的组织效果和参赛成绩，促进更多教育成果落地，实现赛创融合育人的目标，丽湖职教双创教育国际虚拟教研室于4月26日组织举办了第3期线上教研活动，活动主题为“赛",
					},
					{
						img: "http://43.139.158.220:5007/img/static/img/img3.png",
						count: "1",
						price: "188",
						className: "产教融合情境下的双创通识课程建设 | 丽湖职教双创教育国际虚拟教研室常规教研活动第2期顺利举行",
						intro: "【图片】为提升职业院校双创课程建设水平，促进双创课程的改革与发展，丽湖职教双创教育国际虚拟教研室于3月29日组织举办了以“产教融合情境下的双创通识课程建设”为主题的第2期线上教研活动，来自全国各职业院校的60多位教师参会。本",
					},
					{
						img: "http://43.139.158.220:5007/img/static/img/img4.png",
						count: "0",
						price: "188",
						className: "打造双创“金课” | 丽湖职教双创教育国际虚拟教研室常规教研活动第1期顺利举行",
						intro: "为推动高职院校双创课程建设，打造更多的双创精品课程和金课，丽湖职教双创教育国际虚拟教研室于2月22日组织举办了以“如何打造高职双创金课”为主题的第1期教研活动，来自全国各高职院校的80多位教师参会。本次活动由",
					},
				],
			};
		},
		computed: {
			dynamicStyle() {
				return {
					height: `calc(100vh - 10px)`
				};
			}
		},
		methods: {
			swipeIndex(index) {
				this.current = index.detail.current;
			},
			phoneLogin() {
				this.current = 0
			},
			accountLogin() {
				this.current = 1
			},
			gotoWeb(index) {
				const urls = [
					"https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1181",
					"https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1183",
					"https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1210",
					"https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1234",
				];
				if (index >= 0 && index < urls.length) {
					const url = urls[index];
					uni.navigateTo({
						url: "/pages/skipone/skipone?url=" + encodeURIComponent(url),
					});
				}
			},
			gotoWeb_2(index) {
				const urls = [
					"https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1183",
					"https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1211",
					"https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1210",
					"https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1209",
				];
				if (index >= 0 && index < urls.length) {
					const url = urls[index];
					uni.navigateTo({
						url: "/pages/skipone/skipone?url=" + encodeURIComponent(url),
					});
				}
			}
		}
	}
</script>

<style lang="scss">
	.content {
		height: 100vh;
		width: 750rpx;
		background-color: #ffffff;

		.activeTitle {
			position: fixed;
			z-index: 9;
			width: 100%;
			height: 60px;
			background-color: white;
			border-top: 1px solid lightgray;
			display: flex;
			justify-content: center;
			padding: 0 30px;
			font-size: 34rpx;

			.test {
				// height: ;
			}

			.active {
				position: relative;
				font-weight: bold;

				.yun {
					width: 80rpx;
					height: 0rpx;
					position: absolute;
					left: 50%;
					top: 65%;
					transform: translate(-50%, -50%);
					box-shadow: 0px 0px 10px 2px #4a97f2;
				}
			}

			.left {
				width: 50%;
				height: 100%;
				display: flex;
				justify-content: center;
				align-items: center;
			}

			.right {
				width: 50%;
				height: 100%;
				display: flex;
				justify-content: center;
				align-items: center;
			}
		}

		.scroll-view-height {
			// height: 200vmin;
			height: 80vh;

			// height: auto;
			.activeClass {
				width: 100%;

				// height: auto;
				.classBox {
					display: flex;
					justify-content: space-between;
					padding: 0 47rpx;
					background-color: #fff;
					height: 144rpx;

					.classLeft {
						display: flex;
						height: 100%;

						.class_Img {
							display: flex;
							align-items: center;
							flex-grow: 1;

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

						.class_Text {
							display: flex;
							justify-content: center;
							flex-grow: 2;
							flex-direction: column;
							margin-left: 20rpx;

							.text_Title {
								display: flex;
								margin-bottom: 6px;
								align-items: center;

								text {
									&:last-child {
										width: 220px;
										color: #000;
										font-size: 28rpx;
										font-weight: 600;
										display: -webkit-box;
										word-break: break-all;
										text-overflow: ellipsis;
										overflow: hidden;
										-webkit-box-orient: vertical;
										-webkit-line-clamp: 1;
										/*设置 需要显示的行数*/
									}

									&.manage {
										// border: 1px #00b2b6 solid;
										// font-size: 10px;
										// display: flex;
										// white-space: nowrap;
										// justify-content: center;
										// align-items: center;
										// padding: 1px 6px;
										// border-radius: 3px;
										// margin-right: 10rpx;
										// color: #00b2b6;
										// margin-left: 6px;
										// font-weight: 600;
										border: 1px #00b2b6 solid;
										font-size: 20rpx;
										width: 64rpx;
										display: flex;
										height: 32rpx;
										white-space: nowrap;
										justify-content: center;
										align-items: center;
										// padding: 4px 12px 4px 12px;
										border-radius: 5rpx;
										margin-right: 10rpx;
										color: #00b2b6;
									}
								}
							}

							.text_Intro {
								display: flex;

								text {
									font-size: 24rpx;
									font-weight: 400;
									color: rgb(191, 191, 191);
									width: 90%;
									letter-spacing: 2rpx;
									display: -webkit-box;
									word-break: break-all;
									text-overflow: ellipsis;
									overflow: hidden;
									-webkit-box-orient: vertical;
									-webkit-line-clamp: 1;
									/*设置 需要显示的行数*/

									// margin-left: 6px;
								}
							}
						}
					}

					.classright {
						display: flex;
						height: 100%;
						align-items: center;

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