Tang пре 1 година
родитељ
комит
9c359823f6

+ 8 - 0
src/apis/apply.js

@@ -80,4 +80,12 @@ export default {
 			params: data
 		})
 	},
+	//预约考试跳转判断
+	courseoldgoodsredirect(data) {
+		return request({
+			url: '/course/old/goods/redirect',
+			method: 'get',
+			params: data
+		})
+	},
 }

+ 1 - 1
src/axios.js

@@ -31,7 +31,7 @@ const err = (error) => {
       if (error.response.status === 401) {
 
       }
-    }else if (message == "Network Error") {
+    } else if (message == "Network Error") {
       message = "后端接口连接异常";
       Message({
         message: message,

+ 1 - 1
src/common/uploadFile.js

@@ -33,7 +33,7 @@ export default {
                 //如果是base64文件,那么直接把base64字符串转成blob对象进行上传就可以了
                 formData.append("file", file);
                 request.uploadFile(ossToken.host, formData).then(resp => {
-                    if (resp.resultContent && resp.resultContent.size) {
+                    if (resp.resultContent && Number(resp.resultContent.size) > 0) {
                         resolve(ossToken.dir)
                     } else {
                         reject("上传回调失败")

+ 19 - 18
src/components/videoCy/index.vue

@@ -553,24 +553,24 @@ export default {
     },
     //拍照成功回显 url
     async returnParameter(url) {
-      let compareFaceData = await this.faceRecognition(url);
+      let file = this.$tools.convertBase64UrlToBlob(url);
+      try {
+        var photoUrl = await this.$upload.upload(file, 0, {
+          gradeId: this.goodsData.gradeId,
+          orderGoodsId: this.goodsData.orderGoodsId
+        });
+      } catch (err) {
+        this.$message({
+          type: "warning",
+          message: "上传接口报错,请重新拍照上传"
+        });
+        setTimeout(() => {
+          this.openPhoto();
+        }, 1500);
+        return;
+      }
+      let compareFaceData = await this.faceRecognition(photoUrl);
       if (compareFaceData >= 80) {
-        let file = this.$tools.convertBase64UrlToBlob(url);
-        try {
-          var photoUrl = await this.$upload.upload(file, 0, {
-            gradeId: this.goodsData.gradeId,
-            orderGoodsId: this.goodsData.orderGoodsId
-          });
-        } catch (err) {
-          this.$message({
-            type: "warning",
-            message: "上传接口报错,请重新拍照上传"
-          });
-          setTimeout(() => {
-            this.openPhoto();
-          }, 1500);
-          return;
-        }
         this.HideVideo = false;
         this.postCoursePhotoRecord(false, photoUrl)
           .then(async res => {
@@ -702,7 +702,8 @@ export default {
       return new Promise(resolve => {
         this.$request
           .faceCertificationCompareFace({
-            imageA: url,
+            urlA:url,
+            // imageA: url,
             orderGoodsId: this.goodsData.orderGoodsId,
             gradeId: this.goodsData.gradeId
           })

+ 12 - 5
src/pages/course-detail/components/coreContent.vue

@@ -164,10 +164,10 @@ export default {
           orderGoodsId: this.goodsData.orderGoodsId,
           gradeId: this.goodsData.gradeId,
           goodsName: this.goodsData.goodsName,
-          educationName:this.goodsData.educationName,
-          projectName:this.goodsData.projectName,
-          businessName:this.goodsData.businessName,
-          categoryName:this.goodsData.categoryName,
+          educationName: this.goodsData.educationName,
+          projectName: this.goodsData.projectName,
+          businessName: this.goodsData.businessName,
+          categoryName: this.goodsData.categoryName
         });
       }
     },
@@ -289,7 +289,14 @@ export default {
               reject();
             }
           })
-          .catch(() => {
+          .catch(err => {
+            this.$alert(err.msg, "提示", {
+              confirmButtonText: "返回",
+              showClose: false,
+              callback: action => {
+                this.$router.go(-1);
+              }
+            });
             reject();
           });
       });

Разлика између датотеке није приказан због своје велике величине
+ 1342 - 1430
src/pages/course-detail/indexCopy.vue


+ 8 - 7
src/pages/course-exam/index.vue

@@ -1276,13 +1276,13 @@ export default {
 
     //拍照成功回显 url
     async returnParameter(url) {
-      let compareFaceData = await this.faceRecognition(url);
+      let file = this.$tools.convertBase64UrlToBlob(url);
+      const photoUrl = await this.$upload.upload(file, 0, {
+        gradeId: this.gradeId,
+        orderGoodsId: this.orderGoodsId
+      });
+      let compareFaceData = await this.faceRecognition(photoUrl);
       if (compareFaceData >= 80) {
-        let file = this.$tools.convertBase64UrlToBlob(url);
-        const photoUrl = await this.$upload.upload(file, 0, {
-          gradeId: this.gradeId,
-          orderGoodsId: this.orderGoodsId
-        });
         //提交拍照记录
         if (await this.postStudyRecord(0, photoUrl, compareFaceData)) {
           this.needPhoto = false;
@@ -1354,7 +1354,8 @@ export default {
       return new Promise(resolve => {
         this.$request
           .faceCertificationCompareFace({
-            imageA: url,
+            urlA: url,
+            // imageA: url,
             orderGoodsId: this.orderGoodsId,
             gradeId: this.gradeId
           })

+ 21 - 17
src/pages/live-detail/index.vue

@@ -3005,10 +3005,10 @@ export default {
     },
     async takeOk() {
       this.loading = true;
-      let compareFaceData = await this.faceRecognition();
+      const waitYS = await this.imageInfos();
+      let compareFaceData = await this.faceRecognition(waitYS);
       this.compareFaceData = compareFaceData;
       if (compareFaceData >= 80) {
-        const waitYS = await this.imageInfos();
         this.postCoursePhotoRecord()
           .then(res => {
             this.photoHistoryList.push(this.photoIndex);
@@ -4364,11 +4364,12 @@ export default {
       });
     },
 
-    faceRecognition() {
+    faceRecognition(url) {
       return new Promise(resolve => {
         this.$request
           .faceCertificationCompareFace({
-            imageA: this.faceUrl,
+            urlA: url,
+            // imageA: this.faceUrl,
             orderGoodsId: this.orderGoodsId,
             gradeId: this.gradeId
           })
@@ -5979,7 +5980,7 @@ export default {
             .reMenuList({
               courseId: this.courseId,
               gradeId: this.gradeId,
-          orderGoodsId:this.orderGoodsId,
+              orderGoodsId: this.orderGoodsId,
               rebuild: 1
             })
             .then(res => {
@@ -6015,7 +6016,7 @@ export default {
           .reSectionList({
             chapterId: sectionItem.chapterId,
             gradeId: this.gradeId,
-          orderGoodsId:this.orderGoodsId,
+            orderGoodsId: this.orderGoodsId,
             courseId: this.courseId,
             moduleId: 0
           })
@@ -6047,7 +6048,7 @@ export default {
             .reSectionList({
               chapterId: rebuildObj.chapterId,
               gradeId: this.gradeId,
-          orderGoodsId:this.orderGoodsId,
+              orderGoodsId: this.orderGoodsId,
               courseId: this.courseId,
               moduleId: 0,
               rebuild: 1
@@ -6078,7 +6079,7 @@ export default {
           this.$request
             .reMenuList({
               courseId: this.courseId,
-          orderGoodsId:this.orderGoodsId,
+              orderGoodsId: this.orderGoodsId,
               gradeId: this.gradeId,
               rebuild: 1
             })
@@ -6115,7 +6116,7 @@ export default {
           .reSectionList({
             chapterId: sectionItem.chapterId,
             gradeId: this.gradeId,
-          orderGoodsId:this.orderGoodsId,
+            orderGoodsId: this.orderGoodsId,
             courseId: this.courseId,
             moduleId: sectionItem.moduleId
           })
@@ -6156,7 +6157,7 @@ export default {
             .reSectionList({
               chapterId: rebuildObj.chapterId,
               gradeId: this.gradeId,
-          orderGoodsId:this.orderGoodsId,
+              orderGoodsId: this.orderGoodsId,
               courseId: this.courseId,
               moduleId: rebuildObj.moduleId,
               rebuild: 1
@@ -6195,7 +6196,7 @@ export default {
             .reMenuList({
               courseId: this.courseId,
               gradeId: this.gradeId,
-          orderGoodsId:this.orderGoodsId,
+              orderGoodsId: this.orderGoodsId,
               rebuild: 1
             })
             .then(res => {
@@ -6234,7 +6235,7 @@ export default {
         let data = {
           gradeId: Number(self.gradeId),
           goodsId: Number(self.goodsId),
-          orderGoodsId:this.orderGoodsId,
+          orderGoodsId: this.orderGoodsId,
           sectionId: Number(self.playSectionId),
           courseId: Number(self.courseId),
           chapterId: parseInt(self.chapterId),
@@ -6254,7 +6255,7 @@ export default {
       let data = {
         courseId: this.courseId,
         gradeId: this.gradeId,
-          orderGoodsId:this.orderGoodsId,
+        orderGoodsId: this.orderGoodsId,
         goodsId: this.goodsId,
         pageNum: this.noteParams.pageNum,
         pageSize: this.noteParams.pageSize
@@ -6303,8 +6304,11 @@ export default {
     getMenuList() {
       let self = this;
       this.$request
-        .reMenuList({ 
-          orderGoodsId:this.orderGoodsId,courseId: this.courseId, gradeId: this.gradeId })
+        .reMenuList({
+          orderGoodsId: this.orderGoodsId,
+          courseId: this.courseId,
+          gradeId: this.gradeId
+        })
         .then(res => {
           for (let i = 0; i < res.rows.length; i++) {
             let item = res.rows[i];
@@ -6352,7 +6356,7 @@ export default {
         .reMenuList({
           courseId: this.courseId,
           rebuild: 1,
-          orderGoodsId:this.orderGoodsId,
+          orderGoodsId: this.orderGoodsId,
           gradeId: this.gradeId
         })
         .then(res => {
@@ -6628,7 +6632,7 @@ export default {
         gradeId: this.gradeId,
         goodsId: this.goodsId,
         sectionId: this.playSectionId,
-          orderGoodsId:this.orderGoodsId,
+        orderGoodsId: this.orderGoodsId,
         courseId: this.courseId,
         noteText: this.textareaNote,
         noteDate: noteDate,

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

@@ -457,7 +457,14 @@
                     >购买题库</el-button
                   >
                   <el-button
-                    v-if="item.userProfile == 1"
+                    v-if="
+                      (item.profileChangeStatus == 1 &&
+                        (item.profileStatus == 1 || item.profileStatus == 2)) ||
+                        (item.profileChangeStatus == 2 &&
+                          item.profileStatus != -1 &&
+                          item.educationName == '考前培训' &&
+                          item.projectName == '施工现场专业人员')
+                    "
                     type="primary"
                     class="btn"
                     @click="dataReview(item)"
@@ -529,39 +536,38 @@
             >
               温馨提示:当前班级正在申请中,正式开班后方可进行学习,请耐心等待
             </div>
-            
+
             <!-- $tools.GetRTime(item.serviceEndTime) <= 20 &&
-                 ↓↓--> 
+                 ↓↓-->
             <div
               class="course-item__footer"
               style="color: red;"
-              v-if="(item.periodStatus == 0 || item.periodStatus == -1)
-              "
+              v-if="item.periodStatus == 0 || item.periodStatus == -1"
             >
-            <span v-if="$tools.GetRTime(item.classEndTime) >= 0">
-              温馨提示:当前学习有效期至{{
-                $tools.timestampToTime(item.classEndTime)
-              }},超期学时无效,为防审核异常请于{{
-                $tools.timestampToTime(item.classEndTime - 864000, false)
-              }}
-              前完成学习,当前剩余有效学习时间为{{
-                $tools.GetRTime(item.classEndTime) < 0
-                  ? 0
-                  : $tools.GetRTime(item.classEndTime)
-              }}天。
-            </span>
-            <span v-else-if="$tools.GetRTime(item.serviceEndTime) >= 0">
-              温馨提示:当前学习有效期至{{
-                $tools.timestampToTime(item.serviceEndTime)
-              }},超期学时无效,为防审核异常请于{{
-                $tools.timestampToTime(item.serviceEndTime - 864000, false)
-              }}
-              前完成学习,当前剩余有效学习时间为{{
-                $tools.GetRTime(item.serviceEndTime) < 0
-                  ? 0
-                  : $tools.GetRTime(item.serviceEndTime)
-              }}天。
-            </span>
+              <span v-if="$tools.GetRTime(item.classEndTime) >= 0">
+                温馨提示:当前学习有效期至{{
+                  $tools.timestampToTime(item.classEndTime)
+                }},超期学时无效,为防审核异常请于{{
+                  $tools.timestampToTime(item.classEndTime - 864000, false)
+                }}
+                前完成学习,当前剩余有效学习时间为{{
+                  $tools.GetRTime(item.classEndTime) < 0
+                    ? 0
+                    : $tools.GetRTime(item.classEndTime)
+                }}天。
+              </span>
+              <span v-else-if="$tools.GetRTime(item.serviceEndTime) >= 0">
+                温馨提示:当前学习有效期至{{
+                  $tools.timestampToTime(item.serviceEndTime)
+                }},超期学时无效,为防审核异常请于{{
+                  $tools.timestampToTime(item.serviceEndTime - 864000, false)
+                }}
+                前完成学习,当前剩余有效学习时间为{{
+                  $tools.GetRTime(item.serviceEndTime) < 0
+                    ? 0
+                    : $tools.GetRTime(item.serviceEndTime)
+                }}天。
+              </span>
             </div>
             <div
               class="course-item__footer"
@@ -1270,7 +1276,12 @@ export default {
         item.stuAllNum + item.recordNum + "/" + (item.secAllNum + item.examNum)
       );
     },
-    appointment(item) {
+    async appointment(item) {
+      // const result = await this.$request.courseoldgoodsredirect();
+      // if (result.data) {
+      //   window.open(result.data.pcUrl);
+      //   return;
+      // }
       if (item.subscribeSign !== 1) {
         this.$router.push({
           path: "/person-center/my-examination/index"

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

@@ -231,7 +231,7 @@
               type="textarea"
               :rows="3"
               style="width:360px"
-              v-model="ruleForm.refundReason"
+              v-model.trim="ruleForm.refundReason"
               placeholder="请输入退款原因"
             ></el-input></el-form-item
         ></el-form>

+ 2 - 0
src/store/index.js

@@ -170,6 +170,8 @@ export default new Vuex.Store({
             favicon.rel = 'icon'
             favicon.href = response.data.data == '867735392558919680' ? '/static/favicon.ico' : '/static/favicons.ico'
             document.head.appendChild(favicon)
+            // const ps = prompt()
+            // commit('setTENANT_NANE', ps)
             commit('setTENANT_NANE', response.data.data)
             resolve()
           })

Неке датотеке нису приказане због велике количине промена