Browse Source

feat: 乐团报名

lex 1 năm trước cách đây
mục cha
commit
a0de8d9d41

+ 18 - 15
src/student/music-group/layout/login.tsx

@@ -41,14 +41,14 @@ export default defineComponent({
       orchestraInfo: {} as any,
       hasBuyInstruments: false, // 是否购买商品
       // 是否开启微信登录(测试使用)默认为false
-      testIsWeixin: false,
-      noPaymentList: [
-        '1656572729093021697',
-        '1656488025144713217',
-        '1661221287237820418',
-        '1661222465069686785',
-        '1714545500178460674'
-      ]
+      testIsWeixin: false
+      // noPaymentList: [
+      //   '1656572729093021697',
+      //   '1656488025144713217',
+      //   '1661221287237820418',
+      //   '1661222465069686785',
+      //   '1714545500178460674'
+      // ]
     }
   },
   computed: {
@@ -70,12 +70,12 @@ export default defineComponent({
       this.showPopup = true
     }
 
-    if (this.$route.query.id && this.noPaymentList.indexOf(this.$route.query.id as string) != -1) {
-      console.log('提示乐团报名失败')
-      // 提示乐团报名失败
-      this.showPopupMessage = '乐团报名时间已过,请等待通知'
-      this.showPopup = true
-    }
+    // if (this.$route.query.id && this.noPaymentList.indexOf(this.$route.query.id as string) != -1) {
+    //   // console.log('提示乐团报名失败')
+    //   // 提示乐团报名失败
+    //   this.showPopupMessage = '乐团报名时间已过,请等待通知'
+    //   this.showPopup = true
+    // }
 
     this.getDetails()
 
@@ -94,6 +94,9 @@ export default defineComponent({
         if (!data.canSignUp) {
           this.showPopup = true
           this.showPopupMessage = '学校已关闭'
+        } else if (!data.registerOpen) {
+          this.showPopup = true
+          this.showPopupMessage = '该乐团已截止报名'
         }
       } catch {
         //
@@ -152,7 +155,7 @@ export default defineComponent({
     },
     locationReplace(url: any) {
       // 只允许同域名
-      console.log(history.replaceState, 'window.history.replaceState', url)
+      // console.log(history.replaceState, 'window.history.replaceState', url)
       if (history.replaceState) {
         history.replaceState(null, document.title, url)
         history.go(0)

+ 17 - 17
src/student/music-group/pre-apply/index.tsx

@@ -32,23 +32,23 @@ export default defineComponent({
       testIsWeixin: false
     })
     const showPopup = ref(false)
-    const noPaymentList = ref([
-      '1656572729093021697',
-      '1656488025144713217',
-      '1661221287237820418',
-      '1661222465069686785',
-      '1714545500178460674'
-    ])
-    console.log(
-      '提示乐团报名失败',
-      route.query.id,
-      noPaymentList.value.indexOf(route.query.id as string)
-    )
-    if (route.query.id && noPaymentList.value.indexOf(route.query.id as string) != -1) {
-      console.log('提示乐团报名失败')
-      // 提示乐团报名失败
-      showPopup.value = true
-    }
+    // const noPaymentList = ref([
+    //   '1656572729093021697',
+    //   '1656488025144713217',
+    //   '1661221287237820418',
+    //   '1661222465069686785',
+    //   '1714545500178460674'
+    // ])
+    // console.log(
+    //   '提示乐团报名失败',
+    //   route.query.id,
+    //   noPaymentList.value.indexOf(route.query.id as string)
+    // )
+    // if (route.query.id && noPaymentList.value.indexOf(route.query.id as string) != -1) {
+    //   console.log('提示乐团报名失败')
+    //   // 提示乐团报名失败
+    //   showPopup.value = true
+    // }
     const onNext = async (name: string) => {
       if (name === 'payment') {
         await getRegisterStatus()

+ 4 - 1
src/student/pre-register-active/compontent-show/video-show.tsx

@@ -120,10 +120,13 @@ export default defineComponent({
     }
 
     const messageContent = ref('')
+    const registerDisplay = ref()
 
     const getMessage = (ev: any) => {
       if (ev.data.api === 'parent-notes') {
+        console.log(ev.data, 'data')
         messageContent.value = ev.data.message || ''
+        registerDisplay.value = ev.data.registerDisplay || false
       }
     }
     onMounted(() => {
@@ -191,7 +194,7 @@ export default defineComponent({
               社团错开,家长无需担心时间冲突问题。
             </p> */}
             <div v-html={messageContent.value}></div>
-            {/* <Button class={styles.submitBtn} onClick={onSubmit}></Button> */}
+            {registerDisplay.value && <Button class={styles.submitBtn} onClick={onSubmit}></Button>}
           </div>
         </div>
       </div>

+ 4 - 2
src/student/pre-register-active/video.tsx

@@ -41,7 +41,8 @@ export default defineComponent({
       isPageHide: false, // 处理页面返回没有刷新的问题
       parentConferencesNotes: '',
       orchestraRegisterType: '',
-      status: ''
+      status: '',
+      registerDisplay: true
     })
 
     // 播放视频总时长
@@ -426,6 +427,7 @@ export default defineComponent({
         moreTime.value = data.videoBrowseData ? JSON.parse(data.videoBrowseData) : []
         forms.parentConferencesNotes = data.parentConferencesNotes
         forms.orchestraRegisterType = data.orchestraRegisterType
+        forms.registerDisplay = data.registerDisplay
 
         const videoDetails = data.videoDetails || []
         videoDetails.forEach((video: any) => {
@@ -571,7 +573,7 @@ export default defineComponent({
             </p> */}
             <div v-html={forms.parentConferencesNotes}></div>
 
-            <Button class={styles.submitBtn} onClick={onSubmit}></Button>
+            {forms.registerDisplay && <Button class={styles.submitBtn} onClick={onSubmit}></Button>}
           </div>
         </div>
       </div>

+ 2 - 2
vite.config.ts

@@ -12,8 +12,8 @@ function resolve(dir: string) {
 // https://vitejs.dev/config/
 // https://github.com/vitejs/vite/issues/1930 .env
 // const proxyUrl = 'https://online.lexiaoya.cn/'
-const proxyUrl = 'https://test.lexiaoya.cn/'
-// const proxyUrl = 'https://dev.lexiaoya.cn/'
+// const proxyUrl = 'https://test.lexiaoya.cn/'
+const proxyUrl = 'https://dev.lexiaoya.cn/'
 // const proxyUrl = 'http://47.98.131.38:8989/'
 // const proxyUrl = 'http://192.168.3.20:8989/' // 邹旋
 // const proxyUrl = 'http://192.168.3.143:8989/' // 尚科