Pārlūkot izejas kodu

bugfix 信息推送

谢杰标 2 gadi atpakaļ
vecāks
revīzija
2fd4ca73a1
3 mainītis faili ar 197 papildinājumiem un 113 dzēšanām
  1. 76 81
      common/httpList/userInfo.js
  2. 16 21
      pages/learn/index.vue
  3. 105 11
      pages3/polyv/detail.vue

+ 76 - 81
common/httpList/userInfo.js

@@ -1,82 +1,77 @@
-import {
-	myRequest
-} from '../request.js'
+import { myRequest } from "../request.js";
 export default {
-	//修改客户端用户
-	appuserInfo(data) {
-		return myRequest({
-			url: '/app/user/edit',
-			method: 'post',
-			data: data,
-		})
-	},
-	// 修改用户活动邀请码
-	shareActivityCode(data) {
-		return myRequest({
-			url: '/app/user/edit/shareActivityCode',
-			method: 'post',
-			data: data,
-		})
-	},
-	appInfoAttached(data) {
-		return myRequest({
-			url: '/app/user/infoAttached',
-			method: 'get',
-			data: data,
-		})
-	},
-	getSchoolInfo(data) {
-		return myRequest({
-			url: '/school/info/getInfo',
-			method: 'get',
-			data: data,
-		})
-	},
-	updateSchoolInfo(data) {
-		return myRequest({
-			url: '/school/info/edit',
-			method: 'post',
-			data: data,
-		})
-	},
-	getUserBuy(data) {
-		return myRequest({
-			url: '/system/user/list',
-			method: 'get',
-			data: data,
-		})
-	},
-	rankList(data) {
-		return myRequest({
-			url: '/app/user/rankingList',
-			method: 'get',
-			data: data,
-		})
-	},
-	getUserSubscribeRecentExam(data) {
-		return myRequest({
-			url: '/user/subscribe/recentExam',
-			method: 'get',
-			data: data,
-		})
-	},
-	
-	userConfirmInfoDetail(data) {
-			return myRequest({
-				url: '/user/confirm/info/detail',
-				method: 'GET',
-				data: data,
-			})
-		},
-		
-		userConfirminfo(data) {
-				return myRequest({
-					url: '/user/confirm/info',
-					method: 'post',
-					data: data,
-				})
-			},
-	
-	
-	
-}
+  //修改客户端用户
+  appuserInfo(data) {
+    return myRequest({
+      url: "/app/user/edit",
+      method: "post",
+      data: data,
+    });
+  },
+  // 修改用户活动邀请码
+  shareActivityCode(data) {
+    return myRequest({
+      url: "/app/user/edit/shareActivityCode",
+      method: "post",
+      data: data,
+    });
+  },
+  appInfoAttached(data) {
+    return myRequest({
+      url: "/app/user/infoAttached",
+      method: "get",
+      data: data,
+    });
+  },
+  getSchoolInfo(data) {
+    return myRequest({
+      url: "/school/info/getInfo",
+      method: "get",
+      data: data,
+    });
+  },
+  updateSchoolInfo(data) {
+    return myRequest({
+      url: "/school/info/edit",
+      method: "post",
+      data: data,
+    });
+  },
+  getUserBuy(data) {
+    return myRequest({
+      url: "/system/user/list",
+      method: "get",
+      data: data,
+    });
+  },
+  rankList(data) {
+    return myRequest({
+      url: "/app/user/rankingList",
+      method: "get",
+      data: data,
+    });
+  },
+  getUserSubscribeRecentExam(data) {
+    return myRequest({
+      url: "/user/subscribe/recentExam",
+      method: "get",
+      data: data,
+    });
+  },
+
+  userConfirmInfoDetail(data) {
+    return myRequest({
+      url: "/user/confirm/info/detail",
+      method: "GET",
+      data: data,
+    });
+  },
+
+  userConfirminfo(data) {
+    return myRequest({
+      url: "/user/confirm/info",
+      method: "post",
+      data: data,
+    });
+  },
+};

+ 16 - 21
pages/learn/index.vue

