yuanyiming пре 1 година
родитељ
комит
4f140c6df5

+ 228 - 0
components/listBlock1/listBlock1.vue

@@ -0,0 +1,228 @@
+<template>
+	<!-- <view class="teaching_case" v-for="(i,index) in classList" :key="index + 'a'" @click="" :data-index="index"> -->
+	<view class="listBlock1">
+		<view class="img cell-img">
+			<!-- 课程图片 -->
+			<slot name="pic"></slot>
+			<!-- <image :src="i.img" v-if="!item.btn" mode="aspectFill"></image> -->
+		</view>
+	
+		<view class="right">
+			<view class="">
+				<view class="title">
+					<view v-if="!item.btn" class="tag bqZ-font">类型</view>
+					
+					<text class="btn-font" v-if="!item.btn" style="">
+						<!-- 课程名称 -->
+						<slot name="tit"></slot>
+					<!-- {{i.className}} -->
+					</text>
+				</view>
+				<view v-if="!item.btn" class="introduce fwb-font">
+					<!-- 简介 -->
+					<slot name="intro"></slot>
+					<!-- {{ i.intro }} -->
+				</view>
+	
+			</view>
+	
+			<view class="operate">
+				<view class="left">
+					<view class="opr" style="padding-right: 25rpx">
+						<view class="icon">
+							<!-- 收藏按钮 -->
+							<slot name="Sicon"></slot>
+							<!-- <image src="http://43.139.158.220:5007/img/static/yym/Star 1 (Stroke).png"
+								style="width: 28rpx; height: 26rpx" mode="aspectFill"></image> -->
+						</view>
+						<text class="fz-font">收藏</text>
+					</view>
+					<view class="opr">
+						<view class="icon">
+							<!-- 订阅按钮 -->
+							<slot name="Dicon"></slot>
+							<!-- <image src="http://43.139.158.220:5007/img/static/yym/Vector (Stroke).png"
+								style="width: 22rpx; height: 26rpx" mode="aspectFill"></image> -->
+						</view>
+						<text class="fz-font">订阅</text>
+					</view>
+				</view>
+				<view class="">
+					<!-- 立即参与按钮 -->
+					<slot name="btn"></slot>
+					<!-- <button class="btn sBtn-font" disableEventPropagation="true" @click.stop="join">
+						立即参与
+					</button> -->
+				</view>
+			</view>
+	
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name:"listBlock1",
+		data() {
+			return {
+				
+			};
+		},
+		methods:{
+			join() {
+				const value = this.$store.state.user.openid;
+				if (value == '') {
+					uni.navigateTo({
+						url: "/pages/login_Wechat/login_Wechat",
+					});
+					return 1;
+				} else {
+					//推荐课程
+					const urls = [
+						"https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00351166273N",
+						"https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00330324841N",
+						"https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00231455802N",
+						"https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00406339964N",
+					];
+					let index = this.indexId;
+					if (index >= 0 && index < urls.length) {
+						const url = urls[index];
+						uni.navigateTo({
+							url: "/pages/skipone/skipone?url=" + encodeURIComponent(url),
+						});
+					}
+				}
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.listBlock1{
+	
+			display: flex;
+			justify-content: space-between;
+			background-color: #ffffff;
+			padding: 20rpx 30rpx;
+			.img {
+				width: 160rpx;
+				height: 160rpx;
+		
+				image {
+					width: 100%;
+					height: 100%;
+					border-radius: 10rpx;
+				}
+			}
+		
+			.right {
+				padding-left: 20rpx;
+				flex: 1;
+				// height: 300px;
+				width: 100rpx;
+				display: flex;
+				flex-direction: column;
+				// align-content: flex-end ;
+				justify-content: space-between;
+				// align-content: space-between;
+		
+				.title {
+					display: flex;
+					justify-content: flex-start;
+					align-items: center;
+					margin-bottom: 15rpx;
+		
+					// margin-bottom: 10rpx;
+					
+		
+					text {
+						font-weight: bold;
+						overflow: hidden;
+						text-overflow: ellipsis;
+						white-space: nowrap;
+					}
+				}
+		
+				.introduce {
+					// font-size: 28rpx;
+					color: #a7a7a7;
+					// padding: 20rpx 0;
+					// width: 560rpx;
+					height: 40rpx;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					white-space: nowrap;
+				}
+		
+				.operate {
+					display: flex;
+					justify-content: space-between;
+					// align-items: baseline;
+					align-items: flex-end;
+		
+					.left {
+						display: flex;
+						// justify-content: space-between;
+						// align-items: center;
+						align-items: baseline;
+		
+						// width: 200rpx;
+						.opr {
+							display: flex;
+							align-items: center;
+		
+							.icon {
+								width: 32rpx;
+								height: 32rpx;
+								display: flex;
+								justify-content: center;
+								align-items: center;
+							}
+		
+							text {
+								padding-left: 3rpx;
+								color: #666666;
+							}
+						}
+		
+
+		
+						
+					}
+		
+					.btn {
+						z-index: 5;
+						border: none;
+						padding: 0;
+						text-align: center;
+						// padding: 8px, 24px, 8px, 24px;
+						background-color: rgba(48, 129, 232, 1);
+						color: #fff;
+						border-radius: 100rpx;
+						float: right;
+						width: 144rpx;
+						height: 48rpx;
+						line-height: 48rpx;
+						letter-spacing: 1px;
+					}
+				}
+			}
+		
+		.tag {
+			border: 1px #00b2b6 solid;
+			flex-shrink: 0;
+			letter-spacing: 2rpx;
+			width: 64rpx;
+			height: 32rpx;
+			display: flex;
+			white-space: nowrap;
+			justify-content: center;
+			align-items: center;
+			border-radius: 4rpx;
+			margin-right: 10rpx;
+			color: #00b2b6;
+			line-height: 32rpx;
+		}
+	}
+		
+</style>

+ 1 - 111
components/teaching-case/teaching-case.vue

@@ -87,7 +87,6 @@
 			</view>
 		</view>
 
-
 		<!-- <view class="" style="height: 50rpx;width: 100%;background-color: #ffffff;"></view> -->
 	</view>
 </template>
@@ -133,17 +132,6 @@
 				const value = this.$store.state.user.openid;
 
 				const urls = [
-					
-					// "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1210",//产教融合情境下的双创通识课程建设 | 丽湖职教双创教育国际虚拟教研室常规教研活动第2期顺利举
-					// "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1209", //打造双创“金课” | 丽湖职教双创教
-					// "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1211",//赛创融合、协同育人—高职院校双创大赛赛事组织| 丽湖职教双创教育国际虚拟教研室常规研活动第2期
-					// "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1183",
-					
-					
-					// "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",
 					"https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00351166273N",
 					"https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00330324841N",
 					"https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00231455802N",
@@ -199,10 +187,6 @@
 					"https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1209", //打造双创“金课” | 丽湖职教双创教
 					"https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1211",//赛创融合、协同育人—高职院校双创大赛赛事组织| 丽湖职教双创教育国际虚拟教研室常规研活动第2期
 					"https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1183",//丽湖职教双创教育国际虚拟教研室2023年常规教研
-					// "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00351166273N",
-					// "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00330324841N",
-					// "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00231455802N",
-					// "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00406339964N",
 				];
 				if (value == '') {
 					console.log(111);
@@ -223,103 +207,9 @@
 							url: "/pages/activityDetail/activityDetail?acId=" + clickedAcId + "&ty=" + type,
 						});
 					}
