lex 11 kuukautta sitten
vanhempi
commit
a2aba4050c

+ 1 - 1
src/helpers/request.ts

@@ -85,7 +85,7 @@ request.interceptors.response.use(
     }
     const data = await res.clone().json();
     // 999 为特殊code码
-    const otherCode = [999, 5435, 5436, 5437, 5439, 5442, 5443, 5408, 5427];
+    const otherCode = [999, 5435, 5436, 5437, 5439, 5442, 5443, 5408, 5427, 980, 981, 982,983, 984];
     if (
       data.code !== 200 &&
       data.errCode !== 0 &&

+ 40 - 16
src/views/activation-code/activation-register/index.tsx

@@ -503,19 +503,32 @@ export default defineComponent({
             forms.showMessage =
               '<p style="color: #F44541">报名已截止,感谢您的参与</p>'; //result.message;
             forms.showButton = false;
-          } else if (
-            registerResult.code === 5442 ||
-            registerResult.code === 5443
-          ) {
+          } else if (registerResult.code === 980) {
+            // 980:激活码不存在
+            forms.showResultPopup = true;
+            forms.reslutPopupType = 'INVALID';
+            forms.resultPopupContent = registerResult.message;
+          } else if (registerResult.code === 981) {
+            // 981:激活码被同一人重复使用
+            forms.showResultPopup = true;
+            forms.reslutPopupType = 'ACTIVATING-TWO';
+            forms.resultPopupContent = registerResult.message;
+          } else if (registerResult.code === 982) {
+            // 982:激活码已激活
             forms.showResultPopup = true;
             forms.reslutPopupType = 'EXPIRED';
             forms.resultPopupContent = registerResult.message;
+          } else if (registerResult.code === 983) {
+            // 983:激活码已作废
+            forms.showResultPopup = true;
+            forms.reslutPopupType = 'OVERDUE';
+            forms.resultPopupContent = registerResult.message;
+          } else if (registerResult.code === 984) {
+            // 984:激活码已过期
+            forms.showResultPopup = true;
+            forms.reslutPopupType = 'CANCELLED';
+            forms.resultPopupContent = registerResult.message;
           }
-          // else if (registerResult.code === 5443) {
-          //   forms.showResultPopup = true;
-          //   forms.reslutPopupType = 'CANCELLED';
-          //   forms.resultPopupContent = registerResult.message;
-          // }
           return false;
         } else {
           forms.showResultPopup = true;
@@ -585,6 +598,7 @@ export default defineComponent({
           changeTipStatus(true, false);
         } else {
           forms.isRegister = 'create';
+          studentInfo.autoRegister = false;
           changeTipStatus(false, false);
           forms.studentItem = [];
         }
@@ -607,6 +621,7 @@ export default defineComponent({
       forms.studentList = []; // 手机号关联学生列表
       forms.studentItem = {}; // 选择的学生
       forms.isRegister = 'create'; // 是否注册学生
+      studentInfo.autoRegister = false
       forms.isTipRegister = false; // 是否显示名字不一致 - 默认显示
       forms.isChangeSchool = false; // 是否切换学校
     };
@@ -803,6 +818,7 @@ export default defineComponent({
       forms.gradeList = getGradeList();
       forms.classList = classList;
     });
+
     return () => (
       <div class={[styles['student-register']]}>
         <img src={bannerBg} class={styles.bannerBg} />
@@ -1473,13 +1489,17 @@ export default defineComponent({
           <CodeDialog
             type={forms.reslutPopupType}
             btnText={
-              forms.reslutPopupType === 'ACTIVATING'
+              forms.reslutPopupType === 'ACTIVATING' ||
+              forms.reslutPopupType === 'ACTIVATING-TWO'
                 ? '立即下载激活'
                 : '我知道了'
             }
             onConfirm={() => {
               //
-              if (forms.reslutPopupType === 'ACTIVATING') {
+              if (
+                forms.reslutPopupType === 'ACTIVATING' ||
+                forms.reslutPopupType === 'ACTIVATING-TWO'
+              ) {
                 router.push('/download');
               } else {
                 forms.showResultPopup = false;
@@ -1492,13 +1512,17 @@ export default defineComponent({
                 ,使用手机号激活,实现音乐课堂互通互联
               </p>
             )}
-
-            {forms.reslutPopupType === 'CANCELLED' && (
-              <p style={{ textAlign: 'center', paddingTop: '5px' }}>
-                {forms.resultPopupContent}
+            {forms.reslutPopupType === 'ACTIVATING-TWO' && (
+              <p>
+                您已激活该互通码,请勿重复提交,请下载
+                <span style={{ color: '#2B85FF' }}>【音乐数字课堂】</span>
+                实现互通互联
               </p>
             )}
-            {forms.reslutPopupType === 'EXPIRED' && (
+
+            {['INVALID', 'EXPIRED', 'CANCELLED', 'OVERDUE'].includes(
+              forms.reslutPopupType
+            ) && (
               <p style={{ textAlign: 'center', paddingTop: '5px' }}>
                 {forms.resultPopupContent}
               </p>

+ 3 - 3
src/views/activation-code/index.module.less

@@ -206,8 +206,8 @@
 
     .num {
       display: inline-block;
-      width: 15px;
-      height: 15px;
+      width: 16px;
+      height: 16px;
       margin-right: 5px;
       flex-shrink: 0;
     }
@@ -389,4 +389,4 @@
       color: #333333;
     }
   }
-}
+}

+ 31 - 1
src/views/activation-code/instrument-registration/index.module.less

@@ -112,6 +112,36 @@
     padding: 10px 0 20px
   }
 
+  .contentTip {
+    margin-top: 8px;
+    background: #F8F8F8;
+    border-radius: 4px;
+    padding: 10px;
+    font-size: 12px;
+    color: #666666;
+    line-height: 21px;
+
+    p {
+      display: flex;
+      align-items: center;
+    }
+    i {
+      display: inline-block;
+      margin-right: 5px;
+      width: 14px;
+      height: 14px;
+    }
+
+    .num1 {
+      background: url('../images/num1.png') no-repeat center;
+      background-size: contain;
+    }
+    .num2 {
+      background: url('../images/num1.png') no-repeat center;
+      background-size: contain;
+    }
+  }
+
   .pBtnGroup {
     padding: 0 50px;
 
@@ -127,4 +157,4 @@
   .inputGroup {
     margin-top: 706px;
   }
-}
+}

+ 9 - 2
src/views/activation-code/instrument-registration/index.tsx

@@ -112,8 +112,15 @@ export default defineComponent({
             <img class={styles.title} src={loginError} />
 
             <div class={styles.content}>
-              请输入<span style={{ color: '#2b85ff' }}>【音乐数字课堂】</span>
-              激活成功时的手机号
+              互通互联检测未通过,可能存在以下原因:
+              <div class={styles.contentTip}>
+                <p>
+                  <i class={styles.num1}></i>所在学校未开启互通互联
+                </p>
+                <p>
+                  <i class={styles.num2}></i>未激活数字化工具
+                </p>
+              </div>
             </div>
             <div class={styles.pBtnGroup}>
               <Button

BIN
src/views/activation-code/modal/code-dialog/images/title6.png


BIN
src/views/activation-code/modal/code-dialog/images/title7.png


+ 2 - 2
src/views/activation-code/modal/code-dialog/index.module.less

@@ -57,7 +57,7 @@
   background: #FFFFFF;
   border-radius: 12px;
   margin: 4px;
-  padding: 15px;
+  padding: 15px 14px;
 
   .content {
     font-size: 15px;
@@ -81,4 +81,4 @@
       }
     }
   }
-}
+}

+ 18 - 4
src/views/activation-code/modal/code-dialog/index.tsx

@@ -1,7 +1,6 @@
 import { PropType, computed, defineComponent } from 'vue';
 import styles from './index.module.less';
 import { Button } from 'vant';
-import { emit } from 'process';
 
 export const getAssetsHomeFile = (fileName: string) => {
   const path = `./images/${fileName}`;
@@ -25,9 +24,19 @@ export default defineComponent({
       // INACTIVATED: '未激活',
       // EXPIRED: '已失效',
       // ACTIVATING: '激活中',
+      // ACTIVATING-TWO: '激活中',
       // CANCELLED: '已作废',
+      // OVERDUE: '已过期',
+      // INVALID 错误
       type: String as PropType<
-        'ACTIVATED' | 'EXPIRED' | 'CANCELLED' | 'INFO' | 'ACTIVATING'
+        | 'ACTIVATED'
+        | 'EXPIRED'
+        | 'CANCELLED'
+        | 'INFO'
+        | 'ACTIVATING'
+        | 'ACTIVATING-TWO'
+        | 'OVERDUE'
+        | 'INVALID'
       >,
       default: 'ACTIVATED'
     }
@@ -35,13 +44,12 @@ export default defineComponent({
   emits: ['confirm'],
   setup(props, { emit, slots }) {
     const headerImgs = computed(() => {
-      console.log(props.type, 'props.type');
       let title = getAssetsHomeFile('title1.png');
       let icon = getAssetsHomeFile('brid1.png');
       if (props.type === 'ACTIVATED') {
         title = getAssetsHomeFile('title4.png');
         icon = getAssetsHomeFile('brid1.png');
-      } else if (props.type === 'ACTIVATING') {
+      } else if (props.type === 'ACTIVATING' || props.type === 'ACTIVATING-TWO') {
         title = getAssetsHomeFile('title2.png');
         icon = getAssetsHomeFile('brid1.png');
       } else if (props.type === 'EXPIRED') {
@@ -53,6 +61,12 @@ export default defineComponent({
       } else if (props.type === 'INFO') {
         title = getAssetsHomeFile('title3.png');
         icon = getAssetsHomeFile('brid2.png');
+      } else if (props.type === 'INVALID') {
+        title = getAssetsHomeFile('title6.png');
+        icon = getAssetsHomeFile('brid3.png');
+      } else if (props.type === 'OVERDUE') {
+        title = getAssetsHomeFile('title7.png');
+        icon = getAssetsHomeFile('brid3.png');
       }
       return {
         title,

+ 1 - 1
vite.config.ts

@@ -16,7 +16,7 @@ function resolve(dir: string) {
 // const proxyUrl = 'https://test.lexiaoya.cn/';
 // const proxyUrl = 'https://kt.colexiu.com/';
 // const proxyUrl = 'http://192.168.3.143:7093/';
-const proxyUrl = 'https://test.kt.colexiu.com/';
+const proxyUrl = 'https://dev.kt.colexiu.com/';
 export default defineConfig({
   base: './',
   plugins: [