@@ -1048,8 +1048,7 @@ export default {
           // ,有疑问,请联系020-87085982
           uni.showModal({
             showCancel: false,
-            content:
-              "您的学习账号未开通,请稍后再尝试,有疑问!",
+            content: "您的学习账号未开通,请稍后再尝试,有疑问!",
           });
           return;
         }
@@ -1105,21 +1104,19 @@ export default {
         title: "拼命加载中...",
         mask: true,
       });
-      var confirmDetail = true;
-      if (item.educationName == "继续教育") {
-        if (
-          item.officialName &&
-          item.businessName == "二级" &&
-          item.projectName == "建造师"
-        ) {
-          confirmDetail = await this.userConfirmInfoDetail();
-        }
-      }
-
-      if (!confirmDetail) {
-        return;
-      }
-
+      // var confirmDetail = true;
+      // if (item.educationName == "继续教育") {
+      //   if (
+      //     item.officialName &&
+      //     item.businessName == "二级" &&
+      //     item.projectName == "建造师"
+      //   ) {
+      //     confirmDetail = await this.userConfirmInfoDetail();
+      //   }
+      // }
+      // if (!confirmDetail) {
+      //   return;
+      // }
       this.itemIndex = index;
       if (
         item.gradeStatus == 1 &&
@@ -1248,8 +1245,7 @@ export default {
               uni.showModal({
                 showCancel: false,
                 title: "提示",
-                content:
-                  "开通信息推送不成功,无法进入学习!",
+                content: "开通信息推送不成功,无法进入学习!",
               });
               resolve(false);
             }
@@ -1379,8 +1375,7 @@ export default {
                 uni.showModal({
                   showCancel: false,
                   title: "提示",
-                  content:
-                    "开通信息推送不成功,无法进入学习!",
+                  content: "开通信息推送不成功,无法进入学习!",
                 });
               }
               this.showUserConfirmInfo = false;

+ 105 - 11
pages3/polyv/detail.vue

@@ -1957,7 +1957,103 @@ export default {
           return Promise.resolve();
         });
     },