-					// console.log("/pages/activityDetail/activityDetail?openid=" + value);
-					// switch (edata) {
-					// 	case 0:
-					// 		uni.navigateTo({
-					// 			url: "/pages/skipone/skipone?url=" + encodeURIComponent(urls[0]),
-					// 		});
-					// 		break;
-					// 	case 1:
-					// 		uni.navigateTo({
-					// 			url: "/pages/skipone/skipone?url=" + encodeURIComponent(urls[1]),
-					// 		});
-					// 		break;
-					// 	case 2:
-					// 		uni.navigateTo({
-					// 			url: "/pages/skipone/skipone?url=" + encodeURIComponent(urls[2]),
-					// 		});
-					// 		break;
-					// 	case 3:
-					// 		uni.navigateTo({
-					// 			url: "/pages/skipone/skipone?url=" + encodeURIComponent(urls[3]),
-					// 		});
-					// 		break;
-					// 	default:
-					// 		uni.navigateTo({
-					// 			url: "/pages/skipone/skipone?url=" + encodeURIComponent(urls[3]),
-					// 		});
-					// 		break;
-					// }
-				}
-
-
-
-
-
-
 
+				}
 
-				// if (this.item.btn) {
-				// 	if (value == '') {
-				// 		uni.navigateTo({
-				// 			url: "/pages/login/login",
-				// 		});
-				// 	} else {
-				// 		if (this.item.btn_2 === 1) {
-				// 			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",
-				// 			];
-				// 			let index = this.indexId;
-				// 			if (index >= 0 && index < urls.length) {
-				// 				const url = urls[index];
-				// 				uni.navigateTo({
-				// 					url: "/pages/skipone/skipone?url=" + encodeURIComponent(url),
-				// 				});
-				// 			}
-				// 		} else {
-				// 			//常规教研活动
-				// 			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",
-				// 			];
-				// 			let index = this.indexId;
-				// 			if (index >= 0 && index < urls.length) {
-				// 				const url = urls[index];
-				// 				uni.navigateTo({
-				// 					url: "/pages/skipone/skipone?url=" + encodeURIComponent(url),
-				// 				});
-				// 			}
-				// 		}
-				// 	}
-				// } else {
-				// 	const value = this.$store.state.user.openid;
-				// 	if (value == '') {
-				// 		uni.navigateTo({
-				// 			url: "/pages/login/login",
-				// 		});
-				// 	} else {
-				// 		//推荐课程
-				// 		const urls = [
-				// 			"https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00351166273N",
-				// 			"https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00330324841N",
-				// 			"https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00231455802N",
-				// 			"https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00406339964N",
-				// 		];
-				// 		let index = this.indexId;
-				// 		if (index >= 0 && index < urls.length) {
-				// 			const url = urls[index];
-				// 			uni.navigateTo({
-				// 				url: "/pages/skipone/skipone?url=" + encodeURIComponent(url),
-				// 			});
-				// 		}
-				// 	}
-				// }
 			},
 			join() {
 				const value = this.$store.state.user.openid;

+ 90 - 38
pages/index/index.vue

@@ -3,7 +3,8 @@
 		<statusBar :item="navBarData"></statusBar>
 		<view class="top">
 			<!-- <image src="https://teacherapi.cocorobo.cn/teaching-file/static//logo.png" mode="aspectFill"></image> -->
-			<image src="https://teacherapi.cocorobo.cn/teaching-file/static//yym/Rectangle25.png" mode="aspectFill" @click="gotoHome">
+			<image src="https://teacherapi.cocorobo.cn/teaching-file/static//yym/Rectangle25.png" mode="aspectFill"
+				@click="gotoHome">
 			</image>
 		</view>
 
@@ -15,7 +16,8 @@
 				<view class="lookMore fz-font" @click="gotoActivity">查看更多</view>
 			</template>
 			<template #activeBlock>
-				<view class="activeData" @click="gotoActivityDetail" v-for="(item, index) in activeList" :key="index" :data-index="index">
+				<view class="activeData" @click="gotoActivityDetail" v-for="(item, index) in activeList" :key="index"
+					:data-index="index">
 					<image :src="item.pic" mode="aspectFill"></image>
 					<view class="activeTit sBtn-font" style="font-weight: bold">
 						{{ item.acName }}
@@ -38,10 +40,34 @@
 				<view class="title three-font">推荐课程</view>
 			</template>
 			<template #lookMore>
-				<view class="lookMore fz-font" @click="teachmore">查看更多</view>
+				<view class="lookMore fz-font" @click="listBlock1More">查看更多</view>
 			</template>
 			<template #teaching>
-				<teaching-case :classList="classList"></teaching-case>
+				<!-- <teaching-case :classList="classList"></teaching-case> -->
+				<!-- 推荐课程插槽组件 -->
+				<listBlock1 v-for="i in classList">
+					<template #pic>
+						<image :src="i.pic" mode="aspectFill"></image>
+					</template>
+					<template #tit>
+						{{i.acName}}
+					</template>
+					<template #intro>
+						{{ i.brief }}
+					</template>
+					<template #Sicon>
+						<image src="http://43.139.158.220:5007/img/static/yym/Star 1 (Stroke).png"
+							style="width: 28rpx; height: 26rpx" mode="aspectFill"></image>
+					</template>
+					<template #Dicon>
+						<image src="http://43.139.158.220:5007/img/static/yym/Vector (Stroke).png" style="width: 22rpx; height: 26rpx" mode="aspectFill"></image>
+					</template>
+					<template #btn>
+						<button class="list1btn sBtn-font" @click.stop="join">
+							立即参与
+						</button>
+					</template>
+				</listBlock1>
 			</template>
 		</viewX-Case>
 		<view class="" style="height: 30rpx; width: 100%"> </view>
@@ -82,37 +108,30 @@
 					// },
 				],
 				classList: [
-
-					// "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00351166273N",
-					// "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00330324841N",
-					// "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00231455802N",
-					// "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00406339964N",
-
-
-					{
-						img: "https://teacherapi.cocorobo.cn/teaching-file/static//img/jiaoxueship.jpg",
-						className: "教学视频",
-						intro: "课程简介:丽湖职教双创教育国际虚拟教研室教学视频",
-						url: 'https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1210'
-					},
-					{
-						img: "https://teacherapi.cocorobo.cn/teaching-file/static//img/jiaoxuedagang.jpg",
-						className: "教学大纲",
-						intro: "课程简介:丽湖职教双创教育国际虚拟教研室教学大纲",
-						url: 'https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1210'
-					},
-					{
-						img: "https://teacherapi.cocorobo.cn/teaching-file/static//img/peiyangfangan.jpg",
-						className: "培养方案",
-						intro: "课程简介:丽湖职教双创教育国际虚拟教研室培养方案",
-						url: 'https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1210'
-					},
-					{
-						img: "https://teacherapi.cocorobo.cn/teaching-file/static//img/xitishiti.jpg",
-						className: "习题试题",
-						intro: "课程简介:丽湖职教双创教育国际虚拟教研室习题试题",
-						url: 'https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1210'
-					},
+					// {
+					// 	img: "https://teacherapi.cocorobo.cn/teaching-file/static//img/jiaoxueship.jpg",
+					// 	className: "教学视频",
+					// 	intro: "课程简介:丽湖职教双创教育国际虚拟教研室教学视频",
+					// 	url: 'https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1210'
+					// },
+					// {
+					// 	img: "https://teacherapi.cocorobo.cn/teaching-file/static//img/jiaoxuedagang.jpg",
+					// 	className: "教学大纲",
+					// 	intro: "课程简介:丽湖职教双创教育国际虚拟教研室教学大纲",
+					// 	url: 'https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1210'
+					// },
+					// {
+					// 	img: "https://teacherapi.cocorobo.cn/teaching-file/static//img/peiyangfangan.jpg",
+					// 	className: "培养方案",
+					// 	intro: "课程简介:丽湖职教双创教育国际虚拟教研室培养方案",
+					// 	url: 'https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1210'
+					// },
+					// {
+					// 	img: "https://teacherapi.cocorobo.cn/teaching-file/static//img/xitishiti.jpg",
+					// 	className: "习题试题",
+					// 	intro: "课程简介:丽湖职教双创教育国际虚拟教研室习题试题",
+					// 	url: 'https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1210'
+					// },
 				],
 			};
 		},
