Ver Fonte

fix: 1、学时审核为作弊时返回到学习列表为空的情况 2、人脸识别接口错误时加提示

xuqiaoying há 3 anos atrás
pai
commit
fd080f182d
4 ficheiros alterados com 66 adições e 13 exclusões
  1. 4 4
      pages2/class/questionBank.vue
  2. 33 3
      pages2/learn/details.vue
  3. 13 1
      pages3/live/detail.vue
  4. 16 5
      pages3/polyv/detail.vue

+ 4 - 4
pages2/class/questionBank.vue

@@ -1202,10 +1202,10 @@ export default {
           duration: 2000,
         });
 
-        setTimeout(() => {
-          this.uploadLock = false;
-          this.openPhoto();
-        }, 2000);
+        // setTimeout(() => {
+        //   this.uploadLock = false;
+        //   this.openPhoto();
+        // }, 2000);
         return;
       }
 

+ 33 - 3
pages2/learn/details.vue

@@ -146,9 +146,39 @@ export default {
             //     "&orderGoodsId=" +
             //     self.orderGoodsId,
             // });
-            uni.navigateTo({
-              url: `/pages3/polyv/detail?id=''&goodsId=${this.goodsId}&orderGoodsId=${this.orderGoodsId}&gradeId=${this.gradeId}`
-            })
+            this.$http({
+								url: '/course/courseList',
+								method: 'get',
+								data: {
+									pageNum: 1,
+									pageSize: 100,
+									goodsId: this.goodsId,
+									gradeId: this.gradeId,
+									orderGoodsId: this.orderGoodsId,
+								},
+							})
+							.then(res => {
+								if (res.data.code == 200) {
+									if(res.data.total > 1) {
+										uni.redirectTo({
+											url: `/pages3/polyv/detail?id=''&goodsId=${this.goodsId}&orderGoodsId=${this.orderGoodsId}&gradeId=${this.gradeId}`
+										})
+									} else if(res.data.total == 1) {
+										uni.redirectTo({
+											url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${this.goodsId}&orderGoodsId=${this.orderGoodsId}&gradeId=${this.gradeId}`
+										})
+									} else {
+										uni.showToast({
+											icon:'none',
+											title:'暂无可观看的视频课程'
+										})
+									}
+
+								}
+							})
+            // uni.navigateTo({
+            //   url: `/pages3/polyv/detail?id=''&goodsId=${this.goodsId}&orderGoodsId=${this.orderGoodsId}&gradeId=${this.gradeId}`
+            // })
           }
         });
       // uni.showModal({

+ 13 - 1
pages3/live/detail.vue

@@ -2046,7 +2046,19 @@ export default {
               })
               .then((res) => {
                 resolve(res.data.data);
-              });
+              }).catch((err) => {
+                // 当前网络延迟,
+                console.log('人脸识别错误:', err)
+                uni.showModal({
+                  content: "当前网络延迟",
+                  showCancel: false,
+                  success: (resultst) => {
+                    if (resultst.confirm) {
+                      uni.navigateBack()
+                    }
+                  },
+                })
+              })
           },
           fail(err) {
             console.error(err, "err");

+ 16 - 5
pages3/polyv/detail.vue

@@ -2695,16 +2695,30 @@ export default {
               .then((res) => {
                 console.log(res, "res");
                 resolve(res.data.data);
-              });
+              }).catch((err) => {
+                // 当前网络延迟,
+                console.log('人脸识别错误:', err)
+                uni.showModal({
+                  content: "当前网络延迟",
+                  showCancel: false,
+                  success: (resultst) => {
+                    if (resultst.confirm) {
+                      uni.navigateBack()
+                    }
+                  },
+                })
+              })
           },
           fail(err) {
-            console.error(err, "err");
+            // this.$u.toast('人脸识别错误!')
+            console.error(err, "err-----人脸识别错误");
           },
         });
       });
     },
 
     async submit() {
+      console.log('this.uploadLock的值:', this.uploadLock)
       if (this.uploadLock) {
         return;
       }
@@ -2766,9 +2780,6 @@ export default {
         success: (res) => {
           self.avatarUrl = res.tempImagePath;
           this.isTaking = false;
-          // self.submit();
-          // self.photoPopup = false;
-          // self.enableAutoRotation = true;
         },
         fail: (err) => {
         },