Преглед изворни кода

fix:身份证长度,报错提示等

xuqiaoying пре 3 година
родитељ
комит
cacdce4ff6

+ 1 - 1
src/pages/home/index.vue

@@ -495,7 +495,7 @@
             </el-input
           ></el-form-item>
           <el-form-item prop="idCard">
-            <el-input placeholder="身份证号码" v-model="bindForm.idCard">
+            <el-input placeholder="身份证号码" v-model="bindForm.idCard" maxlength="18">
             </el-input
           ></el-form-item>
           <el-button

+ 5 - 2
src/pages/living-room/index.vue

@@ -348,7 +348,7 @@ export default {
       }).then((res) => {
         if (res.code == 200) {
           let item = res.data
-          const {sectionId, goodsId, courseId, orderGoodsId, gradeId, chapterId, moduleId, buyCourse, sectionType} = item
+          const {sectionId, goodsId, courseId, orderGoodsId, gradeId, chapterId, moduleId, buyCourse, sectionType, recordingUrl} = item
           this.goodsId = goodsId
           this.sectionId = sectionId
           this.courseId = courseId
@@ -360,10 +360,13 @@ export default {
           this.goodsStatus = item.goodsStatus
           this.goodsName = item.goodsName
           this.sectionType = sectionType
+          this.vid = recordingUrl || ''
           if (item.checkStatus == 1) { // 有权限
             this.identification = new Date().valueOf() + ""
             this.playVideo();
-            this.studyRecordGetLastLive();
+            if (this.sectionType !=3 ) {
+              this.studyRecordGetLastLive();
+            }
           } else {
             this.showAuth = true
           }

+ 17 - 4
src/pages/login/index.vue

@@ -202,8 +202,8 @@
                   <div class="checkbox">
                     <el-form-item prop="read">
                       <div>
-                        <input type="checkbox" v-model="registerForm.read" />
-                        我已认真阅读并同意
+                        <el-checkbox v-model="registerForm.read">我已认真阅读并同意</el-checkbox>
+                        <!-- <input type="checkbox" v-model="registerForm.read" /> -->
                       </div>
 
                       <div>
@@ -330,6 +330,7 @@
                       <el-input
                         placeholder="身份证号码"
                         v-model="bindForm.idCard"
+                        maxlength="18"
                       >
                       </el-input
                     ></el-form-item>
@@ -866,12 +867,24 @@ export default {
         callback();
       }
     };
+    var validateAccept = (rule, value, callback) => {
+      if (!value) {
+        callback(new Error('请勾选服务协议'))
+      } else {
+        callback();
+      }
+    }
     return {
       state: 1, //1登录 2注册  3找回密码 4绑定学员身份
       tabIndex: 1,
       loginForm: {},
       loginSmsForm: {},
-      registerForm: {},
+      registerForm: {
+        tel: '',
+        code: '',
+        pwd: '',
+        read: false,
+      },
       forgetForm: {},
       bindForm: {},
       countDown: 0,
@@ -919,7 +932,7 @@ export default {
         ],
         code: [{ required: true, trigger: "blur", message: "请输入验证码" }],
         pwd: [{ required: true, trigger: "blur", message: "请输入密码" }],
-        read: [{ required: true, trigger: "blur", message: "请勾选服务协议" }],
+        read: [{ required: true, trigger: ["blur", 'change'], validator: validateAccept },],
       },
 
       bindRules: {

+ 1 - 1
src/pages/person-center/my-course/components/AppointTest.vue

@@ -37,7 +37,7 @@ export default {
         },
         appointItem: {
             type: Object,
-            default: () => {}
+            default: () => []
         },
     },
     data() {

+ 1 - 1
src/pages/person-center/my-course/index.vue

@@ -14,7 +14,7 @@
           @click="changeCourse"
           >切换科目</el-button
         >
-        <el-button size="mini" type="primary" plain style="margin-left: 14px" @click="changeTest()">预约考试
+        <el-button size="mini" type="warning" plain style="margin-left: 14px" @click="changeTest()">预约考试
         </el-button>
       </h4>
       <div v-for="(item, index) in courseList" :key="index">

+ 3 - 1
src/pages/person-center/my-info/index.vue

@@ -283,7 +283,9 @@ export default {
       };
       this.$request.appuserupdatePwd(data).then((res) => {
         this.$message.success("修改成功,请重新登录");
-      });
+      }).catch(err => {
+        this.$message.warning(err.msg)
+      })
     },
     /**
      * 更新头像