Pārlūkot izejas kodu

Merge branch 'iteration-20240403-apply' into dev

lex 1 gadu atpakaļ
vecāks
revīzija
e41dbfb190

BIN
src/common/images/message-bg2.png


BIN
src/common/images/message-close.png


+ 17 - 3
src/components/m-message-tip/index.module.less

@@ -1,8 +1,11 @@
 .wxPopupDialog {
   // position: relative;
   overflow: initial;
-
+  margin: 0 40px;
+  width: calc(100% - 75px) !important;
   // margin-top: -160px;
+  border-radius: 20px !important;
+
   &::before {
     position: absolute;
     content: ' ';
@@ -18,8 +21,8 @@
 }
 
 .popupContainer {
-  background: url('../../common/images/message-bg.png') no-repeat top center;
-  background-size: cover;
+  background: url('../../common/images/message-bg2.png') no-repeat top center;
+  background-size: contain;
   border-radius: 20px;
   overflow: hidden;
   padding-bottom: 20px;
@@ -62,4 +65,15 @@
     color: #FFFFFF;
     border: none;
   }
+
+  .iconClose {
+    position: absolute;
+    top: 16px;
+    right: 16px;
+    display: inline-block;
+    background: url('../../common/images/message-close.png') no-repeat top center;
+    background-size: cover;
+    width: 18px;
+    height: 18px;
+  }
 }

+ 11 - 2
src/components/m-message-tip/index.tsx