-    getbaseprofiletplists() {
+    async getbaseprofiletplists() {
+      // #ifdef MP-WEIXIN
+      this.getCameraSetting();
+      // #endif
+      let {
+        data: { code, rows },
+      } = await this.$api.getbaseprofiletplists({
+        goodsId: this.goodsId,
+        orderGoodsId: this.orderGoodsId,
+      });
+      if (code === 200 && rows.length && rows[0].keyValue) {
+        let baseRes = await this.$api.getbaseprofiletpId(this.goodsId);
+        if (baseRes.data.code === 200 && baseRes.data.data) {
+          let {
+            data: { code, data },
+          } = await this.$api.getbaseprofiletpgetInfo({
+            goodsId: this.goodsId,
+            orderGoodsId: this.orderGoodsId,
+          });
+          if (
+            code === 200 &&
+            (!data || (data.status === 3 && data.changeStatus === 1))
+          ) {
+            this.needProfileModal = true;
+            uni.showModal({
+              content: !data
+                ? "请前往填写资料"
+                : "资料审核不通过,请前往重新填写",
+              cancelText: "返回",
+              success: (resultst) => {
+                if (resultst.confirm) {
+                  this.$navTo.togo("/pages2/verify/input", {
+                    id: this.goodsId,
+                    orderGoodsId: this.orderGoodsId,
+                  });
+                }
+                if (resultst.cancel) {
+                  uni.navigateBack();
+                }
+              },
+            });
+            return Promise.reject();
+          } else if (data.status === 1 && JSON.parse(rows[0].keyValue2)[0]) {
+            let {
+              data: { code, data },
+            } = await this.$api.getbaseprofileStampgetInfo({
+              goodsId: this.goodsId,
+              orderGoodsId: this.orderGoodsId,
+            });
+            if (
+              code === 200 &&
+              (!data || (data.status === 3 && data.changeStatus === 1))
+            ) {
+              this.needProfileModal = true;
+              uni.showModal({
+                content: !data
+                  ? "请前往填写盖章资料"
+                  : "资料盖章审核不通过,请前往重新填写",
+                cancelText: "返回",
+                success: (resultst) => {
+                  if (resultst.confirm) {
+                    this.$navTo.togo("/pages2/verify/input2", {
+                      id: this.goodsId,
+                      orderGoodsId: this.orderGoodsId,
+                    });
+                  }
+                  if (resultst.cancel) {
+                    uni.navigateBack();
+                  }
+                },
+              });
+              return Promise.reject();
+            }
+          }
+        }
+      }
+      let detail = await this.$api.goodsDetail(this.goodsId);
+      if (detail.data.data.erJianErZao) {
+        let info = await this.$api.userConfirmInfoDetail({
+          orderGoodsId: this.orderGoodsId,
+        });
+        if (!info.data.data || info.data.data.pushInfo !== 1) {
+          uni.showModal({
+            showCancel: false,
+            title: "提示",
+            content: "开通信息推送不成功,无法进入学习!",
+            success: (resultst) => {
+              uni.navigateBack();
+            },
+          });
+          return Promise.reject();
+        }
+      }
+      return Promise.resolve();
+    },
+
+    getbaseprofiletplists1() {
       return new Promise((resolve) => {
         let self = this;
         // #ifdef MP-WEIXIN
@@ -1970,6 +2066,7 @@ export default {
           })
           .then((res) => {
             if (res.data.code === 200 && res.data.rows.length) {
+              console.log(res.data.rows[0], 987);
               if (res.data.rows[0].keyValue) {
                 self.$api.getbaseprofiletpId(self.goodsId).then((baseRes) => {
                   if (baseRes.data.code === 200) {
@@ -1982,6 +2079,7 @@ export default {
                         })
                         .then((result) => {
                           if (result.data.code === 200) {
+                            // status 1通过 2是待审 3是不通过
                             if (
                               !result.data.data ||
                               (result.data.data.status === 3 &&
@@ -2101,6 +2199,7 @@ export default {
                 resolve();
               }
             } else {
+              // 调用推送是否成功
               resolve();
             }
           });
@@ -2801,6 +2900,7 @@ export default {
         videoCurrentTime: parseInt(
           currentTime > 0 ? currentTime : self.studyDuration
         ),
+        erJianErZao: this.erJianErZao,
       };
       if (this.ossAvatarUrl) {
         data.similarity = this.compareFaceData; // 相似度
@@ -3467,7 +3567,6 @@ export default {
      * 进入全屏
      */
     fullscreenchange(event) {
-      console.log(event.detail.direction, 666);
       if (event.detail.direction == "vertical") {
         this.navShow = true;
       } else if (event.detail.direction == "horizontal") {
@@ -3506,7 +3605,6 @@ export default {
         }
         self.gradeId = self.goodsData.gradeId;
         self.erJianErZao = self.goodsData.erJianErZao;
-
         this.courseBusiness(this.goodsData.businessId);
         self.getMenuList();
         self.getReMenuList(); //获取重修目录
@@ -3751,13 +3849,6 @@ export default {
           watchStartTime: this.recordObj.videoCurrentTime, // 播放开始时间,表示视频从第几秒开始播放,参数值需小于视频时长
           ts: res.data.data.ts, // 移动播放加密视频需传入的时间戳。
           sign: res.data.data.sign, // 移动端播放加密视频所需的签名
-          // playsafe: (vid, next) => { // PC端播放加密视频所需的授权凭证
-          // console.log('111111111111', vid);
-          //   // this.$api.obtainpolyvvideopcsign(vid).then((res) => {
-          //   //   console.log('请求完后', res);
-          //   //   next(res.data.data);
-          //   // });
-          // },
         });
 
         polyvPlayerContext = this.player;
@@ -3770,7 +3861,10 @@ export default {
           clearInterval(this.barTimer);
           this.barTimer = null;
           let originTime = this.recordObj.videoCurrentTime || 0;
-          if (this.H5isAllowSeek == "on" && !this.barTimer) {
+          if (
+            (this.H5isAllowSeek == "on" || this.erJianErZao) &&
+            !this.barTimer
+          ) {
             this.barTimer = setInterval(function () {
               const currentTime = polyvPlayerContext.j2s_getCurrentTime();
               if (