lex 1 rok pred
rodič
commit
ef7d17f2a4

+ 4 - 0
src/styles/index.less

@@ -262,4 +262,8 @@ body {
 .van-scale-enter-active,
 .van-scale-leave-active {
   transition: all 0.25s;
+}
+
+.van-toast {
+  z-index: 9999 !important;
 }

+ 2 - 2
src/views/exercise-record/exercis-detail.module.less

@@ -4,7 +4,7 @@
 }
 
 .topWrap {
-  margin-bottom: 12px;
+  padding-bottom: 12px;
 
   .topInfo {
     padding: 34px 15px 30px;
@@ -32,7 +32,7 @@
       .infoMsg {
         p {
           display: inline-block;
-          width: 120px;
+          width: 110px;
           text-overflow: ellipsis;
           white-space: nowrap;
           overflow: hidden;

+ 3 - 2
src/views/exercise-record/exercis-detail.tsx

@@ -155,7 +155,8 @@ export default defineComponent({
                   <p>{infoDetail.value.nickname}</p>
                   <div class={styles.tag}>
                     {infoDetail.value.subjectNames
-                      ? infoDetail.value.subjectNames
+                      ? infoDetail.value.subjectNames +
+                        infoDetail.value.classGroupName
                       : '暂无声部'}
                   </div>
                 </div>
@@ -173,7 +174,7 @@ export default defineComponent({
                 <div class={styles.infoTime}>
                   <p class={styles.infoDayMain}>
                     {infoDetail.value.practiceTimes
-                      ? infoDetail.value.practiceTimes
+                      ? Math.ceil(infoDetail.value.practiceTimes / 60)
                       : 0}
                     <span>分钟</span>
                   </p>

+ 27 - 0
src/views/knowledge-library/error-question-mode/index.tsx

@@ -142,6 +142,33 @@ export default defineComponent({
           }
         });
         state.visiableInfo.graspItem.grasp = true;
+
+        // 只有一道题
+        if (state.questionList.length === 1) {
+          onAfter();
+          router.back();
+          return;
+        }
+
+        // 后面还有题
+        if (state.questionList.length > state.currentIndex + 1) {
+          const index = state.questionList.findIndex(
+            (item: any) =>
+              item.studentExaminationErrorEditionId ===
+              state.visiableInfo.graspItem.studentExaminationErrorEditionId
+          );
+          state.questionList.splice(index, 1);
+          state.total -= 1;
+          resizeSwipeItemHeight();
+          // swipeRef.value?.next();
+          return;
+        }
+
+        // 后面没有题
+        if (state.questionList.length === state.currentIndex + 1) {
+          swipeRef.value?.prev();
+          return;
+        }
       } catch {
         //
       }

+ 4 - 3
src/views/knowledge-library/examination-mode/index.tsx

@@ -139,6 +139,7 @@ export default defineComponent({
      * @description 下一题 | 测试完成
      */
     const onNextQuestion = async () => {
+      state.nextStatus = true;
       try {
         const questionList = state.questionList || [];
         const userAnswerList: any = []; // 所有题目的答案
@@ -166,7 +167,6 @@ export default defineComponent({
           return;
         }
 
-        state.nextStatus = true;
         await request.post('/edu-app/studentUnitExamination/submitAnswer', {
           hideLoading: true,
           data: {
@@ -175,11 +175,10 @@ export default defineComponent({
           }
         });
         swipeRef.value?.next();
-
-        state.nextStatus = false;
       } catch {
         //
       }
+      state.nextStatus = false;
     };
 
     /**
@@ -233,6 +232,8 @@ export default defineComponent({
         onResultPopup();
       } else if (state.visiableInfo.operationType === 'TIME') {
         state.visiableInfo.show = false;
+        router.back();
+        onAfter();
       }
     };
     const onCloseResult = async (status: boolean) => {

+ 35 - 30
src/views/knowledge-library/practice-mode/index.tsx

@@ -83,6 +83,7 @@ export default defineComponent({
           item.analysis = {
             message: item.answerAnalysis,
             topic: true, // 是否显示结果
+            isAnswer: false, // 是否答题
             userResult: false // 用户答题对错
           };
           item.userAnswer = []; // 用户答题
@@ -98,36 +99,40 @@ export default defineComponent({
      */
     const onNextQuestion = async () => {
       try {
-        const questionList = state.questionList || [];
-
-        let result: any = {};
-        questionList.forEach((question: any, index: number) => {
-          // 格式化所有题目的答案
-          if (index === state.currentIndex) {
-            result = {
-              questionId: question.id,
-              details: question.userAnswer || []
-            };
-          }
-        });
+        const questionList: any = state.questionList || [];
+        let currentStatus = true;
+        if (!questionList[state.currentIndex]?.analysis.isAnswer) {
+          let result: any = {};
+          questionList.forEach((question: any, index: number) => {
+            // 格式化所有题目的答案
+            if (index === state.currentIndex) {
+              result = {
+                questionId: question.id,
+                details: question.userAnswer || []
+              };
+            }
+          });
 
-        const { data } = await request.post(
-          '/edu-app/studentUnitExamination/submitTrainingAnswer',
-          {
-            hideLoading: true,
-            data: result
-          }
-        );
-        // 初始化是否显示解析
-        questionList.forEach((question: any, index: number) => {
-          // 格式化所有题目的答案
-          if (index === state.currentIndex) {
-            state.answerAnalysis = question.answerAnalysis;
-            state.questionTypeCode = question.questionTypeCode;
-            question.showAnalysis = true;
-            question.analysis.userResult = data;
-          }
-        });
+          const { data } = await request.post(
+            '/edu-app/studentUnitExamination/submitTrainingAnswer',
+            {
+              hideLoading: true,
+              data: result
+            }
+          );
+          currentStatus = data;
+          // 初始化是否显示解析
+          questionList.forEach((question: any, index: number) => {
+            // 格式化所有题目的答案
+            if (index === state.currentIndex) {
+              state.answerAnalysis = question.answerAnalysis;
+              state.questionTypeCode = question.questionTypeCode;
+              question.showAnalysis = true;
+              question.analysis.userResult = data;
+              question.analysis.isAnswer = true; // 是否答题
+            }
+          });
+        }
 
         // 判断是否是最后一题
         if (state.questionList.length === state.currentIndex + 1) {
@@ -143,7 +148,7 @@ export default defineComponent({
           return;
         }
 
-        if (data) {
+        if (currentStatus) {
           swipeRef.value?.next();
         } else {
           state.visiableError = true;

+ 8 - 3
src/views/knowledge-library/wroing-book/woring-stat/index.tsx

@@ -107,7 +107,12 @@ export default defineComponent({
           } else if (item.errorEditionStatEnum === 'OFTEN_ERROR_QUESTION') {
             forms.OFTEN_ERROR_QUESTION = item.data || [];
           } else if (item.errorEditionStatEnum === 'OFTEN_ERROR_POINT') {
-            forms.OFTEN_ERROR_POINT = item.data || [];
+            const temp = item.data || [];
+            const maxLength = temp[0]?.totalNum;
+            temp.forEach((item: any) => {
+              item.totalNum = maxLength;
+            });
+            forms.OFTEN_ERROR_POINT = temp;
           }
         });
 
@@ -191,7 +196,7 @@ export default defineComponent({
           <div class={styles.imitateContainer}>
             <div class={[styles.imitateTitle, styles.preFix]}>
               <i></i>
-              练习模式数据统计
+              数据总览
             </div>
             <Grid columnNum={3} class={styles.imitateGrid} border={false}>
               <GridItem>
@@ -246,7 +251,7 @@ export default defineComponent({
                   <span>及格率</span>
                 </div>
                 <div class={styles.memoResult}>
-                  {forms.MOCK_TEST.passRate || 0}
+                  {forms.MOCK_TEST.passRate || 0}%
                 </div>
               </div>
               <div class={styles.dataItem}>

+ 2 - 2
src/views/member-center/index.tsx

@@ -218,7 +218,7 @@ export default defineComponent({
                       </div>
                     ) : (
-                      <div>您还未开通器乐学练工具哟</div>
+                      <div>您还未领取器乐学练工具哟</div>
                     )}
                   </>
                 </div>
@@ -254,7 +254,7 @@ export default defineComponent({
                   title: () => (
                     <div class={styles.gift}>
                       <img src={iconGift} class={styles.iconGift} />
-                      现在购买赠送{' '}
+                      现在领取赠送{' '}
                       <span>{this.users.membershipGiftDays || 0}</span>
                       天有效期
                     </div>

+ 1 - 1
src/views/student-register/index.tsx

@@ -514,7 +514,7 @@ export default defineComponent({
         />
 
         {/* 是否在微信中打开 */}
-        <OWxTip />
+        {/* <OWxTip /> */}
       </div>
     );
   }

+ 1 - 0
src/views/student-register/shop-address/address-operation.tsx

@@ -135,6 +135,7 @@ export default defineComponent({
             placeholder="请输入收货人姓名"
             v-model={state.name}
             autocomplete="off"
+            maxlength={14}
           />
           <Field
             label="手机号"