@@ -52,9 +52,14 @@ export default defineComponent({
     confirmButtonColor: {
       type: String,
       default: ''
+    },
+    /** 是否有关闭按钮 */
+    showCloseButton: {
+      type: Boolean,
+      default: true
     }
   },
-  emits: ['confirm', 'cancel'],
+  emits: ['confirm', 'cancel', 'close'],
   setup(props, { emit }) {
     const showPopup = ref(false);
     onMounted(() => {
@@ -78,10 +83,14 @@ export default defineComponent({
         <Popup
           v-model:show={showPopup.value}
           round
-          style={{ width: '88%', maxWidth: '520px' }}
+          style={{ width: '100%', maxWidth: '520px' }}
           closeOnClickOverlay={false}
           class={styles.wxPopupDialog}>
           <div class={styles.popupContainer}>
+            {props.showCloseButton && (
+              <i class={styles.iconClose} onClick={() => emit('close')}></i>
+            )}
+
             <p class={styles.title1} v-html={props.title}></p>
             <p
               class={styles.popupTips}

+ 1 - 1
src/router/router-root.ts

@@ -21,7 +21,7 @@ export default [
     name: 'register-member',
     component: () => import('@/views/student-register/register-member'),
     meta: {
-      title: '音乐数字课堂学生注册'
+      title: '音乐数字课堂学生报名'
     }
   },
   {

BIN
src/views/student-register/images/new/banner-bg3.png


BIN
src/views/student-register/images/new/icon-n-3.png


BIN
src/views/student-register/images/new/icon-n-4.png


BIN
src/views/student-register/images/new/icon-n-5.png


+ 5 - 5
src/views/student-register/index.module.less

@@ -172,7 +172,7 @@
 
   &.studentSectionForm {
     padding: 12px 0;
-    background: linear-gradient(180deg, #DBF6FD 0%, #FFFFFF 20%);
+    background: linear-gradient(180deg, #DBF6FD 0%, #FFFFFF 10%);
   }
 
   &.noSendDay {
@@ -183,7 +183,7 @@
   .title3 {
     width: 212px;
     height: 22px;
-    background: url('./images/new/title-3.png') no-repeat center;
+    background: url('./images/new/title-7.png') no-repeat center;
     background-size: contain;
     margin: 0 auto;
   }
@@ -290,7 +290,7 @@
     font-weight: 600;
     font-size: 16px;
     color: #1189FF;
-    line-height: 22px;
+    // line-height: 22px;
     display: flex;
     align-items: center;
     justify-content: center;
@@ -409,7 +409,6 @@
   }
 
   .memberNumer {
-
     margin: 14px 12px 0;
     background: #E8F8FF;
     border-radius: 8px;
@@ -443,8 +442,9 @@
   // padding-left: 19px;
   // padding-right: 19px;
   padding: 5px 19px;
-  font-size: 15px;
+  font-size: 14px;
   font-weight: 500;
+  border-radius: 6px;
 }
 
 .radioItem {

+ 45 - 9
src/views/student-register/index.tsx

@@ -186,9 +186,10 @@ export default defineComponent({
 
     const otherParams = reactive({
       showOtherSchool: false,
+      showCloseButton: true, // 是否显示关闭按钮
       showOtherMessage: '',
       /**  limit 超限制,change 更换学生,nickname 名称不一致  */
-      otherType: '' as 'limit' | 'change' | 'nickname',
+      otherType: '' as 'limit' | 'change' | 'nickname' | 'member',
       showCancelButton: true,
       cancelButtonColor: '',
       cancelButtonText: '取消',
@@ -477,6 +478,7 @@ export default defineComponent({
           '学生姓名与上次提交信息不一致,请确认修改学生信息或创建新的学生账号';
         otherParams.showOtherSchool = true;
         otherParams.showCancelButton = true;
+        otherParams.showCloseButton = true;
         otherParams.cancelButtonColor =
           'linear-gradient( 224deg, #3FE1E6 0%, #00CDD4 100%)';
         otherParams.cancelButtonText = '新建学生';
@@ -496,6 +498,7 @@ export default defineComponent({
         otherParams.showOtherMessage = `同一手机号最多创建${forms.multi_user_limit}个学生`;
         otherParams.showOtherSchool = true;
         otherParams.showCancelButton = false;
+        otherParams.showCloseButton = true;
         otherParams.confirmButtonColor =
           'linear-gradient( 305deg, #40C8FF 0%, #3192FF 100%)';
         otherParams.confirmButtonText = '我知道了';
@@ -511,11 +514,14 @@ export default defineComponent({
         forms.isRegister === 'update'
       ) {
         otherParams.showOtherMessage = `您已绑定【${
+          forms.studentItem?.schoolName || ''
+        }】,提交后将更换到【
+        <span style="color: #2B85FF">${
           forms.registerDetails.schoolName || ''
-        }】,提交后将更换到【${
-          forms.studentItem?.schoolName
-        }】,是否确认提交?`;
+        }</span>
+        】,是否确认提交?`;
         otherParams.showOtherSchool = true;
+        otherParams.showCloseButton = false;
         otherParams.showCancelButton = true;
         otherParams.cancelButtonColor = '';
         otherParams.cancelButtonText = '取消';
@@ -659,7 +665,20 @@ export default defineComponent({
         }
 
         if (schoolInfo.data.hasBuyCourse && vipList.length > 0) {
-          forms.dialogConfirmStatus = true;
+          // forms.dialogConfirmStatus = true;
+
+          // 15907121011
+
+          otherParams.showOtherMessage = `该学员已购买会员,是否确认购买?`;
+          otherParams.showOtherSchool = true;
+          otherParams.showCloseButton = false;
+          otherParams.showCancelButton = true;
+          otherParams.cancelButtonColor = '';
+          otherParams.cancelButtonText = '取消';
+          otherParams.confirmButtonColor = '';
+          otherParams.confirmButtonText = '确定';
+          otherParams.otherType = 'member';
+          otherParams.messageAlign = 'center';
           return;
         }
 
@@ -1741,7 +1760,7 @@ export default defineComponent({
         </Popup>
 
         {/* 已经购买过样品 */}
-        <MDialog
+        {/* <MDialog
           title="提示"
           v-model:show={forms.dialogConfirmStatus}
           message={'已购买会员,是否确认购买?'}
@@ -1758,7 +1777,7 @@ export default defineComponent({
               applyOver();
             }
           }}
-        />
+        /> */}
 
         <MDialog
           title="提示"
@@ -1851,6 +1870,7 @@ export default defineComponent({
 
         <MMessageTip
           show={otherParams.showOtherSchool}
+          showCloseButton={otherParams.showCloseButton}
           messageAlign={otherParams.messageAlign}
           message={otherParams.showOtherMessage}
           showCancelButton={otherParams.showCancelButton}
@@ -1858,16 +1878,30 @@ export default defineComponent({
           cancelButtonText={otherParams.cancelButtonText}
           confirmButtonColor={otherParams.confirmButtonColor}
           confirmButtonText={otherParams.confirmButtonText}
+          onClose={() => (otherParams.showOtherSchool = false)}
           onCancel={() => {
             otherParams.showOtherSchool = false;
             if (otherParams.otherType === 'nickname') {
               forms.isRegister = 'create'; // 新建
               changeTipStatus(false, false);
               onSubmit();
-            } else if (otherParams.otherType === 'limit') {
+            } else if (otherParams.otherType === 'member') {
+              //取消支付,判断是否有结束时间,是否已经结束
+              if (forms.registerExpireTime && forms.activeOverStatus) {
+                applyOver();
+              }
+              //     onConfirm={async () => {
+              //   await paymentContinue();
+              // }}
+              // onCancel={() => {
+              //   //取消支付,判断是否有结束时间,是否已经结束
+              //   if (forms.registerExpireTime && forms.activeOverStatus) {
+              //     applyOver();
+              //   }
+              // }}
             }
           }}
-          onConfirm={() => {
+          onConfirm={async () => {
             otherParams.showOtherSchool = false;
             // 名字
             if (otherParams.otherType === 'nickname') {
@@ -1888,6 +1922,8 @@ export default defineComponent({
                   : true,
                 false
               );
+            } else if (otherParams.otherType === 'member') {
+              await paymentContinue();
             }
           }}
         />

+ 2 - 2
src/views/student-register/register-member/index.module.less

@@ -9,7 +9,7 @@
 
   .studentRegisterContainer {
     padding-top: 137px;
-    background: url('../images/new/banner-bg2.png') no-repeat top center;
+    background: url('../images/new/banner-bg3.png') no-repeat top center;
     background-size: contain;
   }
 }
@@ -24,7 +24,7 @@
 
   &.studentSectionForm {
     padding: 12px 0;
-    background: linear-gradient(180deg, #DBF6FD 0%, #FFFFFF 20%);
+    background: linear-gradient(180deg, #DBF6FD 0%, #FFFFFF 10%);
   }
 
   &.noSendDay {

+ 11 - 5
src/views/student-register/register-member/index.tsx

@@ -110,6 +110,7 @@ export default defineComponent({
     });
     const otherParams = reactive({
       showOtherSchool: false,
+      showCloseButton: true, // 是否显示关闭按钮
       showOtherMessage: '',
       /**  limit 超限制,change 更换学生,nickname 名称不一致  */
       otherType: '' as 'limit' | 'change' | 'nickname',
@@ -280,7 +281,7 @@ export default defineComponent({
           changeTipStatus(true, false);
         } else {
           forms.isRegister = 'create';
-          changeTipStatus(true, false);
+          changeTipStatus(false, false);
           forms.studentItem = [];
         }
       } catch {
@@ -305,6 +306,7 @@ export default defineComponent({
           '学生姓名与上次提交信息不一致,请确认修改学生信息或创建新的学生账号';
         otherParams.showOtherSchool = true;
         otherParams.showCancelButton = true;
+        otherParams.showCloseButton = true;
         otherParams.cancelButtonColor =
           'linear-gradient( 224deg, #3FE1E6 0%, #00CDD4 100%)';
         otherParams.cancelButtonText = '新建学生';
@@ -324,6 +326,7 @@ export default defineComponent({
         otherParams.showOtherMessage = `同一手机号最多创建${forms.multi_user_limit}个学生`;
         otherParams.showOtherSchool = true;
         otherParams.showCancelButton = false;
+        otherParams.showCloseButton = true;
         otherParams.confirmButtonColor =
           'linear-gradient( 305deg, #40C8FF 0%, #3192FF 100%)';
         otherParams.confirmButtonText = '我知道了';
@@ -339,12 +342,13 @@ export default defineComponent({
         forms.isRegister === 'update'
       ) {
         otherParams.showOtherMessage = `您已绑定【${
+          forms.studentItem?.schoolName || ''
+        }】,提交后将更换到【<span style="color: #2B85FF">${
           forms.details.name || ''
-        }】,提交后将更换到【${
-          forms.studentItem?.schoolName
-        }】,是否确认提交?`;
+        }</span>】,是否确认提交?`;
         otherParams.showOtherSchool = true;
         otherParams.showCancelButton = true;
+        otherParams.showCloseButton = false;
         otherParams.cancelButtonColor = '';
         otherParams.cancelButtonText = '取消';
         otherParams.confirmButtonColor = '';
@@ -502,7 +506,7 @@ export default defineComponent({
             class={[
               styles.studentSection,
               styles.studentSectionForm,
-              Number(forms.giftVipDay) <= 0 && styles.noSendDay
+              styles.noSendDay
             ]}>
             <div class={styles.title1}></div>
             <Form labelAlign="left" class={styles.registerForm}>
@@ -741,6 +745,7 @@ export default defineComponent({
 
         <MMessageTip
           show={otherParams.showOtherSchool}
+          showCloseButton={otherParams.showCloseButton}
           messageAlign={otherParams.messageAlign}
           message={otherParams.showOtherMessage}
           showCancelButton={otherParams.showCancelButton}
@@ -748,6 +753,7 @@ export default defineComponent({
           cancelButtonText={otherParams.cancelButtonText}
           confirmButtonColor={otherParams.confirmButtonColor}
           confirmButtonText={otherParams.confirmButtonText}
+          onClose={() => (otherParams.showOtherSchool = false)}
           onCancel={() => {
             otherParams.showOtherSchool = false;
             if (otherParams.otherType === 'nickname') {

+ 1 - 1
src/views/student-register/register-new/index.module.less

@@ -31,7 +31,7 @@
 
   &.studentSectionForm {
     padding: 12px 0;
-    background: linear-gradient(180deg, #DBF6FD 0%, #FFFFFF 20%);
+    background: linear-gradient(180deg, #DBF6FD 0%, #FFFFFF 10%);
   }
 
   &.noSendDay {

+ 12 - 6
src/views/student-register/register-new/index.tsx

@@ -111,6 +111,7 @@ export default defineComponent({
     });
     const otherParams = reactive({
       showOtherSchool: false,
+      showCloseButton: true, // 是否显示关闭按钮
       showOtherMessage: '',
       /**  limit 超限制,change 更换学生,nickname 名称不一致  */
       otherType: '' as 'limit' | 'change' | 'nickname',
@@ -251,7 +252,7 @@ export default defineComponent({
           changeTipStatus(true, false);
         } else {
           forms.isRegister = 'create';
-          changeTipStatus(true, false);
+          changeTipStatus(false, false);
           forms.studentItem = [];
         }
       } catch {
@@ -279,6 +280,7 @@ export default defineComponent({
           '学生姓名与上次提交信息不一致,请确认修改学生信息或创建新的学生账号';
         otherParams.showOtherSchool = true;
         otherParams.showCancelButton = true;
+        otherParams.showCloseButton = true;
         otherParams.cancelButtonColor =
           'linear-gradient( 224deg, #3FE1E6 0%, #00CDD4 100%)';
         otherParams.cancelButtonText = '新建学生';
@@ -298,6 +300,7 @@ export default defineComponent({
         otherParams.showOtherMessage = `同一手机号最多创建${forms.multi_user_limit}个学生`;
         otherParams.showOtherSchool = true;
         otherParams.showCancelButton = false;
+        otherParams.showCloseButton = true;
         otherParams.confirmButtonColor =
           'linear-gradient( 305deg, #40C8FF 0%, #3192FF 100%)';
         otherParams.confirmButtonText = '我知道了';
@@ -313,12 +316,13 @@ export default defineComponent({
         forms.isRegister === 'update'
       ) {
         otherParams.showOtherMessage = `您已绑定【${
-          forms.details.name || ''
-        }】,提交后将更换到【${
-          forms.studentItem?.schoolName
-        }】,是否确认提交?`;
+          forms.studentItem?.schoolName || ''
+        }】,提交后将更换到【
+        <span style="color: #2B85FF">${forms.details.name || ''}</span>
+        】,是否确认提交?`;
         otherParams.showOtherSchool = true;
         otherParams.showCancelButton = true;
+        otherParams.showCloseButton = false;
         otherParams.cancelButtonColor = '';
         otherParams.cancelButtonText = '取消';
         otherParams.confirmButtonColor = '';
@@ -560,7 +564,7 @@ export default defineComponent({
             class={[
               styles.studentSection,
               styles.studentSectionForm,
-              forms.giftVipDay <= 0 && styles.noSendDay
+              Number(forms.giftVipDay) > 0 && styles.noSendDay
             ]}>
             <div class={styles.title1}></div>
             <Form labelAlign="left" class={styles.registerForm}>
@@ -807,6 +811,7 @@ export default defineComponent({
 
         <MMessageTip
           show={otherParams.showOtherSchool}
+          showCloseButton={otherParams.showCloseButton}
           messageAlign={otherParams.messageAlign}
           message={otherParams.showOtherMessage}
           showCancelButton={otherParams.showCancelButton}
@@ -814,6 +819,7 @@ export default defineComponent({
           cancelButtonText={otherParams.cancelButtonText}
           confirmButtonColor={otherParams.confirmButtonColor}
           confirmButtonText={otherParams.confirmButtonText}
+          onClose={() => (otherParams.showOtherSchool = false)}
           onCancel={() => {
             otherParams.showOtherSchool = false;
             if (otherParams.otherType === 'nickname') {