Browse Source

小程序报名修改

lzw11 11 months ago
parent
commit
857d3bb4a4
1 changed files with 76 additions and 13 deletions
  1. 76 13
      pages/activityDetailNew/activityDetailNew.vue

+ 76 - 13
pages/activityDetailNew/activityDetailNew.vue

@@ -107,10 +107,13 @@
 			</view>
 			<view class="rightBtn">
 				<view class="btnt1" v-if="actItemList.openid==oid">本人创建,暂不支持加入</view>
-				<view class="btnt" v-else-if="!isSign && !isExpired" @click="applyAdd">立即报名</view>
-				<view class="btnt" v-else-if="isSign && !isExpired" @click="cancelAdd">取消报名</view>
-				<view class="btnt" v-else-if="isSign &&  isExpired" @click="lookPlayback">查看回放</view>
-				<view class="btnt" style="background-color: #ccc;" v-else-if="!isSign && isExpired">报名时间结束</view>
+				<view class="btnt" v-else-if="!isSign" @click="applyAdd">立即报名</view>
+				<view class="btnt1" style="width:92px;height: 31px;" v-if="isSign && !isExpired" @click="cancelAdd">取消报名
+				</view>
+				<view class="btnt" style="width:92px;height: 31px;margin-left:15px" v-if="isSign && !isExpired"
+					@click="Attend">参与活动</view>
+				<view class="btnt" v-else-if="isSign && isExpired" @click="lookPlayback">查看回放</view>
+				<!-- <view class="btnt" style="background-color: #ccc;" v-else-if="!isSign && isExpired">报名时间结束</view> -->
 				<!-- <view class="btnt1" v-else-if="actItemList.bnum>=actItemList.pers">人数已满</view> -->
 
 				<!-- <view class="btnt1" v-else-if="isSign && actItemList.openid!=oid">已报名</view> -->
@@ -125,12 +128,32 @@
 		<view class="ellone">
 			<u-modal style="height: 600px !important;flex-direction: column !important;" :showConfirmButton="false"
 				:show="DigenrollImg" closeOnClickOverlay @close="DigenrollImg=false">
-				<view style="font-size: 22px;color: #1C56BA;font-weight: 600;">
-					报名需扫描二维码加入班级!
+				<view style="font-size: 15px;font-weight: 600;margin-top: 20px;">
+					报名成功!
+				</view>
+				<view style="font-size: 15px;font-weight: 600;margin-top: 5px;">
+					{{ popupMessage }}
 				</view>
+
 				<u--image style="height: 400px !important;" :src="actItemList.qrlink"></u--image>
 			</u-modal>
 		</view>
+		<view class="ellone">
+			<u-modal style="height: 600px !important;flex-direction: column !important;" :showConfirmButton="false"
+				:show="GetInvolved" closeOnClickOverlay @close="GetInvolved=false">
+				<view style="font-size: 15px;font-weight: 600;margin-top: 20px;">
+					已报名!
+				</view>
+				<view style="font-size: 15px;font-weight: 600;margin-top: 5px;">
+					请扫码进入腾讯会议
+				</view>
+				<view style="font-size: 15px;font-weight: 600;margin-top: 5px;">
+					参与此次教研活动
+				</view>
+				<u--image style="height: 400px !important;" :src="actItemList.qrlink"></u--image>
+
+			</u-modal>
+		</view>
 
 		<!-- @click="showBigImage" -->
 		<!-- 弹窗 -->
@@ -187,6 +210,8 @@
 				// 报名跳转链接
 				// enrollImg: 'https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/file-1719281192664.png',
 				DigenrollImg: false,
+				// 参与活动跳转链接
+				GetInvolved: false,
 				// 页面数据
 				actItemList: {},
 
@@ -201,7 +226,8 @@
 				// 用户订阅列表
 				// subArr: [],
 				uLoading: false,
-
+				//弹窗是否过期显示的内容
+				popupMessage:'',
 				// 收藏按钮节流
 				stopTimer: 0,
 
@@ -426,15 +452,51 @@
 					this.showPopupConfirm = true
 					this.btnEnroll()
 					this.getUsers()
-					setTimeout(() => {
+					
 						this.showPopupConfirm = false
 						if (this.actItemList.qrlink) {
 							this.DigenrollImg = true
 						}
+						// 根据活动是否过期来设置不同的弹窗内容
+						if (this.isExpired) {
+							// 活动过期时的弹窗内容
+							this.popupMessage = "扫描后完成用户绑定,可查看活动回放";
+						} else {
+							// 活动未过期时的弹窗内容
+							this.popupMessage = "参与此次教研活动";
+						}
 						// this.getData()
-					}, 1500)
+					
 				})
 			},
+			// 确认报名操作
+			Attend() {
+
+				this.showPopup = false
+				let data = {
+					oid: this.$store.state.user.openid, //用户id
+					acid: this.acId,
+					ty: 2,
+				}
+				this.$request('/insertSignup', "POST", data).then(res => {
+
+					console.log('报名返回', res);
+
+					// 添加消息页面系统通知提示报名成功
+					this.addMessage()
+
+					this.btnEnroll()
+					this.getUsers()
+
+					this.showPopupConfirm = false
+					if (this.actItemList.qrlink) {
+						this.GetInvolved = true
+					}
+					// this.getData()
+
+				})
+			},
+
 			// 添加消息页面系统通知提示报名成功
 			addMessage() {
 				let data = {
@@ -926,7 +988,8 @@
 				.btnt {
 					width: 454rpx;
 					color: #fff;
-					// font-weight: 600;
+					font-weight: 400;
+					font-size: 14px;
 					height: 96rpx;
 					background-color: rgba(0, 86, 168, 1);
 					display: flex;
@@ -937,10 +1000,10 @@
 
 				.btnt1 {
 					width: 454rpx;
-					color: #fff;
-					// font-weight: 600;
+					font-weight: 400;
+					font-size: 14px;
 					height: 96rpx;
-					background-color: rgba(139, 190, 255, 1);
+					background-color: rgb(217, 217, 217);
 					display: flex;
 					justify-content: center;
 					align-items: center;