Browse Source

添加报名

lex 1 year ago
parent
commit
057bee00e8

+ 4 - 2
dist/project/initiation.html

@@ -389,7 +389,9 @@
             var schoolSystem = schoolDetail.data.data.schoolSystem || 'sixYearSystem'
             this.schoolId = schoolDetail.data.data.id
             if (schoolSystem === 'sixYearSystem') {
-              this.currentGrade.push({ text: '六年级', value: 6 })
+              this.currentGrade.push({ text: '六年级', value: 6 }, { text: '初一', value: 7 }, { text: '初二', value: 8 }, { text: '初三', value: 9 })
+            } else {
+              this.currentGrade.push({ text: '初一', value: 6 }, { text: '初二', value: 7 }, { text: '初三', value: 8 }, { text: '初四', value: 9 })
             }
           }
 
@@ -567,4 +569,4 @@
   </script>
 </body>
 
-</html>
+</html>

+ 4 - 2
public/project/initiation.html

@@ -389,7 +389,9 @@
             var schoolSystem = schoolDetail.data.data.schoolSystem || 'sixYearSystem'
             this.schoolId = schoolDetail.data.data.id
             if (schoolSystem === 'sixYearSystem') {
-              this.currentGrade.push({ text: '六年级', value: 6 })
+              this.currentGrade.push({ text: '六年级', value: 6 }, { text: '初一', value: 7 }, { text: '初二', value: 8 }, { text: '初三', value: 9 })
+            } else {
+              this.currentGrade.push({ text: '初一', value: 6 }, { text: '初二', value: 7 }, { text: '初三', value: 8 }, { text: '初四', value: 9 })
             }
           }
 
@@ -567,4 +569,4 @@
   </script>
 </body>
 
-</html>
+</html>

+ 17 - 1
src/school/orchestra/modal/student-list.tsx

