Browse Source

修改报名判断

lex-xin 4 years ago
parent
commit
8e36c939b9

File diff suppressed because it is too large
+ 0 - 0
dist/app.db3265a6c57e37b963e2.js


BIN
dist/app.70a9f55a40c66129d506.js.gz → dist/app.db3265a6c57e37b963e2.js.gz


File diff suppressed because it is too large
+ 0 - 0
dist/css/PaymentResult.dc5f0da6.css


+ 0 - 1
dist/css/SignUp.3cbb80f4.css

@@ -1 +0,0 @@
-.SignUp[data-v-0eb2d96e]{height:100vh;max-width:700px;position:relative;overflow-y:auto;overflow-x:hidden;background-color:#fff;margin:0 auto}.container[data-v-0eb2d96e]{min-height:100vh;background:url(../img/signUpBg.e551d4ac.png) no-repeat top #f3f4f8;background-size:contain;overflow:hidden}.container h2[data-v-0eb2d96e]{position:absolute;padding-top:.4rem;color:#fff;font-size:.26rem;font-weight:700;width:2.1rem;text-align:left;margin-left:.16rem}.container .section[data-v-0eb2d96e]{background:#fff;margin:2.2rem .16rem 0;border-radius:.1rem;padding:.22rem}.container .section .title[data-v-0eb2d96e]{margin-top:.28rem;font-size:.18rem;color:#1a1a1a}.container .section .content[data-v-0eb2d96e]{padding-top:.05rem;color:grey;font-size:.16rem}.container .protocol[data-v-0eb2d96e]{font-size:.14rem;margin-bottom:.3rem;text-align:center;display:block;color:#0091ff}.container .van-button--primary[data-v-0eb2d96e]{margin:.35rem 0 .1rem;background-color:var(--main-color);border:1px solid var(--main-color);color:#fff;font-size:.18rem;height:.5rem;line-height:.52rem;width:90%;margin-left:5%}

+ 1 - 0
dist/css/SignUp.7dc1e91b.css

@@ -0,0 +1 @@
+.SignUp[data-v-c9ccd8ac]{height:100vh;max-width:700px;position:relative;overflow-y:auto;overflow-x:hidden;background-color:#fff;margin:0 auto}.container[data-v-c9ccd8ac]{min-height:100vh;background:url(../img/signUpBg.e551d4ac.png) no-repeat top #f3f4f8;background-size:contain;overflow:hidden}.container h2[data-v-c9ccd8ac]{position:absolute;padding-top:.4rem;color:#fff;font-size:.26rem;font-weight:700;width:2.1rem;text-align:left;margin-left:.16rem}.container .section[data-v-c9ccd8ac]{background:#fff;margin:2.2rem .16rem 0;border-radius:.1rem;padding:.22rem}.container .section .title[data-v-c9ccd8ac]{margin-top:.28rem;font-size:.18rem;color:#1a1a1a}.container .section .content[data-v-c9ccd8ac]{padding-top:.05rem;color:grey;font-size:.16rem}.container .protocol[data-v-c9ccd8ac]{font-size:.14rem;margin-bottom:.3rem;text-align:center;display:block;color:#0091ff}.container .van-button--primary[data-v-c9ccd8ac]{margin:.35rem 0 .1rem;background-color:var(--main-color);border:1px solid var(--main-color);color:#fff;font-size:.18rem;height:.5rem;line-height:.52rem;width:90%;margin-left:5%}

File diff suppressed because it is too large
+ 0 - 0
dist/css/SignUpLevel.8309b266.css


File diff suppressed because it is too large
+ 0 - 0
dist/index.html


File diff suppressed because it is too large
+ 0 - 0
dist/js/PaymentResult.76fa7340.js


BIN
dist/js/PaymentResult.76fa7340.js.gz


File diff suppressed because it is too large
+ 0 - 0
dist/js/PaymentResult.770cd594.js


BIN
dist/js/PaymentResult.770cd594.js.gz


File diff suppressed because it is too large
+ 0 - 0
dist/js/SignUp.0dd9175c.js


BIN
dist/js/SignUp.0dd9175c.js.gz


File diff suppressed because it is too large
+ 0 - 0
dist/js/SignUp.2f6fb591.js


BIN
dist/js/SignUp.2f6fb591.js.gz


File diff suppressed because it is too large
+ 0 - 0
dist/js/SignUpLevel.6deb2fa1.js


BIN
dist/js/SignUpLevel.6deb2fa1.js.gz


File diff suppressed because it is too large
+ 0 - 0
dist/js/SignUpLevel.b48de50c.js


BIN
dist/js/SignUpLevel.b48de50c.js.gz


+ 22 - 20
src/views/PaymentResult.vue

@@ -4,20 +4,20 @@
     <div class="payOn" v-if="pageStatus == 'ON'">
         <img src="@/assets/images/pay_success.png" alt />
         <p>支付成功</p>
-        <van-button color="var(--main-color)" type="info" @click="onAppBack" round>返回</van-button>
+        <!-- <van-button color="var(--main-color)" type="info" @click="onAppBack" round>返回</van-button> -->
     </div>
 
     <div class="payError" v-if="pageStatus == 'FAILED' || pageStatus == 'CLOSE' || pageStatus == 'REFUND'">
         <img src="@/assets/images/pay_error.png" alt />
         <p>支付失败</p>
-        <van-button color="var(--main-color)" type="info" @click="onAppBack" round>返回</van-button>
+        <!-- <van-button color="var(--main-color)" type="info" @click="onAppBack" round>返回</van-button> -->
     </div>
 
     <div class="paying" v-if="pageStatus == 'ING'">
         <img src="@/assets/images/pay_ing.png" alt />
         <p>订单处理中</p>
-        <van-button color="var(--main-color)" type="info" @click="onAppBack" round>返回</van-button>
-        <p class="countdown">到计时{{ smsText }}秒刷新</p>
+        <!-- <van-button color="var(--main-color)" type="info" @click="onAppBack" round>返回</van-button> -->
+        <!-- <p class="countdown">到计时{{ smsText }}秒刷新</p> -->
     </div>
 
     <div class="paySuccess" v-if="pageStatus == 'SUCCESS'">
@@ -58,8 +58,8 @@
                 {{ examRegistration.examStartTime }}
             </p>
             <!-- <img class="icon_img" src="@/assets/images/icon_cw.png" alt srcset /> -->
-      </div>
-        <van-button color="var(--main-color)" type="info" @click="onAppBack" round>返回</van-button>
+        </div>
+        <!-- <van-button color="var(--main-color)" type="info" @click="onAppBack" round>返回</van-button> -->
     </div>
   </div>
 </template>
@@ -81,7 +81,8 @@ export default {
         const query = this.$route.query
         return {
             headerStatus: false,
-            isBack: query.isBack == "off" ? false : true, // 是否显示返回按钮
+            // isBack: query.isBack == "off" ? false : true, // 是否显示返回按钮
+            isBack: false, // 是否显示返回按钮
             pageStatus: null,
             orderInfo: {},
             examRegistration: {}
@@ -94,6 +95,7 @@ export default {
             this.headerStatus = true;
         }
         this.__init()
+        // this.pushHistory()
     },
     methods: {
         pushHistory() {
@@ -152,22 +154,22 @@ export default {
         onHref() {
             window.location.replace(
                 window.location.href.toString().replace(window.location.hash, "") +
-                "#" + "/levelMusic"
+                "#" + "/paymentResult"
             );
-            this.$router.push("/levelMusic")
+            this.$router.push("/paymentResult")
         },
         CountDown() {
-            let s = 60;
-            this.smsText = s;
-            let timer = setInterval(() => {
-                if (s <= 0) {
-                    this.__init();
-                    clearInterval(timer);
-                } else {
-                    s--;
-                    this.smsText = s;
-                }
-            }, 1000);
+            // let s = 60;
+            // this.smsText = s;
+            // let timer = setInterval(() => {
+            //     if (s <= 0) {
+            //         this.__init();
+            //         clearInterval(timer);
+            //     } else {
+            //         s--;
+            //         this.smsText = s;
+            //     }
+            // }, 1000);
         }
     },
     filters: {

+ 12 - 4
src/views/signup/SignUp.vue

@@ -27,8 +27,8 @@
 				<div class="content">{{ baseInfo.expectExamStartTime }}</div>
 			</div>
 			<!-- <m-button class="sign-btn" @click="onSubmit" text="我要报名" /> -->
-			<van-button type="primary" :color="buttonColor" v-if="baseInfo.status === 'APPLYING'" @click="onSubmit" round block>我要报名</van-button>
-			<a class="protocol" @click="onProtocol" v-if="baseInfo.status === 'APPLYING'">协议协议</a>
+			<van-button type="primary" :color="buttonColor" v-if="baseInfo.status" @click="onSubmit" round block>我要报名</van-button>
+			<a class="protocol" @click="onProtocol" v-if="baseInfo.status">协议</a>
 			<!-- <m-button class="sign-btn" v-if="baseInfo.status === 'APPLYING'" @click="onSubmit" text="我要报名" /> -->
 		</div>
     </div>
@@ -76,13 +76,21 @@ export default {
 				let res = await examinationBasicInfo({ examId: this.examId })
 				if(res.data.code == 200) {
 					let tempData = res.data.data
+					let tempStatus = false
+					const nowTime = +new Date(),
+						startTime = +new Date(tempData.enrollStartTime),
+						endTime = +new Date(tempData.enrollEndTime)
+					// (未开始 || 报名中) && 在报名时间范围内则可以报名
+					if((tempData.status == "NOT_START" || tempData.status == "APPLYING") && nowTime >= startTime && nowTime <= endTime) {
+						tempStatus = true
+					}
 					this.baseInfo = {
 						posterTitle: tempData.posterTitle,
 						examMode: tempData.examMode,
-						enrollTime: dayjs(tempData.enrollStartTime).format("YYYY-MM-DD") + "~" + dayjs(tempData.enrollEndTime).format("YYYY-MM-DD"),
+						enrollTime: dayjs(tempData.enrollStartTime).format("YYYY-MM-DD HH:mm") + "~" + dayjs(tempData.enrollEndTime).format("YYYY-MM-DD HH:mm"),
 						examLocationIdList: tempData.examLocationIdList,
 						expectExamStartTime: dayjs(tempData.expectExamStartTime).format("YYYY-MM-DD"),
-						status: tempData.status,
+						status: tempStatus,
 						examLocations: tempData.examLocations, // 地址
 						posterProfile: tempData.posterProfile
 					}

+ 2 - 0
src/views/signup/SignUpLevel.vue

@@ -99,6 +99,7 @@
                             :after-read="afterRead"
                             v-model.trim="practiceUpload[songUpload.index]"
                             multiple
+                            accept="image/*"
                             :max-count="5" >
                         </van-uploader>
                         <van-uploader
@@ -109,6 +110,7 @@
                             :after-read="afterRead"
                             v-model.trim="performNumUpload[songUpload.index]"
                             multiple
+                            accept="image/*"
                             :max-count="5" >
                         </van-uploader>
                     </template>

Some files were not shown because too many files changed in this diff