瀏覽代碼

Merge branch 'iteration-create'

liushengqiang 1 年之前
父節點
當前提交
7181f697fa
共有 26 個文件被更改,包括 276 次插入129 次删除
  1. 4 0
      src/styles/index.less
  2. 2 2
      src/views/co-ai/index.tsx
  3. 1 0
      src/views/courseware-list/component/book/index.tsx
  4. 2 10
      src/views/courseware-play/component/audio-item/index.tsx
  5. 2 6
      src/views/courseware-play/component/video-item/index.tsx
  6. 1 4
      src/views/courseware-play/index.tsx
  7. 2 2
      src/views/exercise-record/exercis-detail.module.less
  8. 3 2
      src/views/exercise-record/exercis-detail.tsx
  9. 7 5
      src/views/information/help-center/index.tsx
  10. 27 0
      src/views/knowledge-library/error-question-mode/index.tsx
  11. 4 3
      src/views/knowledge-library/examination-mode/index.tsx
  12. 23 19
      src/views/knowledge-library/model/anser-title/index.tsx
  13. 1 1
      src/views/knowledge-library/model/result-finish/index.tsx
  14. 35 30
      src/views/knowledge-library/practice-mode/index.tsx
  15. 1 1
      src/views/knowledge-library/unit-detail.tsx
  16. 1 1
      src/views/knowledge-library/wroing-book/woring-stat/echarts.ts
  17. 8 3
      src/views/knowledge-library/wroing-book/woring-stat/index.tsx
  18. 2 2
      src/views/member-center/index.tsx
  19. 7 0
      src/views/school-register/index.module.less
  20. 32 26
      src/views/school-register/index.tsx
  21. 1 1
      src/views/student-register/index.tsx
  22. 23 2
      src/views/student-register/register-modal/index.module.less
  23. 62 3
      src/views/student-register/register-modal/index.tsx
  24. 1 0
      src/views/student-register/shop-address/address-operation.tsx
  25. 3 1
      src/views/teaher-register/component/success/index.module.less
  26. 21 5
      src/views/teaher-register/index.tsx

+ 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/co-ai/index.tsx

