xlh преди 1 година
родител
ревизия
4f1db37aee
променени са 9 файла, в които са добавени 332 реда и са изтрити 115 реда
  1. 1 0
      App.vue
  2. 53 22
      components/detailBlock/detailBlock.vue
  3. 36 32
      components/teaching-case/teaching-case.vue
  4. 1 1
      manifest.json
  5. 9 0
      pages.json
  6. 87 0
      pages/Sign/Sign.vue
  7. 87 45
      pages/activityDetail/activityDetail.vue
  8. 58 15
      pages/hd/hd.vue
  9. BIN
      static/Vector.png

+ 1 - 0
App.vue

@@ -8,6 +8,7 @@
 				success({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=>{ 

+ 53 - 22
components/detailBlock/detailBlock.vue

@@ -1,30 +1,54 @@
 <template>
-	<view class="detailBlock">
-		<view class="tit fwb-font" v-if="!item.isShow">教研室详情</view>
-		<view class="tit fwb-font" v-else>活动详情</view>
-		<view class="cont sZw-font">
-			会议时间:<text>10月7日上午八点(周日)</text>
-		</view>
-		<view class="cont sZw-font">
-			活动形式:<text style="color: #0056a8;">线上直播</text>
-		</view>
-		<view class="cont sZw-font">
-			<!-- <view id="myElement" class="activeTit">
+	<view>
+		<view class="detailBlock" v-if="!item.isShow">
+			<view class="tit fwb-font">教研室详情</view>
+			<view class="cont sZw-font">
+				会议时间:<text>10月7日上午八点(周日)</text>
+			</view>
+			<view class="cont sZw-font">
+				活动形式:<text style="color: #0056a8;">线上直播</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>
-					{{item.info}}
+				<view class="content">
+					<view ref="p" :class="getClassNames">
+						<text style="color: #999999;">教研室概况:</text>
+						{{i.info}}
+					</view>
+
+					<view ref="btnnn" :class="getClassNames1" @click="qqq">
+						<!-- {{isAll ? '收起' : '展开'}} -->
+					</view>
 				</view>
+			</view>
+		</view>
 
-				<view ref="btnnn" :class="getClassNames1" @click="qqq">
-					<!-- {{isAll ? '收起' : '展开'}} -->
+		<view class="detailBlock" v-else v-for="(i,index) in actItemList" :key="index" :data-index="index">
+			<view class="tit fwb-font">活动详情</view>
+			<view class="cont sZw-font">
+				会议时间:<text>{{ i.begin_at }}</text>
+			</view>
+			<view class="cont sZw-font">
+				活动形式:<text style="color: #0056a8;">{{ i.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>
+						{{i.brief}}
+					</view>
+					<view ref="btnnn" :class="getClassNames1" @click="qqq">
+						<!-- {{isAll ? '收起' : '展开'}} -->
+					</view>
 				</view>
 			</view>
-			
-			
 		</view>
 	</view>
 </template>
@@ -38,15 +62,21 @@
 				default () {
 					return {
 						isshow: 0, //0教研室 1 活动
-						info:''
+						info: ''
 					}
 				}
-			}
+			},
+			actItemList: {
+				type: Array,
+				default () {
+					return [];
+				},
+			},
 		},
 		data() {
 			return {
 				isAll: false,
-				meunButtonInfo:this.meunButtonInfo, //胶囊高度
+				meunButtonInfo: this.meunButtonInfo, //胶囊高度
 			};
 		},
 		computed: {
@@ -94,6 +124,7 @@
 		.cont {
 			color: #999999;
 			margin-bottom: 10px;
+
 			text {
 				color: #666666;
 			}

+ 36 - 32
components/teaching-case/teaching-case.vue

@@ -2,7 +2,7 @@
 	<view>
 
 
-		<view class="teaching_case" v-for="(i,index) in classList" :key="i+'b'" @click="gotoTeDetail" :data-index="index">
+		<view class="teaching_case" v-for="(i,index) in classList" :key="index + 'a'" @click="gotoTeDetail" :data-index="index">
 			<view class="img cell-img">
 				<image :src="i.img" v-if="!item.btn" mode="aspectFill"></image>
 			</view>
@@ -53,7 +53,7 @@
 
 		<!-- 活动列表 -->
 		<view class="teaching_case" v-for="(i,index) in activeList" @click="gotoACdetail" :data-index="index"
-			:key="index+'a'">
+			:key="index + 'b'">
 
 
 			<view class="img cell-img">
@@ -179,8 +179,9 @@
 			},
 			gotoACdetail(e) {
 				console.log(e.currentTarget.dataset['index'], 123);
-				let edata = e.currentTarget.dataset['index']
-
+				let edata = e.currentTarget.dataset['index'];
+				const clickedAcId = this.activeList[edata].acId;
+				
 				const value = this.$store.state.user.openid;
 
 				const urls = [
@@ -189,40 +190,43 @@
 					"https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1210",
 					"https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1234",
 				];
-				console.log(value);
 				if (value == '') {
 					console.log(111);
 					uni.navigateTo({
 						url: "/pages/login/login",
 					});
 				} 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;
-					}
+					uni.navigateTo({
+						url: "/pages/activityDetail/activityDetail?acId=" + clickedAcId,
+					});
+					// console.log("/pages/activityDetail/activityDetail?openid=" + value);
+					// switch (edata) {
+					// 	case 0:
+					// 		uni.navigateTo({
+					// 			url: "/pages/skipone/skipone?url=" + encodeURIComponent(urls[0]),
+					// 		});
+					// 		break;
+					// 	case 1:
+					// 		uni.navigateTo({
+					// 			url: "/pages/skipone/skipone?url=" + encodeURIComponent(urls[1]),
+					// 		});
+					// 		break;
+					// 	case 2:
+					// 		uni.navigateTo({
+					// 			url: "/pages/skipone/skipone?url=" + encodeURIComponent(urls[2]),
+					// 		});
+					// 		break;
+					// 	case 3:
+					// 		uni.navigateTo({
+					// 			url: "/pages/skipone/skipone?url=" + encodeURIComponent(urls[3]),
+					// 		});
+					// 		break;
+					// 	default:
+					// 		uni.navigateTo({
+					// 			url: "/pages/skipone/skipone?url=" + encodeURIComponent(urls[3]),
+					// 		});
+					// 		break;
+					// }
 				}
 
 

+ 1 - 1
manifest.json

@@ -50,7 +50,7 @@
     "quickapp" : {},
     /* 小程序特有相关 */
     "mp-weixin" : {
-        "appid" : "wx1260af162664fd04",
+        "appid" : "wxcf19f82bc4ca3229",
         "setting" : {
             "urlCheck" : false
         },

+ 9 - 0
pages.json

@@ -205,6 +205,15 @@
             }
             
         }
+        ,{
+            "path" : "pages/Sign/Sign",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	"tabBar": {
 		// "custom": true,

+ 87 - 0
pages/Sign/Sign.vue

@@ -0,0 +1,87 @@
+<template>
+	<view class="sign">
+		<statusBar :item="navBarData"></statusBar>
+		<view class="signBox">
+			<view class="img">
+				<image src="../../static/Vector.png" mode="aspectFill"></image>
+			</view>
+			<text>报名已提交</text>
+			<text>等待管理员审核</text>
+			<button @click="gotoIndex">查看课程</button>
+			<text @click="gotoIndex">返回首页</text>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				navBarData: {
+					title: '报名结果',
+					btn: 1
+				},
+			};
+		},
+		methods: {
+			gotoIndex(){
+				uni.switchTab({
+					url: '/pages/index/index'
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.sign {
+		margin-top: 230px;
+		.signBox {
+			width: 100%;
+			height: 100%;
+			text-align: center;
+			display: flex;
+			flex-direction: column;
+			justify-content: space-around;
+
+			.img {
+				width: 100%;
+				height: 100px;
+
+				image {
+					width: 160rpx;
+					height: 160rpx;
+				}
+			}
+
+			text {
+				&:nth-child(2) {
+					font-size: 34rpx;
+					margin-bottom: 8px;
+					font-weight: 600;
+				}
+
+				&:nth-child(3) {
+					font-size: 24rpx;
+					color: rgb(144, 145, 147);
+					margin-bottom: 15px;
+				}
+
+				&:nth-child(5) {
+					font-size: 24rpx;
+				}
+			}
+
+			button {
+				width: 200rpx;
+				height: 64rpx;
+				color: white;
+				line-height: 33px;
+				background-color: #0056A8;
+				font-size: 28rpx;
+				border-radius: 100px;
+				margin-bottom: 10px;
+			}
+		}
+	}
+</style>

+ 87 - 45
pages/activityDetail/activityDetail.vue

@@ -4,21 +4,21 @@
 		<statusBar :item="navbar"></statusBar>
 
 		<!-- 顶部 -->
-		<view class="backPic">
+		<view class="backPic" v-for="(item,index) in actItemList" :key="index + 'a' ">
 			<image src="http://43.139.158.220:5007/img/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>5.12~5.13</text>
+						活动日期:<text>{{ item.begin_at }}~{{ item.endTime }}</text>
 					</view>
 					<view class="col fz-font">
-						招募人数:<text>23/50</text>
+						招募人数:<text>0/{{ item.pers }}</text>
 					</view>
 					<view class="col fz-font">
-						活动地址:<text>龙岗将军帽路一号深圳技师学院</text>
+						活动地址:<text>{{ item.address }}</text>
 						<uni-icons type="location" color="#0056a8"
 							style="position: absolute;right: 10px;top: 0;width: 32rpx;height: 45rpx;"></uni-icons>
 					</view>
@@ -28,17 +28,19 @@
 
 		<!-- 创建者用户名 -->
 		<view style="padding: 0 30rpx;">
-			<view class="creator">
-				<image src="https://file.icve.com.cn/file_doc_public/86/519/15A81C36346AC850A5F0FD456F759D1A.jpg" mode="aspectFill"></image>
+			<view class="creator" v-for="(item,index) in actItemList" :key="index + 'b' ">
+				<image
+					:src="item.avatar == null ? 'http://43.139.158.220:5007/img/static/mine/Avatar_default.png' : item.avatar"
+					mode="aspectFill"></image>
 				<view class="creName btn-font">
-					曾秀臻
+					{{ item.username }}
 				</view>
 			</view>
 		</view>
 
 		<!-- 活动详情 -->
 		<view class="" style="padding: 0 30rpx;">
-			<detailBlock :item='judge'></detailBlock>
+			<detailBlock :actItemList='actItemList' :item='judge'></detailBlock>
 		</view>
 
 
@@ -47,20 +49,28 @@
 		<view style="padding: 0 30rpx;">
 			<view class="member">
 				<view class="memberTop">
-					<view class="btn-font">报名情况(已报名23人)</view>
-					<view class="fz-font" style="color: rgba(0, 0, 0, 0.4);display: flex;align-items: center;" @click="perList">
+					<view class="btn-font">报名情况(已报名0人)</view>
+					<view class="fz-font" style="color: rgba(0, 0, 0, 0.4);display: flex;align-items: center;"
+						@click="perList">
 						<text>查看更多</text>
-						<image src="http://43.139.158.220:5007/img/static/mine/arrow-right.png" style="width: 32rpx;height: 32rpx;" mode="aspectFill"></image>
+						<image src="http://43.139.158.220:5007/img/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="(item,index) in perNum">
+					<!-- <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>
@@ -83,42 +93,73 @@
 				},
 				judge: {
 					isShow: 1,
-					info:'你对创业感兴趣吗?想初步了解创业吗?你是否对确定创业方向和创业机会有选择的困惑呢?在创新创业的大氛围下,课堂上常常强调要以项目为中心,你却苦于迟迟无法最终确定具体的项目?那么,《创业意识与商机识别》这门课程可以帮助你。'
+					info: ''
 				},
-				perNum: [{
-						Name: '陈芬',img:'http://43.139.158.220:5007/img/static/yym/Ellipse 4 (3).png'
-					},
-					{
-						Name: '贺豪杰',img:'http://43.139.158.220:5007/img/static/yym/Ellipse 4 (4).png'
-					},
-					{
-						Name: '张孝迪',img:'http://43.139.158.220:5007/img/static/yym/Ellipse 4.png'
-					},
-					{
-						Name: '马冬梅',img:'http://43.139.158.220:5007/img/static/yym/Ellipse 4 (2).png'
-					},
-					{
-						Name: '康雯妍',img:'http://43.139.158.220:5007/img/static/yym/Ellipse 4 (1).png'
-					},
-					{
-						Name: '张燕琴',img:'http://43.139.158.220:5007/img/static/mine/Avatar.png'
-					}]
-
-				};
+				actItemList: [],
+				perNum: []
+				// perNum: [{
+				// 		Name: '陈芬',
+				// 		img: 'http://43.139.158.220:5007/img/static/yym/Ellipse 4 (3).png'
+				// 	},
+				// 	{
+				// 		Name: '贺豪杰',
+				// 		img: 'http://43.139.158.220:5007/img/static/yym/Ellipse 4 (4).png'
+				// 	},
+				// 	{
+				// 		Name: '张孝迪',
+				// 		img: 'http://43.139.158.220:5007/img/static/yym/Ellipse 4.png'
+				// 	},
+				// 	{
+				// 		Name: '马冬梅',
+				// 		img: 'http://43.139.158.220:5007/img/static/yym/Ellipse 4 (2).png'
+				// 	},
+				// 	{
+				// 		Name: '康雯妍',
+				// 		img: 'http://43.139.158.220:5007/img/static/yym/Ellipse 4 (1).png'
+				// 	},
+				// 	{
+				// 		Name: '张燕琴',
+				// 		img: 'http://43.139.158.220:5007/img/static/mine/Avatar.png'
+				// 	}
+				// ]
+
+			};
+		},
+		methods: {
+			perList() {
+				uni.navigateTo({
+					url: '/pages/dy/dy'
+				})
 			},
-			methods: {
-				perList() {
-					uni.navigateTo({
-						url: '/pages/dy/dy'
-					})
-				},
-				gotoAdd() {
-					uni.navigateTo({
-						url: '/pages/hd/hd'
-					})
+			gotoAdd() {
+				// console.log(e.currentTarget.dataset['index'], 123);
+				// let edata = e.currentTarget.dataset['index'];
+				const clickedAcId = this.actItemList[0].acId;
+				console.log(clickedAcId);
+				uni.navigateTo({
+					url: '/pages/hd/hd?acId=' + clickedAcId
+				})
+			},
+			getActivity() {
+				// 获取当前页面的URL
+				const routes = getCurrentPages();
+				console.log(routes[1].options.acId);
+				const acId = routes[1].options.acId
+				let data = {
+					acId: acId,
+					ty: 1
 				}
-			}
+				this.$request('/selectActivityID', "POST", data).then(res => {
+					console.log(res[0]);
+					// this.activeList=[...this.activeList,...res[0]]
+					this.actItemList = res[0]
+				})
+			},
+		},
+		onShow() {
+			this.getActivity()
 		}
+	}
 </script>
 
 <style lang="scss">
@@ -223,6 +264,7 @@
 			padding: 30rpx;
 			border-radius: 10px;
 			margin-bottom: 30rpx;
+
 			.memberTop {
 				display: flex;
 				justify-content: space-between;

+ 58 - 15
pages/hd/hd.vue

@@ -2,20 +2,20 @@
 	<view class="hd">
 		<statusBar :item="navBarData"></statusBar>
 		
-		<view class="top">
+		<view class="top" v-for="(item,index) in actItemList" :key="index">
 				<view class="card">
-					<image class="image" src="http://43.139.158.220:5007/img/static/mine/img11.jpg" mode="aspectFill"></image>
+					<image class="image" :src="item.pic" mode="aspectFill"></image>
 					<view class="text">
 						
 						<view class="text_title">
 							<view class="manage bqZ-font">类型</view>
-							<view class="t1 bmTit-font">创业意识与商机识别</view>
+							<view class="t1 bmTit-font">{{ item.acName }}</view>
 						</view>
 						<view class="col sZw-font">
-							活动日期:5.12~5.13
+							活动日期:{{ item.begin_at }}~{{ item.endTime }}
 						</view>
 						<view class="col sZw-font">
-							招募人数:23/50
+							招募人数:0/{{ item.pers }}
 						</view>
 					</view>
 				</view>
@@ -29,15 +29,18 @@
 						<view class="textcolor">
 							<view class="name  sZw-font">
 								姓名:
-								<text class="name1  sZw-font">曾秀臻</text>
+								<input type="text" style=" text-align: right;" maxlength="10" placeholder="请输入姓名"
+									placeholder-style="font-size: 28rpx; color: rgb(153, 153, 153);" v-model="nickname" />
 							</view>
 							<view class="name  sZw-font">
 								联系方式:
-								<text class="lx1  sZw-font">172xxxxx5678</text>
+								<input type="text" style=" text-align: right;" maxlength="10" placeholder="请输入联系方式"
+									placeholder-style="font-size: 28rpx; color: rgb(153, 153, 153);" v-model="telephone" />
 							</view>
 							<view class="name  sZw-font">
 								单位:
-								<text class="dw1  sZw-font">深圳职业技术大学</text>
+								<input type="text" style=" text-align: right;" maxlength="10" placeholder="请输入单位"
+									placeholder-style="font-size: 28rpx; color: rgb(153, 153, 153);" v-model="units" />
 							</view>
 						</view>
 					</view>
@@ -49,7 +52,7 @@
 				<button @click="button1Action" class="btn1 sZw-font">清空填写信息</button>
 				<!-- <text class="button-spacing"></text> -->
 				<!-- 添加间距 -->
-				<button @click="button2Action" class="btn2 sZw-font">申请加入</button>
+				<button @click="gotoSign" class="btn2 sZw-font">申请加入</button>
 			</view>
 		</view>
 	</view>
@@ -62,18 +65,50 @@ export default {
 			navBarData: {
 				title: '活动报名',
 				btn: 1
-			}
+			},
+			nickname: '',
+			telephone: '',
+			units: '',
+			actItemList:[]
 		};
 	},
 	methods: {
 		button1Action() {
-			// 这里添加按钮1点击后触发的动作
-			console.log('Button 1 clicked');
+			this.nickname = ''
+			this.telephone = ''
+			this.units = ''
 		},
-		button2Action() {
+		gotoSign() {
 			// 这里添加按钮2点击后触发的动作
-			console.log('Button 2 clicked');
-		}
+			if(this.nickname.trim() === '' || this.telephone.trim() === '') {
+				uni.showToast({
+					title: '请填写完整的表单内容',
+					icon: 'none'
+				});
+				return;
+			}
+			uni.navigateTo({
+				url: '/pages/Sign/Sign'
+			})
+		},
+		getActivity() {
+			// 获取当前页面的URL
+			const routes = getCurrentPages();
+			console.log(routes);
+			const acId = routes[2].options.acId
+			let data = {
+				acId: acId,
+				ty: 1
+			}
+			this.$request('/selectActivityID', "POST", data).then(res => {
+				console.log(res[0]);
+				// this.activeList=[...this.activeList,...res[0]]
+				this.actItemList = res[0]
+			})
+		},
+	},
+	onShow() {
+		this.getActivity()
 	}
 };
 </script>
@@ -159,6 +194,14 @@ export default {
 				display: flex;
 				justify-content: space-between;
 				margin-bottom: 20rpx;
+				.nickname {
+					width: 350rpx;
+					text-align: end;
+					// padding-right: 10rpx;
+					// margin-right: 10rpx;
+					font-size: 28rpx;
+					color: rgb(153, 153, 153);
+				}
 			}
 		}
 	}

BIN
static/Vector.png