yuanyiming 1 年之前
父節點
當前提交
b8cdc0dd2c

+ 77 - 1
App.vue

@@ -131,7 +131,7 @@
 	}
 </script>
 
-<style>
+<style lang="scss">
 	/*每个页面公共css */
 	body,
 	html {
@@ -147,6 +147,82 @@
 		box-sizing: border-box;
 		padding: 0;
 	}
+	/* 确认弹窗 */
+	.popup-container {
+		position: fixed;
+		top: 50%;
+		left: 50%;
+		transform: translate(-50%, -50%);
+		width: 520rpx;
+		height: 260rpx;
+		z-index: 1000;
+	
+		.popup {
+			width: 100%;
+			height: 100%;
+			display: flex;
+			flex-direction: column;
+			background-color: #fff;
+			border-radius: 16rpx;
+			overflow: hidden;
+	
+			.header {
+				flex: 1;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				flex-direction: column;
+				margin-top: 24px;
+				font-size: 34rpx;
+				font-weight: 600;
+	
+				image {
+					width: 150rpx;
+					height: 150rpx;
+					margin-top: 15px;
+					margin-bottom: 15px;
+				}
+			}
+	
+			.footer {
+				width: 100%;
+				display: flex;
+				overflow: hidden;
+	
+				.cancel-btn {
+					width: 50%;
+					height: 100rpx;
+					background-color: #F7F7F7;
+					color: #000;
+					font-size: 34rpx;
+					text-align: center;
+					border-bottom-left-radius: 16rpx;
+					line-height: 50px;
+				}
+	
+				.confirm-btn {
+					width: 50%;
+					height: 100rpx;
+					background-color: #0081FE;
+					color: #fff;
+					font-size: 34rpx;
+					text-align: center;
+					line-height: 50px;
+				}
+			}
+		}
+	}
+	/* 触底加载更多 */
+	.loading {
+		height: 30rpx;
+		text-align: center;
+		padding-top: 20rpx;
+		padding-bottom: 100rpx;
+		font-size: 26rpx;
+		color: #888;
+		line-height: 2em;
+	}
+
 
 	/* 公共字体大小类 */
 

+ 2 - 2
components/teaching-case/teaching-case.vue

@@ -113,7 +113,7 @@
 					oid: this.$store.state.user.openid, //用户id
 					type: 1
 				}
-				this.$request('/selectOperatorTech', 'POST', data).then(res => {
+				this.$request('/selectCollClassList', 'POST', data).then(res => {
 					console.log('获取收藏', res);
 					// 每次调用前清零,防止push叠加错误
 					this.collArr = []
@@ -135,7 +135,7 @@
 		display: flex;
 		flex-wrap: wrap;
 		justify-content: space-between;
-		margin-bottom: 50px;
+		// margin-bottom: 50px;
 
 		// background-color: #000;
 		.cont {

+ 81 - 59
pages/activityPageNew/activityPageNew.vue

@@ -31,10 +31,11 @@
 			</view>
 		</view>
 
-		<swiper class="scroll-view-height" @change="swipeIndex" :current="current" @scrolltolower :duration="300">
+		<swiper class="scroll-view-height" @change="swipeIndex" :current="current" :duration="300">
 			<!-- 专题教研 -->
 			<swiper-item>
-				<scroll-view scroll-y="true" @scrolltolower="aclower" style="height: 100%;">
+				<scroll-view scroll-y="true" refresher-enabled='true' :refresher-triggered="trigger"
+					@refresherrefresh='repulling' @scrolltolower="aclower" style="height: 100%;">
 					<view class="">
 						<listBlock1 ref="listBlock1" :classList="filteredClassList"></listBlock1>
 					</view>
@@ -48,7 +49,8 @@
 
 			<!-- 常规教研 -->
 			<swiper-item>
-				<scroll-view scroll-y="true" @scrolltolower="pulower" style="height: 100%;">
+				<scroll-view scroll-y="true" refresher-enabled='true' :refresher-triggered="putrigger"
+					@refresherrefresh='purepulling' @scrolltolower="pulower" style="height: 100%;">
 					<view>
 						<listBlock1 ref="listBlock2" :classList="filteredClassList2"></listBlock1>
 					</view>
@@ -91,30 +93,36 @@
 				info2: "info2",
 				// swiper: 0,
 				searchText: "", // 搜索文本
+
 				acLoading: 0, //0默认值  1加载中 2没有更多了
 				accurrentPage: 1, //页数
 
-				pucurrentPage: 1,
 				puLoading: 0, //0默认值  1加载中 2没有更多了
+				pucurrentPage: 1,
 				// 教研
 				teclist: [],
 				// 常规
 				pulist: [],
+
+				// 设置当前下拉刷新状态,true 表示下拉刷新已经被触发,false 表示下拉刷新未被触发
+				trigger: false, //专题
+				putrigger: false, //常规
+				
 				// 付费
-				monlist: [{
-					acId: "92e11d93-8778-11ee-b98c-005056b86db5",
-					acName: "丽湖职教双创教育国际虚拟教研室2023年常规教研活动安排",
-					acshape: "户外活动",
-					avatar: "http://139.159.246.165:7006/uploads/20231122/file-1700619408170.jpeg",
-					bnum: 0,
-					brief: "丽湖职教双创教育国际虚拟教研室为立足全国,辐射海外的国际化教研室,围绕创新创业教育的人才培养与课程建设开展深度研究。教研室以贯彻落实立德树人根本任务,通过加强跨专业、跨校、跨地域的教研交流,推动高校协同打造国际化的精品教学资源库、优秀教学案例库、优质教师培训资源库等,全面提高教师",
-					cost: "5000",
-					create_at: "2023.11.20 03:11",
-					pers: "15",
-					pic: "http://139.159.246.165:7006/uploads/20231120/file-1700466209242.png",
-					type: "1",
-					username: "袁一鸣",
-				}]
+				// monlist: [{
+				// 	acId: "92e11d93-8778-11ee-b98c-005056b86db5",
+				// 	acName: "丽湖职教双创教育国际虚拟教研室2023年常规教研活动安排",
+				// 	acshape: "户外活动",
+				// 	avatar: "http://139.159.246.165:7006/uploads/20231122/file-1700619408170.jpeg",
+				// 	bnum: 0,
+				// 	brief: "丽湖职教双创教育国际虚拟教研室为立足全国,辐射海外的国际化教研室,围绕创新创业教育的人才培养与课程建设开展深度研究。教研室以贯彻落实立德树人根本任务,通过加强跨专业、跨校、跨地域的教研交流,推动高校协同打造国际化的精品教学资源库、优秀教学案例库、优质教师培训资源库等,全面提高教师",
+				// 	cost: "5000",
+				// 	create_at: "2023.11.20 03:11",
+				// 	pers: "15",
+				// 	pic: "http://139.159.246.165:7006/uploads/20231120/file-1700466209242.png",
+				// 	type: "1",
+				// 	username: "袁一鸣",
+				// }]
 			};
 		},
 		// 模糊搜索
@@ -133,6 +141,43 @@
 			},
 		},
 		methods: {
+			repulling() {
+				this.trigger = true
+				// this.isrepulling = true
+				setTimeout(() => {
+					this.trigger = false;
+				}, 1000);
+				
+				this.acLoading= 0 //0默认值  1加载中 2没有更多了
+				this.accurrentPage= 1 //页数
+				this.teclist= []// 教研
+				
+				// this.puLoading= 0 //0默认值  1加载中 2没有更多了
+				// this.pucurrentPage=1
+				// this.pulist= []// 常规
+				
+				this.getTecData()
+				console.log(111);
+			},
+			purepulling(){
+				this.putrigger = true
+				// this.isrepulling = true
+				setTimeout(() => {
+					this.putrigger = false;
+				}, 1000);
+				
+				// this.acLoading= 0 //0默认值  1加载中 2没有更多了
+				// this.accurrentPage= 1 //页数
+				// this.teclist= []// 教研
+				
+				this.puLoading= 0 //0默认值  1加载中 2没有更多了
+				this.pucurrentPage=1
+				this.pulist= []// 常规
+				
+				this.getpuData()
+				console.log(111);
+			},
+			
 			aclower() {
 				console.log('没触底?');
 				if (this.acLoading == 2) return
@@ -185,34 +230,13 @@
 					this.pulist = [...this.pulist, ...res[0]]
 				})
 			},