@@ -163,7 +163,23 @@ export default defineComponent({
       console.log(props.selectStudentIds, 'onmount')
       // 判断年级
       if (baseState.user.data.school?.schoolSystem === 'sixYearSystem') {
-        state.classList.push({ text: '六年级', value: 6 })
+        state.classList.push(
+          ...[
+            { text: '六年级', value: 6 },
+            { text: '初一', value: 7 },
+            { text: '初二', value: 8 },
+            { text: '初三', value: 9 }
+          ]
+        )
+      } else {
+        state.classList.push(
+          ...[
+            { text: '初一', value: 6 },
+            { text: '初二', value: 7 },
+            { text: '初三', value: 8 },
+            { text: '初四', value: 9 }
+          ]
+        )
       }
 
       if (props.orchestraList.length > 0) {

+ 15 - 1
src/student/music-group/pre-apply/component/apply.tsx

@@ -181,7 +181,21 @@ export default defineComponent({
       await getSubjects()
       // 判断学年制
       if (props.schoolSystem === 'sixYearSystem') {
-        state.currentGrade.push({ text: '六年级', value: 6 })
+        state.currentGrade.push(
+          { text: '六年级', value: 6 },
+          { text: '初一', value: 7 },
+          { text: '初二', value: 8 },
+          { text: '初三', value: 9 }
+        )
+      } else {
+        state.classList.push(
+          ...[
+            { text: '初一', value: 6 },
+            { text: '初二', value: 7 },
+            { text: '初三', value: 8 },
+            { text: '初四', value: 9 }
+          ]
+        )
       }
       await studentRegister()
 

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

@@ -92,27 +92,18 @@ export default defineComponent({
         // INITIATION_SURVEY: '启蒙调查',
         // PRE_REGISTER: '预报名',
         // REGISTER: '乐团报名',
+        // PARENT_TEACHER_REGISTRATION "家长会报名"
         // DOING: '乐团交付',
         // DONE: '已交付'
         // CLOSE: '已交付'
         // 判断乐团报名,只有 乐团报名 乐团交付 已交付才可以报名
         const oStatus = data.status // 乐团状态
-        if (oStatus !== 'REGISTER' && oStatus !== 'DOING' && oStatus !== 'DONE') {
-          // showDialog({
-          //   title: '提示',
-          //   message: '乐团建设中,请稍等'
-          // }).then(() => {
-          //   setLogout()
-
-          //   const query = {
-          //     returnUrl: route.path,
-          //     ...route.query
-          //   } as any
-          //   router.replace({
-          //     path: '/loginMusic',
-          //     query: query
-          //   })
-          // })
+        if (
+          oStatus !== 'REGISTER' &&
+          oStatus !== 'DOING' &&
+          oStatus !== 'DONE' &&
+          oStatus !== 'PARENT_TEACHER_REGISTRATION'
+        ) {
           state.dialogMessage = '乐团建设中,请稍等'
           state.dialogStatus = true
           return
@@ -120,20 +111,6 @@ export default defineComponent({
 
         // 判断乐团
         if (data.registerOrchestra >= 1) {
-          // showDialog({
-          //   title: '提示',
-          //   message: '您已在其它乐团'
-          // }).then(() => {
-          //   setLogout()
-          //   const query = {
-          //     returnUrl: route.path,
-          //     ...route.query
-          //   } as any
-          //   router.replace({
-          //     path: '/loginMusic',
-          //     query: query
-          //   })
-          // })
           state.dialogMessage = '您已在其它乐团'
           state.dialogStatus = true
           return

+ 32 - 5
src/student/pre-register-active/compontent-show/active-show.tsx

@@ -1,4 +1,4 @@
-import { defineComponent } from 'vue'
+import { defineComponent, nextTick, onMounted, onUnmounted, ref } from 'vue'
 import styles from '../index.module.less'
 import signinTips from '../images/signin-tips.png'
 import { Button, CellGroup, Field } from 'vant'
@@ -7,15 +7,42 @@ export default defineComponent({
   name: 'pre-register',
   emits: ['tabChange'],
   setup(props, { emit }) {
+    const messageContent = ref('')
     const onSubmit = () => {
-      emit('tabChange', 2)
+      // emit('tabChange', 2)
     }
+
+    const getMessage = (ev: any) => {
+      if (ev.data.api === 'parent-agenda') {
+        messageContent.value = ev.data.message || ''
+      }
+    }
+
+    onMounted(() => {
+      nextTick(() => {
+        // 是否加载完成
+        window.parent &&
+          window.parent.postMessage(
+            {
+              api: 'onLoad',
+              status: true
+            },
+            '*'
+          )
+      })
+
+      window.addEventListener('message', getMessage)
+    })
+
+    onUnmounted(() => {
+      window.removeEventListener('message', getMessage)
+    })
     return () => (
       <div class={styles['per-register-active']}>
         <div class={styles.flowPath}>
           <i class={styles.flowPathTitle}></i>
-          <div class={styles.flowPathContent}>
-            一、请所有家长进行<span>签到</span>
+          <div class={styles.flowPathContent} v-html={messageContent.value}>
+            {/* 一、请所有家长进行<span>签到</span>
             <br />
             二、<span>观看</span>管乐团家长会议
             <br />
@@ -38,7 +65,7 @@ export default defineComponent({
             </p>
             三、请
             <span>“有意向”</span>让孩子加入乐团的家长点击
-            <span>“乐团报名”</span>完成信息填报
+            <span>“乐团报名”</span>完成信息填报 */}
           </div>
         </div>
 

+ 36 - 8
src/student/pre-register-active/compontent-show/video-show.tsx

@@ -1,4 +1,4 @@
-import { defineComponent, nextTick, onMounted, reactive, watch } from 'vue'
+import { defineComponent, nextTick, onMounted, onUnmounted, reactive, ref, watch } from 'vue'
 import styles from '../video.module.less'
 import { Button } from 'vant'
 import { browser } from '@/helpers/utils'
@@ -13,6 +13,7 @@ export default defineComponent({
   setup(props, { emit }) {
     const route = useRoute()
     const video = route.query.v ? JSON.parse(route.query.v as any) : []
+    console.log(route.query, 'query')
     const forms = reactive({
       coverImg: route.query.coverImg,
       introductionVideo: route.query.introductionVideo as any,
@@ -115,21 +116,48 @@ export default defineComponent({
     })
 
     const onSubmit = () => {
-      emit('tabChange', 3)
+      // emit('tabChange', 3)
     }
 
+    const messageContent = ref('')
+
+    const getMessage = (ev: any) => {
+      if (ev.data.api === 'parent-notes') {
+        messageContent.value = ev.data.message || ''
+      }
+    }
+    onMounted(() => {
+      nextTick(() => {
+        // 是否加载完成
+        window.parent &&
+          window.parent.postMessage(
+            {
+              api: 'onLoad',
+              status: true
+            },
+            '*'
+          )
+      })
+
+      window.addEventListener('message', getMessage)
+    })
+
+    onUnmounted(() => {
+      window.removeEventListener('message', getMessage)
+    })
     return () => (
       <div class={styles['pre-register-video']}>
         <div class={styles.videoContainer}>
           <div class={styles['video-content']}>
-            <video
+            {/* <video
               id="register-video"
               class={styles['video']}
               src={forms.introductionVideo}
               playsinline={true}
               poster={forms.coverImg as any}
               preload="auto"
-            ></video>
+            ></video> */}
+            <img src={forms.coverImg as any} class={styles.coverImg} />
           </div>
         </div>
         <div class={styles.videoCount}>
@@ -148,7 +176,7 @@ export default defineComponent({
         </div>
         <div class={styles.messageContainer}>
           <div class={styles.messageContent}>
-            <p>家长您好!</p>
+            {/* <p>家长您好!</p>
             <p class={styles.c1}>
               请家长们合理安排时间,<span>认真观看</span>家长会内容。在<span>详细了解</span>
               所有要求后,有意向让孩子加入乐团的家长,请在<span>明晚20:00前</span>,为孩子完成
@@ -160,10 +188,10 @@ export default defineComponent({
             <p class={styles.bottom}>
               注:乐团于下学期正式开始训练,训练时间下 学期开学前另行通知,训练时间会与学校其他
               社团错开,家长无需担心时间冲突问题。
-            </p>
+            </p> */}
+            <div v-html={messageContent.value}></div>
+            <Button class={styles.submitBtn} onClick={onSubmit}></Button>
           </div>
-
-          <Button class={styles.submitBtn} onClick={onSubmit}></Button>
         </div>
       </div>
     )

BIN
src/student/pre-register-active/images/top_title.png


+ 16 - 7
src/student/pre-register-active/index.module.less

@@ -8,9 +8,13 @@
 
 .flowPath {
   position: relative;
-  margin: 0 10px 3px;
-  background: url('./images/flow-path-bg.png') no-repeat center;
-  background-size: contain;
+  margin: 0 14px 12px;
+  // background: url('./images/flow-path-bg.png') no-repeat center;
+  // background-size: contain;
+  background: linear-gradient(180deg, #BFF4FF 0%, #80D3E1 100%);
+  box-shadow: 0px 2px 4px 0px rgba(23, 89, 202, 0.92), inset 0px -9px 6px 0px #64BDFF, inset 0px 3px 4px 0px #FFFFFF;
+  border-radius: 25px;
+  padding: 12px 10px 11px;
 
   .flowPathTitle {
     display: block;
@@ -25,14 +29,19 @@
   }
 
   .flowPathContent {
-    padding: 41px 43px 43px;
+    padding: 31px 20px 14px;
     font-size: 14px;
     color: #2D1A18;
     line-height: 26px;
 
-    span {
-      color: #E15339;
-    }
+    background: linear-gradient(180deg, #FFFFFA 0%, rgba(255, 255, 253, 0.87) 90%, rgba(255, 255, 255, 0.52) 100%);
+    box-shadow: 0px 1px 6px 0px #D9EFF8;
+    border-radius: 18px;
+    border: 5px solid #139CF1;
+
+    // span {
+    //   color: #E15339;
+    // }
   }
 }
 

+ 35 - 6
src/student/pre-register-active/index.tsx

@@ -44,7 +44,8 @@ export default defineComponent({
       currentClass: '', // 班级
       intervalFnRef: null as any,
       applyStatus: false,
-      isPageHide: false
+      isPageHide: false,
+      parentConferencesAgenda: ''
     })
 
     const message = (value: string) => {
@@ -142,13 +143,41 @@ export default defineComponent({
         )
         const schoolSystem = data.schoolSystem || 'sixYearSystem'
         if (schoolSystem === 'sixYearSystem') {
-          forms.currentGradeList.push({ text: '六年级', value: 6 })
+          forms.currentGradeList.push(
+            ...[
+              { text: '六年级', value: 6 },
+              { text: '初一', value: 7 },
+              { text: '初二', value: 8 },
+              { text: '初三', value: 9 }
+            ]
+          )
+        } else {
+          forms.currentGradeList.push(
+            ...[
+              { text: '初一', value: 6 },
+              { text: '初二', value: 7 },
+              { text: '初三', value: 8 },
+              { text: '初四', value: 9 }
+            ]
+          )
         }
+        forms.parentConferencesAgenda = data.parentConferencesAgenda
 
         // 判断是否获取微信code码
         if (!forms.code) return
 
-        if (data.status !== 'PRE_REGISTER') {
+        // 乐团注册
+        if (data.orchestraRegisterType === 'ORCHESTRA' && data.status !== 'PRE_REGISTER') {
+          showToast('家长会调查问卷已结束')
+          forms.applyStatus = true
+          return
+        }
+
+        // 家长会注册
+        if (
+          data.orchestraRegisterType === 'PARENT_CONFERENCES' &&
+          data.status !== 'PARENT_TEACHER_REGISTRATION'
+        ) {
           showToast('家长会调查问卷已结束')
           forms.applyStatus = true
           return
@@ -242,8 +271,8 @@ export default defineComponent({
       <div class={styles['per-register-active']}>
         <div class={styles.flowPath}>
           <i class={styles.flowPathTitle}></i>
-          <div class={styles.flowPathContent}>
-            一、请所有家长进行<span>签到</span>
+          <div class={styles.flowPathContent} v-html={forms.parentConferencesAgenda}>
+            {/* 一、请所有家长进行<span>签到</span>
             <br />
             二、<span>观看</span>管乐团家长会议
             <br />
@@ -266,7 +295,7 @@ export default defineComponent({
             </p>
             三、请
             <span>“有意向”</span>让孩子加入乐团的家长点击
-            <span>“乐团报名”</span>完成信息填报
+            <span>“乐团报名”</span>完成信息填报 */}
           </div>
         </div>
 

+ 5 - 1
src/student/pre-register-active/show.tsx

@@ -2,12 +2,16 @@ import { defineComponent, reactive } from 'vue'
 import ActiveShow from './compontent-show/active-show'
 import VideoShow from './compontent-show/video-show'
 import RegisterShow from './compontent-show/register-show'
+import { useRoute } from 'vue-router'
 
 export default defineComponent({
   name: 'show-page',
   setup() {
+    const route = useRoute()
+    console.log(route.query, 'query')
+    const index = route.query.index ? Number(route.query.index) : 1
     const forms = reactive({
-      tabIndex: 1
+      tabIndex: index || 1
     })
     return () => (
       <>

+ 31 - 12
src/student/pre-register-active/video.module.less

@@ -26,6 +26,12 @@
   padding-bottom: 28px;
   margin: 0 auto;
 
+  .coverImg {
+    width: 100%;
+    height: 100%;
+    border-radius: 30px;
+  }
+
   video {
     width: 100%;
   }
@@ -166,27 +172,40 @@
 
 .messageContainer {
   margin: 0 10px 20px;
-  background: url('./images/message-bg.png') no-repeat center;
-  background-size: contain;
-  min-height: 440px;
+  // background: url('./images/message-bg.png') no-repeat center;
+  // background-size: contain;
+  // min-height: 440px;
+  background: linear-gradient(180deg, #BFF4FF 0%, #80D3E1 100%);
+  box-shadow: 0px 2px 4px 0px rgba(23, 89, 202, 0.92), inset 0px -9px 6px 0px #64BDFF, inset 0px 3px 4px 0px #FFFFFF;
+  border-radius: 25px;
+  padding: 12px 10px 11px;
 
   .messageContent {
-    padding: 32px 32px 26px;
+    padding: 12px 20px 12px;
     font-size: 14px;
     color: #2D1A18;
     line-height: 26px;
 
-    p {
+    background: linear-gradient(180deg, #FFFFFA 0%, rgba(255, 255, 253, 0.87) 90%, rgba(255, 255, 255, 0.52) 100%);
+    box-shadow: 0px 1px 6px 0px #D9EFF8;
+    border-radius: 18px;
+    border: 5px solid #139CF1;
+
+    &>div {
       text-align: justify;
     }
 
-    .c1 {
-      text-indent: 2em;
+    // p {
+    //   text-align: justify;
+    // }
 
-      span {
-        color: #DD3210;
-      }
-    }
+    // .c1 {
+    //   text-indent: 2em;
+
+    //   span {
+    //     color: #DD3210;
+    //   }
+    // }
   }
 
   .bottom {
@@ -201,6 +220,6 @@
   background-size: contain;
   border: none;
   display: block;
-  margin: 0 auto;
+  margin: 20px auto 0;
   border-radius: 50px;
 }

+ 25 - 21
src/student/pre-register-active/video.tsx

@@ -37,7 +37,10 @@ export default defineComponent({
       pointVideo: {} as any, // 需要处理有效的时间段
       pointVideoTime: 0, // 有效时长
       videoSelectId: null, // 选中的编号
-      isPageHide: false // 处理页面返回没有刷新的问题
+      isPageHide: false, // 处理页面返回没有刷新的问题
+      parentConferencesNotes: '',
+      orchestraRegisterType: '',
+      status: ''
     })
 
     // 播放视频总时长
@@ -340,22 +343,21 @@ export default defineComponent({
         initVideoCount(videoIntervalRef.isActive.value)
 
         await updateStat()
-        window.location.href =
-          window.location.origin +
-          window.location.pathname +
-          '/project/preRegister.html?' +
-          qs.stringify({
-            orchestraId: forms.orchestraId,
-            openId: forms.openId
-          })
-
-        // window.location.href =
-        //   window.location.origin +
-        //   '/project/preRegister.html?' +
-        //   qs.stringify({
-        //     orchestraId: forms.orchestraId,
-        //     openId: forms.openId
-        //   })
+        if (forms.orchestraRegisterType === 'PARENT_TEACHER_REGISTRATION') {
+          window.location.href =
+            window.location.origin +
+            window.location.pathname +
+            '/project/preRegister.html?' +
+            qs.stringify({
+              orchestraId: forms.orchestraId,
+              openId: forms.openId
+            })
+        } else {
+          window.location.href =
+            window.location.origin +
+            window.location.pathname +
+            `/#/preApply?id=${forms.orchestraId}`
+        }
       } catch (e) {
         console.log(e, 'e')
         // 还原
@@ -381,6 +383,8 @@ export default defineComponent({
         forms.introductionVideoTime = data.introductionVideoTime
         forms.coverImg = data.coverImg
         moreTime.value = data.videoBrowseData ? JSON.parse(data.videoBrowseData) : []
+        forms.parentConferencesNotes = data.parentConferencesNotes
+        forms.orchestraRegisterType = data.orchestraRegisterType
 
         const videoDetails = data.videoDetails || []
         videoDetails.forEach((video: any) => {
@@ -495,7 +499,7 @@ export default defineComponent({
         </div>
         <div class={styles.messageContainer}>
           <div class={styles.messageContent}>
-            <p>家长您好!</p>
+            {/* <p>家长您好!</p>
             <p class={styles.c1}>
               请家长们合理安排时间,<span>认真观看</span>家长会内容。在<span>详细了解</span>
               所有要求后,有意向让孩子加入乐团的家长,请在<span>明晚20:00前</span>,为孩子完成
@@ -506,10 +510,10 @@ export default defineComponent({
             </p>
             <p class={styles.bottom}>
               注:乐团于下学期正式开始训练,训练时间下学期开学前另行通知,训练时间会与学校其他社团错开,家长无需担心时间冲突问题。
-            </p>
+            </p> */}
+            <div v-html={forms.parentConferencesNotes}></div>
+            <Button class={styles.submitBtn} onClick={onSubmit}></Button>
           </div>
-
-          <Button class={styles.submitBtn} onClick={onSubmit}></Button>
         </div>
       </div>
     )

+ 2 - 1
vite.config.ts

@@ -12,7 +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://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/' // 尚科