yuanyiming 1 jaar geleden
bovenliggende
commit
a7831bed68

+ 2 - 1
App.vue

@@ -10,13 +10,14 @@
 			// 微信登录
 			wx.login({
 				success({code}) {
+					console.log('code',code);
 					uni.request({
 						url:'https://teacherapi.cocorobo.cn/api/pbl/weChatCode',
 						// url: 'http://localhost:7333/api/pbl/weChatCode', //接口地址:前缀+方法中传入的地址
 						method:'GET',
 						data:{codes:code}
 					}).then(res=>{ 
-						console.log(res);
+						// console.log('微信登录',res);
 						uni.setStorageSync('oId',res.data)
 						// uni.getStorageSync('oId')
 					})

+ 1 - 1
api/request.js

@@ -8,7 +8,7 @@ const request = (url = '', method = 'GET', data = {}, header = {   //这里这
 		// console.log(header);
 		uni.request({
 			url: 'https://teacherapi.cocorobo.cn/api/pbl' + url, //接口地址:前缀+方法中传入的地址
-			// url: 'http://localhost:7333/api/pbl' + url, //接口地址:前缀+方法中传入的地址
+			// url: 'http://10.3.13.84:7333/api/pbl' + url, //接口地址:前缀+方法中传入的地址
 			method: method, //请求方法
 			data: data, //传递参数
 			header: header, //自定义头部,和后端商同后编写

+ 238 - 268
components/listBlock1/listBlock1.vue

@@ -1,35 +1,35 @@
 <template>
-	<view class="" >
-		<view class="listBlock1" v-for="(i,index) in classList" :key="index+'a'">
+	<view class="">
+		<view class="listBlock1" v-for="(i,index) in classList" :key="index+'a'"  @click="gotoDetail" :data-aid="i.acId">
 			<view class="img cell-img">
 				<image :src="i.pic" mode="aspectFill"></image>
 			</view>
-				
+
 			<view class="right">
 				<view class="">
 					<view class="title">
-						<view  class="tag bqZ-font">类型</view>
-						
-						<text class="btn-font"  style="">
+						<view class="tag bqZ-font">类型</view>
+
+						<text class="btn-font" style="">
 							{{i.acName}}
 						</text>
 					</view>
 					<view class="introduce fwb-font">
 						{{ i.brief }}
 					</view>
-				
+
 				</view>
-				
+
 				<view class="operate">
 					<view class="left">
-						<view class="opr" style="padding-right: 25rpx"  @click="coll" :data-e="i">
+						<view class="opr" style="padding-right: 25rpx" @click.stop="coll" :data-e="i">
 							<view class="icon">
 								<image :src="collArr.includes(i.acId) ? pic_coll2 : pic_coll "
 									style="width: 28rpx; height: 26rpx" mode="aspectFill"></image>
 							</view>
 							<text class="fz-font">收藏</text>
 						</view>
-						<view class="opr" @click="subaaa" :data-e="i">
+						<view class="opr" @click.stop="subaaa" :data-e="i">
 							<view class="icon">
 								<image :src="subArr.includes(i.acId) ? pic_sub2 : pic_sub "
 									style="width: 22rpx; height: 26rpx" mode="aspectFill"></image>
@@ -38,20 +38,20 @@
 						</view>
 					</view>
 					<view class="">
-						<button class="btn sBtn-font" @click.stop="join">
+						<button class="btn sBtn-font"  @click="join" :data-index="index">
 							立即参与
 						</button>
 					</view>
 				</view>
 			</view>
 		</view>
-		
+
 	</view>
 </template>
 
 <script>
 	export default {
-		name:"listBlock1",
+		name: "listBlock1",
 		props: {
 			classList: {
 				type: Array,
@@ -66,147 +66,102 @@
 		// props:['classList'],
 		data() {
 			return {
-				collArr:[],
-				subArr:[],
-				// collArr.includes(i.acId) ? 'http://43.139.158.220:5007/img/static/yym/Star 1 (Stroke).png' : 'http://43.139.158.220:5007/img/static/yym/Vector (Stroke).png'
-				pic_coll:'http://43.139.158.220:5007/img/static/yym/Star 1 (Stroke).png',
-				pic_coll2:'https://teacherapi.cocorobo.cn/teaching-file/static//mine/Collect_yellow.png',
-				pic_sub:'http://43.139.158.220:5007/img/static/yym/Vector (Stroke).png',
-				pic_sub2:'../../static/mine/dingyue_blue.png'
+				collArr: [],
+				subArr: [],
+				pic_coll: 'https://teacherapi.cocorobo.cn/teaching-file/static/yym/Star 1 (Stroke).png',
+				pic_coll2: 'https://teacherapi.cocorobo.cn/teaching-file/static//mine/Collect_yellow.png',
+				pic_sub: 'https://teacherapi.cocorobo.cn/teaching-file/static/yym/Vector (Stroke).png',
+				pic_sub2: '../../static/mine/dingyue_blue.png'
 			};
 		},
-		
-		methods:{
+
+		methods: {
 			// 收藏事件
-			coll(event){
-				// console.log(event.currentTarget.dataset.e);
-				console.log(this.$store.state.user.openid);
-				let aId=event.currentTarget.dataset.e.acId
-				// 先获取用户收藏信息
-				let data={
-					oid:this.$store.state.user.openid, //用户id
+			coll(event) {
+				const value = this.$store.state.user.openid;
+				if (value == '') {
+					uni.navigateTo({
+						url: "/pages/login_Wechat/login_Wechat",
+					});
+					return
 				}
-				this.$request('/selectColl','POST',data).then(res=>{
-					// console.log('获取收藏信息',res);
-					// return console.log('获取收藏信息',res[0][0].coll=='');
-					let res2
-					let colls
-					if(res[0][0].coll!==null && res[0][0].coll !==""){
-						colls=JSON.parse(res[0][0].coll)
-						console.log('获取收藏信息',colls);
-						// 判断收藏表是否包含这个活动
-						res2 = colls.some((e)=>{
-							return e == aId
-						})
-						// console.log(res2);
-					}
-					
-					// return 	console.log('2',res2);
-					// 第一次存储返回值为null,然后存储收藏
-					if(res[0][0].coll==null || res[0][0].coll==""){
-						// 然后进行存储活动到用户coll字段
-						let arr={
-							oid:this.$store.state.user.openid, //用户id
-							acid:JSON.stringify([aId])
-						}
-						this.$request('/updateColl','POST',arr).then(res=>{
-							this.$request('/selectColl','POST',data).then(res=>{
-								this.collArr=JSON.parse(res[0][0].coll)
-							})
+				// return	console.log(event);
+				let aId = event.currentTarget.dataset.e.acId
+
+				//判断是否收藏
+				let iscoll = null
+
+				// 查询是否收藏过
+				let data = {
+					acid: aId,
+					oid: this.$store.state.user.openid, //用户id
+					ty: 0
+				}
+				this.$request('/selectOneOperator', 'POST', data).then(res => {
+					// console.log('查询是否收藏过',res);
+					res[0].length ? iscoll = true : iscoll = false;
+
+					// iscoll为true表示已经收藏过,执行删除  为true则收藏
+					if (iscoll) {
+						console.log('执行删除');
+						this.$request('/deleteOperator', 'POST', data).then(res => {
+							console.log(res);
+							this.getdata()
 						})
-					// 当数组中没有这个收藏活动时添加收藏
-					}else if(!res2){
-						colls.push(aId)
-						let arr2={
-							oid:this.$store.state.user.openid, //用户id
-							acid:JSON.stringify(colls) 
-						}
-						this.$request('/updateColl','POST',arr2).then(res=>{
-							this.$request('/selectColl','POST',data).then(res=>{
-								this.collArr=JSON.parse(res[0][0].coll)
-							})
-						})
-					// 取消收藏
-					}else if(res2){
-						const newArray = colls.filter(item => item !== aId);
-						let arr3={
-							oid:this.$store.state.user.openid, //用户id
-							acid:JSON.stringify(newArray) 
-						}
-						this.$request('/updateColl','POST',arr3).then(res=>{
-							this.$request('/selectColl','POST',data).then(res=>{
-								this.collArr=JSON.parse(res[0][0].coll)
-							})
+					} else {
+						console.log('执行添加');
+						this.$request('/insertOperator', 'POST', data).then(res => {
+							console.log(res);
+							this.getdata()
 						})
 					}
 				})
 			},
-			
+
 			// 订阅事件
-			subaaa(event){
-				console.log('sub',111111111);
-				console.log(this.$store.state.user.openid);
-				let aId=event.currentTarget.dataset.e.acId
-				// 先获取用户订阅信息
-				let data={
-					oid:this.$store.state.user.openid, //用户id
+			subaaa(event) {
+				const value = this.$store.state.user.openid;
+				if (value == '') {
+					uni.navigateTo({
+						url: "/pages/login_Wechat/login_Wechat",
+					});
+					return
 				}
-				this.$request('/selectSub','POST',data).then(res=>{
-					// console.log('获取订阅信息',res);
-					// return console.log('获取订阅信息',res[0][0].coll=='');
-					let res2
-					let subs
-					if(res[0][0].sub!==null && res[0][0].sub !==""){
-						subs=JSON.parse(res[0][0].sub)
-						console.log('获取订阅信息',subs);
-						// 判断订阅表是否包含这个活动
-						res2 = subs.some((e)=>{
-							return e == aId
-						})
-						// console.log(res2);
-					}
-					
-					// return 	console.log('2',res2);
-					// 第一次存储返回值为null,然后存储订阅
-					if(res[0][0].sub==null || res[0][0].sub==""){
-						// 然后进行存储活动到用户coll字段
-						let arr={
-							oid:this.$store.state.user.openid, //用户id
-							acid:JSON.stringify([aId])
-						}
-						this.$request('/updateSub','POST',arr).then(res=>{
-							this.$request('/selectSub','POST',data).then(res=>{
-								this.subArr=JSON.parse(res[0][0].sub)
-							})
-						})
-					// 当数组中没有这个订阅活动时添加订阅
-					}else if(!res2){
-						subs.push(aId)
-						let arr2={
-							oid:this.$store.state.user.openid, //用户id
-							acid:JSON.stringify(subs) 
-						}
-						this.$request('/updateSub','POST',arr2).then(res=>{
-							this.$request('/selectSub','POST',data).then(res=>{
-								this.subArr=JSON.parse(res[0][0].sub)
-							})
+				let aId = event.currentTarget.dataset.e.acId
+
+				//判断是否订阅
+				let iscoll = null
+
+				// 查询是否订阅过
+				let data = {
+					acid: aId,
+					oid: this.$store.state.user.openid, //用户id
+					ty: 1
+				}
+				this.$request('/selectOneOperator', 'POST', data).then(res => {
+					// console.log('查询是否订阅过',res);
+					res[0].length ? iscoll = true : iscoll = false;
+
+					// iscoll为true表示已经订阅过,执行删除  为true则订阅
+					if (iscoll) {
+						console.log('执行删除');
+						this.$request('/deleteOperator', 'POST', data).then(res => {
+							console.log(res);
+							this.getSub()
 						})
-					// 取消订阅
-					}else if(res2){
-						const newArray = subs.filter(item => item !== aId);
-						let arr3={
-							oid:this.$store.state.user.openid, //用户id
-							acid:JSON.stringify(newArray) 
-						}
-						this.$request('/updateSub','POST',arr3).then(res=>{
-							this.$request('/selectSub','POST',data).then(res=>{
-								this.subArr=JSON.parse(res[0][0].sub)
-							})
+					} else {
+						console.log('执行添加');
+						this.$request('/insertOperator', 'POST', data).then(res => {
+							console.log(res);
+							this.getSub()
 						})
 					}
 				})
 			},
-			join() {
+
+			join(e) {
+				let num = e.currentTarget.dataset['index'];
+
 				const value = this.$store.state.user.openid;
 				if (value == '') {
 					uni.navigateTo({
@@ -221,164 +176,180 @@
 						"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),
-						});
-					}
+					if (num > 3) return uni.showToast({
+						title: '暂时无第三方链接',
+						icon: 'none'
+					})
+
+					uni.navigateTo({
+						url: "/pages/skipone/skipone?url=" + encodeURIComponent(urls[num]),
+					});
 				}
 			},
-			getdata(){
-				let data={
-					oid:this.$store.state.user.openid, //用户id
+			// 跳转到详情页
+			gotoDetail(e){
+				let aid = e.currentTarget.dataset.aid;
+				const value = this.$store.state.user.openid;
+				if (value == '') return this.goLog()
+				
+				uni.navigateTo({
+					url: `/pages/teachingDetail/teachingDetail?acId=${aid}`
+				});
+			},
+			// 获取收藏事件
+			getdata() {
+				// console.log(this.$store.state.user.openid);
+				let data = {
+					oid: this.$store.state.user.openid, //用户id
+					type: 0
 				}
-				this.$request('/selectColl','POST',data).then(res=>{
-					let a=JSON.parse(res[0][0].coll)
-					if(a==null || a=='undefined'){
-						this.collArr=[]
-					}else{
-						this.collArr=JSON.parse(res[0][0].coll)
-					}
-					console.log('进来就显示111111',this.collArr);
+				this.$request('/selectOperator', 'POST', data).then(res => {
+					// console.log('获取收藏', res);
+					// 每次调用前清零,防止push叠加错误
+					this.collArr = []
+					// 将acid遍历到collArr中
+					res[0].forEach(i => {
+						this.collArr.push(i.acId)
+					})
+
 				})
 			},
-			getSub(){
-				let data={
-					oid:this.$store.state.user.openid, //用户id
+			// 获取订阅事件
+			getSub() {
+
+				// console.log(this.$store.state.user.openid);
+				let data = {
+					oid: this.$store.state.user.openid, //用户id
+					type: 1
 				}
-				this.$request('/selectSub','POST',data).then(res=>{
-					console.log('呵呵呵',res[0][0].sub);
-					let a=JSON.parse(res[0][0].sub)
-					if(a==null || a=='undefined'){
-						this.sub=[]
-					}else{
-						this.subArr=JSON.parse(res[0][0].sub)
-					}
-					
-					// this.subArr=JSON.parse(res[0][0].sub)
-					console.log('进来就显示',this.subArr);
+				this.$request('/selectOperator', 'POST', data).then(res => {
+					// console.log('获取订阅', res);
+					// 每次调用前清零,防止push叠加错误
+					this.subArr = []
+					// 将acid遍历到collArr中
+					res[0].forEach(i => {
+						this.subArr.push(i.acId)
+					})
+
 				})
 			}
 		},
-		// created () {
-		// 	this.getdata()
-		// }
+
 	}
 </script>
 
 <style lang="scss">
-	.listBlock1{
+	.listBlock1 {
+		display: flex;
+		justify-content: space-between;
+		// margin-bottom: 10px;
+		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;
-			// margin-bottom: 10px;
-			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;
+			// align-content: space-between;
+
+			.title {
 				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;
+				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;
 				}
-		
-				.operate {
+			}
+
+			.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: baseline;
-					align-items: flex-end;
-		
-					.left {
+					// justify-content: space-between;
+					// align-items: center;
+					align-items: baseline;
+
+					// width: 200rpx;
+					.opr {
 						display: flex;
-						// justify-content: space-between;
-						// align-items: center;
-						align-items: baseline;
-		
-						// width: 200rpx;
-						.opr {
+						align-items: center;
+
+						.icon {
+							width: 32rpx;
+							height: 32rpx;
 							display: flex;
+							justify-content: center;
 							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;
+						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;
@@ -395,5 +366,4 @@
 			line-height: 32rpx;
 		}
 	}
-		
 </style>

+ 28 - 147
components/teaching-case/teaching-case.vue

@@ -2,7 +2,7 @@
 	<view>
 
 
-		<view class="teaching_case" v-for="(i,index) in classList" :key="index + 'a'" @click="" :data-index="index">
+		<!-- <view class="teaching_case" v-for="(i,index) in classList" :key="index + 'a'" @click="" :data-index="index">
 			<view class="img cell-img">
 				<image :src="i.img" v-if="!item.btn" mode="aspectFill"></image>
 			</view>
@@ -46,13 +46,13 @@
 				</view>
 
 			</view>
-		</view>
+		</view> -->
 
 
 
 
 		<!-- 活动列表 -->
-		<view class="teaching_case" v-for="(i,index) in activeList" @click="gotoACdetail" :data-index="index"
+		<view class="teaching_case" v-for="(i,index) in activeList" @click="gotoACdetail" :data-aid="i.acId"
 			:key="index + 'b'">
 
 
@@ -81,7 +81,7 @@
 						<view class="pernum fz-font">已报名{{ i.pers }}人</view>
 					</view>
 					<view class="">
-						<button class="btn sBtn-font" @click.stop="actApply">立即报名</button>
+						<button class="btn sBtn-font" @click.stop="actApply" :data-index="index">立即报名</button>
 					</view>
 				</view>
 			</view>
@@ -103,139 +103,38 @@
 					};
 				},
 			},
-			classList: {
-				type: Array,
-				default () {
-					return [];
-				},
-			},
+			// classList: {
+			// 	type: Array,
+			// 	default () {
+			// 		return [];
+			// 	},
+			// },
 			activeList: {
 				type: Array,
 				default () {
 					return [];
 				},
 			},
-			indexId: {
-				type: Number,
-			},
 		},
 		data() {
 			return {};
 		},
 		methods: {
-			gotoTeDetail(e) {
-				
-				
-				console.log(e.currentTarget.dataset['index'], 123);
-				let edata = e.currentTarget.dataset['index']
-
-				const value = this.$store.state.user.openid;
-
-				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",
-				];
-				console.log(value);
-				if (value == '') {
-					// console.log(111);
-					uni.navigateTo({
-						url: "/pages/login_Wechat/login_Wechat",
-					});
-				} else {
-					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;
-					}
-				}
-
-			},
+		// 跳转活动详情页
 			gotoACdetail(e) {
-				console.log(e.currentTarget.dataset['index'], 123);
-				let edata = e.currentTarget.dataset['index'];
-				const clickedAcId = this.activeList[edata].acId;
-				const type = this.activeList[edata].type;
-				console.log(clickedAcId);
+				// console.log(e.currentTarget.dataset);
+				let aid=e.currentTarget.dataset.aid
 				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",//丽湖职教双创教育国际虚拟教研室2023年常规教研
-				];
-				if (value == '') {
-					console.log(111);
-					uni.navigateTo({
-						url: "/pages/login_Wechat/login_Wechat",
-					});
-				} else {
-					if (this.item.btn_2 === 1) {
-						uni.navigateTo({
-							url: "/pages/teachingDetail/teachingDetail?acId=" + clickedAcId,
-						});
-					}else if (this.item.btn_2 === 2) {
-						uni.navigateTo({
-							url: "/pages/activityDetail/activityDetail?acId=" + clickedAcId + "&ty=" + type,
-						});
-					}else{
-						uni.navigateTo({
-							url: "/pages/activityDetail/activityDetail?acId=" + clickedAcId + "&ty=" + type,
-						});
-					}
-
-				}
-
-			},
-			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),
-						});
-					}
-				}
+				if (value == '') return uni.navigateTo({url: "/pages/login_Wechat/login_Wechat"});
+				
+				uni.navigateTo({
+					url: `/pages/activityDetail/activityDetail?acId=${aid}`,
+				});
 			},
-			actApply() {
+			
+			// 跳转外部链接
+			actApply(e) {
+				let num= e.currentTarget.dataset['index'];
 				const value = this.$store.state.user.openid;
 				if (value == '') {
 					uni.navigateTo({
@@ -243,36 +142,18 @@
 					});
 					return 1;
 				} 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/1211",
 							"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),
-							});
-						}
-					}
+						console.log('数据呢',num);
+						if(num>3) return uni.showToast({title:'暂时无第三方链接',icon:'none'})
+						uni.navigateTo({
+								url: "/pages/skipone/skipone?url=" + encodeURIComponent(urls[num]),
+						});
 				}
 			},
 		},

+ 6 - 1
pages/Sign/Sign.vue

@@ -7,7 +7,7 @@
 			</view>
 			<text>报名已提交</text>
 			<text>等待管理员审核</text>
-			<button @click="gotoIndex">查看课程</button>
+			<button @click="gotoAct">查看课程</button>
 			<text @click="gotoIndex">返回首页</text>
 		</view>
 	</view>
@@ -28,6 +28,11 @@
 				uni.switchTab({
 					url: '/pages/index/index'
 				})
+			},
+			gotoAct(){
+				uni.navigateTo({
+					url:'/pages/mineActive/mineActive'
+				})
 			}
 		}
 	}

+ 365 - 170
pages/activityDetail/activityDetail.vue

@@ -1,85 +1,115 @@
 <template>
 	<!-- 教研室详情 -->
-	<view class="activityDetail">
+	<view class="activeDetail">
 		<statusBar :item="navbar"></statusBar>
 
 		<!-- 顶部 -->
-		<view class="backPic" v-for="(item,index) in actItemList" :key="index + 'a' ">
-			<image src="https://teacherapi.cocorobo.cn/teaching-file/static//yym/Rectangle 40.png" mode="aspectFill"></image>
-			<view style="padding: 0 30rpx;margin-bottom: 20px;">
-				<view class="card">
-					<view class="cardTop three-font">
-						{{ item.acName }}
-					</view>
-					<view class="col fz-font">
-						活动日期:<text>{{ item.create_at.split('T')[0] }}</text>
-					</view>
-					<view class="col fz-font">
-						招募人数:<text>0/{{ item.pers }}</text>
-					</view>
-					<view class="col fz-font">
-						活动地址:<text>{{ item.address }}</text>
-						<uni-icons type="location" color="#0056a8"
-							style="position: absolute;right: 10px;top: 0;width: 32rpx;height: 45rpx;"></uni-icons>
+		<view class="backPic">
+			<image src="https://teacherapi.cocorobo.cn/teaching-file/static//yym/Rectangle 40.png" mode="aspectFill">
+			</image>
+			<view class="card">
+				<view class="cardTop">
+					<view class="title three-font">{{ actItemList.acName }}</view>
+					<view class="icons">
+						<view class="icon" @click="coll">
+							<image :src="collArr.includes(actItemList.acId) ? pic_coll2 : pic_coll "
+								style="width: 42rpx;height: 42rpx;" mode="aspectFill"></image>
+						</view>
+						<view class="icon" @click="sub">
+							<image
+								:src="subArr.includes(actItemList.acId) ? pic_sub2 : pic_sub "
+								style="width: 38rpx;height: 42rpx;" mode="aspectFill"></image>
+						</view>
 					</view>
 				</view>
+				<view class="col fz-font">
+					活动日期:<text class="col2"> {{ actItemList.begin_at}}</text> 
+				</view>
+				<view class="col fz-font">
+					招募人数:<text class="col2"> {{ actItemList.pers}}/50</text> 
+				</view>
+				<view class="col fz-font tag">
+					<view class=" tag">活动地址:</view>
+					<text class="col2">{{actItemList.address}}</text>
+				</view>
 			</view>
 		</view>
 
+
 		<!-- 创建者用户名 -->
-		<view style="padding: 0 30rpx;">
-			<view class="creator" v-for="(item,index) in actItemList" :key="index + 'b' ">
+		<view style="padding:30rpx;padding-top: 30rpx;">
+			<view class="creator">
 				<image
-					:src="item.avatar == null ? 'https://teacherapi.cocorobo.cn/teaching-file/static//mine/Avatar_default.png' : item.avatar"
+					:src="actItemList.avatar"
 					mode="aspectFill"></image>
 				<view class="creName btn-font">
-					{{ item.username }}
+					{{ actItemList.username }}
 				</view>
 			</view>
 		</view>
 
-		<!-- 活动详情 -->
+
+
+		<!-- 教研室详情 -->
 		<view class="" style="padding: 0 30rpx;">
-			<detailBlock :actItemList='actItemList' :item='judge'></detailBlock>
+			<!-- <detailBlock :actItemList='actItemList' :item="judge"></detailBlock> -->
+			<view class="detailBlock">
+				<view class="tit fwb-font">活动详情</view>
+				<view class="cont sZw-font">
+					活动时间:<text>{{ actItemList.begin_at }}</text>
+				</view>
+				<view class="cont sZw-font">
+					活动形式:<text style="color: #0056a8;">{{ actItemList.acshape }}</text>
+				</view>
+				<view class="cont sZw-font">
+					<!-- <view id="myElement" class="activeTit">
+						教研室概况:查看更多查看更多查看更多看更多查看更多查看更多查看更多查看更多查看更多查看更多查看更多看更多查看更多查看更多查看更多查看更多
+				   </view>
+					<text class="zdwz" style="color: #0056a8;float: right;" @click="zdwz">收起</text> -->
+					<view class="content">
+						<view ref="p" :class="getClassNames">
+							<text style="color: #999999;">教研室概况:</text>
+							{{actItemList.brief}}
+						</view>
+			
+						<view ref="btnnn" :class="getClassNames1" @click="qqq">
+							<!-- {{isAll ? '收起' : '展开'}} -->
+						</view>
+					</view>
+				</view>
+			</view>
 		</view>
 
 
-
 		<!-- 当前成员 -->
-		<view style="padding: 0 30rpx; display: none;">
+		<!-- <view style="padding: 0 30rpx; display: none;">
 			<view class="member">
 				<view class="memberTop">
-					<view class="btn-font">报名情况(已报名0人)</view>
+					<view class="btn-font">当前成员</view>
 					<view class="fz-font" style="color: rgba(0, 0, 0, 0.4);display: flex;align-items: center;"
-						@click="perList">
+						@click="gotoMorePer">
 						<text>查看更多</text>
 						<image src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/arrow-right.png"
 							style="width: 32rpx;height: 32rpx;" mode="aspectFill"></image>
-						<!-- <uni-icons type="right"></uni-icons> -->
 					</view>
 				</view>
 
 				<view class="pers">
-					<!-- <view class="per" v-if="perNum == []" v-for="(item,index) in perNum">
-						<image :src="item.img"></image>
-						<view class="perName fz-font">
-							{{item.Name}}
-						</view>
-					</view> -->
+					
 					<view class="per">
-						<!-- <image :src="item.img"></image> -->
 						<view class="perName fz-font">
 							暂无人员
 						</view>
 					</view>
 				</view>
 			</view>
-		</view>
+		</view> -->
 
 		<!-- 申请加入 -->
-		<view class="btnBlock" v-show="btnShow">
-			<button class="btn zw-font" :disabled="isButtonDisabled" @click="gotoAdd"
-				:style="isButtonDisabled ? 'background-color:#87CEFA;' : 'background-colo:#0056a8;'">{{ btnText }}</button>
+		<view class="btnBlock">
+				<button class="btn btn1 zw-font" v-if="actItemList.openid==oid">本人创建,暂不支持加入</button>
+				<button class="btn zw-font" v-if="!isSign && actItemList.openid!=oid" @click="applyAdd">申请加入</button>
+				<button class="btn btn1 zw-font" v-if="isSign && actItemList.openid!=oid">已加入</button>
 		</view>
 	</view>
 </template>
@@ -92,122 +122,208 @@
 					title: '活动详情',
 					btn: 1
 				},
-				btnShow: true,  //控制按钮显示隐藏
-				isButtonDisabled: false,
-				btnText: '立即报名',
-				judge: {
-					isShow: 1,
-					info: ''
-				},
-				actItemList: [],
-				perNum: []
-				// perNum: [{
-				// 		Name: '陈芬',
-				// 		img: 'https://teacherapi.cocorobo.cn/teaching-file/static//yym/Ellipse 4 (3).png'
-				// 	},
-				// 	{
-				// 		Name: '贺豪杰',
-				// 		img: 'https://teacherapi.cocorobo.cn/teaching-file/static//yym/Ellipse 4 (4).png'
-				// 	},
-				// 	{
-				// 		Name: '张孝迪',
-				// 		img: 'https://teacherapi.cocorobo.cn/teaching-file/static//yym/Ellipse 4.png'
-				// 	},
-				// 	{
-				// 		Name: '马冬梅',
-				// 		img: 'https://teacherapi.cocorobo.cn/teaching-file/static//yym/Ellipse 4 (2).png'
-				// 	},
-				// 	{
-				// 		Name: '康雯妍',
-				// 		img: 'https://teacherapi.cocorobo.cn/teaching-file/static//yym/Ellipse 4 (1).png'
-				// 	},
-				// 	{
-				// 		Name: '张燕琴',
-				// 		img: 'https://teacherapi.cocorobo.cn/teaching-file/static//mine/Avatar.png'
-				// 	}
-				// ]
-
+				// 是否已加入
+				isSign:0,
+				// 用户openid
+				oid:'',
+				// 活动id
+				acId:'',
+				// 页面数据
+				actItemList: {},
+				// 用户收藏列表
+				collArr:[],
+				// 用户订阅列表
+				subArr:[],
+				
+			
+				perNum: [],
+				
+				
+				
+				pic_coll: 'https://teacherapi.cocorobo.cn/teaching-file/static/yym/Star 1 (Stroke).png',
+				pic_coll2: 'https://teacherapi.cocorobo.cn/teaching-file/static//mine/Collect_yellow.png',
+				pic_sub: 'https://teacherapi.cocorobo.cn/teaching-file/static/yym/Vector (Stroke).png',
+				pic_sub2: '../../static/mine/dingyue_blue.png'
+				
+				
+				// pic_coll:'https://teacherapi.cocorobo.cn/teaching-file/static//yym/Star 1 (Stroke) (2).png',
+				// pic_coll2:'https://teacherapi.cocorobo.cn/teaching-file/static//mine/Collect_yellow.png',
+				// pic_sub:'https://teacherapi.cocorobo.cn/teaching-file/static/yym/Vector (Stroke) (1).png',
+				// pic_sub2:'https://teacherapi.cocorobo.cn/teaching-file/static/dingyue_blue.png',
 			};
 		},
 		methods: {
-			perList() {
-				uni.navigateTo({
-					url: '/pages/dy/dy'
+			// 获取页面数据
+			getdata(){
+				let data = {
+					oid:this.$store.state.user.openid,
+					acId: this.acId,
+				}
+				this.$request('/selectActivityID', "POST", data).then(res => {
+					console.log(res[0][0]);
+					this.actItemList = res[0][0]
 				})
+				
 			},
-			gotoAdd() {
-				// console.log(e.currentTarget.dataset['index'], 123);
-				// let edata = e.currentTarget.dataset['index'];
-				const routes = getCurrentPages();
-				const ty = routes[1].options.ty ? routes[1].options.ty : routes[2].options.ty;
-				const clickedAcId = this.actItemList[0].acId;
-				console.log(clickedAcId);
-				uni.navigateTo({
-					url: '/pages/hd/hd?acId=' + clickedAcId + '&ty=' + ty
+			addview(){
+				let data={
+					oid:this.$store.state.user.openid,
+					acId: this.acId,
+				}
+				this.$request('/updateView', "POST", data).then(res => {
+					console.log(res[0][0]);
+					this.actItemList = res[0][0]
 				})
 			},
-			//判断是否报名
-			btnEnroll(clickedAcId) {
-				this.$request('/selectActivityEnrollid', "POST", {
-					acId: clickedAcId,
-					openid: uni.getStorageSync('oId')
-				}).then(res => {
-					if (!res[0][0] || !res[0][0].hasOwnProperty('acId')) {
-						console.log('acId 未定义或不存在');
-						return
+			// 收藏事件
+			coll(){
+				//判断是否收藏
+				let iscoll = null
+				
+				// 查询是否收藏过
+				let data = {
+					acid: this.acId,
+					oid: this.$store.state.user.openid, //用户id
+					ty: 0
+				}
+				this.$request('/selectOneOperator', 'POST', data).then(res => {
+					// console.log('查询是否收藏过',res);
+					res[0].length ? iscoll = true : iscoll = false;
+				
+					// iscoll为true表示已经收藏过,执行删除  为true则收藏
+					if (iscoll) {
+						console.log('执行删除');
+						this.$request('/deleteOperator', 'POST', data).then(res => {
+							// console.log(res);
+							this.getColl()
+						})
+					} else {
+						console.log('执行添加');
+						this.$request('/insertOperator', 'POST', data).then(res => {
+							// console.log(res);
+							this.getColl()
+						})
 					}
-					if (clickedAcId === res[0][0].acId) {
-						this.isButtonDisabled = true
-						this.btnText = '已加入'
+				})
+			},
+			// 订阅事件
+			sub(){
+				//判断是否订阅
+				let iscoll = null
+				
+				// 查询是否订阅过
+				let data = {
+					acid: this.acId,
+					oid: this.$store.state.user.openid, //用户id
+					ty: 1
+				}
+				this.$request('/selectOneOperator', 'POST', data).then(res => {
+					// console.log('查询是否订阅过',res);
+					res[0].length ? iscoll = true : iscoll = false;
+					
+					// iscoll为true表示已经订阅过,执行删除  为true则订阅
+					if (iscoll) {
+						console.log('执行删除');
+						this.$request('/deleteOperator', 'POST', data).then(res => {
+							console.log(res);
+							this.getSub()
+						})
+					} else {
+						console.log('执行添加');
+						this.$request('/insertOperator', 'POST', data).then(res => {
+							console.log(res);
+							this.getSub()
+						})
 					}
 				})
 			},
-			getActivity() {
-				// 获取当前页面的URL
-				const routes = getCurrentPages();
-				console.log(routes);
-				// const acId = routes[1].options.acId ? routes[1].options.acId : routes[2].options.acId;
-				// const ty = routes[1].options.ty ? routes[1].options.ty : routes[2].options.ty;
-				// if (routes[2]) {
-				// 	this.isShow = routes[2].options.isShow ?false : true
-				// }
-				// this.isShow = routes[2].options.isShow
-				// console.log(this.isShow);
-				let acId, ty, isShow;
-				if (routes.length > 1) {
-				    acId = routes[1].options.acId ? routes[1].options.acId : routes[2].options.acId;
-				    ty = routes[1].options.ty ? routes[1].options.ty : routes[2].options.ty;
-				    isShow = routes[2] ? (routes[2].options.isShow ? false : true) : true;
+			// 申请加入
+			applyAdd() {
+				
+				uni.navigateTo({
+					url: `/pages/jys/jys?acId=${this.acId}&tit=${'活动报名'}`
+				})
+			},
+			// 查看更多报名同学
+			gotoMorePer() {
+				uni.navigateTo({
+					url: '/pages/dy/dy'
+				})
+			},
+			// 获取是否订阅
+			getSub(){
+				let data = {
+					oid: this.$store.state.user.openid, //用户id
+					type: 1
 				}
-					this.btnShow = isShow;
+				this.$request('/selectOperator', 'POST', data).then(res => {
+					console.log('获取', res);
+					// 每次调用前清零,防止push叠加错误
+					this.subArr = []
+					// 将acid遍历到subArrsubArr中
+					res[0].forEach(i => {
+						this.subArr.push(i.acId)
+					})
+				
+				})
 				
+			},
+			//获取是否收藏
+			getColl() {
 				let data = {
-					acId: acId,
-					ty: ty
+					oid: this.$store.state.user.openid, //用户id
+					type: 0
 				}
-				this.$request('/selectActivityID', "POST", data).then(res => {
-					console.log(res[0]);
-					// this.activeList=[...this.activeList,...res[0]]
-					this.actItemList = res[0]
-					const clickedAcId = this.actItemList[0].acId;
-					this.btnEnroll(clickedAcId)
+				this.$request('/selectOperator', 'POST', data).then(res => {
+					console.log('获取收藏', res);
+					// 每次调用前清零,防止push叠加错误
+					this.collArr = []
+					// 将acid遍历到collArr中
+					res[0].forEach(i => {
+						this.collArr.push(i.acId)
+					})
+				})
+			},
+			//判断是否报名
+			btnEnroll() {
+				let data = {
+					oid: this.$store.state.user.openid, //用户id
+					aid:this.acId,
+					type: 2
+				}
+				this.$request('/selectSignup', 'POST', data).then(res => {
+					console.log('获取报名', res[0][0]);
+					this.isSign=res[0][0].num
 				})
 			},
+			
+			goLog() {
+				uni.navigateTo({
+					url: "/pages/login_Wechat/login_Wechat",
+				});
+			}
 		},
-		onShow() {
-			this.getActivity()
+		onLoad(e) {
+			console.log('接收参数',e);
+			this.acId=e.acId
+			this.oid=this.$store.state.user.openid
+			// this.getActivity()
+			this.btnEnroll()
+			this.getdata()
+			this.getColl()
+			this.getSub()
 		}
 	}
 </script>
 
 <style lang="scss">
-	.activityDetail {
+	.activeDetail {
 		padding-bottom: 80px;
 
 		.backPic {
 			width: 750rpx;
 			position: relative;
-
+			margin-bottom: 30rpx;
 			image {
 				width: 100%;
 				display: block;
@@ -216,57 +332,70 @@
 			.card {
 				position: absolute;
 				width: 690rpx;
-				// height: 150px;
-				bottom: -20px;
+				bottom: -30rpx;
 				left: 50%;
-				// padding: 30rpx 16px;
 				padding: 30rpx;
-				border-radius: 10px;
+				// background-color: rgba(0, 0, 0, 0.26);
 				background-color: #ffffff;
+				border-radius: 10px;
 				transform: translate(-50%, 0);
+				// border: 1rpx #667870 solid;
+				color: #ffffff;
 
+				// display: flex;
+				// flex-direction: column;
+				// justify-content: space-between;
 				.cardTop {
-					// display: flex;
-					// justify-content: center;
-					// padding-bottom: 5px;
-					margin-bottom: 5px;
-					// font-size: 18px;
-					font-weight: bold;
-					display: -webkit-box;
-					word-break: break-all;
-					text-overflow: ellipsis;
-					overflow: hidden;
-					-webkit-box-orient: vertical;
-					-webkit-line-clamp: 2;
+					display: flex;
+					justify-content: space-between;
 
-					/*设置 需要显示的行数*/
 					.title {
-						font-weight: bold;
+						margin-bottom: 20rpx;
+						width: 80%;
+						// height: 48rpx;
+						color:rgba(0, 0, 0, 0.8);
+						font-family: PingFang SC;
+						// overflow: hidden;
+						// text-overflow: ellipsis;
+						// white-space: nowrap;
+						
+						display: -webkit-box;
+						word-break: break-all;
+						text-overflow: ellipsis;
+						overflow: hidden;
+						-webkit-box-orient: vertical;
+						-webkit-line-clamp: 2;
+					}
+
+					.icons {
+						flex: 1;
+						display: flex;
+						// align-items: center;
+						justify-content: space-between;
+
+						.icon {
+							width: 48rpx;
+							height: 48rpx;
+							display: flex;
+							align-items: center;
+							justify-content: center;
+						}
 					}
+
 				}
 
 				.col {
-					position: relative;
 					margin-bottom: 10rpx;
-					color: #999999;
-					padding-right: 40px;
-					// font-size: 14px;
-					width: 100%;
-					display: -webkit-box;
-					word-break: break-all;
-					text-overflow: ellipsis;
-					overflow: hidden;
-					-webkit-box-orient: vertical;
-					-webkit-line-clamp: 2;
-
-					/*设置 需要显示的行数*/
-					text {
-						color: #333333;
-					}
+					// font-weight: 100;
+					color:rgba(0, 0, 0, 0.4);
+				}
+				.col2 {
+					color:rgba(0, 0, 0, 0.8);
+					// font-weight: bold;
 				}
-
 				.tag {
 					display: flex;
+					align-items: center;
 				}
 			}
 
@@ -276,12 +405,10 @@
 
 		.creator {
 			display: flex;
-			// padding: 10px 30px;
-			padding: 30rpx 20rpx;
+			padding: 30rpx;
 			background-color: #ffffff;
 			align-items: center;
-			margin-top: 30px;
-			margin-bottom: 20rpx;
+			// margin-top: 20rpx;
 			border-radius: 10px;
 
 			image {
@@ -315,11 +442,8 @@
 				align-items: center;
 
 				.per {
-					// display: inline-block;
 					display: flex;
 					flex-direction: column;
-					// justify-content: center;
-					align-items: center;
 
 					image {
 						width: 72rpx;
@@ -356,6 +480,77 @@
 				background-color: #0056a8;
 				color: #ffffff;
 			}
+			.btn1 {
+				background-color: rgba(139, 190, 255, 1);
+			}
+		}
+		.detailBlock {
+			background-color: #ffffff;
+			border-radius: 10rpx;
+			padding: 30rpx;
+		
+			.tit {
+				font-weight: 600;
+				margin-bottom: 10px;
+			}
+		
+			.cont {
+				color: #999999;
+				margin-bottom: 10px;
+		
+				text {
+					color: #666666;
+				}
+		
+				.content {
+					white-space: normal;
+					/*隐藏溢出*/
+					/*当文本溢出包含元素时显示省略符号来代表被修剪的文本*/
+					/*规定段落中的文本不进行换行*/
+					letter-spacing: 2rpx;
+					display: -webkit-box;
+					word-break: break-all;
+					text-overflow: ellipsis;
+					overflow: hidden;
+					-webkit-box-orient: vertical;
+					-webkit-line-clamp: 4;
+				}
+		
+				.content .p {
+					width: 90%;
+					color: #666666;
+					// max-width: 100%;
+					// display:inline-block;
+					display: block;
+					// float: left;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					white-space: nowrap;
+					// padding-right: 50rpx;
+					/*设置文字溢出时显示省略号*/
+		
+				}
+		
+				.content .p.is-expanded {
+					width: 100%;
+					overflow: visible;
+					white-space: normal;
+					/*文字溢出时不再显示省略号*/
+				}
+		
+				.btn-more {
+					float: right;
+					display: inline-block;
+					// width: 60px;
+					transform: translate(0, -100%);
+					color: #0056a8;
+				}
+		
+				.btn-more.is-zd {
+					transform: none;
+					// transform: translate(0,0);
+				}
+			}
 		}
 	}
 </style>

+ 5 - 10
pages/activityList/activityList.vue

@@ -1,10 +1,6 @@
 <template>
 	<view class="activeList">
 		<statusBar :item="navbarData"></statusBar>
-		<!-- <teaching-case :item="teaData"></teaching-case> -->
-		<!-- 		<view class="" style="padding-bottom: 50rpx;">
-			<teaching-case :activeList="activeList" :indexId="index"></teaching-case>
-		</view> -->
 		<scroll-view class="list" scroll-y="true">
 			<view>
 				<teaching-case :activeList="activeList" :indexId="index"></teaching-case>
@@ -24,7 +20,7 @@
 		data() {
 			return {
 				navbarData: {
-					title: '常规教研活动',
+					title: '活动推荐列表',
 					btn: 1
 				},
 				teaData: {
@@ -44,7 +40,7 @@
 					openid: uni.getStorageSync('oId'),
 					ty: 1,
 					page: this.currentPage, //下拉获取更多的备用字段
-					lim: 6 //一次获取多少数据
+					lim: 15 //一次获取多少数据
 				}
 				this.$request('/selectActivity', "POST", data).then(res => {
 					console.log(res[0]);
@@ -62,12 +58,11 @@
 		// 触底加载更多
 		onReachBottom() {
 			console.log(111);
-			if (this.newsLoading == 2) {
-				return
-			}
+			if (this.newsLoading == 2) return
+			
 			this.newsLoading = 1
 			this.currentPage++
-			setTimeout(this.getData, 2000)
+			setTimeout(this.getData, 1000)
 
 		},
 		onLoad() {

+ 2 - 2
pages/activityList_2/activityList_2.vue

@@ -24,7 +24,7 @@
 		data() {
 			return {
 				navbarData: {
-					title: '专题教研活动',
+					title: '精选活动列表',
 					btn: 1
 				},
 				
@@ -46,7 +46,7 @@
 					openid: uni.getStorageSync('oId'),
 					ty: 2,
 					page: this.currentPage, //下拉获取更多的备用字段
-					lim: 10 //一次获取多少数据
+					lim: 15 //一次获取多少数据
 				}
 				this.$request('/selectActivity', "POST", data).then(res => {
 					console.log(res[0]);

+ 66 - 94
pages/activityPage/activityPage.vue

@@ -11,12 +11,12 @@
 			<template #activeBlock>
 				<view class="activeData" v-for="(item, index) in liveList" :key="index">
 					<!-- <image src="https://teacherapi.cocorobo.cn/teaching-file/static//activity/bg1.png" mode="aspectFill"></image> -->
-					<image :src="item.pic" mode="aspectFill" @click="gotoAnnoun" :data-index="index"></image>
+					<image :src="item.pic" mode="aspectFill" @click="gotoAnnoun" :data-index="item.acId"></image>
 
 					<view class="liveBroadcast">
 						<view class="title">
 							<view class="tag bqZ-font">类型</view>
-							<text three-font @click="gotoAnnoun" :data-index="index">{{ item.acName }}</text>
+							<text three-font>{{ item.acName }}</text>
 						</view>
 
 						<view class="operate">
@@ -27,10 +27,7 @@
 								<view class="user fwb-font">{{ item.username }}</view>
 							</view>
 							<view class="collection" @click="coll" :data-e="item">
-								<!-- <view class="" style="display: flex;margin-right: 10rpx;align-items: center;"> -->
 								<view class="img">
-									<!-- <image src="https://teacherapi.cocorobo.cn/teaching-file/static//yym/Vector (Stroke) (2).png"
-										mode="aspectFill"></image> -->
 									<image :src="collArr.includes(item.acId) ? pic_coll2 : pic_coll" mode="aspectFill">
 									</image>
 								</view>
@@ -44,7 +41,7 @@
 
 		<viewX-Case style="margin-top: 10px">
 			<template #title>
-				<view class="title three-font">常规教研活动</view>
+				<view class="title three-font">活动推荐</view>
 			</template>
 			<template #lookMore>
 				<view class="lookMore fz-font" @click="lookMore">查看更多</view>
@@ -80,8 +77,8 @@
 				// 教研活动列表
 				activeList: [],
 				collArr:[],
-				pic_coll:'http://43.139.158.220:5007/img/static/yym/Star 1 (Stroke).png',
-				pic_coll2:'https://teacherapi.cocorobo.cn/teaching-file/static//mine/Collect_yellow.png'
+				pic_coll:'https://teacherapi.cocorobo.cn/teaching-file/static/yym/Star 1 (Stroke).png',
+				pic_coll2:'https://teacherapi.cocorobo.cn/teaching-file/static/mine/Collect_yellow.png'
 			};
 		},
 		methods: {
@@ -91,11 +88,9 @@
 					openid: uni.getStorageSync('oId'),
 					ty: 1,
 					page: 1, //下拉获取更多的备用字段
-					lim: 6 //一次获取多少数据
+					lim: 12 //一次获取多少数据
 				}
 				this.$request('/selectActivity', "POST", data).then(res => {
-					console.log(res[0]);
-					// this.activeList=[...this.activeList,...res[0]]
 					this.activeList = res[0]
 				})
 			},
@@ -105,87 +100,74 @@
 					openid: uni.getStorageSync('oId'),
 					ty: 0,
 					page: 1, //下拉获取更多的备用字段
-					lim: 6 //一次获取多少数据
+					lim: 12 //一次获取多少数据
 				}
 				this.$request('/selectActivity', "POST", data).then(res => {
-					console.log(res[0]);
-					// this.activeList=[...this.activeList,...res[0]]
-					this.liveList = res[0].slice(0, 6);
+					this.liveList = res[0]
 				})
 			},
+			
+			// 获取收藏
 			getcoll(){
-				let data={
-					oid:this.$store.state.user.openid, //用户id
+				let data = {
+					oid: this.$store.state.user.openid, //用户id
+					type: 0
 				}
-				this.$request('/selectColl','POST',data).then(res=>{
-					this.collArr=JSON.parse(res[0][0].coll)
-					console.log('进来就显示',this.collArr);
+				this.$request('/selectOperator', 'POST', data).then(res => {
+					// console.log('获取收藏', res);
+					// 每次调用前清零,防止push叠加错误
+					this.collArr = []
+					// 将acid遍历到collArr中
+					res[0].forEach(i => {
+						this.collArr.push(i.acId)
+					})
+				
 				})
 			},
 			// 收藏事件
 			coll(event){
-				// console.log(event.currentTarget.dataset.e);
-				console.log(this.$store.state.user.openid);
+				// 未登录去登录
+				const value = this.$store.state.user.openid;
+				if (value == '') {
+					uni.navigateTo({
+						url: "/pages/login_Wechat/login_Wechat",
+					});
+					return
+				}
+				
+				
 				let aId=event.currentTarget.dataset.e.acId
-				// 先获取用户收藏信息
-				let data={
-					oid:this.$store.state.user.openid, //用户id
+				
+				let iscoll = null
+				
+				// 查询是否收藏过
+				let data = {
+					acid: aId,
+					oid: this.$store.state.user.openid, //用户id
+					ty: 0
 				}
-				this.$request('/selectColl','POST',data).then(res=>{
-					// console.log('获取收藏信息',res);
-					// return console.log('获取收藏信息',res[0][0].coll=='');
-					let res2
-					let colls
-					if(res[0][0].coll!==null && res[0][0].coll !==""){
-						colls=JSON.parse(res[0][0].coll)
-						console.log('获取收藏信息',colls);
-						// 判断收藏表是否包含这个活动
-						res2 = colls.some((e)=>{
-							return e == aId
+				this.$request('/selectOneOperator', 'POST', data).then(res => {
+					// console.log('查询是否收藏过',res);
+					res[0].length ? iscoll = true : iscoll = false;
+				
+					// iscoll为true表示已经收藏过,执行删除  为true则收藏
+					if (iscoll) {
+						console.log('执行删除');
+						this.$request('/deleteOperator', 'POST', data).then(res => {
+							console.log(res);
+							console.log('this',this);
+							this.getcoll()
 						})
-						// console.log(res2);
-					}
-					
-					// return 	console.log('2',res2);
-					// 第一次存储返回值为null,然后存储收藏
-					if(res[0][0].coll==null || res[0][0].coll==""){
-						// 然后进行存储活动到用户coll字段
-						let arr={
-							oid:this.$store.state.user.openid, //用户id
-							acid:JSON.stringify([aId])
-						}
-						this.$request('/updateColl','POST',arr).then(res=>{
-							this.$request('/selectColl','POST',data).then(res=>{
-								this.collArr=JSON.parse(res[0][0].coll)
-							})
-						})
-					// 当数组中没有这个收藏活动时添加收藏
-					}else if(!res2){
-						colls.push(aId)
-						let arr2={
-							oid:this.$store.state.user.openid, //用户id
-							acid:JSON.stringify(colls) 
-						}
-						this.$request('/updateColl','POST',arr2).then(res=>{
-							this.$request('/selectColl','POST',data).then(res=>{
-								this.collArr=JSON.parse(res[0][0].coll)
-							})
-						})
-					// 取消收藏
-					}else if(res2){
-						const newArray = colls.filter(item => item !== aId);
-						let arr3={
-							oid:this.$store.state.user.openid, //用户id
-							acid:JSON.stringify(newArray) 
-						}
-						this.$request('/updateColl','POST',arr3).then(res=>{
-							this.$request('/selectColl','POST',data).then(res=>{
-								this.collArr=JSON.parse(res[0][0].coll)
-							})
+					} else {
+						console.log('执行添加');
+						this.$request('/insertOperator', 'POST', data).then(res => {
+							console.log(res);
+							this.getcoll()
 						})
 					}
-				})
+				})		
 			},
+			// 查看更多常规教研活动事件
 			lookMore() {
 				const value = this.$store.state.user.openid;
 				if (value == '') {
@@ -198,11 +180,13 @@
 					});
 				}
 			},
+			// 查看更多直播活动事件
 			gotoLiveList() {
 				uni.navigateTo({
 					url: '/pages/liveActivityList/liveActivityList'
 				})
 			},
+			// 跳转到发布页
 			fabClick() {
 				const value = this.$store.state.user.openid;
 				if (value == '') {
@@ -215,11 +199,10 @@
 					});
 				}
 			},
+			// 跳转活动详情页
 			gotoAnnoun(e) {
-				let edata = e.currentTarget.dataset['index'];
-				console.log(e.currentTarget.dataset['index'], 123);
-				const clickedAcId = this.liveList[edata].acId;
-				console.log(clickedAcId);
+				// return console.log( e.currentTarget.dataset.index);
+				let aid=e.currentTarget.dataset.index
 				const value = this.$store.state.user.openid;
 				if (value == '') {
 					uni.navigateTo({
@@ -227,20 +210,8 @@
 					});
 				} else {
 					uni.navigateTo({
-						url: "/pages/activityDetail/activityDetail?acId=" + clickedAcId + "&ty=0",
+						url: `/pages/activityDetail/activityDetail?acId=${aid}`,
 					});
-					// const urls = [
-					// 	"https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1181",//丽湖职教双创教育国际虚拟教研室启动大会暨双创教育国际论坛圆满举行
-					// 	"https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1234",//丽湖职教双创教育国际虚拟教研室 • 常规教研活动 第9期
-					// 	"https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1210",//产教融合情境下的双创通识课程建设 | 丽湖职教双创教育国际虚拟教研室常规教研活动第2期顺利举行
-					// 	"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),
-					// 	});
-					// }
 				}
 			},
 
@@ -316,7 +287,8 @@
 							// padding: 1rpx 4rpx;
 							// border-radius: 3px;
 							// margin-right: 10rpx;
-							// color: #00b2b6;
+							// color: #00b2b6;]\
+							flex-shrink: 0;
 							border: 1px #00b2b6 solid;
 							font-size: 20rpx;
 							width: 64rpx;

+ 59 - 87
pages/index/index.vue

@@ -3,21 +3,21 @@
 		<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"
+			<image src="https://teacherapi.cocorobo.cn/teaching-file/static/yym/Rectangle25.png" mode="aspectFill"
 				@click="gotoHome">
 			</image>
 		</view>
 
 		<viewX-Case class="mid">
 			<template #title>
-				<view class="title three-font">专题教研活动</view>
+				<view class="title three-font">精选活动</view>
 			</template>
 			<template #lookMore>
 				<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">
+					:data-aid="item.acId">
 					<image :src="item.pic" mode="aspectFill"></image>
 					<view class="activeTit sBtn-font" style="font-weight: bold">
 						{{ item.acName }}
@@ -28,7 +28,7 @@
 							<text class="fz-font">¥</text>{{ item.cost }}
 						</view>
 					</view>
-					<button class="btn sBtn-font" @click.stop="gotoHd(index)">
+					<button class="btn sBtn-font" @click.stop="gotoHd" :data-index="index">
 						立即报名
 					</button>
 				</view>
@@ -37,17 +37,14 @@
 
 		<viewX-Case>
 			<template #title>
-				<view class="title three-font">推荐课程</view>
+				<view class="title three-font">教研室活动</view>
 			</template>
 			<template #lookMore>
 				<view class="lookMore fz-font" @click="listBlock1More">查看更多</view>
 			</template>
 			<template #teaching>
-				<!-- <teaching-case :classList="classList"></teaching-case> -->
 				<!-- 推荐课程组件 -->
 				<listBlock1 ref="listBlock1" :classList="classList"></listBlock1>
-				<!-- {{classList}} -->
-				<!-- {{activeList}} -->
 			</template>
 		</viewX-Case>
 		<view class="" style="height: 30rpx; width: 100%"> </view>
@@ -74,7 +71,7 @@
 					openid: uni.getStorageSync('oId'),
 					ty: 2,
 					page: 1, //下拉获取更多的备用字段
-					lim: 6 //一次获取多少数据
+					lim: 12 //一次获取多少数据
 				}
 				this.$request('/selectActivity', "POST", data).then(res => {
 					// console.log(res[0]);
@@ -88,105 +85,76 @@
 					openid: uni.getStorageSync('oId'),
 					ty: 3,
 					page: 1, //下拉获取更多的备用字段
-					lim: 6 //一次获取多少数据
+					lim: 12 //一次获取多少数据
 				}
 				this.$request('/selectActivity', "POST", data).then(res => {
 					console.log(res[0]);
 					// this.activeList=[...this.activeList,...res[0]]
-					this.classList =res[0]
-					
-					console.log('推荐课程',this.classList);
+					this.classList = res[0]
+
+					// console.log('推荐课程',this.classList);
 				})
 			},
 			// 跳转到推荐课程查看更多
 			listBlock1More() {
 				const value = this.$store.state.user.openid;
-				if (value == '') {
-					uni.navigateTo({
-						url: "/pages/login_Wechat/login_Wechat",
-					});
-				} else {
-					uni.navigateTo({
-						url: "/pages/teachingList/teachingList",
-					});
-				}
+				if (value == '') return this.goLog()
+				uni.navigateTo({
+					url: "/pages/teachingList/teachingList",
+				});
+
 			},
 			gotoTeDetail() {
 				const value = this.$store.state.user.openid;
-				if (value == '') {
-					uni.navigateTo({
-						url: "/pages/login_Wechat/login_Wechat",
-					});
-				} else {
-					uni.navigateTo({
-						url: "/pages/teachingDetail/teachingDetail",
-					});
-				}
+				if (value == '') return this.goLog()
+				uni.navigateTo({
+					url: "/pages/teachingDetail/teachingDetail",
+				});
+
 			},
 			// 跳转到专题教研活动查看更多
 			gotoActivity() {
 				const value = this.$store.state.user.openid;
-				if (value == '') {
-					uni.navigateTo({
-						url: "/pages/login_Wechat/login_Wechat",
-					});
-				} else {
-					uni.navigateTo({
-						url: "/pages/activityList_2/activityList_2",
-					});
-				}
+				if (value == '') return this.goLog()
+				uni.navigateTo({
+					url: "/pages/activityList_2/activityList_2",
+				});
+
 			},
+			// 跳转到详情页
 			gotoActivityDetail(e) {
-				let edata = e.currentTarget.dataset['index'];
-				console.log(e.currentTarget.dataset['index'], 123);
-				const clickedAcId = this.activeList[edata].acId;
-				console.log(clickedAcId);
+				// return console.log(e.currentTarget.dataset);
+				let aid = e.currentTarget.dataset.aid;
 				const value = this.$store.state.user.openid;
-				if (value == '') {
-					uni.navigateTo({
-						url: "/pages/login_Wechat/login_Wechat",
-					});
-				} else {
-					uni.navigateTo({
-						url: "/pages/teachingDetail/teachingDetail?acId=" + clickedAcId,
-					});
-					// 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),
-					// 	});
-					// }
-				}
+				if (value == '') return this.goLog()
+
+				uni.navigateTo({
+					url: `/pages/teachingDetail/teachingDetail?acId=${aid}`
+				});
+
 			},
-			gotoHd(index) {
-				// console.log(this.$store.state.user.openid,33333333333333333);
+			// 专题教研活动跳转外部链接
+			gotoHd(e) {
+				// return console.log(e);
+				let num = e.currentTarget.dataset['index'];
 				const value = this.$store.state.user.openid;
-				if (value == '') {
-					console.log(11);
-					uni.navigateTo({
-						url: "/pages/login_Wechat/login_Wechat",
-					});
-				} else {
-					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),
-						});
-					}
-				}
+				if (value == '') return this.goLog()
+				
+				// let num = e.currentTarget.dataset['index'];
+				const urls = [
+					"https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1181",
+					"https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1210",
+					"https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1183",
+					"https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1234",
+				];
+				if (num > 3) num = 3
+				
+				uni.navigateTo({
+					url: "/pages/skipone/skipone?url=" + encodeURIComponent(urls[num]),
+				});
+				
 			},
+			// 顶部大图跳转外部链接
 			gotoHome() {
 				// const web = this.classList[this.current];
 				const url = "https://mp.weixin.qq.com/s/QZEGcvBn3aW7aHirMFLBQA";
@@ -194,7 +162,11 @@
 					url: "/pages/skipone/skipone?url=" + encodeURIComponent(url),
 				});
 			},
-
+			goLog() {
+				uni.navigateTo({
+					url: "/pages/login_Wechat/login_Wechat",
+				});
+			}
 		},
 		onShow() {
 			this.getData()

+ 177 - 87
pages/jys/jys.vue

@@ -1,18 +1,18 @@
 <template>
-	<view class="hd">
+	<view class="jys">
 		<statusBar :item="navBarData"></statusBar>
 
-		<view class="top" v-for="(item,index) in actItemList" :key="index">
+		<view class="top">
 			<view class="card">
-				<image class="image" :src="item.pic" mode="aspectFill"></image>
+				<image class="image" :src="actItemList.pic" mode="aspectFill"></image>
 				<view class="text">
 
 					<view class="text_title">
 						<view class="manage bqZ-font">类型</view>
-						<view class="t1 bmTit-font">{{ item.acName }}</view>
+						<view class="t1 bmTit-font">{{ actItemList.acName }}</view>
 					</view>
 					<view class="col sZw-font">
-						负责人:{{ item.username }}
+						负责人:{{ actItemList.username }}
 					</view>
 					<view class="col sZw-font">
 						教研室标签:{{ typetext }}
@@ -30,31 +30,66 @@
 						<view class="name  sZw-font">
 							姓名:
 							<input type="text" style=" text-align: right;" maxlength="10" placeholder="请输入姓名"
-								placeholder-style="font-size: 28rpx; color: rgb(153, 153, 153);" v-model="nickname" />
+								placeholder-style="font-size: 28rpx; color: rgb(153, 153, 153);" v-model="applyname" />
 						</view>
 						<view class="name  sZw-font">
 							联系方式:
-							<input type="text" style=" text-align: right;" maxlength="11" placeholder="请输入联系方式"
-								placeholder-style="font-size: 28rpx; color: rgb(153, 153, 153);" v-model="telephone" />
+							<input type="number" style=" text-align: right;" maxlength="11" placeholder="请输入联系方式"
+								placeholder-style="font-size: 28rpx; color: rgb(153, 153, 153);" v-model="phone" />
 						</view>
 						<view class="name  sZw-font">
 							单位:
 							<input type="text" style=" text-align: right;" maxlength="15" placeholder="请输入单位"
-								placeholder-style="font-size: 28rpx; color: rgb(153, 153, 153);" v-model="units" />
-						</view>
+								placeholder-style="font-size: 28rpx; color: rgb(153, 153, 153);" v-model="stations" />
+						</view> 
 					</view>
 				</view>
 			</view>
 		</view>
-		<!-- </uni-card> -->
 		<view class="buttons">
 			<view class="button-container">
 				<button @click="button1Action" class="btn1 sZw-font">清空填写信息</button>
 				<!-- <text class="button-spacing"></text> -->
 				<!-- 添加间距 -->
-				<button :disabled="isButtonDisabled" :style="isButtonDisabled ? 'background-color:#87CEFA;' : 'background-colo:#0056a8;'" @click="gotoSign" class="btn2 sZw-font">申请加入</button>
+				<button style="background-colo:#0056a8;" @click="showPop" class="btn2 sZw-font">申请加入</button>
+			</view>
+		</view>
+		
+		<!-- 弹窗 -->
+		<view>
+			<view class="mask" v-show="showPopup" @click="closePopup"></view>
+			<view class="popup-container" v-show="showPopup">
+				<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="gotoSign">确认</view>
+					</view>
+				</view>
 			</view>
 		</view>
+		
+		<view>
+			<view class="mask" v-show="showPopupConfirm" @click="closePopup"></view>
+			<view class="popup-container" style="height: 175px;" v-show="showPopupConfirm">
+				<view class="popup">
+					<view class="header" style="margin-top: 15px;">
+						<image src="https://teacherapi.cocorobo.cn/teaching-file/static//gou1.png" mode="aspectFill">
+						</image>
+						<text style="margin-bottom: 24px;">报名成功</text>
+					</view>
+		
+				</view>
+			</view>
+		</view>
+		
+		
+		
+		
+		
 	</view>
 </template>
 
@@ -66,108 +101,86 @@
 					title: '教研室报名',
 					btn: 1
 				},
-				nickname: '',
-				telephone: '',
-				units: '',
-				actItemList: [],
+
+				//控制弹窗
+				showPopup: false,
+				// 成功弹窗
+				showPopupConfirm: false,
+				
+				// 用户名
+				applyname: '',
+				// 联系方式
+				phone: '',
+				// 单位
+				stations: '',
+				
+				
+				
+				
+				// 获取的渲染数据
+				actItemList: {},
+				
 				typetext: '',
 				isButtonDisabled: false,
 			};
 		},
 		methods: {
 			button1Action() {
-				this.nickname = ''
-				this.telephone = ''
-				this.units = ''
+				this.applyname = ''
+				this.phone = ''
+				this.stations = ''
+			},
+			// 确定按钮显示弹窗
+			showPop(){
+				if(this.applyname == '') return uni.showToast({title:'请输入姓名',icon:'none'})
+				if(this.phone == '') return uni.showToast({title:'请输入联系方式',icon:'none'})
+				if(this.stations == '') return uni.showToast({title:'请输入单位',icon:'none'})
+				
+				this.showPopup=true
 			},
+			// 确定报名
 			gotoSign() {
-				// 这里添加按钮2点击后触发的动作
-				if (this.nickname.trim() === '' || this.telephone.trim() === '') {
-					uni.showToast({
-						title: '请填写完整的表单内容',
-						icon: 'none'
-					});
-					return;
-				}
-				let data = {
-					acId: this.actItemList[0].acId,
-					openid: uni.getStorageSync('oId'),
-					acName: this.actItemList[0].acName,
-					brief: this.actItemList[0].brief,
-					pic: this.actItemList[0].pic,
-					pers: this.actItemList[0].pers,
-					acshape: this.actItemList[0].acshape,
-					// create_at:this.actItemList[0].create_at,
-					address: this.actItemList[0].address,
-					type: this.actItemList[0].type,
-					begin_at: this.actItemList[0].begin_at,
-					endTime: this.actItemList[0].endTime,
-					cost: this.actItemList[0].cost
+				let data={
+					oid: this.$store.state.user.openid, //用户id
+					acid: this.acId,
+					ty:2,
+					ume:this.applyname,
+					pho:this.phone,
+					sta:this.stations
 				}
-				console.log(data);
-				console.log('1111');
-				console.log(this.actItemList[0].acId);
-				this.$request('/insertActivityEnroll', "POST", data).then(res => {
+				this.$request('/insertSignup', "POST", data).then(res => {
 					console.log(res);
+					this.showPopup=false
 					uni.navigateTo({
-						url: '/pages/Sign/Sign'
+						url:'/pages/Sign/Sign'
 					})
-				})
-				
-			},
-			mapTypeToText(type) {
-				if (type === 0) {
-					return "直播活动";
-				} else if (type === 1) {
-					return "常规教研活动";
-				} else {
-					return "专题教研活动";
-				}
-			},
-			enrollPublisher(clickedAcId) {
-				this.$request('/selectPublisher', "POST", {
-					openid: uni.getStorageSync('oId'),
-					acId: clickedAcId,
-				}).then(res => {
-					const openid = uni.getStorageSync('oId')
-					console.log(res[0][0].openid);
-					if (openid === res[0][0].openid) {
-						uni.showToast({
-							title: '您是该活动的发布者,不能报名',
-							icon: 'none'
-						});
-						this.isButtonDisabled = true
-						return;
-					}
-				})
+				})	
 			},
+
+			// 获取页面数据
 			getActivity() {
-				// 获取当前页面的URL
-				const routes = getCurrentPages();
-				console.log(routes);
-				const acId = routes[2].options.acId
 				let data = {
-					acId: acId,
-					ty: 2
+					oid: this.$store.state.user.openid, //用户id
+					acId: this.acId,
 				}
 				this.$request('/selectActivityID', "POST", data).then(res => {
 					console.log(res[0]);
-					// this.activeList=[...this.activeList,...res[0]]
-					this.actItemList = res[0]
-					this.typetext = this.mapTypeToText(this.actItemList.type);
-					const clickedAcId = this.actItemList[0].acId;
-					this.enrollPublisher(clickedAcId)
+					this.actItemList = res[0][0]
 				})
 			},
 		},
-		onShow() {
+		onLoad(e) {
+			console.log('进来了',e);
+			this.acId=e.acId
+			this.navBarData.title=e.tit
+
 			this.getActivity()
 		}
 	};
 </script>
 
 <style lang="scss" scoped>
-	.hd {
+	.jys {
 		.top {
 			width: 690rpx;
 			height: 192rpx;
@@ -312,5 +325,82 @@
 
 
 		}
+		.mask {
+			position: fixed;
+			top: 0;
+			left: 0;
+			width: 100%;
+			height: 100%;
+			background-color: rgba(0, 0, 0, 0.3);
+			z-index: 999;
+			overflow: hidden;
+			// 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;
+					}
+				}
+			}
+		}
 	}
 </style>

+ 1 - 1
pages/liveActivityList/liveActivityList.vue

@@ -49,7 +49,7 @@
 					openid: uni.getStorageSync('oId'),
 					ty: 0,
 					page: this.currentPage, //下拉获取更多的字段
-					lim: 10 //一次获取多少数据
+					lim: 15 //一次获取多少数据
 				}
 				this.$request('/selectActivity', "POST", data).then(res => {
 					console.log(res[0]);

+ 22 - 8
pages/login_Wechat/login_Wechat.vue

@@ -46,10 +46,11 @@
 			};
 		},
 		methods: {
+			// 选择名称
 			inpvalue(e) {
-				console.log(e.detail.value, '1111111');
 				this.nickname = e.detail.value
 			},
+			// 上传图片
 			onChooseAvatar(e) {
 				const {
 					avatarUrl
@@ -83,6 +84,7 @@
 
 				// this.avatarUrl = avatarUrl
 			},
+			// 登录
 			gotoIndex() {
 				if (this.avatarUrl ==
 					'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0'
@@ -102,12 +104,8 @@
 					});
 					return
 				}
-				
-				
-				
-				
-				
-				
+				if(!this.isShow) return uni.showToast({title: '请勾选条约',icon: 'error',duration: 1000});
+					
 				let oId = uni.getStorageSync('oId')
 				console.log('gotoIndex:', oId);
 				// let all = []
@@ -154,18 +152,34 @@
 				})
 
 			},
+			// 跳转其他登录方式
 			goto() {
 				uni.navigateTo({
 					url: "/pages/login_two/login_two"
 				})
 			},
+			// 勾选取消条约
 			isDui() {
 				this.isShow = !this.isShow
+			},
+			getdata(){
+				this.$request('/selectUserInfo', "POST", {openid: uni.getStorageSync('oId')}).then(res => {
+					console.log('获取渲染数据',res[0][0]);
+					let data=res[0][0]
+					console.log(data);
+					if(!data){
+						return
+					}else{
+						this.avatarUrl=data.avatar
+						this.nickname=data.username
+					}
+				})
 			}
 		},
 		onLoad() {
 			this.avatarUrl =
-				'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0'
+				'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0';
+			this.getdata()
 		}
 	}
 </script>

+ 16 - 1
pages/mine/mine.vue

@@ -14,7 +14,8 @@
 						<!-- <span v-if="isManage!==''" class="manage bq-font">管理员</span> -->
 					</view>
 					<view class="infoTexttwo">
-						<text style="font-size: 26rpx;font-weight: 400;line-height: 42rpx;color: #999999;">个性签名</text>
+						<!-- <text style="font-size: 26rpx;font-weight: 400;line-height: 42rpx;color: #999999;">{{signature!=='' ? signature : '个性签名' }}</text> -->
+						<text style="font-size: 26rpx;font-weight: 400;line-height: 42rpx;color: #999999;"></text>
 					</view>
 				</view>
 			</view>
@@ -117,6 +118,12 @@
 				</view>
 			</view>
 		</view>
+		
+		
+		
+		
+		
+		
 	</view>
 </template>
 
@@ -133,8 +140,13 @@
 					title: '我的',
 					btn: 0
 				},
+			
+				// 用户名
 				username: '',
+				// 头像
 				userAvatar: 'https://teacherapi.cocorobo.cn/teaching-file/static//mine/Avatar.png',
+				// 签名
+				signature:'',
 				isManage: ''
 			};
 		},
@@ -204,6 +216,8 @@
 			console.log(this.$store.state);
 			this.userAvatar = this.$store.state.user.avatar;
 			this.username = this.$store.state.user.username;
+			this.signature=this.$store.state.user.brief;
+			
 			this.isManage = this.$store.state.user.openid;
 			console.log(this.isManage == "");
 		}
@@ -331,5 +345,6 @@
 				}
 			}
 		}
+		
 	}
 </style>

+ 24 - 71
pages/mineActive/mineActive.vue

@@ -11,7 +11,7 @@
 
 				</view>
 
-				<view class="right" @click="gotoActivityDetail" :data-index="index">
+				<view class="right">
 					<view class="title">
 						<view class="tag bqZ-font">类型</view>
 						<text class="three-font" style="font-weight: 600;">{{ item.acName }}</text>
@@ -24,17 +24,16 @@
 					<view class="operate">
 						<view class="left">
 							<view class="money fNum-font"><text class="three-font">¥</text> {{ item.cost }}</view>
-							<view class="person">已报名{{ item.pers }}人</view>
+							<!-- <view class="person">已报名{{ item.pers }}人</view> -->
 						</view>
 
-						<view class="Oright">
+						<view class="Oright" @click="gotoDetail" :data-all="item">
 							<view class="text">查看详情</view>
 							<view class="arrow">
-								<image src="http://43.139.158.220:5007/img/static/mine/arrow-right-blue.png"
+								<image src="https://teacherapi.cocorobo.cn/teaching-file/static/mine/arrow-right-blue.png"
 									mode="aspectFill"></image>
 							</view>
 						</view>
-
 					</view>
 				</view>
 			</view>
@@ -53,80 +52,37 @@
 					title: '我的活动',
 					btn: 1
 				},
-				activeList: [
-					// {
-					// 	img: "https://teacherapi.cocorobo.cn/teaching-file/static//img/1695656271245-image.png",
-					// 	count: "3842",
-					// 	price: "299",
-					// 	className: "丽湖职教双创教育国际虚拟教研室启动大会暨双创教育国际论坛圆满举行",
-					// 	intro: "丽湖职教双创教育国际虚拟教研室为立足全国,辐射海外的国际化教研室,围绕创新创业教育的人才培养与课程建设开展深度研究。教研室以贯彻落实立德树人根本任务,通过加强跨专业、跨校、跨地域的教研交流,推动高校协同打造国际化的精品教学资",
-					// },
-					// {
-					// 	img: "https://teacherapi.cocorobo.cn/teaching-file/static//img/img1.png",
-					// 	count: "17",
-					// 	price: "188",
-					// 	className: "丽湖职教双创教育国际虚拟教研室2023年常规教研活动安排",
-					// 	intro: "丽湖职教双创教育国际虚拟教研室为立足全国,辐射海外的国际化教研室,围绕创新创业教育的人才培养与课程建设开展深度研究。教研室以贯彻落实立德树人根本任务,通过加强跨专业、跨校、跨地域的教研交流,推动高校协同打造国际化的精品教学资",
-					// },
-					// {
-					// 	img: "https://teacherapi.cocorobo.cn/teaching-file/static//img/img3.png",
-					// 	count: "1",
-					// 	price: "188",
-					// 	className: "产教融合情境下的双创通识课程建设 | 丽湖职教双创教育国际虚拟教研室常规教研活动第2期顺利举行",
-					// 	intro: "【图片】为提升职业院校双创课程建设水平,促进双创课程的改革与发展,丽湖职教双创教育国际虚拟教研室于3月29日组织举办了以“产教融合情境下的双创通识课程建设”为主题的第2期线上教研活动,来自全国各职业院校的60多位教师参会。",
-					// },
-					// {
-					// 	img: "https://teacherapi.cocorobo.cn/teaching-file/static//yym/83b48be81d4ed9c93908737496f2a54.png",
-					// 	count: "3842",
-					// 	price: "299",
-					// 	className: "丽湖职教双创教育国际虚拟教研室 • 常规教研活动 第9期",
-					// 	intro: "丽湖职教双创教育国际虚拟教研室 • 常规教研活动 第9期"
-					// },
-				],
+				activeList: [],
 			};
 		},
 		methods: {
-			gotoActivityDetail(e) {
-				// const value = uni.getStorageSync("login");
-				// if (value == 0) {
-				// 	// uni.navigateTo({
-				// 	// 	url: "/pages/login/login",
-				// 	// });
-				// } else {
-				// 	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),
-				// 		});
-				// 	}
-				// }
-				let edata = e.currentTarget.dataset['index'];
-				const clickedAcId = this.activeList[edata].acId;
-				const type = this.activeList[edata].type;
-				const isShow = false
-				uni.navigateTo({
-					url: "/pages/activityDetail/activityDetail?acId=" + clickedAcId + "&ty=" + type + "&isShow=" +
-						isShow,
-				});
+			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}`
+					});
+				}
 			},
-			myactivity() {
+			// 获取数据
+			getdata() {
 				let data = {
-					openid: uni.getStorageSync('oId'),
+					oid: this.$store.state.user.openid, //用户id
+					type: 2
 				}
-				this.$request('/selectActivityEnroll', "POST", data).then(res => {
+				this.$request('/selectOperator', "POST", data).then(res => {
 					console.log(res[0]);
 					this.activeList = res[0]
 				})
 			}
 		},
 		onShow() {
-			this.myactivity()
+			this.getdata()
 		}
 	}
 </script>
@@ -204,10 +160,7 @@
 				.operate {
 					display: flex;
 					justify-content: space-between;
-					// align-items: flex-end;
 					align-items: baseline;
-					// margin-top: 15px;
-
 					.left {
 						display: flex;
 						flex-direction: row;
@@ -232,7 +185,7 @@
 					.Oright {
 						width: 80px;
 						display: flex;
-						justify-content: flex-start;
+						justify-content: flex-end;
 						align-items: center;
 						// flex-direction: row;
 						// justify-content: space-around;

+ 34 - 41
pages/mineCollect/mineCollect.vue

@@ -4,14 +4,14 @@
 
 		<view class="collectBox">
 			<view class="collect_length">
-				<text>共{{ collArr.length }}条收藏</text>
+				<text>共{{ classList.length }}条收藏</text>
 			</view>
 			<!-- <view class="classBox" @click="gotoWeb(index)" v-for="(item,index) in classList" :key="index"> -->
-			<view class="classBox" v-for="(item,index) in classList" :key="index">
+			<view class="classBox" v-for="(item,index) in classList" :key="index" @click="gotoDetail" :data-all="item">
 				<view class="classTitle">
 					<text>{{ item.acName }}</text>
-					<image src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/Collect_yellow.png"
-						mode="aspectFill" @click="coll" :data-e="item"></image>
+					<image src="https://teacherapi.cocorobo.cn/teaching-file/static/mine/Collect_yellow.png"
+						mode="aspectFill" @click.stop="coll" :data-e="item"></image>
 					<!-- <image :src="collArr.includes(item.acId) ? pic2 : '' " style="width: 28rpx; height: 26rpx" mode="aspectFill"  @click="coll" :data-e="item"></image> -->
 
 				</view>
@@ -20,7 +20,7 @@
 						<view class="constDate">
 							<text class="manage">类型</text>
 							<text>|</text>
-							<text class="c_data">{{item.Crdate}}</text>
+							<text class="c_data">{{item.dtime}}</text>
 							<!-- <text class="c_time">21:07</text> -->
 						</view>
 						<view class="classIntro">
@@ -44,60 +44,53 @@
 					title: '我的收藏',
 					btn: 1
 				},
-				collArr: [],
+				collArr: [], //无用了
 				classList: [],
 			};
 		},
 		methods: {
 			getData() {
+				
 				let data = {
 					oid: this.$store.state.user.openid, //用户id
+					type: 0
 				}
-				this.$request('/selectColl', 'POST', data).then(res => {
-					this.collArr = JSON.parse(res[0][0].coll)
-					// let a=this.collArr.join(', ');
-					// console.log( '不行吗',this.collArr);
-					let data = {
-						oid: this.$store.state.user.openid, //用户id
-						list: this.collArr
-					}
-					// return console.log(data);
-					this.$request('/selectCollList', 'POST', data).then(res => {
-						console.log('enenenen?',res[0]);
-						// this.collArr=res[0]
-						this.classList = res[0]
-					})
+				this.$request('/selectOperator', 'POST', data).then(res => {
+					console.log('获取收藏', res);
+					
+					this.classList = res[0]
 				})
 			},
 			// 这里获取的活动肯定是已收藏的,就不用判断直接删除就可以了
 			coll(event) {
-				// console.log(this.$store.state.user.openid);
+				
 				let aId = event.currentTarget.dataset.e.acId
-				// 先获取用户收藏信息
+				
 				let data = {
+					acid: aId,
 					oid: this.$store.state.user.openid, //用户id
+					ty: 0
 				}
-
-				this.$request('/selectColl', 'POST', data).then(res => {
-
-					let colls = JSON.parse(res[0][0].coll)
-					console.log('取消不了?',colls);
-					// 把未取消收藏的数据提取出来
-					console.log('aid',aId);
-					const newArray = colls.filter(item => item !== aId);
-					
-					console.log('新',newArray);
-					let arr3 = {
-						oid: this.$store.state.user.openid, //用户id
-						acid: JSON.stringify(newArray)
-					}
-					this.$request('/updateColl', 'POST', arr3).then(res => {
-						// 删除后重新获取数据进行渲染
-						this.getData()
-					})
+				
+				this.$request('/deleteOperator', 'POST', data).then(res => {
+					console.log(res);
+					this.getData()
 				})
 			},
-
+			// 跳转到详情页
+			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}`
+					});
+				}
+			},
 		},
 		onShow() {
 			this.getData()

+ 292 - 83
pages/mineEdit/mineEdit.vue

@@ -8,7 +8,7 @@
 					<text>头像</text>
 				</view>
 				<view class="userAvatar">
-					<image :src="userAvatar"></image>
+					<image :src="userData.avatar"></image>
 				</view>
 			</view>
 			<view class="setName">
@@ -17,74 +17,84 @@
 				</view>
 				<view class="input_details">
 					<view class="nickname">
-						<input type="text" style=" text-align: right;" maxlength="10" placeholder="请输入一个昵称"
-							placeholder-style="font-size: 28rpx; color: rgb(153, 153, 153);" v-model="username" />
+						<input type="text" style=" text-align: right;" maxlength="10" placeholder="请输入昵称"
+							placeholder-style="font-size: 28rpx; color: rgb(153, 153, 153);"
+							v-model="userData.username" />
 					</view>
 				</view>
 			</view>
 			<view class="setPicker">
-				<picker mode="selector" :range="genderList" @change="handelGender">
+				<picker mode="selector" :range="genderList" :value="userData.sex" @change="handelGender">
 					<view class="content">
 						<view class="edit_title">
 							<text>性别</text>
 						</view>
 						<view class="input_details">
 							<view class="details">
-								<view class="uni-input text">{{gender}}</view>
+								<view class="uni-input text">{{genderList[userData.sex]}}</view>
 							</view>
 							<view class="arrow">
-								<image src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/arrow-right_gray.png" mode="aspectFill"></image>
+								<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="schoolList" @change="handelSchool">
+				<picker mode="selector" :range="schoolList" :value="userData.school" @change="handelSchool">
 					<view class="content">
 						<view class="edit_title">
 							<text>学校</text>
 						</view>
 						<view class="input_details">
 							<view class="details">
-								<view class="uni-input text">{{school}}</view>
+								<view class="uni-input text">{{schoolList[userData.school]}}</view>
 							</view>
 							<view class="arrow">
-								<image src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/arrow-right_gray.png" mode="aspectFill"></image>
+								<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="date" :value="date" :start="startDate" :end="endDate" @change="bindDateChange">
+				<picker mode="date" :value="userData.birthday" :start="startDate" :end="endDate" @change="bindDateChange">
+				<!-- <picker mode="date" :value="userData.date" @change="bindDateChange"> -->
 					<view class="content">
 						<view class="edit_title">
 							<text>生日</text>
 						</view>
 						<view class="input_details">
 							<view class="details">
-								<view class="uni-input text">{{date}}</view>
+								<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>
+								<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" @change="handelHobby">
+				<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">{{hobby}}</view>
+								<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>
+								<image
+									src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/arrow-right_gray.png"
+									mode="aspectFill"></image>
 							</view>
 						</view>
 					</view>
@@ -97,117 +107,311 @@
 				<view class="input_details">
 					<view class="selfdomIntro">
 						<textarea type="text" placeholder="请输入你的个性签名" maxlength="75"
-							placeholder-style="font-size: 28rpx; color: rgb(153, 153, 153);" v-model="selfdomintro" />
+							placeholder-style="font-size: 28rpx; color: rgb(153, 153, 153);" style="color: black;" v-model="userData.brief" />
 					</view>
 				</view>
 			</view>
 		</view>
 		<view class="btnBox">
 			<view class="btn">
-				<button>保存修改</button>
+				<button @click="saveInfo">保存修改</button>
 				<button @click="gotoLogin">退出登录</button>
 			</view>
 		</view>
+
+
+
+		<!-- 弹窗 -->
+		<view>
+			<view class="mask" v-show="showPopup" @click="closePopup"></view>
+			<view class="popup-container" v-show="showPopup">
+				<view class="popup">
+					<view class="header">
+						<text>确认修改</text>
+					</view>
+					<view class="footer">
+						<view class="cancel-btn" @click="closePopup">取消</view>
+						<view class="confirm-btn" @click="conf">确认</view>
+					</view>
+				</view>
+			</view>
+		</view>
+
+		<view>
+			<!-- <view class="mask" v-show="showPopupConfirm" @click="closePopup"></view> -->
+			<view class="popup-container" style="height: 175px;" v-show="showPopupConfirm">
+				<view class="popup">
+					<view class="header" style="margin-top: 15px;">
+						<image src="https://teacherapi.cocorobo.cn/teaching-file/static//gou1.png" mode="aspectFill">
+						</image>
+						<text style="margin-bottom: 24px;">修改成功</text>
+					</view>
+
+				</view>
+			</view>
+		</view>
+
+
+
+
+
+
 	</view>
 </template>
 
 <script>
 	export default {
 		data() {
-			const currentDate = this.getDate({
-				format: true
-			})
+			// const currentDate = this.getDate({
+			// 	format: true
+			// })
 			return {
 				navBarData: {
 					title: '个人资料',
 					btn: 1
 				},
-				userAvatar:'',
-				username: '',
-				selfdomintro: '',
 
+
+
+				// 相别选项
 				genderList: ['男', '女'],
+				//学校选项
+				schoolList: ['深圳信息XX学院', '深圳XX学院', '深圳XX学院'],
+				// 兴趣选项
+				hobbyList: ['篮球','编程','钢琴','美术','摄影'],
+				
 				gender: '男',
-
-				schoolList: ['xx学院', 'xx学院', 'xx学院'],
 				school: 'xx学院',
 
-				date: currentDate,
+				//控制弹窗
+				showPopup: false,
+				//修改成功弹窗
+				showPopupConfirm: false,
+				// isFirstShow: true,
+
+				// 用户信息数据
+				userData: {
+					oid:'',
+					avatar: '', //头像
+					username: '', //用户名
+					sex:null, //用户性别
+					school:null,//学校
+					birthday: '',//生日
+					tag:null, //兴趣标签
+					brief: '', //用户简介
+				}
+
 
-				hobbyList: ['篮球'],
-				hobby: '篮球'
 			};
 		},
-		computed: {
-			startDate() {
-				return this.getDate('start');
-			},
-			endDate() {
-				return this.getDate('end');
-			}
-		},
+		// computed: {
+		// 	startDate() {
+		// 		return this.getDate('start');
+		// 	},
+		// 	endDate() {
+		// 		return this.getDate('end');
+		// 	}
+		// },
 		methods: {
+			// 获取渲染数据
+			getData(){
+				const value = this.$store.state.user.openid;
+				if (value == '') return
+				
+				this.$request('/selectUserInfo', "POST", {openid: this.$store.state.user.openid,}).then(res => {
+					console.log('获取渲染数据',res[0][0]);
+					// res[0][0].birthday=
+					if(res[0][0].birthday==null) res[0][0].birthday=''
+					if(res[0][0].brief==null) res[0][0].brief=''
+					this.userData=res[0][0]
+					// this.userData.oid=res[0][0].oid
+					// this.userData.avatar=res[0][0].avatar
+					// this.userData.username=res[0][0].username
+					// this.userData.sex=res[0][0].sex?res[0][0].sex :''
+					// this.userData.school=res[0][0].school?res[0][0].school :''
+					// this.userData.birthday=res[0][0].birthday ?res[0][0].birthday :''
+					// this.userData.tag=res[0][0].tag ?res[0][0].tag :''
+					// this.userData.brief=res[0][0].brief ?res[0][0].brief :''
+				})
+			},
+			// 取消操作
+			closePopup() {
+				this.showPopup = false;
+				// this.showPopupConfirm = false;
+			},
+			// 确认操作
+			conf() {
+				
+				this.showPopup = false;
+				this.showPopupConfirm=true
+				console.log('要上传修改的数据',this.userData);
+				this.$request('/updateUserInfo', "POST", this.userData).then(res => {
+					// console.log('修改的数据',res);
+					
+					this.$request('/selectUser', 'POST', {
+						oId: uni.getStorageSync('oId'),
+					}).then(res => {
+						console.log('selectUser', res[0][0]);
+						this.$store.dispatch('asyncUpdateUser', res[0][0])
+					})
+					setTimeout(()=>{
+						this.showPopupConfirm=false
+						this.getData()
+					},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'})
+				}
+				this.showPopup = true
+			},
+			// 选择用户性别
 			handelGender(e) {
-				this.gender = this.genderList[e.detail.value]
+				console.log(e);
+				this.userData.sex = e.detail.value
 			},
-			handelSchool(e) {
-				this.school = this.schoolList[e.detail.value]
+			handelHobby(e){
+				this.userData.tag = e.detail.value
 			},
-			handeHobby(e) {
-				this.hobby = this.hobbyList[e.detail.value]
+			// 生日
+			bindDateChange(e) {
+				this.userData.birthday = e.detail.value
 			},
-			bindDateChange: function(e) {
-				this.date = e.detail.value
+			// handelGender(e) {
+			// 	this.gender = this.genderList[e.detail.value]
+			// },
+			// 学校
+			handelSchool(e) {
+				this.userData.school = e.detail.value
 			},
-			getDate(type) {
-				const date = new Date();
-				let year = date.getFullYear();
-				let month = date.getMonth() + 1;
-				let day = date.getDate();
-
-				if (type === 'start') {
-					year = year - 60;
-				} else if (type === 'end') {
-					year = year + 2;
-				}
-				month = month > 9 ? month : '0' + month;
-				day = day > 9 ? day : '0' + day;
-				return `${year}-${month}-${day}`;
+			// 兴趣
+			handeHobby(e) {
+				this.userData.tag = e.detail.value
 			},
-			gotoLogin(){
-				let  user= {
-					openid:'',
+			
+			// 清除vuex的数据
+			gotoLogin() {
+				console.log(this.$store.state.user);
+				let user = {
 					avatar: "",
-					desc: "",
-					email: "",
-					phone: "",
-					sex: "",
-					token: "",
-					username: "暂无",
-					__v: 0,
-					_id: ""
+					birthday: "",
+					brief: "",
+					id: "",
+					openid: "",
+					school: "null",
+					sex: null,
+					tag: null,
+					username: "暂无"
 				}
+				
 				this.$store.dispatch('asyncUpdateUser', user)
 				uni.navigateTo({
-					url:'/pages/login_Wechat/login_Wechat'
+					url: '/pages/login_Wechat/login_Wechat'
 				})
+				// 清除本页面数据
+				this.userData={}
 			},
 		},
-		onShow() {
+		onReady() {
 			console.log(this.$store.state);
-			this.userAvatar=this.$store.state.user.avatar;
-			this.username=this.$store.state.user.username;
-			// this.isManage = this.$store.state.user.openid;
-			// console.log(this.isManage == "");
+			this.getData()
 		}
 	}
 </script>
 
 <style lang="scss">
+	.mask {
+		position: fixed;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+		background-color: rgba(0, 0, 0, 0.3);
+		z-index: 999;
+		overflow: hidden;
+		// 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%;
+				// flex: 1;
+				display: flex;
+				// justify-content: space-around;
+				// align-items: end;
+				// padding-top: 17px;
+				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;
+				}
+			}
+		}
+	}
+
 	.edit_title {
 		display: flex;
 		align-items: center;
 		font-size: 32rpx;
+
 	}
 
 	.editBox {
@@ -292,22 +496,23 @@
 				}
 			}
 		}
+
 		.setIntro {
 			display: flex;
 			flex-direction: column;
 			justify-content: space-evenly;
 			height: 216rpx;
 			border-top: 1px solid #E7E7E7;
-		
+
 			.input_details {
 				display: flex;
 				align-items: center;
-		
+
 				.selfdomIntro {
 					width: 100%;
 					height: 88rpx;
-					
-					textarea{
+
+					textarea {
 						width: 100%;
 						height: 88rpx;
 						font-size: 28rpx;
@@ -317,12 +522,14 @@
 			}
 		}
 	}
-	.btnBox{
+
+	.btnBox {
 		position: absolute;
 		margin: 0 85rpx;
 		bottom: 40px;
-		.btn{
-			button{
+
+		.btn {
+			button {
 				width: 580rpx;
 				height: 88rpx;
 				border: none;
@@ -334,12 +541,14 @@
 				align-items: center;
 				color: #545454;
 				text-align: center;
-				&:first-child{
+
+				&:first-child {
 					background-color: rgb(0, 86, 168);
 					color: white;
 					margin-bottom: 24rpx;
 				}
-				&::after{
+
+				&::after {
 					border: none;
 				}
 			}

+ 124 - 93
pages/mineRelease/mineRelease.vue

@@ -2,7 +2,7 @@
 	<view>
 		<statusBar :item="navBarData"></statusBar>
 		<view class="activeBox" v-for="(item,index) in activeList" :key="index">
-			<view class="teaching_case" @click="gotoActdetail" :data-index="index">
+			<view class="teaching_case" >
 				<view class="img">
 					<!-- <image src="https://teacherapi.cocorobo.cn/teaching-file/static//activity/bg2.png" mode="aspectFill"></image> -->
 					<image :src="item.pic" mode="aspectFill"></image>
@@ -12,7 +12,7 @@
 				<view class="right">
 					<view class="title">
 						<view class="tag bqZ-font">类型</view>
-						<text class="three-font" style="font-weight: 600;">{{ item.acName }}</text>
+						<text class="three-font" style="font-weight: 550;">{{ item.acName }}</text>
 					</view>
 
 					<view class="introduce">
@@ -21,14 +21,15 @@
 
 					<view class="operate">
 						<view class="left">
-
-							<view class="person">浏览0 · 订阅0 · 收藏0 · 已购0</view>
+							<!-- <view class="person">浏览0 · 订阅{{ item.snum }} · 收藏{{ item.dnum }} · 已购0</view> -->
+							<view class="person"> 订阅{{ item.snum }} · 收藏{{ item.dnum }} </view>
 						</view>
 
-						<view class="Oright">
+						<view class="Oright" @click="gotoActdetail" :data-info="item">
 							<view class="text">查看详情</view>
 							<view class="arrow">
-								<image src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/arrow-right-blue.png"
+								<image
+									src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/arrow-right-blue.png"
 									mode="aspectFill"></image>
 							</view>
 						</view>
@@ -37,34 +38,53 @@
 			</view>
 			<view class="controls">
 				<view class="controls_btns">
-					<button @click="gotoEdit(index)">编辑</button>
-					<button @click="actDelete(index)">删除</button>
+					<button @click="gotoEdit" :data-aid="item.acId">编辑</button>
+					<button @click="actDelete" :data-aid="item.acId">删除</button>
 				</view>
 			</view>
 		</view>
-		
+
 		<view class="loading">
 			<view v-if="newsLoading==1">数据加载中...</view>
 			<view v-if="newsLoading==2">没有更多了~~</view>
 		</view>
-		
+
 		<view class="" style="width: 100%;height: 50rpx;"></view>
-		
+
 		<!-- 弹窗 -->
 		<view>
-			<view class="mask" v-show="showPopup" @click="closePopup"></view>
+			<!-- <view class="mask" v-show="showPopup" @click="closePopup"></view> -->
 			<view class="popup-container" v-show="showPopup">
 				<view class="popup">
 					<view class="header">
 						<text>确认删除</text>
 					</view>
 					<view class="footer">
-						<button class="cancel-btn" @click="closePopup">取消</button>
-						<button class="confirm-btn" @click="confirm">确认</button>
+						<view class="cancel-btn" @click="showPopup= false">取消</view>
+						<view class="confirm-btn" @click="confirm">确认</view>
 					</view>
 				</view>
 			</view>
 		</view>
+		
+		<view>
+			<!-- <view class="mask" v-show="showPopupConfirm" @click="closePopup"></view> -->
+			<view class="popup-container" style="height: 175px;" v-show="showPopupConfirm">
+				<view class="popup">
+					<view class="header" style="margin-top: 15px;">
+						<image src="https://teacherapi.cocorobo.cn/teaching-file/static//gou1.png" mode="aspectFill">
+						</image>
+						<text style="margin-bottom: 24px;">删除成功</text>
+					</view>
+		
+				</view>
+			</view>
+		</view>
+		
+		
+		
+		
+		
 	</view>
 </template>
 
@@ -77,78 +97,89 @@
 					btn: 1 //是否显示返回按钮 0不显示  1 显示
 				},
 				showPopup: false,
-				deleteAcId : '',
+				showPopupConfirm:false,
+				deleteAcId: '',
 				// 触底加载动画提示
 				newsLoading: 0, //0默认值  1加载中 2没有更多了
+				// 分页查询
 				currentPage: 1,
-				activeList: [
-					// {
-					// 	pic: "https://teacherapi.cocorobo.cn/teaching-file/static//img/1695656271245-image.png",
-					// 	count: "3842",
-					// 	cost: "299",
-					// 	acName: "丽湖职教双创教育国际虚拟教研室启动大会暨双创教育国际论坛圆满举行",
-					// 	intro: "丽湖职教双创教育国际虚拟教研室为立足全国,辐射海外的国际化教研室,围绕创新创业教育的人才培养与课程建设开展深度研究。教研室以贯彻落实立德树人根本任务,通过加强跨专业、跨校、跨地域的教研交流,推动高校协同打造国际化的精品教学资",
-					// }, 
-				],
+				// 渲染数据列表
+				activeList: [],
 			};
 		},
 		methods: {
+			// 获取数据渲染数据
 			getpublish() {
-				let data={
-					openid:uni.getStorageSync('oId'),
-					del: 0,
+				// const oid = 
+				let data = {
+					openid: this.$store.state.user.openid,
 					page: this.currentPage, //下拉获取更多的备用字段
-					lim: 5 //一次获取多少数据
+					lim: 15 //一次获取多少数据
 				}
 				this.$request('/selectMyPublish', "POST", data).then(res => {
-					console.log(res[0]);
+					console.log("我的发布", res[0].length);
+					// 看是否有发布过数据,没有的话提示通知
 					if (!res[0].length) {
 						this.newsLoading = 2
+						return
 					} else {
-						this.newsLoading = 0
-					}
-					this.activeList = [...this.activeList, ...res[0]]
-					if (this.activeList.length < 1) {
-						uni.showToast({
-							title: '没有您发布的内容',
-							icon: 'none'
-						});
-						// return;
+						this.activeList = [...this.activeList,...res[0]]
 					}
 				})
 			},
+			// 查看详情
 			gotoActdetail(e) {
-				let edata = e.currentTarget.dataset['index'];
-				const clickedAcId = this.activeList[edata].acId;
-				const type = this.activeList[edata].type;
-				const isShow = false
-				uni.navigateTo({
-					url: "/pages/activityDetail/activityDetail?acId=" + clickedAcId + "&ty=" + type + "&isShow=" + isShow,
-				});
+				// console.log(e.currentTarget.dataset.aid);
+				let data = e.currentTarget.dataset.info
+				console.log(data);
+				if(data.type==0 || data.type==1){
+					uni.navigateTo({
+						url: `/pages/activityDetail/activityDetail?acId=${data.acId}`
+					});
+					return
+				}else{
+					uni.navigateTo({
+						url: `/pages/teachingDetail/teachingDetail?acId=${data.acId}`
+					});
+				}
 			},
-			gotoEdit(index) {
-				const clickedAcId = this.activeList[index].acId;
-				const type = this.activeList[index].type;
-				// console.log(clickedAcId);
+			// 编辑功能
+			gotoEdit(e) {
+				console.log(e);
+				let acid = e.currentTarget.dataset.aid
 				uni.navigateTo({
-					url: "/pages/publish/publish?acId=" + clickedAcId + "&ty=" + type,
+					url: `/pages/publish/publish?acId=${acid}`
 				});
 			},
-			actDelete(index) {
-				this.deleteAcId = this.activeList[index].acId;
+			// 显示删除弹窗
+			actDelete(e) {
+				this.deleteAcId = e.currentTarget.dataset.aid;
 				this.showPopup = true; //显示弹窗
 			},
+			// 删除功能
 			confirm() {
-				let data={
-					id: this.deleteAcId,
+				let data = {
+					oid: this.$store.state.user.openid, //用户id
+					aid: this.deleteAcId,
 				}
-				console.log(this.deleteAcId);
+				this.showPopupConfirm=true
 				this.$request('/deleteMyPublish', "POST", data).then(res => {
-					// console.log(res);
-					console.log('删除成功');
+					
+					this.showPopup = false
+					
+					setTimeout(()=>{
+						this.showPopupConfirm=false
+					},1500)
+					
+					// 在列表里也将他删除
+					this.newsLoading=0
+					this.currentPage=1
+					// this.activeList=this.activeList.filter(e=>{
+					// 	return e.acId!=this.deleteAcId
+					// })
+					 this.activeList=[]
 					this.getpublish()
 				})
-				this.closePopup()
 			},
 			closePopup() {
 				// 取消操作
@@ -158,16 +189,19 @@
 		},
 		// 触底加载更多
 		onReachBottom() {
-			console.log(111);
 			if (this.newsLoading == 2) {
 				return
 			}
 			this.newsLoading = 1
 			this.currentPage++
-			setTimeout(this.getpublish, 2000)
-		
+			setTimeout(this.getpublish, 1000)
+
 		},
 		onShow() {
+			// 重新恢复初始状态
+			this.newsLoading = 0
+			this.currentPage=1
+			this.activeList=[]
 			this.getpublish();
 		}
 	}
@@ -183,23 +217,26 @@
 		color: #888;
 		line-height: 2em;
 	}
-	
+
 	.activeBox {
-		width: 100%;
+		width: 750rpx;
+		padding: 30rpx;
 		background-color: #fff;
-		&:first-child{
-			padding: 10px 0 0 0;
-		}
+		// &:first-child{
+		// 	padding: 10px 0 0 0;
+		// }
 
 		.teaching_case {
 			display: flex;
 			justify-content: space-between;
-			padding: 10px 10px;
-			border-top: 1px solid #E7E7E7;
+			// padding: 10px 10px;
+			// border-top: 1px solid #E7E7E7;
+			padding-bottom: 25rpx;
 
 			.img {
 				width: 160rpx;
 				height: 160rpx;
+				margin-right: 20rpx;
 
 				image {
 					width: 160rpx;
@@ -209,13 +246,14 @@
 			}
 
 			.right {
-				padding-left: 15px;
+				// padding-left: 15px;
 				flex: 1;
 				display: flex;
 				flex-direction: column;
 				// align-content: flex-end;
 				justify-content: space-between;
 
+				// box-sizing: border-box;
 				.title {
 					display: flex;
 					align-items: center;
@@ -266,9 +304,7 @@
 				.operate {
 					display: flex;
 					justify-content: space-between;
-					// align-items: flex-end;
 					align-items: baseline;
-					// margin-top: 15px;
 
 					.left {
 						display: flex;
@@ -277,8 +313,6 @@
 						align-items: baseline;
 						width: 330rpx;
 
-
-
 						.person {
 							color: #00000099;
 							font-size: 20rpx;
@@ -287,13 +321,11 @@
 					}
 
 					.Oright {
-						width: 200rpx;
+						// width: 200rpx;
 						display: flex;
 						justify-content: flex-end;
 						align-items: center;
-						// flex-direction: row;
-						// justify-content: space-around;
-						// align-items: flex-end;
+
 
 						.text {
 							font-size: 24rpx;
@@ -344,6 +376,7 @@
 			}
 		}
 	}
+
 	.mask {
 		position: fixed;
 		top: 0;
@@ -352,9 +385,10 @@
 		height: 100%;
 		background-color: rgba(0, 0, 0, 0.3);
 		z-index: 999;
+		overflow: hidden;
 		// display: none;
 	}
-	
+
 	.popup-container {
 		position: fixed;
 		top: 50%;
@@ -364,7 +398,8 @@
 		height: 260rpx;
 		z-index: 1000;
 		// display: none;
-	
+		overflow: hidden;
+
 		.popup {
 			width: 100%;
 			height: 100%;
@@ -372,7 +407,8 @@
 			flex-direction: column;
 			background-color: #fff;
 			border-radius: 16rpx;
-	
+			overflow: hidden;
+
 			.header {
 				flex: 1;
 				display: flex;
@@ -382,7 +418,7 @@
 				margin-top: 24px;
 				font-size: 34rpx;
 				font-weight: 600;
-	
+
 				image {
 					width: 150rpx;
 					height: 150rpx;
@@ -390,35 +426,30 @@
 					margin-bottom: 15px;
 				}
 			}
-	
+
 			.footer {
-				flex: 1;
+				width: 100%;
 				display: flex;
-				justify-content: space-around;
-				align-items: end;
-				padding-top: 17px;
-	
+				overflow: hidden;
+
 				.cancel-btn {
-					width: 259rpx;
+					width: 50%;
 					height: 100rpx;
 					background-color: #F7F7F7;
 					color: #000;
 					font-size: 34rpx;
 					text-align: center;
-					border-radius: 0;
 					border-bottom-left-radius: 16rpx;
 					line-height: 50px;
 				}
-	
+
 				.confirm-btn {
-					width: 259rpx;
+					width: 50%;
 					height: 100rpx;
 					background-color: #0081FE;
 					color: #fff;
 					font-size: 34rpx;
 					text-align: center;
-					border-radius: 0;
-					border-bottom-right-radius: 16rpx;
 					line-height: 50px;
 				}
 			}

+ 222 - 106
pages/mineSubscribe/mineSubscribe.vue

@@ -2,7 +2,7 @@
 	<view class="content">
 		<statusBar :item="navBarData"></statusBar>
 
-		<view class="" style="width: 750rpx;height: 60px;">
+		<!-- <view class="" style="width: 750rpx;height: 60px;">
 			<view class="activeTitle">
 				<view class="left" @click="phoneLogin" :class="current==0?active:test">
 					<text>教研室活动</text>
@@ -13,9 +13,38 @@
 					<view :class="current==1?yun:test"></view>
 				</view>
 			</view>
+		</view> -->
+
+
+		<view class="activeClass">
+			<view class="classBox" @click="gotoDetail" :data-all="item" v-for="(item,index) in classList" :key="index">
+
+				<view class="classLeft">
+					<!-- <view class="class_Img"> -->
+					<image :src="item.pic" mode="aspectFill"></image>
+					<!-- </view> -->
+
+					<view class="class_Text">
+						<view class="text_Title">
+							<text class="manage">类型</text>
+							<text class="wenzi">{{ item.acName }}</text>
+						</view>
+						<view class="text_Intro">
+							<text>{{ item.brief }}</text>
+						</view>
+						
+						<view class="classright">
+							<image src="https://teacherapi.cocorobo.cn/teaching-file/static/dingyue_blue.png" mode="aspectFill" @click.stop="sub" :data-e="item"></image>
+						</view>
+					</view>
+
+				</view>
+
+			</view>
 		</view>
 
-		<swiper class="scroll-view-height" @change="swipeIndex" :current="current" :duration="300">
+
+		<!-- <swiper class="scroll-view-height" @change="swipeIndex" :current="current" :duration="300">
 			<swiper-item>
 				<scroll-view scroll-y="true" style="height: 80vh;">
 					<view class="activeClass">
@@ -37,8 +66,8 @@
 								</view>
 							</view>
 							<view class="classright">
-								<!-- <image src="../../static/mine/Union.png" mode="aspectFill"></image> -->
-								<image src="../../static/mine/Union.png" mode="aspectFill" @click="sub" :data-e="item"></image>
+								<image src="https://teacherapi.cocorobo.cn/teaching-file/static/dingyue_blue.png"
+									mode="aspectFill" @click="sub" :data-e="item"></image>
 
 							</view>
 						</view>
@@ -50,7 +79,8 @@
 			<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="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>
@@ -66,13 +96,14 @@
 								</view>
 							</view>
 							<view class="classright">
-								<image src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/Union.png" mode=""></image>
+								<image src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/Union.png"
+									mode=""></image>
 							</view>
 						</view>
 					</view>
 				</scroll-view>
 			</swiper-item>
-		</swiper>
+		</swiper> -->
 	</view>
 </template>
 
@@ -94,58 +125,9 @@
 				test: 'test',
 				yun: 'yun',
 				subArr: [],
-				classList: [
-					// {
-					// 	img: "https://teacherapi.cocorobo.cn/teaching-file/static//img/1695656271245-image.png",
-					// 	className: "丽湖职教双创教育国际虚拟教研室启动大会暨双创教育国际论坛圆满举行",
-					// 	intro: "丽湖职教双创教育国际虚拟教研室为立足全国,辐射海外的国际化教研室,围绕创新创业教育的人才培养与课程建设开展深度研究。教研室以贯彻落实立德树人根本任务,通过加强跨专业、跨校、跨地域的教研交流,推动高校协同打造国际化的精品教学资",
-					// },
-					// {
-					// 	img: "https://teacherapi.cocorobo.cn/teaching-file/static//img/img1.png",
-					// 	className: "丽湖职教双创教育国际虚拟教研室2023年常规教研活动安排",
-					// 	intro: "丽湖职教双创教育国际虚拟教研室为立足全国,辐射海外的国际化教研室,围绕创新创业教育的人才培养与课程建设开展深度研究。教研室以贯彻落实立德树人根本任务,通过加强跨专业、跨校、跨地域的教研交流,推动高校协同打造国际化的精品教学资",
-					// },
-					// {
-					// 	img: "https://teacherapi.cocorobo.cn/teaching-file/static//img/img3.png",
-					// 	className: "产教融合情境下的双创通识课程建设 | 丽湖职教双创教育国际虚拟教研室常规教研活动第2期顺利举行",
-					// 	intro: "【图片】为提升职业院校双创课程建设水平,促进双创课程的改革与发展,丽湖职教双创教育国际虚拟教研室于3月29日组织举办了以“产教融合情境下的双创通识课程建设”为主题的第2期线上教研活动,来自全国各职业院校的60多位教师参会。本",
-					// },
-					// {
-					// 	img: "https://teacherapi.cocorobo.cn/teaching-file/static//yym/83b48be81d4ed9c93908737496f2a54.png",
-					// 	className: "丽湖职教双创教育国际虚拟教研室 • 常规教研活动 第9期",
-					// 	intro: "丽湖职教双创教育国际虚拟教研室 • 常规教研活动 第9期:主题为创新创业在线课程建设与运营。【图片】【图片】【图片】【图片】【图片】"
-					// },
-				],
-				activeList: [
-					{
-						img: "https://teacherapi.cocorobo.cn/teaching-file/static//img/img1.png",
-						count: "17",
-						price: "188",
-						className: "丽湖职教双创教育国际虚拟教研室2023年常规教研活动安排",
-						intro: "丽湖职教双创教育国际虚拟教研室为立足全国,辐射海外的国际化教研室,围绕创新创业教育的人才培养与课程建设开展深度研究。教研室以贯彻落实立德树人根本任务,通过加强跨专业、跨校、跨地域的教研交流,推动高校协同打造国际化的精品教学资",
-					},
-					{
-						img: "https://teacherapi.cocorobo.cn/teaching-file/static//img/img2.png",
-						count: "6",
-						price: "188",
-						className: "赛创融合、协同育人—高职院校双创大赛赛事组织| 丽湖职教双创教育国际虚拟教研室常规教研活动第3期顺利举",
-						intro: " 为全面落实双创教育“以赛促教、以赛促学、以赛促创”,提升学校双创大赛的组织效果和参赛成绩,促进更多教育成果落地,实现赛创融合育人的目标,丽湖职教双创教育国际虚拟教研室于4月26日组织举办了第3期线上教研活动,活动主题为“赛",
-					},
-					{
-						img: "https://teacherapi.cocorobo.cn/teaching-file/static//img/img3.png",
-						count: "1",
-						price: "188",
-						className: "产教融合情境下的双创通识课程建设 | 丽湖职教双创教育国际虚拟教研室常规教研活动第2期顺利举行",
-						intro: "【图片】为提升职业院校双创课程建设水平,促进双创课程的改革与发展,丽湖职教双创教育国际虚拟教研室于3月29日组织举办了以“产教融合情境下的双创通识课程建设”为主题的第2期线上教研活动,来自全国各职业院校的60多位教师参会。本",
-					},
-					{
-						img: "https://teacherapi.cocorobo.cn/teaching-file/static//img/img4.png",
-						count: "0",
-						price: "188",
-						className: "打造双创“金课” | 丽湖职教双创教育国际虚拟教研室常规教研活动第1期顺利举行",
-						intro: "为推动高职院校双创课程建设,打造更多的双创精品课程和金课,丽湖职教双创教育国际虚拟教研室于2月22日组织举办了以“如何打造高职双创金课”为主题的第1期教研活动,来自全国各高职院校的80多位教师参会。本次活动由",
-					},
-				],
+				// 渲染列表
+				classList: [],
+				activeList: [],
 			};
 		},
 		computed: {
@@ -157,50 +139,76 @@
 		},
 		methods: {
 			getData() {
+				console.log(111);
 				let data = {
 					oid: this.$store.state.user.openid, //用户id
+					type: 1
 				}
-				this.$request('/selectSub', 'POST', data).then(res => {
-					this.subArr = JSON.parse(res[0][0].sub)
-					// console.log(this.collArr);
-					// let a=this.collArr.join(', ');
-					// return console.log({a});
-					let data = {
-						oid: this.$store.state.user.openid, //用户id
-						list: this.subArr
-					}
-					// return console.log(data);
-					this.$request('/selectSubList', 'POST', data).then(res => {
-						console.log("要渲染的数据",res);
-						// this.collArr=res[0]
-						this.classList = res[0]
-					})
+				this.$request('/selectOperator', 'POST', data).then(res => {
+					console.log('获取订阅', res);
+					this.classList = res[0]
 				})
+				// let data = {
+				// 	oid: this.$store.state.user.openid, //用户id
+				// }
+				// this.$request('/selectSub', 'POST', data).then(res => {
+				// 	this.subArr = JSON.parse(res[0][0].sub)
+				// 	// console.log(this.collArr);
+				// 	// let a=this.collArr.join(', ');
+				// 	// return console.log({a});
+				// 	let data = {
+				// 		oid: this.$store.state.user.openid, //用户id
+				// 		list: this.subArr
+				// 	}
+				// 	// return console.log(data);
+				// 	this.$request('/selectSubList', 'POST', data).then(res => {
+				// 		// console.log("要渲染的数据", res);
+				// 		// this.collArr=res[0]
+				// 		this.classList = res[0]
+				// 		// console.log(this.classList);
+				// 	})
+				// })
 			},
 			// 这里获取的活动肯定是已订阅的,就不用判断直接删除就可以了
-			sub(event){
-				console.log(this.$store.state.user.openid);
-				let aId=event.currentTarget.dataset.e.acId
-				// 先获取用户订阅信息
-				let data={
-					oid:this.$store.state.user.openid, //用户id
+			sub(event) {
+				let aId = event.currentTarget.dataset.e.acId
+				
+				let data = {
+					acid: aId,
+					oid: this.$store.state.user.openid, //用户id
+					ty: 1
 				}
 				
-				this.$request('/selectSub','POST',data).then(res=>{
-					
-					let subs=JSON.parse(res[0][0].sub)
-					
-					// 把未取消订阅的数据提取出来
-					const newArray = subs.filter(item => item !== aId);
-					let arr3={
-						oid:this.$store.state.user.openid, //用户id
-						acid:JSON.stringify(newArray) 
-					}
-					this.$request('/updateSub','POST',arr3).then(res=>{
-						// 删除后重新获取数据进行渲染
-						this.getData()
-					})
+				this.$request('/deleteOperator', 'POST', data).then(res => {
+					console.log(res);
+					this.getData()
 				})
+				// let aId = event.currentTarget.dataset.e.acId
+				// // 先获取用户订阅信息
+				// let data = {
+				// 	oid: this.$store.state.user.openid, //用户id
+				// }
+
+				// this.$request('/selectSub', 'POST', data).then(res => {
+
+				// 	let subs = JSON.parse(res[0][0].sub)
+
+				// 	// 把未取消订阅的数据提取出来
+				// 	const newArray = subs.filter(item => item !== aId);
+				// 	let arr3 = {
+				// 		oid: this.$store.state.user.openid, //用户id
+				// 		acid: JSON.stringify(newArray)
+				// 	}
+				// 	this.$request('/updateSub', 'POST', arr3).then(res => {
+				// 		// 删除后重新获取数据进行渲染
+				// 		this.getData()
+				// 		uni.showToast({
+				// 			title: '已取消订阅',
+				// 			icon: 'error',
+				// 			duration: 1000
+				// 		})
+				// 	})
+				// })
 			},
 			swipeIndex(index) {
 				this.current = index.detail.current;
@@ -225,6 +233,19 @@
 					});
 				}
 			},
+			// 跳转详情页
+			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}`
+					});
+				}
+			},
 			gotoWeb_2(index) {
 				const urls = [
 					"https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1183",
@@ -360,18 +381,7 @@
 									}
 
 									&.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;
@@ -425,4 +435,110 @@
 			}
 		}
 	}
+
+	.activeClass {
+		width: 100%;
+
+		.classBox {
+			width: 100%;
+			display: flex;
+			justify-content: space-between;
+			background-color: #fff;
+			position: relative;
+			padding: 40rpx;
+
+			.classLeft {
+				display: flex;
+				justify-content: space-between;
+				height: 100%;
+				width: 100%;
+				image {
+					width: 120rpx;
+					height: 120rpx;
+					border-radius: 10rpx;
+				}
+
+				// }
+
+				.class_Text {
+					display: flex;
+					justify-content: space-between;
+					flex: 1;
+					flex-direction: column;
+					margin-left: 20rpx;
+					position: relative;
+					.text_Title {
+						display: flex;
+						// justify-content: center;
+						align-items: center;
+						// justify-content: space-between;
+						// width: 500rpx;
+						.manage {
+							border: 1px #00b2b6 solid;
+							font-size: 20rpx;
+							width: 64rpx;
+							display: flex;
+							height: 32rpx;
+							white-space: nowrap;
+							justify-content: center;
+							align-items: center;
+							border-radius: 5rpx;
+							margin-right: 10rpx;
+							color: #00b2b6;
+						}
+						.wenzi {
+							// width: 100%;
+							line-height: 32rpx;
+							flex: 1;
+							padding-right: 50rpx;
+							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;
+						}
+
+						
+
+					}
+					.text_Intro {
+						display: flex;
+						width: 100%;
+						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 {
+				height: 100%;
+				position: absolute;
+				top: 0;
+				right: 0;
+
+				image {
+					width: 38rpx;
+					height: 42rpx;
+				}
+			}
+		}
+	}
 </style>

+ 154 - 239
pages/publish/publish.vue

@@ -14,9 +14,6 @@
 					<view class="txt">
 						<textarea class="txtClass" value="" placeholder="请输入内容" v-model="activityintro" />
 					</view>
-					<!-- <uni-file-picker :v-model="imageValue" fileMediatype="image" file-extname="png,jpg,jpeg"
-						@select="select" @success="success" limit="1"> -->
-					<!-- 上传图片 -->
 
 					<view class="pic" @click="uploadPic">
 						<view class="picCont">
@@ -34,14 +31,6 @@
 							<image :src="imageValue" mode="aspectFill"></image>
 						</view>
 					</view>
-					<!-- <view class="pic_show">
-						<image :src="imageValue" mode="aspectFill"></image>
-					</view> -->
-
-					<!-- </uni-file-picker> -->
-
-					<!-- <beUpload @getFile="getFile" :navName="'上传文件'" :accept="accept" :progress="progress"></beUpload> -->
-
 
 				</view>
 			</view>
@@ -61,7 +50,8 @@
 								<view class="input_details">
 									<view class="details">
 										<view class="uni-input text">
-											{{classifyList[index]==null?'请选择':classifyList[index]}}</view>
+											{{classifyList[index]==null?'请选择':classifyList[index]}}
+										</view>
 									</view>
 									<view class="arrow">
 										<image
@@ -268,7 +258,7 @@
 
 		<view class="" style="height: 10vh;width: 750rpx;position: relative;">
 			<view class="publish_now">
-				<button class="btn" @click="submitForm">{{ btntext }}</button>
+				<button class="btn" @click="submitForm">{{ isedit?'立即修改':'立即上传' }}</button>
 			</view>
 		</view>
 
@@ -278,11 +268,12 @@
 			<view class="popup-container" v-show="showPopup">
 				<view class="popup">
 					<view class="header">
-						<text>确认{{ poptext }}</text>
+						<text>确认{{ isedit?'修改':'上传' }}</text>
 					</view>
 					<view class="footer">
-						<button class="cancel-btn" @click="closePopup">取消</button>
-						<button class="confirm-btn" @click="conf">确认</button>
+						<view class="cancel-btn" @click="closePopup">取消</view>
+						<view class="confirm-btn" v-if="isedit" @click="editPublish">确认</view>
+						<view class="confirm-btn" v-else @click="conf">确认</view>
 					</view>
 				</view>
 			</view>
@@ -295,11 +286,9 @@
 					<view class="header" style="margin-top: 15px;">
 						<image src="https://teacherapi.cocorobo.cn/teaching-file/static//gou1.png" mode="aspectFill">
 						</image>
-						<text style="margin-bottom: 24px;">{{ poptext }}成功</text>
+						<text style="margin-bottom: 24px;">{{ isedit?'修改':'上传' }}成功</text>
 					</view>
-					<!-- <view class="footer" style="padding-top: 0px;">
-						<button class="confirm-btn_2" @click="closePopup">确认</button>
-					</view> -->
+
 				</view>
 			</view>
 		</view>
@@ -323,48 +312,58 @@
 				mode: 'range',
 				//控制弹窗
 				showPopup: false,
+				// 成功弹窗
 				showPopupConfirm: false,
 				isFirstShow: true,
 				//按钮文本
-				btntext: '立即发布',
+				// btntext: '立即发布',
 				// 弹窗文本
-				poptext: '发布',
+				// poptext: '发布',
 				//acId
 				acId: '',
-				// 标题
+
+				// 上传标题
 				activitytitle: '',
-				// 内容
+				// 上传内容
 				activityintro: '',
-				// 图片
-				pic: 'https://teacherapi.cocorobo.cn/teaching-file/static//publish/photo.png',
+				// 上传图片
 				imageValue: '',
-
-				// 分类
-				classifyList: ['直播活动', '常规教研活动', '专题教研活动', '推荐课程'],
-				// index判断选择分类  0       1                   2         3   ,对应上面
+				// index判断选择分类  0 直播活动      1 常规教研活动    2 专题教研活动  3 推荐课程  ,对应上面
 				index: null,
-				classify: '请选择',
-
 				// 人数
 				recruitment: '',
-
-				// 活动形式
-				activityformList: ['户外活动', 'xxxx', 'xxxx'],
-				activityform: '请选择',
-
-				// 活动地址
-				addressList: ['深圳xxxx大学', '深圳xxxx大学', '深圳xxxx大学'],
-				address: '请选择',
 				// 活动费用
 				funds: '',
+				
+
+				// 活动地址选项
+				addressList: ['深圳××学院', '××××××××', '××××××', '××××××', '××××××'],
+				// 分类选项
+				classifyList: ['直播活动', '活动推荐', '精选活动', '教研室活动'],
+				// classifyList: ['直播活动', '常规教研活动', '专题教研活动'],
+				// 活动形式选项
+				activityformList: ['户外活动', '室内活动', '社会活动'],
+				// 默认图片
+				pic: 'https://teacherapi.cocorobo.cn/teaching-file/static//publish/photo.png',
+				// 默认分类
+				classify: '请选择',
+				// 默认活动形式
+				activityform: '请选择',
+				// 默认活动地址
+				address: '请选择',
+
 
 
 				// activityDate: currentDate,
+				// 活动时间默认显示
 				activityDate: '请选择',
+				// 报名截止默认显示
 				deadlineDate: '请选择',
-				activeList: [],
+				// activeList: [],
 				formData: {},
 
+				// 上传和修改共用一个页面,为true修改 为false上传
+				isedit: false
 
 			};
 		},
@@ -378,104 +377,20 @@
 		},
 		methods: {
 			confirm(e) {
-				console.log(e);
-				console.log(e[0], e[e.length - 1]);
+				// console.log(e);
+				// console.log(e[0], e[e.length - 1]);
 				this.activityDate = e[0] + '~' + e[e.length - 1]
 				this.show = false
 			},
 
-			editPublish() {
-				const routes = getCurrentPages()
-				console.log(routes);
-				if (routes.length == 3) {
-					const acId = routes[2].options.acId
-					const type = routes[2].options.ty
-					if (acId) {
-						this.navBarData.title = '修改发布'
-						this.btntext = '修改发布'
-						this.poptext = '修改'
-						console.log(acId);
-						console.log(type);
-						let data = {
-							acId: acId,
-							ty: type
-						}
-						this.$request('/selectActivityID', "POST", data).then(res => {
-							console.log(res[0]);
-							// this.actItemList = res[0]
-							const item = res[0][0]
-							this.acId = item.acId
-							this.activitytitle = item.acName
-							this.activityintro = item.brief
-							this.imageValue = item.pic
-							this.index = item.type
-							this.recruitment = item.pers
-							this.activityform = item.acshape
-							this.address = item.address
-							this.funds = item.cost
-							this.activityDate = item.begin_at
-							this.deadlineDate = item.endTime
-
-							if (this.classify == 0) {
-								this.classify = "直播活动"
-							} else if (this.classify == 1) {
-								this.classify = "常规教研活动"
-							} else {
-								this.classify = "专题教研活动"
-							}
-						})
-					}
-				}
-			},
+
+			// 上传按钮进行判断必填
 			submitForm() {
-				//判断表单内容是否完整
-				const conditions = [
-					// 添加提示信息
-					{
-						value: this.activitytitle,
-						message: '请填写活动标题'
-					},
-					{
-						value: this.activityintro,
-						message: '请填写活动内容'
-					},
-					{
-						value: this.index,
-						message: '请填写活动分类'
-					},
-					{
-						value: this.recruitment,
-						message: '请填写招募人数'
-					},
-					{
-						value: this.address,
-						message: '请填写活动地址'
-					},
-					{
-						value: this.activityDate,
-						message: '请填写活动时间'
-					},
-				];
-				for (const condition of conditions) {
-					if (!condition.value || condition.value === '请选择') {
-						uni.showToast({
-							title: condition.message,
-							icon: 'none'
-						});
-						return;
-					}
-				}
+				if (!this.activitytitle || this.activitytitle == null) return uni.showToast({title: '请填写标题',icon: 'none'})
+				if (!this.activityintro || this.activityintro == null) return uni.showToast({title: '请填写内容',icon: 'none'})
+				if (!this.imageValue || this.imageValue == null) return uni.showToast({title: '请添加图片',icon: 'none'})
+				if (!this.index && this.index == null) return uni.showToast({title: '请选择分类',icon: 'none'})
 
-				//判断没有填写的表单内容是否填写,如果没有替换
-				if (
-					this.imageValue == '' ||
-					this.activityform === '请选择' ||
-					this.funds === '请选择'
-				) {
-					this.imageValue = 'https://teacherapi.cocorobo.cn/teaching-file/static//zanwu_img.png'
-					this.activityform = '暂无'
-					this.funds = '暂无'
-				}
 				this.showPopup = true; //显示弹窗
 
 			},
@@ -483,84 +398,75 @@
 				// 取消操作
 				this.showPopup = false;
 				this.showPopupConfirm = false;
-				uni.switchTab({
-					url: '/pages/activityPage/activityPage'
-				})
+				
 			},
-			//清空发布里的内容
-			contentClear() {
-				this.activitytitle = ''
-				this.activityintro = ''
-				this.imageValue = ''
-				this.index = null
-				this.recruitment = ''
-				this.activityform = '请选择'
-				this.address = '请选择'
-				this.funds = ''
-				this.activityDate = '请选择'
-				this.deadlineDate = '请选择'
-			},
-			// 上传发布
+			// 上传活动
 			conf() {
-
 				this.formData = {
 					// id: this.$store.state.user.openid,
-					id: this.btntext === '修改发布' ? this.acId : this.$store.state.user.openid,
+					id:this.$store.state.user.openid,
 					activitytitle: this.activitytitle,
 					activityintro: this.activityintro,
 					img: this.imageValue,
 					recruitment: this.recruitment,
-					activityform: this.activityform,
-					address: this.address,
+					activityform: this.activityform=='请选择'?'-':this.activityform,
+					address: this.address=='请选择'?'-':this.address,
 					classify: this.index,
-					activityDate: this.activityDate,
-					deadlineDate: this.deadlineDate,
+					activityDate: this.activityDate=='请选择'?'-':this.activityDate,
+					deadlineDate: this.deadlineDate=='请选择'?'-':this.deadlineDate,
 					funds: this.funds
 				};
-
 				this.showPopup = false;
 				this.showPopupConfirm = true
-				// return console.log(formData);
-				console.log(this.btntext);
-
-
-
-				if (this.btntext === '修改发布') {
-					// formData.acId = this.acId
-					// console.log(formData);
-					this.$request('/updateMyPublish', 'POST', this.formData).then(res => {
-						console.log(res);
-						this.contentClear()
+				
+				this.$request('/insertActive', 'POST', this.formData).then(res => {
+					// console.log(res.data);
+					// if (res.code == 200) {
+						setTimeout(() => {
+							uni.switchTab({
+								url: '/pages/activityPage/activityPage'
+							})
+							this.isedit=true
+							uni.removeStorageSync('formData');
+						}, 2000)
+					// }
+				})
+			},
+			// 修改上传
+			editPublish() {
+					let data={
+						id: this.acId,
+						tit: this.activitytitle,
+						intro: this.activityintro,
+						img: this.imageValue,
+						per: this.recruitment,
+						activityform: this.activityform,
+						address: this.address,
+						ty: this.index,
+						activityDate: this.activityDate,
+						deadlineDate: this.deadlineDate,
+						funds: this.funds
+					}
+					this.showPopupConfirm = true
+					
+					// return console.log(data);				
+					this.$request('/updateMyPublish', 'POST', data).then(res => {
+						// console.log(res);
 						setTimeout(() => {
 							uni.navigateBack();
-						}, 500)
+						}, 1000)
+				
 					})
-				} else {
-					this.$request('/insertActive', 'POST', this.formData).then(res => {
-						console.log(res.data);
-						if (res.code == 200) {
-							this.contentClear()
-							setTimeout(() => {
-								uni.switchTab({
-									url: '/pages/activityPage/activityPage'
-								})
-							}, 2000)
-						}
-					})
-				}
-
 			},
+			// 选择分类
 			handelclassify(e) {
-				// console.log(e);
-
 				this.index = e.detail.value
-				console.log(this.index);
-				// this.classify = this.classifyList[e.detail.value]
-				// console.log(this.classify);
 			},
+			//选择活动形式
 			handelActivityform(e) {
 				this.activityform = this.activityformList[e.detail.value]
 			},
+			// 选择活动地址
 			handeladdress(e) {
 				this.address = this.addressList[e.detail.value]
 			},
@@ -593,12 +499,10 @@
 					sourceType: ['album', 'camera'], //从相册选择或者拍照
 					success: (res) => {
 						const tempFilePaths = res.tempFilePaths[0];
-						console.log(this);
+						// console.log(this);
 						let that = this
 						const uploadTask = uni.uploadFile({
 							url: 'http://139.159.246.165:7006/img', // post请求地址
-							// url: 'https://cxcy.ssti.net.cn/api/UploadFirmFile', // post请求地址
-							// filePath: tempFilePaths,
 							filePath: tempFilePaths,
 							name: 'file', // 待确认
 							header: {
@@ -606,10 +510,7 @@
 								// 'Content-Type': 'multipart/form-data',
 							},
 							success: function(res) {
-								// console.log(res.data);
 								that.imageValue = res.data
-								// let url = JSON.parse(res.data)
-								// console.log(url.data);
 							},
 							fail: function(uploadFileFail) {
 								console.log('Error:', uploadFileFail.data);
@@ -624,29 +525,48 @@
 
 			},
 		},
-		onShow() {
-			if (this.isFirstShow) {
-				this.editPublish()
-				this.isFirstShow = false
+		onLoad(e) {
+			console.log('获取参数', e);
+			if (e.acId) {
+				let data = {
+					oid: this.$store.state.user.openid,
+					aid: e.acId
+				}
+				this.$request('/selectAmendAct', 'POST', data).then(res => {
+					// console.log(res[0][0]);
+					let item = res[0][0]
+					this.acId = item.acId
+					this.activitytitle = item.acName
+					this.activityintro = item.brief
+					this.imageValue = item.pic
+					this.index = item.type
+					this.recruitment = item.pers
+					this.activityform = item.acshape
+					this.address = item.address
+					this.funds = item.cost
+					this.activityDate = item.begin_at
+					this.deadlineDate = item.endTime
+				})
+				this.isedit = true
 			}
-
-			this.formData = this.$store.state.formData
-			if (this.btntext !== '修改发布') {
-				let data = uni.getStorageSync('formData')
-				console.log(data);
-				this.activitytitle = data.activitytitle
-				this.activityintro = data.activityintro
-				this.imageValue = data.imageValue
-				this.index = data.classify
-				this.recruitment = data.recruitment
-				this.activityform = data.activityform
-				this.address = data.address
-				this.funds = data.funds
-				this.activityDate = data.activityDate
-				this.deadlineDate = data.deadlineDate
+			// console.log(uni.getStorageSync('formData'));
+			// 获取缓存里面的数据
+			let setAll=uni.getStorageSync('formData')
+			if(setAll){
+				this.activitytitle = setAll.activitytitle
+				this.activityintro = setAll.activityintro
+				this.imageValue = setAll.imageValue
+				this.index = setAll.classify
+				this.recruitment = setAll.recruitment
+				this.activityform = setAll.activityform
+				this.address = setAll.address
+				this.funds = setAll.funds
+				this.activityDate = setAll.activityDate
+				this.deadlineDate = setAll.deadlineDate
 			}
+				
+			
 
-			console.log(this.index);
 		},
 		beforeDestroy() {
 			// 在组件销毁之前保存表单数据到 Vuex 中
@@ -662,12 +582,10 @@
 				activityDate: this.activityDate,
 				deadlineDate: this.deadlineDate
 			}
-			if (this.btntext !== '修改发布') {
+			if (!this.isedit) {
 				uni.setStorageSync('formData', data)
 			}
-			// this.$store.commit('saveformData', this.formData);
-			// console.log('Submitted formData:', this.formData);
-			// console.log('Current state.formData:', this.$store.state.formData);
+
 		},
 	}
 </script>
@@ -890,6 +808,7 @@
 			height: 100%;
 			background-color: rgba(0, 0, 0, 0.3);
 			z-index: 999;
+			overflow: hidden;
 			// display: none;
 		}
 
@@ -910,6 +829,7 @@
 				flex-direction: column;
 				background-color: #fff;
 				border-radius: 16rpx;
+				overflow: hidden;
 
 				.header {
 					flex: 1;
@@ -930,48 +850,43 @@
 				}
 
 				.footer {
-					flex: 1;
+					width: 100%;
 					display: flex;
-					justify-content: space-around;
-					align-items: end;
-					padding-top: 17px;
+					overflow: hidden;
 
 					.cancel-btn {
-						width: 259rpx;
+						width: 50%;
 						height: 100rpx;
 						background-color: #F7F7F7;
 						color: #000;
 						font-size: 34rpx;
 						text-align: center;
-						border-radius: 0;
 						border-bottom-left-radius: 16rpx;
 						line-height: 50px;
 					}
 
 					.confirm-btn {
-						width: 259rpx;
+						width: 50%;
 						height: 100rpx;
 						background-color: #0081FE;
 						color: #fff;
 						font-size: 34rpx;
 						text-align: center;
-						border-radius: 0;
-						border-bottom-right-radius: 16rpx;
 						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;
-					}
+					// .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;
+					// }
 				}
 			}
 		}

+ 115 - 69
pages/resource/resource.vue

@@ -10,13 +10,15 @@
 			<view class="left" @click="phoneLogin" :class="current == 0 ? info1 : info2">
 				<text class="">资源库</text>
 				<view v-if="current == 0" class="yun">
-					<image src="https://teacherapi.cocorobo.cn/teaching-file/static//yym/Ellipse 10.png" mode="aspectFill"></image>
+					<image src="https://teacherapi.cocorobo.cn/teaching-file/static//yym/Ellipse 10.png"
+						mode="aspectFill"></image>
 				</view>
 			</view>
 			<view class="right" @click="accountLogin" :class="current == 1 ? info1 : info2">
 				<text class="">精品慕课</text>
 				<view v-if="current == 1" class="yun">
-					<image src="https://teacherapi.cocorobo.cn/teaching-file/static//yym/Ellipse 10.png" mode="aspectFill"></image>
+					<image src="https://teacherapi.cocorobo.cn/teaching-file/static//yym/Ellipse 10.png"
+						mode="aspectFill"></image>
 				</view>
 			</view>
 		</view>
@@ -26,8 +28,8 @@
 			<swiper-item>
 				<scroll-view scroll-y="true" :style="{ height: swiper + 'px' }">
 					<view class="contBox">
-						<view class="cont" @click="gotozyk(index)" v-for="(item, index) in filteredClassList"
-							:index="index" :key="index">
+						<view class="cont" @click="gotozyk" v-for="(item, index) in filteredClassList" :index="index"
+							:key="index" :data-reId="item.goto">
 							<image class="image" :src="item.url" mode="aspectFill" />
 							<view class="tit btn-font">{{ item.className }}</view>
 							<view class="teacher fz-font">主讲教师:{{ item.th_name }}</view>
@@ -39,8 +41,8 @@
 			<swiper-item>
 				<scroll-view scroll-y="true" :style="{ height: swiper + 'px' }">
 					<view class="contBox">
-						<view class="cont" @click="gotoWeb(index)" v-for="(item, index) in filteredClassList2"
-							:index="index" :key="index">
+						<view class="cont" @click="gotoWeb" v-for="(item, index) in filteredClassList2" :index="index"
+							:key="index" :data-kid="item.goto">
 							<image class="image" :src="item.url" mode="aspectFill" />
 							<view class="tit btn-font">{{ item.className }}</view>
 							<view class="teacher fz-font">主讲教师:{{ item.th_name }}</view>
@@ -65,145 +67,185 @@
 				info2: "info2",
 				swiper: 0,
 				searchText: "", // 搜索文本
+
 				classList: [{
 						url: "https://teacherapi.cocorobo.cn/teaching-file/static//pubic/img5.jpg",
 						className: "创新思维",
+						goto: "https://zyk.icve.com.cn/courseDetailed?id=efajaxyn4p1fahmj-32xng",
 						th_name: "吴伟",
 					},
 					{
 						url: "https://teacherapi.cocorobo.cn/teaching-file/static//img/sc.jpg",
 						className: "商机识别与创业营销 ",
+						goto: "https://zyk.icve.com.cn/courseDetailed?id=bxmpaiwpzrjixvfpvdzj7w ",
 						th_name: "明照凤 ",
 					},
 					{
 						url: "https://teacherapi.cocorobo.cn/teaching-file/static//img/sg.jpg",
 						className: "双创生态圈构建 ",
+						goto: "https://zyk.icve.com.cn/courseDetailed?id=ewvaiwparxiamjafg03aa ",
 						th_name: "徐文泽",
 					},
 					{
 						url: "https://teacherapi.cocorobo.cn/teaching-file/static//img/cy.jpg",
 						className: "创业基础 ",
+						goto: "https://zyk.icve.com.cn/courseDetailed?id=f-enaxunb7ngggksdm0ivq",
 						th_name: "杨哲旗",
 					},
 					{
 						url: "https://teacherapi.cocorobo.cn/teaching-file/static//img/ks.png",
 						className: "跨界产品研发实战 ",
+						goto: "https://zyk.icve.com.cn/courseDetailed?id=fjioasmspopfnyo0l7d2a",
 						th_name: "王程程",
 					},
 					{
 						url: "https://teacherapi.cocorobo.cn/teaching-file/static//img/cs.jpg",
 						className: "创造性思维与创新方法训练 ",
+						goto: "https://zyk.icve.com.cn/courseDetailed?id=inanarowyjhlw5vrlnrchw",
 						th_name: "申珊珊",
 					},
 					{
 						url: "https://teacherapi.cocorobo.cn/teaching-file/static//img/hs.jpg",
 						className: "行业创业实践 ",
+						goto: "https://zyk.icve.com.cn/courseDetailed?id=jkwpajcprqdgz4dlumimza",
 						th_name: "陆亚文",
 					},
 					{
 						url: "https://teacherapi.cocorobo.cn/teaching-file/static//img/cx.png",
 						className: "创新方法与训练 ",
+						goto: "https://zyk.icve.com.cn/courseDetailed?id=klaqaycnir9cklu4y8yaia",
 						th_name: "张梦龙",
 					},
 				],
+
+
+
+
+
+
+
+
+
+
+
 				classList2: [{
 						url: "https://teacherapi.cocorobo.cn/teaching-file/static//img/ydjk.png",
 						className: "运动与健康",
+						goto: "https://www.xuetangx.com/course/HUBU10011000132/16906642?channel=i.area.course_list_all",
 						th_name: "代方梅 史文文 等",
 					},
 					{
 						url: "https://teacherapi.cocorobo.cn/teaching-file/static//img/shyy.png",
 						className: "生活英语听说",
+						goto: "https://www.xuetangx.com/course/THU05021000376?channel=i.area.course_list_all",
 						th_name: "杨芳 张文霞",
 					},
 					{
 						url: "https://teacherapi.cocorobo.cn/teaching-file/static//img/yyll.jpg",
 						className: "科研伦理与学术规范",
+						goto: "https://www.xuetangx.com/course/BNU03031000037/16905009?channel=i.area.course_list_all",
 						th_name: "印波",
 					},
 					{
 						url: "https://teacherapi.cocorobo.cn/teaching-file/static//img/kylw.png",
 						className: "如何写好科研论文",
+						goto: "https://www.xuetangx.com/course/THU04011000365/16906220?channel=i.area.course_list_all",
 						th_name: "高飞飞 张靖 等",
 					},
 					{
 						url: "https://teacherapi.cocorobo.cn/teaching-file/static//img/Cardimg-1.jpg",
 						className: "中国共产党与中华民族伟大复兴",
-						th_name: "杜玉芳",
+						goto: "https://www.xuetangx.com/course/zysy06011001641?channel=i.area.course_list_all",
+						th_name: "杜玉芳"
 					},
 					{
 						url: "https://teacherapi.cocorobo.cn/teaching-file/static//img/Cardimg-2.jpg",
 						className: "大国航母与舰载机",
+						goto: "https://www.xuetangx.com/course/NAU08091000091/16904996?channel=i.area.course_list_all",
 						th_name: "岳奎志 郭卫刚 等",
 					},
 					{
 						url: "https://teacherapi.cocorobo.cn/teaching-file/static//img/Cardimg-4.jpg",
 						className: "体育与社会",
+						goto: "https://www.xuetangx.com/course/Wuhanty04021002450/16906830?channel=i.area.course_list_all",
 						th_name: "张德胜 李菁 等",
 					},
 					{
 						url: "https://teacherapi.cocorobo.cn/teaching-file/static//img/Cardimg-5.png",
 						className: "公共管理学",
+						goto: "https://www.xuetangx.com/course/NUDT12041000081?channel=i.area.course_list_all",
 						th_name: "张学礼",
 					},
 					{
 						url: "https://teacherapi.cocorobo.cn/teaching-file/static//img/Cardimg-6.png",
 						className: "心理学概论",
-						th_name: "彭凯平",
+						goto: "https://www.xuetangx.com/course/THU07111000416/16905032?channel=i.area.course_list_all",
+						th_name: "彭凯平"
 					},
 					{
 						url: "https://teacherapi.cocorobo.cn/teaching-file/static//img/Cardimg-7.png",
 						className: "C++语言程序设计基础",
+						goto: "https://www.xuetangx.com/course/THU08091000247/16906211?channel=i.area.course_list_all",
 						th_name: "郑莉 李超 等",
 					},
 					{
 						url: "https://teacherapi.cocorobo.cn/teaching-file/static//img/Cardimg-8.png",
 						className: "《资治通鉴》导读",
+						goto: "https://www.xuetangx.com/course/THU03011000245/16905905?channel=i.area.course_list_all",
 						th_name: "张国刚",
 					},
 					{
 						url: "https://teacherapi.cocorobo.cn/teaching-file/static//img/Cardimg-9.png",
 						className: "军事理论",
+						goto: "https://www.xuetangx.com/course/NDU00001001710?channel=i.area.course_list_all",
 						th_name: "徐焰杜 文龙 等",
 					},
 					{
 						url: "https://teacherapi.cocorobo.cn/teaching-file/static//img/Cardimg-10.png",
 						className: "数据结构(上)",
+						goto: "https://www.xuetangx.com/course/THU08091000384/16906679?channel=i.area.course_list_all",
 						th_name: "邓俊辉",
 					},
 					{
 						url: "https://teacherapi.cocorobo.cn/teaching-file/static//img/Cardimg-11.png",
 						className: "不朽的艺术:走进大师与经典",
+						goto: "https://www.xuetangx.com/course/THU13011000261/16904949?channel=i.area.course_list_all",
 						th_name: "肖鹰 孙晶",
 					},
 					{
 						url: "https://teacherapi.cocorobo.cn/teaching-file/static//img/Cardimg-12.jpg",
 						className: "中国近现代史纲要",
+						goto: "https://www.xuetangx.com/course/THU03051000444/16905083?channel=i.area.course_list_all",
 						th_name: "翁贺凯",
 					},
 					{
 						url: "https://teacherapi.cocorobo.cn/teaching-file/static//img/Cardimg-13.png",
 						className: "马克思主义基本原理",
+						goto: "https://www.xuetangx.com/course/THU03051000344/16906535?channel=i.area.course_list_all",
 						th_name: "刘震 刘恩至 等",
 					},
 					{
 						url: "https://teacherapi.cocorobo.cn/teaching-file/static//img/Cardimg-14.png",
 						className: "数据结构(下)",
-						th_name: "邓俊辉",
+						goto: "https://www.xuetangx.com/course/THU08091002048/16906478?channel=i.area.course_list_all",
+						th_name: "邓俊辉"
 					},
 					{
 						url: "https://teacherapi.cocorobo.cn/teaching-file/static//img/Cardimg-16.png",
 						className: "大学生心理健康",
+						goto: "https://www.xuetangx.com/course/THU07111000285/16905861?channel=i.area.course_list_all",
 						th_name: "李焰 刘丹 等",
 					},
 					{
 						url: "https://teacherapi.cocorobo.cn/teaching-file/static//img/Cardimg-17.png",
 						className: "财务分析与决策",
+						goto: "https://www.xuetangx.com/course/THU02031000264?channel=i.area.course_list_all",
 						th_name: "肖星",
 					},
 					{
 						url: "https://teacherapi.cocorobo.cn/teaching-file/static//img/Cardimg-15.png",
 						className: "习近平新时代中国特色社会主义思想",
+						goto: "https://www.xuetangx.com/course/THU03051000744/16905028?channel=i.area.course_list_all",
 						th_name: "胡鞍钢",
 					},
 				],
@@ -225,70 +267,75 @@
 			},
 		},
 		methods: {
-			gotoLogin() {
-				// uni.navigateTo({
-				// 	url: "/pages/login/login"
-				// })
-				const value = uni.getStorageSync("login");
-				if (value == 0) {
+		
+			gotozyk(e) {
+				const value = this.$store.state.user.openid;
+				if (value == '') {
 					uni.navigateTo({
-
-						url: "/pages/login/login",
+						url: "/pages/login_Wechat/login_Wechat",
 					});
+					return
 				}
+				let acid = e.currentTarget.dataset.reid
+				uni.navigateTo({
+					url: "/pages/skipone/skipone?url=" + encodeURIComponent(acid),
+				});
+				// 	const urls = [
+				// 		"https://zyk.icve.com.cn/courseDetailed?id=efajaxyn4p1fahmj-32xng",
+				// 		"https://zyk.icve.com.cn/courseDetailed?id=bxmpaiwpzrjixvfpvdzj7w ",
+				// 		"https://zyk.icve.com.cn/courseDetailed?id=ewvaiwparxiamjafg03aa ",
+				// 		"https://zyk.icve.com.cn/courseDetailed?id=f-enaxunb7ngggksdm0ivq",
+				// 		"https://zyk.icve.com.cn/courseDetailed?id=fjioasmspopfnyo0l7d2a",
+				// 		"https://zyk.icve.com.cn/courseDetailed?id=inanarowyjhlw5vrlnrchw",
+				// 		"https://zyk.icve.com.cn/courseDetailed?id=jkwpajcprqdgz4dlumimza",
+				// 		"https://zyk.icve.com.cn/courseDetailed?id=klaqaycnir9cklu4y8yaia"
+				// 	];
+
 			},
-			gotozyk(index) {
-				if (this.current === 0) {
-					const urls = [
-						"https://zyk.icve.com.cn/courseDetailed?id=efajaxyn4p1fahmj-32xng",
-						"https://zyk.icve.com.cn/courseDetailed?id=bxmpaiwpzrjixvfpvdzj7w ",
-						"https://zyk.icve.com.cn/courseDetailed?id=ewvaiwparxiamjafg03aa ",
-						"https://zyk.icve.com.cn/courseDetailed?id=f-enaxunb7ngggksdm0ivq",
-						"https://zyk.icve.com.cn/courseDetailed?id=fjioasmspopfnyo0l7d2a",
-						"https://zyk.icve.com.cn/courseDetailed?id=inanarowyjhlw5vrlnrchw",
-						"https://zyk.icve.com.cn/courseDetailed?id=jkwpajcprqdgz4dlumimza",
-						"https://zyk.icve.com.cn/courseDetailed?id=klaqaycnir9cklu4y8yaia"
-					];
-					if (index >= 0 && index < urls.length) {
-						const url = urls[index];
-						uni.navigateTo({
-							url: "/pages/skipone/skipone?url=" + encodeURIComponent(url),
-						});
-					}
-				}
-			},
-			gotoWeb(index) {
-				if (this.current === 1) {
-					const url_header = 'https://www.xuetangx.com/course'
-					const urls = [
-						"/HUBU10011000132/16906642?channel=i.area.course_list_all",
-						"/THU05021000376?channel=i.area.course_list_all",
-						"/BNU03031000037/16905009?channel=i.area.course_list_all",
-						"/THU04011000365/16906220?channel=i.area.course_list_all",
-						"/zysy06011001641?channel=i.area.course_list_all",
-						"/NAU08091000091/16904996?channel=i.area.course_list_all",
-						"/Wuhanty04021002450/16906830?channel=i.area.course_list_all",
-						"/NUDT12041000081?channel=i.area.course_list_all",
-						"/THU07111000416/16905032?channel=i.area.course_list_all",
-						"/THU08091000247/16906211?channel=i.area.course_list_all",
-						"/THU03011000245/16905905?channel=i.area.course_list_all",
-						"/NDU00001001710?channel=i.area.course_list_all",
-						"/THU08091000384/16906679?channel=i.area.course_list_all",
-						"/THU13011000261/16904949?channel=i.area.course_list_all",
-						"/THU03051000444/16905083?channel=i.area.course_list_all",
-						"/THU03051000344/16906535?channel=i.area.course_list_all",
-						"/THU08091002048/16906478?channel=i.area.course_list_all",
-						"/THU07111000285/16905861?channel=i.area.course_list_all",
-						"/THU02031000264?channel=i.area.course_list_all",
-						"/THU03051000744/16905028?channel=i.area.course_list_all"
-					];
-					if (index >= 0 && index < urls.length) {
-						const url = urls[index];
-						uni.navigateTo({
-							url: "/pages/skipone/skipone?url=" + url_header + encodeURIComponent(url),
-						});
-					}
+			gotoWeb(e) {
+				const value = this.$store.state.user.openid;
+				if (value == '') {
+					uni.navigateTo({
+						url: "/pages/login_Wechat/login_Wechat",
+					});
+					return
 				}
+				// return console.log('aaaaaa', e.currentTarget.dataset);
+				let acid = e.currentTarget.dataset.kid
+				uni.navigateTo({
+					url: "/pages/skipone/skipone?url=" + encodeURIComponent(acid),
+				});
+				// if (this.current === 1) {
+				// 	const url_header = 'https://www.xuetangx.com/course'
+				// 	const urls = [
+				// 		"/HUBU10011000132/16906642?channel=i.area.course_list_all",
+				// 		"/THU05021000376?channel=i.area.course_list_all",
+				// 		"/BNU03031000037/16905009?channel=i.area.course_list_all",
+				// 		"/THU04011000365/16906220?channel=i.area.course_list_all",
+				// 		"/zysy06011001641?channel=i.area.course_list_all",
+				// 		"/NAU08091000091/16904996?channel=i.area.course_list_all",
+				// 		"/Wuhanty04021002450/16906830?channel=i.area.course_list_all",
+				// 		"/NUDT12041000081?channel=i.area.course_list_all",
+				// 		"/THU07111000416/16905032?channel=i.area.course_list_all",
+				// 		"/THU08091000247/16906211?channel=i.area.course_list_all",
+				// 		"/THU03011000245/16905905?channel=i.area.course_list_all",
+				// 		"/NDU00001001710?channel=i.area.course_list_all",
+				// 		"/THU08091000384/16906679?channel=i.area.course_list_all",
+				// 		"/THU13011000261/16904949?channel=i.area.course_list_all",
+				// 		"/THU03051000444/16905083?channel=i.area.course_list_all",
+				// 		"/THU03051000344/16906535?channel=i.area.course_list_all",
+				// 		"/THU08091002048/16906478?channel=i.area.course_list_all",
+				// 		"/THU07111000285/16905861?channel=i.area.course_list_all",
+				// 		"/THU02031000264?channel=i.area.course_list_all",
+				// 		"/THU03051000744/16905028?channel=i.area.course_list_all"
+				// 	];
+				// 	if (index >= 0 && index < urls.length) {
+				// 		const url = urls[index];
+				// 		uni.navigateTo({
+				// 			url: "/pages/skipone/skipone?url=" + url_header + encodeURIComponent(url),
+				// 		});
+				// 	}
+				// }
 			},
 
 			toggleActive1() {
@@ -311,7 +358,6 @@
 				this.current = 1;
 			},
 		},
-		onReady() {},
 		onLoad() {
 			if (this.navheight) {
 				this.swiper = this.screenHeight - this.navheight - 140;

+ 4 - 4
pages/skipone/skipone.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="">
-		<web-view :src="url"></web-view>
+		<web-view :src="url1"></web-view>
 		<!-- <iframe :src="url" frameborder="0" style="width: 100%; height: 100vh;"></iframe> -->
 	</view>
 </template>
@@ -9,12 +9,12 @@
 	export default {
 		data() {
 			return {
-				url: ''
+				url1: ''
 			};
 		},
 		onLoad(options) {
-			// console.log(options);
-			this.url = decodeURIComponent(options.url);
+			console.log(options);
+			this.url1 = decodeURIComponent(options.url);
 		}
 	}
 </script>

+ 261 - 243
pages/teachingDetail/teachingDetail.vue

@@ -4,36 +4,37 @@
 		<statusBar :item="navbar"></statusBar>
 
 		<!-- 顶部 -->
-		<view class="backPic" v-for="(item,index) in actItemList" :key="index + 'a' ">
+		<view class="backPic">
 			<image src="https://teacherapi.cocorobo.cn/teaching-file/static//yym/Rectangle 40.png" mode="aspectFill">
 			</image>
 			<view class="card">
 				<view class="cardTop">
-					<view class="title three-font">{{ item.acName }}</view>
+					<view class="title three-font">{{ actItemList.acName }}</view>
 					<view class="icons">
 						<view class="icon" @click="coll">
-							<image :src="collArr.includes(item.acId) ? pic_coll2 : pic_coll "
+							<image :src="collArr.includes(actItemList.acId) ? pic_coll2 : pic_coll "
 								style="width: 42rpx;height: 42rpx;" mode="aspectFill"></image>
 						</view>
 						<view class="icon" @click="sub">
 							<image
-								:src="subArr.includes(item.acId) ? pic_sub2 : pic_sub "
+								:src="subArr.includes(actItemList.acId) ? pic_sub2 : pic_sub "
 								style="width: 38rpx;height: 42rpx;" mode="aspectFill"></image>
 						</view>
 					</view>
 				</view>
 				<view class="col fz-font">
-					成立日期:{{ item.create_at.split('T')[0] }}
+					成立日期:{{ actItemList.create_at}}
 				</view>
 				<view class="col fz-font">
-					人数:{{ item.pers }}
+					当前人数:{{ actItemList.pers }}/50
 				</view>
 				<view class="tag col">
-					<view class="fz-font">教研标签:</view>
+					<view class="fz-font tag">教研标签:</view>
+					
 					<view class="" style="display: flex;">
 						<view class="bqZ-font"
 							style="color: #00b2b6; border: 1px #00b2b6 solid;padding: 2rpx 10rpx;border-radius: 5rpx;font-weight: 600;">
-							{{ typetext }}
+							暂无
 						</view>
 					</view>
 				</view>
@@ -54,23 +55,48 @@
 
 		<!-- 教研室详情 -->
 		<view class="" style="padding: 0 30rpx;">
-			<detailBlock :actItemList='actItemList' :item="judge"></detailBlock>
+			<!-- <detailBlock :actItemList='actItemList' :item="judge"></detailBlock> -->
+			<view class="detailBlock">
+				<view class="tit fwb-font">教研室详情</view>
+				<view class="cont sZw-font">
+					会议时间:<text>{{ actItemList.begin_at }}</text>
+				</view>
+				<view class="cont sZw-font">
+					活动形式:<text style="color: #0056a8;">{{ actItemList.acshape }}</text>
+				</view>
+				<view class="cont sZw-font">
+					<!-- <view id="myElement" class="activeTit">
+						教研室概况:查看更多查看更多查看更多看更多查看更多查看更多查看更多查看更多查看更多查看更多查看更多看更多查看更多查看更多查看更多查看更多
+				   </view>
+					<text class="zdwz" style="color: #0056a8;float: right;" @click="zdwz">收起</text> -->
+					<view class="content">
+						<view ref="p" :class="getClassNames">
+							<text style="color: #999999;">教研室概况:</text>
+							{{actItemList.brief}}
+						</view>
+			
+						<view ref="btnnn" :class="getClassNames1" @click="qqq">
+							<!-- {{isAll ? '收起' : '展开'}} -->
+						</view>
+					</view>
+				</view>
+			</view>
 		</view>
 
 		<!-- 创建者用户名 -->
 		<view style="padding: 0 30rpx;">
-			<view class="creator" v-for="(item,index) in actItemList" :key="index + 'b' ">
+			<view class="creator">
 				<image
-					:src="item.avatar == null ? 'https://teacherapi.cocorobo.cn/teaching-file/static//mine/Avatar_default.png' : item.avatar"
+					:src="actItemList.avatar"
 					mode="aspectFill"></image>
 				<view class="creName btn-font">
-					{{ item.username }}
+					{{ actItemList.username }}
 				</view>
 			</view>
 		</view>
 
 		<!-- 当前成员 -->
-		<view style="padding: 0 30rpx; display: none;">
+		<!-- <view style="padding: 0 30rpx; display: none;">
 			<view class="member">
 				<view class="memberTop">
 					<view class="btn-font">当前成员</view>
@@ -79,31 +105,26 @@
 						<text>查看更多</text>
 						<image src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/arrow-right.png"
 							style="width: 32rpx;height: 32rpx;" mode="aspectFill"></image>
-						<!-- <uni-icons type="right"></uni-icons> -->
 					</view>
 				</view>
 
 				<view class="pers">
-					<!-- <view class="per" v-for="i in perNum">
-						<image :src="i.img"></image>
-						<view class="perName fz-font">
-							{{i.Name}}
-						</view>
-					</view> -->
+					
 					<view class="per">
-						<!-- <image :src="item.img"></image> -->
 						<view class="perName fz-font">
 							暂无人员
 						</view>
 					</view>
 				</view>
 			</view>
-		</view>
+		</view> -->
 
 		<!-- 申请加入 -->
 		<view class="btnBlock">
-			<button class="btn zw-font" :disabled="isButtonDisabled" @click="applyAdd"
-				:style="isButtonDisabled ? 'background-color:#87CEFA;' : 'background-colo:#0056a8;'">{{ btnText }}</button>
+			
+			<button class="btn btn1 zw-font" v-if="actItemList.openid==oid">本人创建,暂不支持加入</button>
+			<button class="btn zw-font" v-if="!isSign && actItemList.openid!=oid" @click="applyAdd">申请加入</button>
+			<button class="btn btn1 zw-font" v-if="isSign && actItemList.openid!=oid">已加入</button>
 		</view>
 	</view>
 </template>
@@ -116,258 +137,179 @@
 					title: '教研室详情',
 					btn: 1
 				},
-				isButtonDisabled: false,
-				btnText: '申请加入',
-				actItemList: [],
+				// 用户openid
+				oid:'',
+				// 活动id
+				acId:'',
+				// 页面数据
+				actItemList: {},
+				// 用户收藏列表
 				collArr:[],
+				// 用户订阅列表
 				subArr:[],
+				// 是否已加入
+				isSign:0,
 				clickedAcId:'',
+				
+				
 				pic_coll:'https://teacherapi.cocorobo.cn/teaching-file/static//yym/Star 1 (Stroke) (2).png',
 				pic_coll2:'https://teacherapi.cocorobo.cn/teaching-file/static//mine/Collect_yellow.png',
 				pic_sub:'https://teacherapi.cocorobo.cn/teaching-file/static/yym/Vector (Stroke) (1).png',
-				pic_sub2:'../../static/mine/dingyue_blue.png',
-				perNum: [{
-						Name: '金晶',
-						img: 'https://teacherapi.cocorobo.cn/teaching-file/static//yym/Ellipse 4 (1).png'
-					},
-					{
-						Name: '朱心艺',
-						img: 'https://teacherapi.cocorobo.cn/teaching-file/static//yym/Ellipse 4 (2).png'
-					},
-					{
-						Name: '李红',
-						img: 'https://teacherapi.cocorobo.cn/teaching-file/static//yym/Ellipse 4 (3).png'
-					},
-					{
-						Name: '杨婉',
-						img: 'https://teacherapi.cocorobo.cn/teaching-file/static//yym/Ellipse 4 (4).png'
-					},
-					{
-						Name: '郑元雄',
-						img: 'https://teacherapi.cocorobo.cn/teaching-file/static//yym/Ellipse 4.png'
-					},
-					{
-						Name: '罗佳诚',
-						img: 'https://teacherapi.cocorobo.cn/teaching-file/static//yym/Ellipse 4 (3).png'
-					}
-				],
-				judge: {
-					isShow: 0,
-					info: ""
-				},
-				typetext: ''
+				pic_sub2:'https://teacherapi.cocorobo.cn/teaching-file/static/dingyue_blue.png',
 			};
 		},
 		methods: {
+			// 获取页面数据
+			getdata(){
+				let data = {
+					oid:this.$store.state.user.openid,
+					acId: this.acId,
+				}
+				this.$request('/selectActivityID', "POST", data).then(res => {
+					console.log(res[0][0]);
+					this.actItemList = res[0][0]
+				})
+				
+			},
 			// 收藏事件
-			coll(event){
-				// console.log(event.currentTarget.dataset.e);
-				console.log(this.$store.state.user.openid);
-				let aId=this.clickedAcId
-				// 先获取用户收藏信息
-				let data={
-					oid:this.$store.state.user.openid, //用户id
+			coll(){
+				//判断是否收藏
+				let iscoll = null
+				
+				// 查询是否收藏过
+				let data = {
+					acid: this.acId,
+					oid: this.$store.state.user.openid, //用户id
+					ty: 0
 				}
-				this.$request('/selectColl','POST',data).then(res=>{
-					// console.log('获取收藏信息',res);
-					// return console.log('获取收藏信息',res[0][0].coll=='');
-					let res2
-					let colls
-					if(res[0][0].coll!==null && res[0][0].coll !==""){
-						colls=JSON.parse(res[0][0].coll)
-						console.log('获取收藏信息',colls);
-						// 判断收藏表是否包含这个活动
-						res2 = colls.some((e)=>{
-							return e == aId
-						})
-						// console.log(res2);
-					}
-					
-					// return 	console.log('2',res2);
-					// 第一次存储返回值为null,然后存储收藏
-					if(res[0][0].coll==null || res[0][0].coll==""){
-						// 然后进行存储活动到用户coll字段
-						let arr={
-							oid:this.$store.state.user.openid, //用户id
-							acid:JSON.stringify([aId])
-						}
-						this.$request('/updateColl','POST',arr).then(res=>{
-							this.$request('/selectColl','POST',data).then(res=>{
-								this.collArr=JSON.parse(res[0][0].coll)
-							})
+				this.$request('/selectOneOperator', 'POST', data).then(res => {
+					// console.log('查询是否收藏过',res);
+					res[0].length ? iscoll = true : iscoll = false;
+				
+					// iscoll为true表示已经收藏过,执行删除  为true则收藏
+					if (iscoll) {
+						console.log('执行删除');
+						this.$request('/deleteOperator', 'POST', data).then(res => {
+							// console.log(res);
+							this.getColl()
 						})
-					// 当数组中没有这个收藏活动时添加收藏
-					}else if(!res2){
-						colls.push(aId)
-						let arr2={
-							oid:this.$store.state.user.openid, //用户id
-							acid:JSON.stringify(colls) 
-						}
-						this.$request('/updateColl','POST',arr2).then(res=>{
-							this.$request('/selectColl','POST',data).then(res=>{
-								this.collArr=JSON.parse(res[0][0].coll)
-							})
-						})
-					// 取消收藏
-					}else if(res2){
-						const newArray = colls.filter(item => item !== aId);
-						let arr3={
-							oid:this.$store.state.user.openid, //用户id
-							acid:JSON.stringify(newArray) 
-						}
-						this.$request('/updateColl','POST',arr3).then(res=>{
-							this.$request('/selectColl','POST',data).then(res=>{
-								this.collArr=JSON.parse(res[0][0].coll)
-							})
+					} else {
+						console.log('执行添加');
+						this.$request('/insertOperator', 'POST', data).then(res => {
+							// console.log(res);
+							this.getColl()
 						})
 					}
 				})
 			},
 			// 订阅事件
-			sub(event){
-				// console.log(event.currentTarget.dataset.e);
-				console.log(this.$store.state.user.openid);
-				let aId=this.clickedAcId
-				// 先获取用户订阅信息
-				let data={
-					oid:this.$store.state.user.openid, //用户id
+			sub(){
+				//判断是否订阅
+				let iscoll = null
+				
+				// 查询是否订阅过
+				let data = {
+					acid: this.acId,
+					oid: this.$store.state.user.openid, //用户id
+					ty: 1
 				}
-				this.$request('/selectSub','POST',data).then(res=>{
-					// console.log('获取订阅信息',res);
-					// return console.log('获取订阅信息',res[0][0].coll=='');
-					let res2
-					let subs
-					if(res[0][0].sub!==null && res[0][0].sub !==""){
-						console.log(res);
-						subs=JSON.parse(res[0][0].sub)
-						console.log('获取订阅信息',subs);
-						// 判断订阅表是否包含这个活动
-						res2 = subs.some((e)=>{
-							return e == aId
-						})
-						// console.log(res2);
-					}
+				this.$request('/selectOneOperator', 'POST', data).then(res => {
+					// console.log('查询是否订阅过',res);
+					res[0].length ? iscoll = true : iscoll = false;
 					
-					// return 	console.log('2',res2);
-					// 第一次存储返回值为null,然后存储订阅
-					if(res[0][0].sub==null || res[0][0].sub==""){
-						// 然后进行存储活动到用户coll字段
-						let arr={
-							oid:this.$store.state.user.openid, //用户id
-							acid:JSON.stringify([aId])
-						}
-						this.$request('/updateSub','POST',arr).then(res=>{
-							this.$request('/selectSub','POST',data).then(res=>{
-								this.subArr=JSON.parse(res[0][0].sub)
-							})
+					// iscoll为true表示已经订阅过,执行删除  为true则订阅
+					if (iscoll) {
+						console.log('执行删除');
+						this.$request('/deleteOperator', 'POST', data).then(res => {
+							console.log(res);
+							this.getSub()
 						})
-					// 当数组中没有这个订阅活动时添加订阅
-					}else if(!res2){
-						subs.push(aId)
-						let arr2={
-							oid:this.$store.state.user.openid, //用户id
-							acid:JSON.stringify(subs) 
-						}
-						this.$request('/updateSub','POST',arr2).then(res=>{
-							this.$request('/selectSub','POST',data).then(res=>{
-								this.subArr=JSON.parse(res[0][0].sub)
-							})
-						})
-					// 取消订阅
-					}else if(res2){
-						const newArray = subs.filter(item => item !== aId);
-						let arr3={
-							oid:this.$store.state.user.openid, //用户id
-							acid:JSON.stringify(newArray) 
-						}
-						this.$request('/updateSub','POST',arr3).then(res=>{
-							this.$request('/selectSub','POST',data).then(res=>{
-								this.subArr=JSON.parse(res[0][0].sub)
-							})
+					} else {
+						console.log('执行添加');
+						this.$request('/insertOperator', 'POST', data).then(res => {
+							console.log(res);
+							this.getSub()
 						})
 					}
 				})
 			},
-			gotoMorePer() {
-				uni.navigateTo({
-					url: '/pages/dy/dy'
-				})
-			},
+			// 申请加入
 			applyAdd() {
-				// const clickedAcId = this.actItemList[0].acId;
-				// console.log(clickedAcId);
 				uni.navigateTo({
-					url: '/pages/jys/jys?acId=' + this.clickedAcId
+					url: `/pages/jys/jys?acId=${this.acId}&tit=${'教研室报名'}`
 				})
 			},
-			//判断是否报名
-			btnEnroll() {
-				this.$request('/selectActivityEnrollid', "POST", {
-					acId: this.clickedAcId,
-					openid: uni.getStorageSync('oId')
-				}).then(res => {
-					if (!res[0][0] || !res[0][0].hasOwnProperty('acId')) {
-						console.log('acId 未定义或不存在');
-						return
-					}
-					// console.log(clickedAcId);
-					console.log(res[0]);
-					if (this.clickedAcId === res[0][0].acId) {
-						this.isButtonDisabled = true
-						this.btnText = '已加入'
-					}
+			// 查看更多报名同学
+			gotoMorePer() {
+				uni.navigateTo({
+					url: '/pages/dy/dy'
 				})
 			},
-			mapTypeToText(type) {
-				if (type === 0) {
-					return "直播活动";
-				} else if (type === 1) {
-					return "常规教研活动";
-				} else {
-					return "专题教研活动";
-				}
-			},
-			getActivity() {
-				// 获取当前页面的URL
-				const routes = getCurrentPages();
-				console.log(routes);
-				const acId = routes[1].options.acId ? routes[1].options.acId : routes[2].options.acId
+			// 获取是否订阅
+			getSub(){
 				let data = {
-					acId: acId,
-					ty: 2
+					oid: this.$store.state.user.openid, //用户id
+					type: 1
 				}
-				this.$request('/selectActivityID', "POST", data).then(res => {
-					// console.log(res[0]);
-					// this.activeList=[...this.activeList,...res[0]]
-					this.actItemList = res[0]
-					this.typetext = this.mapTypeToText(this.actItemList.type);
-					this.clickedAcId = this.actItemList[0].acId;
-					this.btnEnroll()
+				this.$request('/selectOperator', 'POST', data).then(res => {
+					console.log('获取', res);
+					// 每次调用前清零,防止push叠加错误
+					this.subArr = []
+					// 将acid遍历到subArrsubArr中
+					res[0].forEach(i => {
+						this.subArr.push(i.acId)
+					})
+				
 				})
+				
 			},
-			getdata(){
-				let data={
-					oid:this.$store.state.user.openid, //用户id
+			//获取是否收藏
+			getColl() {
+				let data = {
+					oid: this.$store.state.user.openid, //用户id
+					type: 0
 				}
-				this.$request('/selectColl','POST',data).then(res=>{
-					this.collArr=JSON.parse(res[0][0].coll)
-					console.log('进来就显示',this.collArr);
+				this.$request('/selectOperator', 'POST', data).then(res => {
+					console.log('获取收藏', res);
+					// 每次调用前清零,防止push叠加错误
+					this.collArr = []
+					// 将acid遍历到collArr中
+					res[0].forEach(i => {
+						this.collArr.push(i.acId)
+					})
 				})
 			},
-			getSub(){
-				let data={
-					oid:this.$store.state.user.openid, //用户id
+			//获取是否报名
+			btnEnroll() {
+				let data = {
+					oid: this.$store.state.user.openid, //用户id
+					aid:this.acId,
+					type: 2
 				}
-				this.$request('/selectSub','POST',data).then(res=>{
-					this.subArr=JSON.parse(res[0][0].sub)
-					console.log('进来就显示',this.subArr);
+				this.$request('/selectSignup', 'POST', data).then(res => {
+					console.log('获取报名', res[0][0]);
+					this.isSign=res[0][0].num
 				})
+			},
+			
+			goLog() {
+				uni.navigateTo({
+					url: "/pages/login_Wechat/login_Wechat",
+				});
 			}
 		},
-		onShow() {
-			this.getActivity()
+		onLoad(e) {
+			// console.log('接收参数',e);
+			this.acId=e.acId
+			this.oid=this.$store.state.user.openid
+			
+			
+			// this.getActivity()
+			// 获取页面数据
 			this.getdata()
+			this.getColl()
 			this.getSub()
+			this.btnEnroll()
 		}
 	}
 </script>
@@ -388,8 +330,9 @@
 			.card {
 				position: absolute;
 				width: 690rpx;
-				height: 256rpx;
+				// height: 256rpx;
 				bottom: 10px;
+				// top: 40%;
 				left: 50%;
 				padding: 30rpx;
 				background-color: rgba(0, 0, 0, 0.26);
@@ -406,22 +349,27 @@
 					justify-content: space-between;
 
 					.title {
-						// padding-bottom: 20rpx;
 						margin-bottom: 20rpx;
-						width: 506rpx;
-						height: 48rpx;
+						width: 80%;
+						// height: 48rpx;
 						color: #ffffff;
 						font-family: PingFang SC;
-						// font-weight: 550;
-						overflow: hidden;
+						// overflow: hidden;
+						// text-overflow: ellipsis;
+						// white-space: nowrap;
+						
+						display: -webkit-box;
+						word-break: break-all;
 						text-overflow: ellipsis;
-						white-space: nowrap;
+						overflow: hidden;
+						-webkit-box-orient: vertical;
+						-webkit-line-clamp: 2;
 					}
 
 					.icons {
 						flex: 1;
 						display: flex;
-						align-items: center;
+						// align-items: center;
 						justify-content: space-between;
 
 						.icon {
@@ -439,11 +387,10 @@
 					margin-bottom: 10rpx;
 					font-weight: 100;
 					color: #f0edea;
-					// font-size: 30rpx;
 				}
-
 				.tag {
 					display: flex;
+					align-items: center;
 				}
 			}
 
@@ -576,6 +523,77 @@
 				background-color: #0056a8;
 				color: #ffffff;
 			}
+			.btn1 {
+				background-color: rgba(139, 190, 255, 1);
+			}
+		}
+		.detailBlock {
+			background-color: #ffffff;
+			border-radius: 10rpx;
+			padding: 30rpx;
+		
+			.tit {
+				font-weight: 600;
+				margin-bottom: 10px;
+			}
+		
+			.cont {
+				color: #999999;
+				margin-bottom: 10px;
+		
+				text {
+					color: #666666;
+				}
+		
+				.content {
+					white-space: normal;
+					/*隐藏溢出*/
+					/*当文本溢出包含元素时显示省略符号来代表被修剪的文本*/
+					/*规定段落中的文本不进行换行*/
+					letter-spacing: 2rpx;
+					display: -webkit-box;
+					word-break: break-all;
+					text-overflow: ellipsis;
+					overflow: hidden;
+					-webkit-box-orient: vertical;
+					-webkit-line-clamp: 4;
+				}
+		
+				.content .p {
+					width: 90%;
+					color: #666666;
+					// max-width: 100%;
+					// display:inline-block;
+					display: block;
+					// float: left;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					white-space: nowrap;
+					// padding-right: 50rpx;
+					/*设置文字溢出时显示省略号*/
+		
+				}
+		
+				.content .p.is-expanded {
+					width: 100%;
+					overflow: visible;
+					white-space: normal;
+					/*文字溢出时不再显示省略号*/
+				}
+		
+				.btn-more {
+					float: right;
+					display: inline-block;
+					// width: 60px;
+					transform: translate(0, -100%);
+					color: #0056a8;
+				}
+		
+				.btn-more.is-zd {
+					transform: none;
+					// transform: translate(0,0);
+				}
+			}
 		}
 	}
 </style>

+ 2 - 2
pages/teachingList/teachingList.vue

@@ -25,7 +25,7 @@
 		data() {
 			return {
 				navbarData: {
-					title: '推荐课程',
+					title: '教研室列表',
 					btn: 1
 				},
 
@@ -47,7 +47,7 @@
 					openid: uni.getStorageSync('oId'),
 					ty: 3,
 					page: this.currentPage, //下拉获取更多的备用字段
-					lim: 10 //一次获取多少数据
+					lim: 15 //一次获取多少数据
 				}
 				this.$request('/selectActivity', "POST", data).then(res => {
 					console.log('获取数据', res[0]);