-			// 获取付费
-			getmonData() {
-				let data = {
-					openid: uni.getStorageSync('oId'),
-					ty: 1,
-					page: this.currentPage, //下拉获取更多的备用字段
-					lim: 15 //一次获取多少数据
-				}
-				this.$request('/selectActivity', "POST", data).then(res => {
-					// console.log('教研', res[0]);
-					// this.teclist = res[0]
 
-				})
-			},
 			// 区域滑动变换头部
 			swipeIndex(index) {
 				this.current = index.detail.current;
 				// this.$refs.listBlock1.getdata()
 			},
-			// 触底加载更多
-			// onReachBottom() {
-			// 	console.log('没触底?');
-			// 	if (this.newsLoading == 2) return
-			// 	this.newsLoading = 1
-			// 	this.currentPage++
-			// 	setTimeout(this.getData, 1000)
-
-			// },
+
 			// 区域滑动
 			phoneLogin() {
 				this.current = 0;
@@ -224,27 +248,34 @@
 				this.current = 2;
 			}
 		},
-		onShow() {
-			// 获取收藏事件
-			this.$refs.listBlock1.getdata() //专题
-			this.$refs.listBlock2.getdata() //常规
+		onLoad() {
+
 
 			// 刷新
 			// 教研
-			this.teclist = []
-			// 常规
-			this.pulist = []
-			this.accurrentPage = 1
-			this.pucurrentPage = 1
+			// this.teclist = []
+			// // 常规
+			// this.pulist = []
+			// this.accurrentPage = 1
+			// this.pucurrentPage = 1
+
+			// console.log('刷新',this.teclis);
 
 			this.getpuData() //获取常规列表
 			this.getTecData() //获取专题列表
 
-			this.getAllMessage() // 调用app.js中的方法
 			// 因为组件没有onshow
 			// 获取订阅事件
 			// this.$refs.listBlock1.getSub()
 		},
+		onShow() {
+
+
+			this.getAllMessage() // 调用app.js中的方法
+			// 获取收藏事件
+			this.$refs.listBlock1.getdata() //专题
+			this.$refs.listBlock2.getdata() //常规
+		}
 	};
 </script>
 
@@ -258,15 +289,6 @@
 		flex-direction: column;
 		height: 100vh;
 
-		.loading {
-			height: 30rpx;
-			text-align: center;
-			padding-top: 20rpx;
-			padding-bottom: 100rpx;
-			font-size: 26rpx;
-			color: #888;
-			line-height: 2em;
-		}
 
 		.search {
 			background-color: #ffffff;

+ 6 - 33
pages/index/index.vue

@@ -71,7 +71,6 @@
 					title: "首页", //导航栏标题
 					btn: 0, //是否显示返回按钮 0不显示  1 显示
 				},
-				activeList: [],
 				classList: [],
 				sortList: [{
 						tit: '活动专区',
@@ -90,7 +89,6 @@
 				]
 			};
 		},
-		onLoad() {},
 		methods: {
 			gotoTab(e){
 				console.log(e.currentTarget.dataset.index.tit);
@@ -111,20 +109,7 @@
 					icon:'none'
 				})
 			},
-			// 获取精选活动
-			// getData() {
-			// 	let data = {
-			// 		openid: uni.getStorageSync('oId'),
-			// 		ty: 2,
-			// 		page: 1, //下拉获取更多的备用字段
-			// 		lim: 12 //一次获取多少数据
-			// 	}
-			// 	this.$request('/selectActivity', "POST", data).then(res => {
-			// 		console.log('精选活动', res[0]);
-			// 		// this.activeList=[...this.activeList,...res[0]]
-			// 		this.activeList = res[0]
-			// 	})
-			// },
+			
 			// 获取教研室活动list 数据
 			getlistBlock1Data() {
 				let data = {
@@ -149,15 +134,7 @@
 				});
 
 			},
-			// gotoTeDetail() {
-			// 	const value = this.$store.state.user.openid;
-			// 	if (value == '') return this.goLog()
-			// 	uni.navigateTo({
-			// 		url: "/pages/teachingDetail/teachingDetail",
-			// 	});
-
-			// },
-
+			
 			// 顶部大图跳转外部链接
 			gotoHome() {
 				// const web = this.classList[this.current];
@@ -173,21 +150,17 @@
 			},
 
 		},
-		// onReady(){
-		// 	this.$refs.listBlock1.getdata()	
-		// },
 		onShow() {
-			//获取 精选
-			// this.getData()
-			// 获取教研室
+		
+			this.classList=[]
+			// 获取数据
 			this.getlistBlock1Data()
 			this.getAllMessage() // 调用app.js中的方法
 
 			// 因为组件没有onshow
 			// 获取收藏事件
 			this.$refs.listBlock1.getdata()
-			// 获取订阅事件
-			// this.$refs.listBlock1.getSub(0)
+			
 		}
 	};
 </script>

+ 20 - 9
pages/jys/jys.vue

@@ -34,7 +34,7 @@
 						</view>
 						<view class="name  sZw-font">
 							联系方式:
-							<input @input="handleInput" type="number" style=" text-align: right;" maxlength="11"
+							<input @blur="handleInput" type="number" style=" text-align: right;" maxlength="11"
 								placeholder="请输入联系方式" placeholder-style="font-size: 28rpx; color: rgb(153, 153, 153);"
 								v-model="phone" />
 						</view>
@@ -130,13 +130,15 @@
 				this.stations = ''
 			},
 			handleInput(e) {
-				const {value} = e.target
-				
+				const {
+					value
+				} = e.target
+				// console.log('value',value);
 				const newValue = value.replace(/[^\d]/g, '') // 只允许输入数字
-				
-				if (newValue.length <= 11) {
-					this.phone = newValue
-				}
+				// console.log('newValue',newValue);
+				// if (newValue.length <= 11) {
+				this.phone = newValue;
+				// }
 			},
 			// 确定按钮显示弹窗
 			showPop() {
@@ -191,9 +193,18 @@
 
 							// 弹窗关闭
 							this.showPopup = false
-							uni.navigateTo({
-								url: '/pages/Sign/Sign'
+							uni.reLaunch({
+								url: '/pages/Sign/Sign',
 							})
+							// uni.navigateTo({
+							// 	url: '/pages/Sign/Sign',
+							// 	success() {
+							// 		//跳转成功后,禁止返回
+							// 		uni.navigateBack({
+							// 			delta:0
+							// 		})
+							// 	}
+							// })
 						})
 					}
 				})