@@ -122,8 +141,8 @@
 				let data = {
 					openid: uni.getStorageSync('oId'),
 					ty: 2,
-					page:1, //下拉获取更多的备用字段
-					lim:6   //一次获取多少数据
+					page: 1, //下拉获取更多的备用字段
+					lim: 6 //一次获取多少数据
 				}
 				this.$request('/selectActivity', "POST", data).then(res => {
 					console.log(res[0]);
@@ -131,7 +150,22 @@
 					this.activeList = res[0].slice(0, 6);
 				})
 			},
-			teachmore() {
+			// 获取推荐课程list 数据
+			getlistBlock1Data(){
+				let data={
+					openid:uni.getStorageSync('oId'),
+					ty:3,
+					page:1, //下拉获取更多的备用字段
+					lim:6   //一次获取多少数据
+				}
+				this.$request('/selectActivity',"POST",data).then(res=>{
+					console.log('推荐课程',res[0]);
+					// this.activeList=[...this.activeList,...res[0]]
+					this.classList=res[0]
+				})
+			},
+			// 跳转到推荐课程查看更多
+			listBlock1More() {
 				const value = this.$store.state.user.openid;
 				if (value == '') {
 					uni.navigateTo({
@@ -155,6 +189,7 @@
 					});
 				}
 			},
+			// 跳转到专题教研活动查看更多
 			gotoActivity() {
 				const value = this.$store.state.user.openid;
 				if (value == '') {
@@ -229,6 +264,7 @@
 		},
 		onShow() {
 			this.getData()
+			this.getlistBlock1Data()
 		}
 	};
 </script>
@@ -236,6 +272,22 @@
 <style lang="scss" scoped>
 	.content {
 
+		.list1btn {
+			z-index: 5;
+			border: none;
+			padding: 0;
+			text-align: center;
+			// padding: 8px, 24px, 8px, 24px;
+			background-color: rgba(48, 129, 232, 1);
+			color: #fff;
+			border-radius: 100rpx;
+			float: right;
+			width: 144rpx;
+			height: 48rpx;
+			line-height: 48rpx;
+			letter-spacing: 1px;
+		}
+
 		// background-color: ;
 		// background-color: #f0f2f5;
 		.top {

+ 113 - 31
pages/teachingList/teachingList.vue

@@ -1,11 +1,44 @@
 <template>
-	<view class="teachingDetail">
-		<statusBar :item="navbarBata"></statusBar>
-		<!-- <teaching-case></teaching-case> -->
-		<view class="" style="padding-bottom: 50rpx;">
-			<teaching-case :classList='classList'></teaching-case>
-		</view>
+	<view class="teachingList">
+		<statusBar :item="navbarData"></statusBar>
+		<!-- <teaching-case :item="teaData"></teaching-case> -->
+		<!-- <view class="" style="padding-bottom: 50rpx;">
+			<teaching-case :activeList="activeList" :indexId="index" :item="teaData"></teaching-case>
+		</view> -->
+
+		<scroll-view class="list" scroll-y="true">
+			<view>
+				<!-- 推荐课程插槽组件 -->
+				<listBlock1 v-for="i in classList">
+					<template #pic>
+						<image :src="i.pic" mode="aspectFill"></image>
+					</template>
+					<template #tit>
+						{{i.acName}}
+					</template>
+					<template #intro>
+						{{ i.brief }}
+					</template>
+					<template #Sicon>
+						<image src="http://43.139.158.220:5007/img/static/yym/Star 1 (Stroke).png"
+							style="width: 28rpx; height: 26rpx" mode="aspectFill"></image>
+					</template>
+					<template #Dicon>
+						<image src="http://43.139.158.220:5007/img/static/yym/Vector (Stroke).png" style="width: 22rpx; height: 26rpx" mode="aspectFill"></image>
+					</template>
+					<template #btn>
+						<button class="list1btn sBtn-font" @click.stop="join">
+							立即参与
+						</button>
+					</template>
+				</listBlock1>
+			</view>
+		</scroll-view>
 
+		<view class="loading">
+			<view v-if="newsLoading==1">数据加载中...</view>
+			<view v-if="newsLoading==2">没有更多了~~</view>
+		</view>
 	</view>
 </template>
 
@@ -13,39 +46,88 @@
 	export default {
 		data() {
 			return {
-				navbarBata: {
+				navbarData: {
 					title: '推荐课程',
 					btn: 1
 				},
-				classList: [
-				  {
-				    img: "https://teacherapi.cocorobo.cn/teaching-file/static//img/jiaoxueship.jpg",
-				    className: "教学视频",
-				    intro: "课程简介:丽湖职教双创教育国际虚拟教研室教学视频",
-				  },
-				  {
-				    img: "https://teacherapi.cocorobo.cn/teaching-file/static//img/jiaoxuedagang.jpg",
-				    className: "教学大纲",
-				    intro: "课程简介:丽湖职教双创教育国际虚拟教研室教学大纲",
-				  },
-				  {
-				    img: "https://teacherapi.cocorobo.cn/teaching-file/static//img/peiyangfangan.jpg",
-				    className: "培养方案",
-				    intro: "课程简介:丽湖职教双创教育国际虚拟教研室培养方案",
-				  },
-				  {
-				    img: "https://teacherapi.cocorobo.cn/teaching-file/static//img/xitishiti.jpg",
-				    className: "习题试题",
-				    intro: "课程简介:丽湖职教双创教育国际虚拟教研室习题试题",
-				  },
-				],
+				
+				teaData: {
+					btn: 1,
+					btn_2: 1,
+				},
+				// 渲染数据
+				classList: [],
+				// 触底加载动画提示
+				newsLoading: 0, //0默认值  1加载中 2没有更多了
+				currentPage: 1,
 			};
+		},
+		methods: {
+			// 获取页面数据
+			getData() {
+				let data = {
+					openid: uni.getStorageSync('oId'),
+					ty: 3,
+					page: this.currentPage, //下拉获取更多的备用字段
+					lim: 10 //一次获取多少数据
+				}
+				this.$request('/selectActivity', "POST", data).then(res => {
+					console.log('获取数据',res[0]);
+					if (!res[0].length) {
+						this.newsLoading = 2
+					} else {
+						this.newsLoading = 0
+					}
+					// return
+					this.classList=[...this.classList,...res[0]]
+					// this.activeList = res[0]
+				})
+			},
+		},
+		// 触底加载更多
+		onReachBottom() {
+			console.log(111);
+			if (this.newsLoading == 2) {
+				return
+			}
+			this.newsLoading = 1
+			this.currentPage++
+			setTimeout(this.getData,2000)
+			
+		},
+		
+		onLoad() {
+			// 一进页面就加载数据
+			this.getData()
 		}
 	}
 </script>
 
 <style lang="scss">
-	.teachingDetail {
-		// background-color: red;
+	.teachingList {
+		.loading{
+			height: 50rpx;
+			text-align: center;
+			padding-top: 20rpx;
+			padding-bottom: 100rpx;
+			font-size: 26rpx;
+			color:#888;
+			line-height: 2em;
+		}
+		.list1btn {
+			z-index: 5;
+			border: none;
+			padding: 0;
+			text-align: center;
+			// padding: 8px, 24px, 8px, 24px;
+			background-color: rgba(48, 129, 232, 1);
+			color: #fff;
+			border-radius: 100rpx;
+			float: right;
+			width: 144rpx;
+			height: 48rpx;
+			line-height: 48rpx;
+			letter-spacing: 1px;
+		}
 	}
 </style>

+ 1 - 0
store/index.js

@@ -59,6 +59,7 @@ const store = new Vuex.Store({
 		},
 		// 聊天记录
 		// message: [],
+		
 		formData: {}
 	},
 	getters: {