@@ -56,7 +56,7 @@ export default defineComponent({
       /** 音乐Index */
       musicIndex: 0,
       /** 显示简谱 */
-      isShowJianpu: false,
+      isShowJianpu: true,
       /** 教材列表 */
       types: [] as any[],
       /** 音乐列表 */
@@ -289,7 +289,7 @@ export default defineComponent({
                         <div class={styles.musicDes}>
                           <div class={styles.musicFavitor}>{item.usedNum}</div>
                           <div class={[styles.musicAuthor, 'van-ellipsis']}>
-                            {item.composer}
+                            {item.composer || '佚名'}
                           </div>
                         </div>
                       </div>

+ 1 - 0
src/views/courseware-list/component/book/index.tsx

@@ -186,6 +186,7 @@ export default defineComponent({
           name: item.name
         })
         const url = location.origin + location.pathname + '#/courseware-play?' + query;
+        console.log("🚀 ~ url:", url)
         postMessage({
           api: 'openWebView',
           content: {

+ 2 - 10
src/views/courseware-play/component/audio-item/index.tsx

@@ -55,7 +55,7 @@ export default defineComponent({
       () => props.show,
       val => {
         if (val) {
-          onToggleAudio();
+          // onToggleAudio();
         } else {
           audioRef.value.pause();
         }
@@ -66,10 +66,6 @@ export default defineComponent({
       val => {
         if (val === 'hidden' && props.show) {
           audioRef.value.pause();
-        } else {
-          if (props.show){
-            onToggleAudio();
-          }
         }
       }
     );
@@ -114,10 +110,6 @@ export default defineComponent({
     /** 加载成功 */
     const onLoadedmetadata = () => {
       data.duration = audioRef.value.duration;
-      // 加载成功后台, 如果是第一次加载, 且是show状态, 则播放
-      if (props.show) {
-        onToggleAudio();
-      }
     };
 
     /** 改变播放时间 */
@@ -133,7 +125,7 @@ export default defineComponent({
     /** 播放结束 */
     const onEnded = () => {
       data.playState = 'pause';
-      emit('ended');
+      // emit('ended');
     };
     return () => (
       <div class={styles.videoWrap}>

+ 2 - 6
src/views/courseware-play/component/video-item/index.tsx

@@ -53,7 +53,7 @@ export default defineComponent({
     watch(
       () => props.show,
       val => {
-        onToggleAudio(val ? 'play' : 'pause');
+        onToggleAudio('pause');
       }
     );
     watch(
@@ -61,10 +61,6 @@ export default defineComponent({
       val => {
         if (val === 'hidden' && props.show) {
           onToggleAudio('pause');
-        } else {
-          if (props.show){
-            onToggleAudio('play');
-          }
         }
       }
     );
@@ -107,7 +103,7 @@ export default defineComponent({
     /** 播放结束 */
     const onEnded = () => {
       data.playState = 'pause';
-      emit('ended');
+      // emit('ended');
     };
     onMounted(() => {
       console.log('加载');

+ 1 - 4
src/views/courseware-play/index.tsx

@@ -123,10 +123,7 @@ export default defineComponent({
         data.knowledgePointList = res.data.map((item: any) => {
           return {
             ...item,
-            url:
-              item.type === 'SONG'
-                ? 'https://gyt.ks3-cn-beijing.ksyuncs.com/courseware/1687916228530.png'
-                : item.coverImg
+            url: item.coverImg
           };
         });
       }

+ 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>

+ 7 - 5
src/views/information/help-center/index.tsx

@@ -77,10 +77,12 @@ export default defineComponent({
           styles.helpCenter,
           !form.listState.dataShow && 'emptyRootContainer'
         ]}>
-        <OSticky position="top">
-          <OHeader border={false} isBack={route.query.platformType == 'ANALYSIS' ? false : true} />
-          <OSearch onSearch={onSearch} />
-        </OSticky>
+        {route.query.platformType == 'ANALYSIS' ? null : (
+          <OSticky position="top">
+            <OHeader border={false} />
+            <OSearch onSearch={onSearch} />
+          </OSticky>
+        )}
 
         {form.listState.dataShow ? (
           <List
@@ -99,7 +101,7 @@ export default defineComponent({
                   router.push({
                     path: 'help-detail',
                     query: {
-                      id: item.id,
+                      id: item.id
                     }
                   });
                 }}></Cell>

+ 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) => {

+ 23 - 19
src/views/knowledge-library/model/anser-title/index.tsx

@@ -1,9 +1,9 @@
-import { Tag, Image, Icon } from 'vant'
-import { computed, defineComponent } from 'vue'
-import { QuestionType, QuestionTypeName } from '../../unit'
-import styles from './index.module.less'
-import iconPassCheck from '../../images/icon-pass-check.png'
-import UnitAudio from '../unit-audio'
+import { Tag, Image, Icon } from 'vant';
+import { computed, defineComponent } from 'vue';
+import { QuestionType, QuestionTypeName } from '../../unit';
+import styles from './index.module.less';
+import iconPassCheck from '../../images/icon-pass-check.png';
+import UnitAudio from '../unit-audio';
 
 export default defineComponent({
   name: 'answer-title',
@@ -38,30 +38,31 @@ export default defineComponent({
   setup(props) {
     const answerTypeName = computed(() => {
       if (props.answerType === QuestionType.CHECKBOX) {
-        return QuestionTypeName.CHECKBOX
+        return QuestionTypeName.CHECKBOX;
       } else if (props.answerType === QuestionType.LINK) {
-        return QuestionTypeName.LINK
+        return QuestionTypeName.LINK;
       } else if (props.answerType === QuestionType.SORT) {
-        return QuestionTypeName.SORT
+        return QuestionTypeName.SORT;
       } else if (props.answerType === QuestionType.PLAY) {
-        return QuestionTypeName.PLAY
+        return QuestionTypeName.PLAY;
       }
-      return QuestionTypeName.RADIO
-    })
+      return QuestionTypeName.RADIO;
+    });
 
     const mediaUrls = computed(() =>
       props.extra.mediaUrls ? props.extra.mediaUrls.split(',') : ''
-    )
+    );
     return () => (
       <>
         <div class={styles.unitSubjectTitle}>
-          {props.index}、{props.name} <span class={styles.unitScore}>({props.score || 0}分)</span>
+          {props.index}、{props.name}
+          {/* <span class={styles.unitScore}>({props.score || 0}分)</span> */}
           <Tag
             type="primary"
             style={{
+              marginLeft: '8px',
               lineHeight: '20px'
-            }}
-          >
+            }}>
             {answerTypeName.value}
           </Tag>
         </div>
@@ -83,7 +84,10 @@ export default defineComponent({
                       {url.substr(-3) === 'mp3' ? (
                         <UnitAudio src={url} class={styles.valueAudio} />
                       ) : (
-                        <Image class={[styles.unitTitleImg, 'answerTitleImg']} src={url} />
+                        <Image
+                          class={[styles.unitTitleImg, 'answerTitleImg']}
+                          src={url}
+                        />
                       )}
                     </>
                   )
@@ -93,6 +97,6 @@ export default defineComponent({
           ''
         )}
       </>
-    )
+    );
   }
-})
+});

+ 1 - 1
src/views/knowledge-library/model/result-finish/index.tsx

@@ -55,7 +55,7 @@ export default defineComponent({
     /** 是否显示关闭 */
     closeable: {
       type: Boolean,
-      default: true
+      default: false
     }
   },
   emits: ['close', 'conform'],

+ 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;

+ 1 - 1
src/views/knowledge-library/unit-detail.tsx

@@ -42,7 +42,7 @@ export default defineComponent({
           '/edu-app/studentUnitExamination/checkKnowledgePointIds',
           {
             params: {
-              lessonCoursewareId: forms.detailId
+              knowledgePointIds: forms.detailId
             }
           }
         );

+ 1 - 1
src/views/knowledge-library/wroing-book/woring-stat/echarts.ts

@@ -96,7 +96,7 @@ export const lineChartOption = {
   },
   yAxis: {
     type: 'category',
-    data: ['多选题', '排序题', '单选题', '连连看']
+    data: ['连连看', '单选题', '排序题', '多选题']
   },
   dataZoom: [{ type: 'inside', throttle: 100 }],
   toolbox: { feature: { saveAsImage: { show: false } } }

+ 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>

+ 7 - 0
src/views/school-register/index.module.less

@@ -190,4 +190,11 @@
             margin: 0 auto;
         }
     }
+}
+.codeWrap{
+    :global{
+        .van-field__error-message{
+            text-align: left !important;
+        }
+    }
 }

+ 32 - 26
src/views/school-register/index.tsx

@@ -14,6 +14,7 @@ import {
   api_sysAreaQueryAllProvince
 } from './api';
 import { useRoute } from 'vue-router';
+import MImgCode from '@/components/m-img-code';
 
 export default defineComponent({
   name: 'SchoolRegister',
@@ -45,7 +46,7 @@ export default defineComponent({
       cityCode: '', // 所属城市
       provinceCode: '', // 所属省份
       schoolNature: 'PUBLIC' as 'PUBLIC' | 'PRIVATE' | string, // 学校性质
-      schoolType: 'PRIMARY' as 'PRIMARY' | 'JUNIOR' | 'PRIMARY_JUNIOR' | string, // 学校类型
+      schoolType: 'PRIMARY_JUNIOR' as 'PRIMARY' | 'JUNIOR' | 'PRIMARY_JUNIOR' | string, // 学校类型
       gradeYear: 'SIX_YEAR_SYSTEM' as
         | 'FIVE_YEAR_SYSTEM'
         | 'SIX_YEAR_SYSTEM'
@@ -65,7 +66,8 @@ export default defineComponent({
       showArea: false,
       success: false,
       areaList: {} as any,
-      sendMsg: '发送验证码'
+      sendMsg: '发送验证码',
+      imgCodeStatus: false
     });
     const formateArea = (area: any[]) => {
       const province_list: { [_: string]: string } = {};
@@ -131,7 +133,6 @@ export default defineComponent({
     const handleSubmit = async () => {
       const res = await api_schoolAdd({ ...forms });
       if (res?.code === 200) {
-        showToast('提交成功');
         data.success = true;
       }
     };
@@ -160,6 +161,7 @@ export default defineComponent({
                   placeholder="请输入学校全称"
                   inputAlign="right"
                   v-model={forms.name}
+                  maxlength={20}
                   rules={[{ required: true, message: '请输入学校全称' }]}
                 />
                 <Field
@@ -196,27 +198,6 @@ export default defineComponent({
                   }}
                 </Field>
 
-                <Field center border label="学校类型" labelWidth="70px">
-                  {{
-                    input: () => (
-                      <>
-                        {formOptions.types.map(item => {
-                          return (
-                            <Button
-                              class={styles.radio}
-                              size="small"
-                              color={
-                                item.value === forms.schoolType ? '#198CFE' : ''
-                              }
-                              onClick={() => (forms.schoolType = item.value)}>
-                              {item.label}
-                            </Button>
-                          );
-                        })}
-                      </>
-                    )
-                  }}
-                </Field>
                 <Field center border label="学年制">
                   {{
                     input: () => (
@@ -317,8 +298,8 @@ export default defineComponent({
                   }}
                 </Field>
                 <Field
+                  class={styles.codeWrap}
                   border
-                  center
                   name="code"
                   label="验证码"
                   placeholder="请输入验证码"
@@ -331,7 +312,21 @@ export default defineComponent({
                         size="small"
                         type="primary"
                         color="#198CFE"
-                        onClick={() => onSendSms()}>
+                        onClick={() => {
+                          if (!forms.educationalAdministrationPhone) {
+                            showToast('请输入负责人手机号码');
+                            return;
+                          }
+                          if (
+                            !/^1[3456789]\d{9}$/.test(
+                              forms.educationalAdministrationPhone
+                            )
+                          ) {
+                            showToast('手机号码格式不正确');
+                            return;
+                          }
+                          data.imgCodeStatus = true;
+                        }}>
                         {data.sendMsg}
                       </Button>
                     )
@@ -381,6 +376,17 @@ export default defineComponent({
                 </div>
               </div>
             </Popup>
+
+            {data.imgCodeStatus ? (
+              <MImgCode
+                v-model:value={data.imgCodeStatus}
+                phone={forms.educationalAdministrationPhone}
+                onClose={() => {
+                  data.imgCodeStatus = false;
+                }}
+                onSendCode={onSendSms}
+              />
+            ) : null}
           </div>
         </div>
       </div>

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

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

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

@@ -29,7 +29,7 @@
 
   :global {
     .van-cell {
-      padding: 16px 16px;
+      padding: 14px 14px;
 
     }
 
@@ -38,7 +38,7 @@
       font-weight: 600;
       color: #5B2C03;
       line-height: 22px;
-      margin-bottom: 10px;
+      margin-bottom: 8px;
     }
 
     .van-field__control {
@@ -66,4 +66,25 @@
   font-weight: 600;
   color: #5B2C03 !important;
   line-height: 22px;
+}
+
+.radioSection {
+  position: relative;
+  min-width: 32px;
+  justify-content: center;
+  padding-left: 14px;
+  padding-right: 14px;
+}
+
+.radioItem {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  opacity: 0;
+}
+
+.radioSection+.radioSection {
+  margin-left: 12px;
 }

+ 62 - 3
src/views/student-register/register-modal/index.tsx

@@ -1,7 +1,18 @@
 import { computed, defineComponent, nextTick, reactive, ref } from 'vue';
 import styles from './index.module.less';
 import infoTitle from '../images/info-title.png';
-import { Button, CountDown, Field, Form, Picker, Popup, showToast } from 'vant';
+import {
+  Button,
+  CountDown,
+  Field,
+  Form,
+  Picker,
+  Popup,
+  Radio,
+  RadioGroup,
+  Tag,
+  showToast
+} from 'vant';
 import MProtocol from '@/components/m-protocol';
 import MImgCode from '@/components/m-img-code';
 import { checkPhone } from '@/helpers/utils';
@@ -79,7 +90,8 @@ export default defineComponent({
       extra: {
         nickname: '',
         currentGradeNum: '',
-        currentClass: ''
+        currentClass: '',
+        gender: 1
       },
       grant_type: 'password',
       loginType: 'SMS',
@@ -121,7 +133,10 @@ export default defineComponent({
           requestType: 'form',
           data: {
             ...res,
-            extra: JSON.stringify({ ...extra, schoolId: props.schoolId })
+            extra: JSON.stringify({
+              ...extra,
+              schoolId: props.schoolId
+            })
           }
         });
 
@@ -218,10 +233,54 @@ export default defineComponent({
             label="学生姓名"
             placeholder="请输入学生姓名"
             autocomplete="off"
+            maxlength={14}
             v-model={studentInfo.extra.nickname}
           />
           <Field
             clearable
+            label="学生性别"
+            placeholder="请选择性别"
+            autocomplete="off"
+            // v-model={studentInfo.extra.nickname}
+          >
+            {{
+              input: () => (
+                <RadioGroup
+                  checked-color="#ffcb75"
+                  v-model={studentInfo.extra.gender}
+                  direction="horizontal">
+                  <Tag
+                    size="large"
+                    type="primary"
+                    color={
+                      !(studentInfo.extra.gender === 1) ? '#EAEAEA' : '#ffcb75'
+                    }
+                    textColor={
+                      !(studentInfo.extra.gender === 1) ? '#AAA' : '#5B2C03'
+                    }
+                    class={styles.radioSection}
+                    round>
+                    <Radio class={styles.radioItem} name={1}></Radio>男
+                  </Tag>
+                  <Tag
+                    size="large"
+                    type="primary"
+                    color={
+                      !(studentInfo.extra.gender === 0) ? '#EAEAEA' : '#ffcb75'
+                    }
+                    textColor={
+                      !(studentInfo.extra.gender === 0) ? '#AAA' : '#5B2C03'
+                    }
+                    class={styles.radioSection}
+                    round>
+                    <Radio class={styles.radioItem} name={0}></Radio>女
+                  </Tag>
+                </RadioGroup>
+              )
+            }}
+          </Field>
+          <Field
+            clearable
             label="所在年级"
             placeholder="请选择年级"
             isLink

+ 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="手机号"

+ 3 - 1
src/views/teaher-register/component/success/index.module.less

@@ -1,12 +1,14 @@
 .container {
     width: 100vw;
-    min-height: 100vh;
+    height: 100vh;
     background-color: rgba(96, 166, 241, 1);
     background-image: url('../../images/icon_bg.png');
     background-repeat: no-repeat;
     background-size: 100%;
     padding-top: 50Px;
     margin: 0 auto;
+    overflow-x: hidden;
+    overflow-y: auto;
 
     .titleIcon {
         display: block;

+ 21 - 5
src/views/teaher-register/index.tsx

@@ -25,6 +25,7 @@ import {
 import { useRoute } from 'vue-router';
 import { postMessage } from '@/helpers/native-message';
 import Success from './component/success/index';
+import MImgCode from '@/components/m-img-code';
 
 export default defineComponent({
   name: 'SchoolRegister',
@@ -36,7 +37,7 @@ export default defineComponent({
       provinceCode: '', // 所属省份
       code: '', // 验证码
       tenantId: route.query.tenantId || '', // 机构
-      phone: null,
+      phone: null as any,
       schoolId: route.query.schoolId || '', // 学校id
       nickname: null,
       gender: 1
@@ -48,7 +49,8 @@ export default defineComponent({
       checked: true,
       success: false,
       areaList: {} as any,
-      sendMsg: '获取验证码'
+      sendMsg: '获取验证码',
+      imgCodeStatus: false
     });
     const formateArea = (area: any[]) => {
       const province_list: { [_: string]: string } = {};
@@ -86,7 +88,7 @@ export default defineComponent({
       getAreaList();
     });
     /** 发送验证码 */
-    const onSendSms = async () => {
+    const onSendSms = () => {
       if (!forms.phone) {
         showToast('请输入手机号码');
         return;
@@ -95,6 +97,9 @@ export default defineComponent({
         showToast('手机号码格式不正确');
         return;
       }
+      data.imgCodeStatus = true;
+    };
+    const onCodeSend = async (code: string) => {
       if (data.sendMsg.includes('s')) return;
       try {
         await api_openSendSms({
@@ -112,8 +117,8 @@ export default defineComponent({
       }
     };
     const onCountDown = () => {
-      data.sendMsg = '30s';
-      let count = 30;
+      data.sendMsg = '60s';
+      let count = 60;
       let timer = setInterval(() => {
         count--;
         data.sendMsg = `${count}s`;
@@ -297,6 +302,17 @@ export default defineComponent({
               v-model:show={data.success}>
               <Success />
             </Popup>
+
+            {data.imgCodeStatus ? (
+              <MImgCode
+                v-model:value={data.imgCodeStatus}
+                phone={forms.phone}
+                onClose={() => {
+                  data.imgCodeStatus = false;
+                }}
+                onSendCode={onCodeSend}
+              />
+            ) : null}
           </div>
         </div>
       </div>