+ 1 - 1
pages/login_Wechat/login_Wechat.vue

@@ -334,7 +334,7 @@
 				let data = {
 					oid: opid,
 					acid: '',
-					type: 2,
+					type: 1,
 				}
 				this.$request('/insertMessage', "POST", data).then(res => {
 					console.log(res);

+ 4 - 45
pages/mine/mine.vue

@@ -28,19 +28,7 @@
 			</view>
 			<view class="userOptionsBox">
 				<view class="optionsItemBox">
-<!-- 					<view class="optionItem" @click="goToSub(1)">
-						<view class="option_left">
-							<span class="option_icon">
-								<image src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/Subscribe.png" mode="aspectFill">
-								</image>
-							</span>
-							<text class="option_text fwb-font">我的订阅</text>
-						</view>
-						<view class="option_right">
-							<image src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/arrow-right.png" mode="aspectFill">
-							</image>
-						</view>
-					</view> -->
+
 					<view class="optionItem" @click="goMsg">
 						<view class="option_left">
 							<view class="option_icon">
@@ -137,7 +125,6 @@
 							</image>
 						</view>
 					</view>
-					<!-- <beUpload @getFile="getFile" :navName="'上传文件'" :accept="accept" :progress="progress">111</beUpload> -->
 				</view>
 			</view>
 		</view>
@@ -154,11 +141,7 @@
 	export default {
 		data() {
 			return {
-				accept: "*",
-				progress: {
-					value: 50,
-					show: false,
-				},
+
 				navBarData: {
 					title: '我的',
 					btn: 0
@@ -170,7 +153,7 @@
 				userAvatar: 'https://teacherapi.cocorobo.cn/teaching-file/static/mine/Avatar.png',
 				// 学校
 				signature:'',
-				isManage: ''
+				
 			};
 		},
 		methods: {
@@ -221,31 +204,7 @@
 					}
 				})
 			}
-			// 我的发布
-			// gotomyRelease() {
-			// 	const value = this.$store.state.user.openid;
-			// 	if (value == '') {
-			// 		uni.navigateTo({
-			// 			url: "/pages/login_Wechat/login_Wechat",
-			// 		});
-			// 	} else {
-			// 		uni.navigateTo({
-			// 			url: '/pages/mineRelease/mineRelease'
-			// 		})
-			// 	}
-			// },
-			// 我的订阅
-			// goToSub(i) {
-			// 	uni.navigateTo({
-			// 		url: '/pages/mineSubscribe/mineSubscribe'
-			// 	});
-			// },
-			// 我的教研室
-			// gotoMineClass() {
-			// 	uni.navigateTo({
-			// 		url: '/pages/mineClass/mineClass'
-			// 	})
-			// },
+
 		},
 		onShow() {
 			this.getMag()    // 调用app.js中的方法

+ 12 - 10
pages/mineActive/mineActive.vue

@@ -57,16 +57,18 @@
 		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}`
-					});
-				}
+				uni.navigateTo({
+					url: `/pages/activityDetail/activityDetail?acId=${data.acId}`,
+				});
+				// if(data.type<=1){
+				// 	uni.navigateTo({
+				// 		url: `/pages/activityDetail/activityDetail?acId=${data.acId}`,
+				// 	});
+				// }else{
+				// 	uni.navigateTo({
+				// 		url: `/pages/teachingDetail/teachingDetail?acId=${data.acId}`
+				// 	});
+				// }
 			},
 			// 获取数据
 			getdata() {

+ 62 - 69
pages/mineCollNew/mineCollNew.vue

@@ -26,16 +26,16 @@
 							<view class="img cell-img">
 								<image :src="i.pic" mode="aspectFill"></image>
 								<image class="star" @click.stop="coll" :data-e="i"
-									:src="collArr.includes(i.acId) ? pic_coll2 : pic_coll " mode=""></image>
+									:src="pic_coll2" mode=""></image>
 							</view>
 
 							<view class="right">
 								<view class="title">
-									<view class="tag bqZ-font">{{i.acshape}}</view>
-
-									<text class="btn-font" style="">
+									<!-- <view class="tag bqZ-font">{{i.acshape}}</view> -->
+									<view class="bqZ-font" :class="i.acshape=='线下活动'?'tag':'tag1'"> {{i.acshape}}</view>
+									<view class="titTxt btn-font" style="">
 										{{i.acName}}
-									</text>
+									</view>
 								</view>
 
 								<view class="introduce">
@@ -52,7 +52,7 @@
 									<view class="left">
 										<view class="add fz-font">已报名{{i.bnum}}人</view>
 									</view>
-									<view class="Oright">
+									<view class="Oright" @click.stop="gotoLink" :data-link="i.link">
 										<view class="text">查看详情</view>
 										<view class="arrow">
 											<image
@@ -73,7 +73,7 @@
 			</swiper-item>
 
 			<swiper-item>
-				<scroll-view scroll-y="true" style="height: 100%;">
+				<scroll-view scroll-y="true"  @scrolltolower="cllower" style="height: 100%;">
 					<view class="classListFlex">
 						<view class="cont" @click="gotoWeb" v-for="(item, index) in classlist" :index="index"
 							:key="index" :data-kid="item.href">
@@ -84,17 +84,17 @@
 							<view class="teacher fz-font">{{ item.school }}</view>
 						</view>
 					</view>
-					<!-- <view class="loading">
+					<view class="loading">
 						<view v-if="clLoading==1">数据加载中...</view>
 						<view v-if="clLoading==2">没有更多了~~</view>
-					</view> -->
+					</view>
 				</scroll-view>
 			</swiper-item>
 		</swiper>
 
-		<view class="" style="height: 68rpx;width: 750rpx;">
+		<!-- <view class="" style="height: 68rpx;width: 750rpx;">
 
-		</view>
+		</view> -->
 	</view>
 </template>
 
@@ -150,11 +150,13 @@
 				})
 			},
 			// 获取课程数据
-			getColldata1cl() {
+			getTeachData() {
 				// console.log('触发课程收藏事件');
 				let data = {
 					oid: this.$store.state.user.openid, //用户id
-					type: 1
+					type: 1,
+					page: this.clcurrentPage, //下拉获取更多的备用字段
+					lim: 15 //一次获取多少数据
 				}
 				this.$request('/selectOperatorTech', 'POST', data).then(res => {
 					console.log('获取课程数据', res);
@@ -167,49 +169,12 @@
 						this.clLoading = 0
 					}
 
-					this.classlist = res[0]
-					// console.log(this.collArr);
-				})
-			},
-			// 获取活动收藏
-			getColldata() {
-				// console.log('触发活动收藏事件');
-				let data = {
-					oid: this.$store.state.user.openid, //用户id
-					type: 0
-				}
-				this.$request('/selectOperator', 'POST', data).then(res => {
-					console.log('获取活动收藏', res);
-					// 每次调用前清零,防止push叠加错误
-					this.collArr = []
-					// 将acid遍历到collArr中
-					res[0].forEach(i => {
-						this.collArr.push(i.acId)
-					})
+					this.classlist = [...this.classlist,...res[0]]
+					// this.classlist = res[0]
 					// console.log(this.collArr);
 				})
 			},
-			// 获取课程收藏数据
-			// getDatacl() {
-			// 	let data = {
-			// 		oid: this.$store.state.user.openid, //用户id
-			// 		// type: 0,
-			// 		// page: this.currentPage, //下拉获取更多的备用字段
-			// 		// lim: 15 //一次获取多少数据
-			// 	}
-			// 	this.$request('/selectCollClassList', 'POST', data).then(res => {
-			// 		console.log('获取课程收藏数据', res);
-
-			// 		// 每次调用前清零,防止push叠加错误
-			// 		// this.collArrcl = []
-					
-			// 		// 将cid遍历到collArr中
-			// 		res[0].forEach(i => {
-			// 			this.collArrcl.push(i.cid)
-			// 		})
-			// 	})
-			// },
-
+			
 			// 跳转活动详情页
 			gotoDetail(e) {
 				let aid = e.currentTarget.dataset.aid;
@@ -219,7 +184,6 @@
 			},
 			// 查看课程外部链接
 			gotoWeb(e) {
-
 				// return console.log('aaaaaa', e.currentTarget.dataset);
 				let acid = e.currentTarget.dataset.kid
 				uni.navigateTo({
@@ -271,25 +235,31 @@
 					if (this.classlist.length < 15) {
 						this.cllower()
 					}
-					// this.getColldata1cl()
 				})
 			},
 			// 活动触底加载更多
 			lower() {
-				console.log('没触底?');
+				console.log('活动没触底?');
 				if (this.newsLoading == 2) return
 				this.newsLoading = 1
 				this.currentPage++
 				setTimeout(this.getData, 1000)
 			},
 			// 课程触底加载更多
-			// cllower() {
-			// 	console.log('没触底?');
-			// 	if (this.clLoading == 2) return
-			// 	this.clLoading = 1
-			// 	this.clcurrentPage++
-			// 	setTimeout(this.getColldata1cl, 1000)
-			// },
+			cllower() {
+				console.log('课程没触底?');
+				if (this.clLoading == 2) return
+				this.clLoading = 1
+				this.clcurrentPage++
+				setTimeout(this.getTeachData, 1000)
+			},
+			//跳转到第三方链接
+			gotoLink(e){
+				let link = e.currentTarget.dataset.link;
+				uni.navigateTo({
+					url: "/pages/skipone/skipone?url=" + encodeURIComponent(link),
+				});
+			},
 			swipeIndex(index) {
 				this.current = index.detail.current;
 			},
@@ -302,11 +272,11 @@
 			},
 		},
 		onLoad() {
-			this.getData()
 			// this.getDatacl()
-			// 获取收藏事件
-			this.getColldata()
-			this.getColldata1cl()
+			// this.getColldata()
+			// 获取数据
+			this.getData()
+			this.getTeachData()
 		}
 	}
 </script>
@@ -473,10 +443,18 @@
 
 				.title {
 					display: flex;
-					width: 360rpx;
+					width: 500rpx;
 					justify-content: flex-start;
 					align-items: center;
-
+						
+					.titTxt{
+						flex: 1;
+						font-weight: bold;
+						overflow: hidden;
+						text-overflow: ellipsis;
+						white-space: nowrap;
+					}
+	
 					text {
 						font-weight: bold;
 						overflow: hidden;
@@ -566,6 +544,21 @@
 				color: #00b2b6;
 				line-height: 32rpx;
 			}
+			.tag1 {
+				border: 1px rgba(0, 86, 168, 1) solid;
+				flex-shrink: 0;
+				letter-spacing: 2rpx;
+				width: 104rpx;
+				height: 32rpx;
+				display: flex;
+				white-space: nowrap;
+				justify-content: center;
+				align-items: center;
+				border-radius: 4rpx;
+				margin-right: 10rpx;
+				color: rgba(0, 86, 168, 1);
+				line-height: 32rpx;
+			}
 		}
 	}
 </style>

+ 94 - 91
pages/mineEdit/mineEdit.vue

@@ -7,7 +7,7 @@
 				<view class="edit_title">
 					<text>头像</text>
 				</view>
-				<view class="userAvatar">
+				<view class="userAvatar" @click="updateava">
 					<image :src="userData.avatar"></image>
 				</view>
 			</view>
@@ -99,44 +99,7 @@
 					</view>
 				</picker>
 			</view>
-<!-- 			<view class="setPicker">
-				<picker mode="date" :value="userData.birthday" :start="startDate" :end="endDate" @change="bindDateChange">
-					<view class="content">
-						<view class="edit_title">
-							<text>生日</text>
-						</view>
-						<view class="input_details">
-							<view class="details">
-								<view class="uni-input text">{{userData.birthday=='null'?" ":userData.birthday}}</view>
-							</view>
-							<view class="arrow">
-								<image
-									src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/arrow-right_gray.png"
-									mode="aspectFill"></image>
-							</view>
-						</view>
-					</view>
-				</picker>
-			</view> -->
-<!-- 			<view class="setPicker">
-				<picker mode="selector" :range="hobbyList" :value="userData.tag"  @change="handelHobby">
-					<view class="content">
-						<view class="edit_title">
-							<text>兴趣标签</text>
-						</view>
-						<view class="input_details">
-							<view class="details">
-								<view class="uni-input text">{{hobbyList[userData.tag]}}</view>
-							</view>
-							<view class="arrow">
-								<image
-									src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/arrow-right_gray.png"
-									mode="aspectFill"></image>
-							</view>
-						</view>
-					</view>
-				</picker>
-			</view> -->
+
 			<view class="setIntro">
 				<view class="edit_title">
 					<text>简介</text>
@@ -144,7 +107,8 @@
 				<view class="input_details">
 					<view class="selfdomIntro">
 						<textarea type="text" placeholder="请输入你的个性签名" maxlength="75"
-							placeholder-style="font-size: 28rpx; color: rgb(153, 153, 153);" style="color: black;" v-model="userData.brief" />
+							placeholder-style="font-size: 28rpx; color: rgb(153, 153, 153);" style="color: black;"
+							v-model="userData.brief" />
 					</view>
 				</view>
 			</view>
@@ -218,8 +182,8 @@
 				//职称选项
 				rankList: ['xx', 'xx', 'xx'],
 				// 兴趣选项
-				hobbyList: ['篮球','编程','钢琴','美术','摄影'],
-				
+				hobbyList: ['篮球', '编程', '钢琴', '美术', '摄影'],
+
 				gender: '男',
 				school: 'xx学院',
 
@@ -231,13 +195,13 @@
 
 				// 用户信息数据
 				userData: {
-					oid:'',
+					oid: '',
 					avatar: '', //头像
 					username: '', //用户名
-					sex:'', //用户性别
-					school:'',//学校
-					spe:'',//专业
-					rankl:'',//职称
+					sex: '', //用户性别
+					school: '', //学校
+					spe: '', //专业
+					rankl: '', //职称
 					brief: '', //用户简介
 				}
 
@@ -253,50 +217,100 @@
 		// 	}
 		// },
 		methods: {
+			// 上传图片
+			updateava() {
+				let that = this
+				uni.chooseImage({
+					count: 1, // 图片数量
+					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+					sourceType: ['album', 'camera'], //从相册选择或者拍照
+					success: (res) => {
+						const tempFilePaths = res.tempFilePaths[0];
+
+						const uploadTask = uni.uploadFile({
+							url: 'http://139.159.246.165:7006/img', // post请求地址
+							filePath: tempFilePaths,
+							name: 'file', // 待确认
+							header: {
+								// 不要写这个不然报错
+								// 'Content-Type': 'multipart/form-data',
+							},
+							formData: {
+								// 携带的用户数据
+								// userId: that.$store.getters.getUser._id, // 用户ID
+							},
+							success: function(res) {
+								// console.log(res);
+								that.userData.avatar=res.data
+								
+							},
+							fail: function(uploadFileFail) {
+								console.log('Error:', uploadFileFail.data);
+							},
+							complete: () => {
+								// 接口调用结束的回调函数(调用成功、失败都会执行)
+								// console.log('Complete:');
+							}
+						});
+
+
+					}
+				});
+
+			},
 			// 获取渲染数据
-			getData(){
+			getData() {
 				const value = this.$store.state.user.openid;
 				if (value == '') return
-				console.log('????', this.$store.state.user.openid);
-				this.$request('/selectUserInfo', "POST", {openid: this.$store.state.user.openid}).then(res => {
-					console.log('获取渲染数据',res[0][0]);
-					
-					this.userData=res[0][0]
+				// console.log('????', this.$store.state.user.openid);
+				this.$request('/selectUserInfo', "POST", {
+					openid: this.$store.state.user.openid
+				}).then(res => {
+					// 假如简介为null
+					if(!res[0][0].brief){
+						res[0][0].brief=''
+					}
+					// console.log('获取渲染数据', res[0][0]);
+					this.userData = res[0][0]
 				})
 			},
 			// 取消操作
 			closePopup() {
 				this.showPopup = false;
-				// this.showPopupConfirm = false;
 			},
 			// 确认操作
 			conf() {
 				this.showPopup = false;
-				this.showPopupConfirm=true
-				console.log('要上传修改的数据',this.userData);
+				this.showPopupConfirm = true
+				console.log(' this.userData', this.userData);
 				this.$request('/updateUserInfo', "POST", this.userData).then(res => {
-					console.log('修改的数据',res);
-					
-					console.log('this',this);
+
+					// console.log('this', this);
 					this.$request('/selectUserInfo', 'POST', {
 						oId: this.$store.state.user.openid
 					}).then(res => {
-						console.log('获取', res[0][0]);
+						console.log('获取caozuo', res[0][0]);
 						this.$store.dispatch('asyncUpdateUser', res[0][0])
 					})
-					setTimeout(()=>{
-						this.showPopupConfirm=false
+					setTimeout(() => {
+						this.showPopupConfirm = false
 						this.getData()
-					},1500)
+					}, 1500)
 				})
 			},
 			// 点击保存修改
 			saveInfo() {
-				
+
 				const value = this.$store.state.user.openid;
-				if (value == '') return uni.showToast({title:'未登录',icon:'none'})
-				if(!this.userData.username){
-					return uni.showToast({title:'昵称不能为空',icon:'none'})
+				if (value == '') return uni.showToast({
+					title: '未登录',
+					icon: 'none'
+				})
+				if (!this.userData.username) {
+					return uni.showToast({
+						title: '昵称不能为空',
+						icon: 'none'
+					})
 				}
 				this.showPopup = true
 			},
@@ -305,58 +319,47 @@
 				console.log(e);
 				this.userData.sex = e.detail.value
 			},
-			// handelHobby(e){
-			// 	this.userData.tag = e.detail.value
-			// },
-			// // 生日
-			// bindDateChange(e) {
-			// 	this.userData.birthday = e.detail.value
-			// },
-			// handelGender(e) {
-			// 	this.gender = this.genderList[e.detail.value]
-			// },
+			
 			// 学校
 			handelSchool(e) {
 				console.log(e);
-				this.userData.school = this.schoolList[e.detail.value] 
+				this.userData.school = this.schoolList[e.detail.value]
 			},
 			// 专业
 			handelspe(e) {
-				console.log('handelspe',e);
+				console.log('handelspe', e);
 				this.userData.spe = this.speList[e.detail.value]
-				 console.log('???',this.userData.spe );
+				console.log('???', this.userData.spe);
 			},
 			// 职位
 			handelrank(e) {
 				console.log(e);
-				this.userData.rankl = this.rankList[e.detail.value] 
+				this.userData.rankl = this.rankList[e.detail.value]
 			},
 			// 兴趣
 			handeHobby(e) {
 				this.userData.tag = e.detail.value
 			},
-			
+
 			// 清除vuex的数据
 			gotoLogin() {
 				let user = {
-					openid:'',
+					openid: '',
 					avatar: '', //头像
 					username: '', //用户名
-					sex:'', //用户性别
-					school:'',//学校
-					spe:'',//专业
-					rankl:'',//职称
-					// birthday: '',//生日
-					// tag:null, //兴趣标签
+					sex: '', //用户性别
+					school: '', //学校
+					spe: '', //专业
+					rankl: '', //职称
 					brief: '', //用户简介
 				}
-				
+
 				this.$store.dispatch('asyncUpdateUser', user)
 				uni.navigateTo({
 					url: '/pages/login_Wechat/login_Wechat'
 				})
 				// 清除本页面数据
-				this.userData={}
+				this.userData = {}
 			},
 		},
 		onReady() {

+ 272 - 51
pages/msg/msg.vue

@@ -1,38 +1,55 @@
 <template>
 	<view class="msg">
 		<statusBar :item="navBarData"></statusBar>
+		<view class="allRead" @click="updateisread">
+			一键已读
+		</view>
 		<view class="top">
 			<view class="left" @click="puMsg" :class="current == 0 ? info1 : info2">
-				<text class="">消息通知</text>
+				<view class="" style="position: relative;">
+					<view class="msgq" v-if="msgn>0">
+						{{msgn}}
+					</view>
+					<text>消息通知</text>
+				</view>
 				<view v-if="current == 0" class="yun">
 					<image src="https://teacherapi.cocorobo.cn/teaching-file/static//yym/Ellipse 10.png"
 						mode="aspectFill"></image>
 				</view>
 			</view>
+
 			<view class="right" @click="sysMsg" :class="current == 1 ? info1 : info2">
-				<text class="">系统通知</text>
+				<view class="" style="position: relative;">
+					<view class="msgq" v-if="msgn2>0">
+						{{msgn2}}
+					</view>
+					<text>系统通知</text>
+				</view>
 				<view v-if="current == 1" class="yun">
 					<image src="https://teacherapi.cocorobo.cn/teaching-file/static//yym/Ellipse 10.png"
 						mode="aspectFill"></image>
 				</view>
 			</view>
 		</view>
-		
+
 		<swiper class="scroll-view-height" @change="swipeIndex" :current="current" :duration="300">
 			<swiper-item>
-				<scroll-view scroll-y="true" style="height: 100%;">
+				<scroll-view scroll-y="true" @scrolltolower="informlower" style="height: 100%;">
 					<view class="">
 						<view class="" v-for="(item,index) in Msglist" :key="index">
-							<view class="msgBlock" v-if="item.type==0">
+							<view class="msgBlock" @click="readOneMsg" :data-id="item">
+								<view class="dian" v-if="!item.isread">•</view>
 								<view class="tit">
 									<view>活动报名成功</view>
 									<view class="msgtime">
 										{{item.create_at}}
 									</view>
 								</view>
-								<view class="contxt">恭喜!您已成功完成<text style="color: rgba(0, 86, 168, 1);">“{{item.acName}}”</text>活动报名。您的参与信息已经成功提交,您现在是我们活动的一部分,我们非常期待与您共度美好时光。</view>
+								<view class="contxt">恭喜!您已成功完成<text
+										style="color: rgba(0, 86, 168, 1);">“{{item.acName}}”</text>活动报名。您的参与信息已经成功提交,您现在是我们活动的一部分,我们非常期待与您共度美好时光。
+								</view>
 								<view class="contxt">
-									 以下是一些额外信息,以确保您充分了解您的参与:
+									以下是一些额外信息,以确保您充分了解您的参与:
 								</view>
 								<view class="contxt1" style="display: flex;">
 									<view class="" style="width: 2em;text-align: center;">•</view>
@@ -52,53 +69,73 @@
 									<view class=""> 地点: [{{item.address}}]</view>
 								</view>
 							</view>
-							
-							<view class="msgBlock" v-if="item.type==1">
+
+							<view class="msgBlock" v-if="item.type==1" @click="readOneMsg" :data-id="item">
+								<view class="dian" v-if="!item.isread">•</view>
 								<view class="tit">
 									<view>活动开始提醒</view>
 									<text class="msgtime">{{item.create_at}}</text>
 								</view>
 								<view class="contxt">
-									<text style="color: rgba(0, 86, 168, 1);">“丽湖职教双创教育国际虚拟教研室 • 常规教研活动 第9期”</text>活动现在已经在我们的平台上正式上线,欢迎您点击浏览和积极参加。不要错过这个令人兴奋的机会,我们期待着与您一同度过难忘的时光。点击活动名称进入活动详情哦!
+									<text style="color: rgba(0, 86, 168, 1);">“丽湖职教双创教育国际虚拟教研室 • 常规教研活动
+										第9期”</text>活动现在已经在我们的平台上正式上线,欢迎您点击浏览和积极参加。不要错过这个令人兴奋的机会,我们期待着与您一同度过难忘的时光。点击活动名称进入活动详情哦!
 								</view>
 							</view>
 						</view>
 					</view>
-					<!-- <view class="loading">
+					<view class="loading">
 						<view v-if="clLoading==1">数据加载中...</view>
 						<view v-if="clLoading==2">没有更多了~~</view>
-					</view> -->
-					
+					</view>
+
 				</scroll-view>
 			</swiper-item>
-		
+
 			<swiper-item>
-				<scroll-view scroll-y="true" style="height: 100%;">
+				<scroll-view scroll-y="true" @scrolltolower="syslower" style="height: 100%;">
 					<view class="">
-						<view class="" v-for="(item,index) in Msglist" :key="index">
-							<view class="msgBlock"  v-if="item.type==2">
+						<view class="" v-for="(item,index) in syslist" :key="index">
+							<view class="msgBlock" @click="readOneMsg" :data-id="item">
+								<view class="dian" v-if="!item.isread">•</view>
 								<view class="tit">
 									<view>恭喜您,成功加入会员</view>
 									<text class="msgtime">{{item.create_at}}</text>
 								</view>
 								<view class="contxt1">
-									尊敬的<text style="color: rgba(0, 86, 168, 1);">{{item.username}}</text>, 
+									尊敬的<text style="color: rgba(0, 86, 168, 1);">{{item.username}}</text>,
 								</view>
 								<view class="contxt">
-										我们很高兴通知您,您已成功加入<text style="color: rgba(0, 86, 168, 1);">[XXX小程序会员]</text>!欢迎加入我们的团队,我们期待与您一同合作并参与。
+									我们很高兴通知您,您已成功加入<text
+										style="color: rgba(0, 86, 168, 1);">[XXX小程序会员]</text>!欢迎加入我们的团队,我们期待与您一同合作并参与。
 								</view>
 							</view>
 						</view>
 					</view>
-					<!-- <view class="loading">
+					<view class="loading">
 						<view v-if="sysLoading==1">数据加载中...</view>
 						<view v-if="sysLoading==2">没有更多了~~</view>
-					</view> -->
-					
+					</view>
+
 				</scroll-view>
 			</swiper-item>
 		</swiper>
-		
+
+		<!-- 弹窗 -->
+		<view style="width: 750rpx;height: 100vh;background-color: rgba(0, 0, 0, .5);padding: 0;position: absolute;"
+			v-show="showPopup">
+			<!-- <view class="mask" v-show="showPopup" @click="closePopup"></view> -->
+			<view class="popup-container">
+				<view class="popup">
+					<view class="header">
+						<text>确认一键已读?</text>
+					</view>
+					<view class="footer">
+						<view class="cancel-btn" @click="showPopup=false">取消</view>
+						<view class="confirm-btn" @click="conf">确认</view>
+					</view>
+				</view>
+			</view>
+		</view>
 	</view>
 </template>
 
@@ -110,42 +147,173 @@
 					title: '活动消息',
 					btn: 1
 				},
-				Msglist:[],
-				currentPage:1,
-				current: 0, //登录方式切换
+				Msglist: [],
+				syslist: [],
+
+				showPopup: false,
+
+
+				current: 0, //消息页面切换
 				info1: "info1", //类名
 				info2: "info2",
+				msgn: 0,
+				msgn2: 0,
+
+				clLoading: 0,
+				sysLoading: 0,
+
+				clcurrentPage: 1, //页数
+				syscurrentPage: 1, //页数
+
+
 			};
 		},
-		methods:{
-			// 获取数据
+		methods: {
+			// 获取消息通知数据
 			getdata() {
 				let data = {
 					oid: this.$store.state.user.openid, //用户id
-					page: this.currentPage,
-					lim: 30
+					ty: 0,
+					page: this.clcurrentPage,
+					lim: 15
 				}
 				this.$request('/selectMessage', "POST", data).then(res => {
-					console.log('获取', res);
-					// this.list = [this.list,...res[0]]
-					this.Msglist = res[0]
-					// console.log('获取',this.list);
+					console.log('获取消息通知数据', res);
+					if (!res[0].length) {
+						this.clLoading = 2
+					} else {
+						this.clLoading = 0
+					}
+
+					this.Msglist = [...this.Msglist, ...res[0]]
 				})
 			},
+			// 获取系统通知数据
+			getdata2() {
+				let data = {
+					oid: this.$store.state.user.openid, //用户id
+					ty: 1,
+					page: this.syscurrentPage,
+					lim: 15
+				}
+				this.$request('/selectMessage', "POST", data).then(res => {
+					console.log('获取系统通知数据', res);
+					if (!res[0].length) {
+						this.sysLoading = 2
+					} else {
+						this.sysLoading = 0
+					}
+
+					this.syslist = [...this.syslist, ...res[0]]
+				})
+			},
+			// 点击单个已读
+			readOneMsg(e) {
+				const data = e.currentTarget.dataset.id
+				console.log(data);
+
+				let a = {
+					openid: this.$store.state.user.openid, //用户id
+					id: data.id
+				}
+
+				if (data.isread == 0) {
+					this.$request('/updateOneIsRead', "POST", a).then(res => {
+						console.log(res);
+						this.getMag()
+						// 去除信息列表右上未读红点,current判断所在哪个消息列表
+						if (this.current == 0) {
+							this.Msglist.forEach(e => {
+								if (data.id == e.id) {
+									e.isread = 1
+								}
+							})
+						} else {
+							this.syslist.forEach(e => {
+								if (data.id == e.id) {
+									e.isread = 1
+								}
+							})
+						}
+					})
+				}
+			},
+
+			// 消息通知触底
+			informlower() {
+				console.log('没触底?');
+				if (this.clLoading == 2) return
+				this.clLoading = 1
+				this.clcurrentPage++
+				setTimeout(this.getdata, 1000)
+			},
+			// 系统通知触底
+			syslower() {
+				console.log('没触底?');
+				if (this.sysLoading == 2) return
+				this.sysLoading = 1
+				this.syscurrentPage++
+				setTimeout(this.getdata2, 1000)
+			},
 			// 更新已读
 			updateisread() {
+				this.showPopup = true
+			},
+			// 弹窗确认已读
+			conf() {
 				let data = {
 					oid: this.$store.state.user.openid, //用户id
-					// type: 2,
+					type: this.current,
 				}
 				this.$request('/updateIsRead', "POST", data).then(res => {
 					// console.log('获取', res);
+					// 未读提示红点重置为0,在后面赋值
+					// this.msgn = 0
+					// this.msgn2 = 0
+					// 调用方法赋值未读红点
+					this.getMag()
+
+					// 去除信息列表右上未读红点,current判断所在哪个消息列表
+					if (this.current == 0) {
+						this.Msglist.forEach(e => {
+							e.isread = 1
+						})
+					} else {
+						this.syslist.forEach(e => {
+							e.isread = 1
+						})
+					}
+					this.showPopup = false
 				})
 			},
-			puMsg(){
-				this.current =0;
+			// 获取未读信息
+			getMag() {
+				this.$request('/selectUnreadMsg', "POST", {
+					oid: this.$store.state.user.openid
+				}).then(res => {
+					console.log('获取未读信息', res);
+					// 未读提示红点重置为0,在后面赋值
+					this.msgn = 0
+					this.msgn2 = 0
+
+					let arr = res[0]
+					if (arr.length != 0) {
+						arr.forEach(e => {
+							if (e.type == 0) {
+								this.msgn = res[0][0].msg
+							} else if (e.type == 1 && arr.length == 2) {
+								this.msgn2 = res[0][1].msg
+							} else if (e.type == 1 && arr.length == 1) {
+								this.msgn2 = res[0][0].msg
+							}
+						})
+					}
+				})
 			},
-			sysMsg(){
+			puMsg() {
+				this.current = 0;
+			},
+			sysMsg() {
 				this.current = 1;
 			},
 			swipeIndex(index) {
@@ -154,7 +322,8 @@
 		},
 		onShow() {
 			this.getdata()
-			this.updateisread()
+			this.getdata2()
+			this.getMag()
 		}
 	}
 </script>
@@ -167,6 +336,22 @@
 		justify-content: space-between;
 		width: 750rpx;
 		height: 100vh;
+
+		.allRead {
+			position: fixed;
+			font-size: 20rpx;
+			width: 90rpx;
+			height: 90rpx;
+			border-radius: 50%;
+			text-align: center;
+			line-height: 90rpx;
+			background-color: rgba(0, 86, 168, 1);
+			color: #fff;
+			right: 70rpx;
+			z-index: 10;
+			bottom: 100rpx;
+		}
+
 		.loading {
 			height: 30rpx;
 			text-align: center;
@@ -176,7 +361,7 @@
 			color: #888;
 			line-height: 2em;
 		}
-		
+
 		.top {
 			display: flex;
 			justify-content: space-between;
@@ -184,7 +369,26 @@
 			width: 100%;
 			background-color: #ffffff;
 			padding: 10px 20%;
-		
+			// position: relative;
+
+
+
+			.msgq {
+				width: 32rpx;
+				height: 32rpx;
+				background-color: rgba(213, 73, 65, 1);
+				border-radius: 50rpx;
+				color: #fff;
+				font-size: 20rpx;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				position: absolute;
+				top: -10rpx;
+				right: -20rpx;
+				font-weight: normal !important;
+			}
+
 			.info1 {
 				font-weight: bold !important;
 				position: relative;
@@ -194,19 +398,21 @@
 				width: 136rpx;
 				height: 48rpx;
 				text-align: center;
+
 				.yun {
 					width: 134rpx;
 					height: 32rpx;
 					position: absolute;
 					left: 0;
 					bottom: -10rpx;
+
 					image {
 						width: 100%;
 						height: 100%;
 					}
 				}
 			}
-		
+
 			.info2 {
 				color: rgba(0, 0, 0, 0.6);
 				font-size: 34rpx;
@@ -218,17 +424,29 @@
 				font-family: 微软雅黑;
 			}
 		}
+
 		.scroll-view-height {
 			padding: 20rpx 0;
 			flex: 1;
-			.msgBlock{
+
+			.msgBlock {
 				width: 720rpx;
 				margin: auto;
 				background-color: #ffffff;
 				border-radius: 12px;
 				padding: 28rpx 24rpx 32rpx 24rpx;
 				margin-bottom: 20rpx;
-				.tit{
+				position: relative;
+
+				.dian {
+					position: absolute;
+					right: 10rpx;
+					top: -20rpx;
+					font-size: 60rpx;
+					color: rgba(213, 73, 65, 1);
+				}
+
+				.tit {
 					font-size: 34rpx;
 					font-weight: 400;
 					height: 48rpx;
@@ -237,26 +455,29 @@
 					color: rgba(0, 0, 0, 0.8);
 					display: flex;
 					justify-content: space-between;
-					.msgtime{
+
+					.msgtime {
 						line-height: 58rpx;
-							font-size: 28rpx;
-							color: rgba(0, 0, 0, 0.4);
+						font-size: 28rpx;
+						color: rgba(0, 0, 0, 0.4);
 					}
 				}
-				.contxt{
+
+				.contxt {
 					text-indent: 2em;
 					color: rgba(0, 0, 0, 0.6);
 					font-size: 28rpx;
 					line-height: 40rpx;
 				}
-				.contxt1{
+
+				.contxt1 {
 					color: rgba(0, 0, 0, 0.6);
 					font-size: 28rpx;
 					line-height: 40rpx;
 				}
 			}
-			
-			
+
+
 		}
 	}
 </style>

+ 0 - 77
pages/publish/publish.vue

@@ -815,83 +815,6 @@
 			// display: none;
 		}
 
-		.popup-container {
-			position: fixed;
-			top: 50%;
-			left: 50%;
-			transform: translate(-50%, -50%);
-			width: 520rpx;
-			height: 260rpx;
-			z-index: 1000;
-			// display: none;
-
-			.popup {
-				width: 100%;
-				height: 100%;
-				display: flex;
-				flex-direction: column;
-				background-color: #fff;
-				border-radius: 16rpx;
-				overflow: hidden;
-
-				.header {
-					flex: 1;
-					display: flex;
-					justify-content: center;
-					align-items: center;
-					flex-direction: column;
-					margin-top: 24px;
-					font-size: 34rpx;
-					font-weight: 600;
-
-					image {
-						width: 150rpx;
-						height: 150rpx;
-						margin-top: 15px;
-						margin-bottom: 15px;
-					}
-				}
-
-				.footer {
-					width: 100%;
-					display: flex;
-					overflow: hidden;
-
-					.cancel-btn {
-						width: 50%;
-						height: 100rpx;
-						background-color: #F7F7F7;
-						color: #000;
-						font-size: 34rpx;
-						text-align: center;
-						border-bottom-left-radius: 16rpx;
-						line-height: 50px;
-					}
-
-					.confirm-btn {
-						width: 50%;
-						height: 100rpx;
-						background-color: #0081FE;
-						color: #fff;
-						font-size: 34rpx;
-						text-align: center;
-						line-height: 50px;
-					}
 
-					// .confirm-btn_2 {
-					// 	width: 518rpx;
-					// 	height: 100rpx;
-					// 	background-color: #F7F7F7;
-					// 	color: #000;
-					// 	font-size: 34rpx;
-					// 	text-align: center;
-					// 	border-radius: 0;
-					// 	border-bottom-left-radius: 16rpx;
-					// 	border-bottom-right-radius: 16rpx;
-					// 	line-height: 50px;
-					// }
-				}
-			}
-		}
 	}
 </style>

+ 148 - 8
pages/resource/resource.vue

@@ -32,18 +32,28 @@
 
 		<swiper class="scroll-view-height" @change="swipeIndex" :current="current" :duration="300">
 			<swiper-item>
-				<scroll-view scroll-y="true" style="height: 100%;">
+				<scroll-view scroll-y="true" refresher-enabled='true' :refresher-triggered="trigger"
+					@refresherrefresh='repulling' @scrolltolower="relower" style="height: 100%;">
 					<view class="">
 						<teaching-case ref="reso" :acList='filteredClassList'></teaching-case>
 					</view>
+					<view class="loading">
+						<view v-if="reLoading==1">数据加载中...</view>
+						<view v-if="reLoading==2">没有更多了~~</view>
+					</view>
 				</scroll-view>
 			</swiper-item>
 
 			<swiper-item>
-				<scroll-view scroll-y="true" style="height: 100%;">
+				<scroll-view scroll-y="true" refresher-enabled='true' :refresher-triggered="putrigger"
+					@refresherrefresh='purepulling' @scrolltolower="tealower" style="height: 100%;">
 					<view class="">
 						<teaching-case ref="tech" :acList='filteredClassList2'></teaching-case>
 					</view>
+					<view class="loading">
+						<view v-if="teaLoading==1">数据加载中...</view>
+						<view v-if="teaLoading==2">没有更多了~~</view>
+					</view>
 				</scroll-view>
 			</swiper-item>
 
@@ -76,9 +86,21 @@
 				pic_coll: 'https://teacherapi.cocorobo.cn/teaching-file/static/Stara.png',
 				pic_coll2: 'https://teacherapi.cocorobo.cn/teaching-file/static/mine/Collect_yellow.png',
 
+				// 资源库
 				classList: [],
 
+				// 精品课程
 				classList2: [],
+
+				reLoading: 0, //0默认值  1加载中 2没有更多了
+				recurrentPage: 1, //页数
+
+				teaLoading: 0, //0默认值  1加载中 2没有更多了
+				teacurrentPage: 1,
+
+				// 设置当前下拉刷新状态,true 表示下拉刷新已经被触发,false 表示下拉刷新未被触发
+				trigger: false, //专题
+				putrigger: false, //常规
 			};
 		},
 		// 模糊搜索
@@ -98,18 +120,94 @@
 
 		},
 		methods: {
+			// 资源库下拉刷新
+			repulling() {
+				this.trigger = true
+				// this.isrepulling = true
+				setTimeout(() => {
+					this.trigger = false;
+				}, 1000);
+
+				// 资源库
+				this.classList= []
+				this.reLoading= 0 //0默认值  1加载中 2没有更多了
+				this.recurrentPage= 1 //页数
+				
+				
+
+				this.getreList()
+				console.log(111);
+			},
+			// 精品慕课下拉刷新
+			purepulling() {
+				this.putrigger = true
+				// this.isrepulling = true
+				setTimeout(() => {
+					this.putrigger = false;
+				}, 1000);
+
+				// 精品课程
+				this.classList2= []
+				this.teaLoading= 0 //0默认值  1加载中 2没有更多了
+				this.teacurrentPage= 1
 
+				this.getteaList()
+				console.log(111);
+			},
 			// 获取资源库
-			getclassList() {
+			getreList() {
+				let data = {
+					openid: uni.getStorageSync('oId'),
+					ty: 0,
+					page: this.recurrentPage,
+					lim: 15
+				}
+				this.$request('/selectResource', "POST", data).then(res => {
+					console.log('获取资源库', res);
+					if (!res[0].length) {
+						this.reLoading = 2
+					} else {
+						this.reLoading = 0
+					}
+					this.classList = [...this.classList, ...res[0]]
+					// this.classList2 = res[1]
+				})
+			},
+			// 获取精品慕课
+			getteaList() {
 				let data = {
 					openid: uni.getStorageSync('oId'),
+					ty: 1,
+					page: this.teacurrentPage,
+					lim: 15
 				}
 				this.$request('/selectResource', "POST", data).then(res => {
-					// console.log('获取资源库', res);
-					this.classList = res[0]
-					this.classList2 = res[1]
+					console.log('获取资源库', res);
+					if (!res[0].length) {
+						this.teaLoading = 2
+					} else {
+						this.teaLoading = 0
+					}
+					this.classList2 = [...this.classList2, ...res[0]]
+					// this.classList2 = res[1]
 				})
 			},
+			// 资源库触底
+			relower() {
+				console.log('没触底?');
+				if (this.reLoading == 2) return
+				this.reLoading = 1
+				this.recurrentPage++
+				setTimeout(this.getreList, 1000)
+			},
+			// 精品慕课触底
+			tealower() {
+				console.log('没触底?');
+				if (this.teaLoading == 2) return
+				this.teaLoading = 1
+				this.teacurrentPage++
+				setTimeout(this.getteaList, 1000)
+			},
 
 			swipeIndex(index) {
 				this.current = index.detail.current;
@@ -124,13 +222,55 @@
 			costClass() {
 				this.current = 2;
 			}
+		},
+		onLoad() {
+			// this.classList: []
+
+			// 精品课程
+			// this.classList2: []
+
+			// this.reLoading: 0 //0默认值  1加载中 2没有更多了
+			// this.recurrentPage: 1 //页数
+
+			// this.teaLoading: 0 //0默认值  1加载中 2没有更多了
+			// this.teacurrentPage: 1
+
+			
+
 		},
 		onShow() {
+			// 精品课程
+			this.classList2= []
+			this.teaLoading= 0 //0默认值  1加载中 2没有更多了
+			this.teacurrentPage= 1
+			
+			// 资源库
+			this.classList= []
+			this.reLoading= 0 //0默认值  1加载中 2没有更多了
+			this.recurrentPage= 1 //页数
+			
+			this.getreList()
+			this.getteaList()
+
 			this.getAllMessage() // 调用app.js中的方法
-			this.getclassList()
+			// 获取收藏
 			this.$refs.reso.getdata()
 			this.$refs.tech.getdata()
-		},
+		}
+		// onShow() {
+		// 	// 资源库
+
+
+
+
+
+		// 	this.getAllMessage() // 调用app.js中的方法
+		// 	this.getreList()
+		// 	this.getteaList()
+		// 	// 获取收藏
+		// 	this.$refs.reso.getdata()
+		// 	this.$refs.tech.getdata()
+		// },
 	};
 </script>
 

+ 1 - 1
pages/teachingList/teachingList.vue

@@ -25,7 +25,7 @@
 		data() {
 			return {
 				navbarData: {
-					title: '教研室列表',
+					title: '推荐列表',
 					btn: 1
 				},