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

fix:课程进去会出现俩次填写资料的问题和我的消息-进去预约

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

+ 7 - 3
pages2/appointment/index.vue

@@ -111,8 +111,11 @@ export default {
     this.goodsId = Number(option.goodsId);
     this.gradeId = Number(option.gradeId);
     this.orderGoodsId = Number(option.orderGoodsId) || "";
-    this.getAppoint()
-    this.getInfo();
+    if (this.applyId) {
+      this.getInfo();
+    } else {
+      this.getAppoint()
+    }
   },
   methods: {
     getAppoint() {
@@ -120,7 +123,8 @@ export default {
         url: '/user/subscribe/listSubscribe',
         methods: 'get',
         data: {
-          orderGoodsId: this.orderGoodsId
+          orderGoodsId: this.orderGoodsId,
+          goodsId: this.goodsId,
         }
       }).then((res) => {
         console.log('-----', res)

+ 3 - 3
pages2/msg/detail.vue

@@ -290,9 +290,9 @@ export default {
 						}
 						if (res.data.code === 200) {
 							this.$navTo.togo('/pages2/appointment/index', {
-								goodsId: item.goodsId,
-								gradeId: item.gradeId,
-								orderGoodsId: this.orderGoodsId,
+								goodsId: 725 || item.goodsId,
+								gradeId: 645 || item.gradeId,
+								orderGoodsId: 2232 || this.orderGoodsId,
 							});
 						}
 					});

+ 13 - 6
pages2/verify/input.vue

@@ -725,6 +725,7 @@ export default {
     this.orderGoodsId = Number(option.orderGoodsId);
     this.goodsId = Number(option.id);
     this.gradeId = Number(option.gradeId);
+    
     await this.getInfo();
     await this.getGoodsDetail();
   },
@@ -1162,7 +1163,10 @@ export default {
                                     if (res.data.code === 200) {
                                       this.$method.showToast("提交成功");
                                       this.getUserInfo();
-                                      uni.navigateBack();
+                                      setTimeout(() => {
+                                        console.log('延迟')
+                                        uni.navigateBack();
+                                      }, 1500)
                                     } else {
                                       this.$method.showToast(res.data.msg);
                                       this.isUploading = false;
@@ -1255,7 +1259,10 @@ export default {
           if (res.data.code === 200) {
             this.$method.showToast("提交成功");
             this.getUserInfo();
-            uni.navigateBack();
+            setTimeout(() => {
+              console.log('延迟')
+              uni.navigateBack();
+            }, 1500)
           } else {
             this.$method.showToast(res.data.msg);
             this.isUploading = false;
@@ -1294,7 +1301,10 @@ export default {
             if (res.data.code === 200) {
               this.$method.showToast("提交成功");
               this.getUserInfo();
-              uni.navigateBack();
+              setTimeout(() => {
+                console.log('延迟')
+                uni.navigateBack();
+              }, 1500)
             } else {
               this.$method.showToast(res.data.msg);
               this.isUploading = false;
@@ -1307,9 +1317,6 @@ export default {
       this.$set(this.form, "commitment_seal", "");
       this.titleName = "";
     },
-    backPage() {
-      uni.navigateBack();
-    },
     //提交表单
     async submitApi() {
       var data = JSON.parse(JSON.stringify(this.form));

+ 8 - 2
pages2/verify/input2.vue

@@ -240,7 +240,10 @@ export default {
 					this.isUploading = false;
 					if (res.data.code === 200) {
 						self.$method.showToast('提交成功');
-						uni.navigateBack();
+						setTimeout(() => {
+							console.log('延迟')
+							uni.navigateBack();
+						}, 1500)
 					}
 				});
 			} else {
@@ -248,7 +251,10 @@ export default {
 					this.isUploading = false;
 					if (res.data.code === 200) {
 						self.$method.showToast('提交成功');
-						uni.navigateBack();
+						setTimeout(() => {
+							console.log('延迟')
+							uni.navigateBack();
+						}, 1500)
 					}
 				});
 			}

+ 5 - 7
pages3/live/detail.vue

@@ -741,14 +741,15 @@ export default {
       this.informId = option.informId
       this.clickOfficial()
     }
-    if (this.$method.isGoLogin()) { // 从公众号消息进来的没登录需要跳到登录页,登录后返回
-      return;
-    }
-    this.courseCourseList();
+    
     this.$store.getters.dictObj;
 
   },
   onShow() {
+    if (this.$method.isGoLogin()) { // 从公众号消息进来的没登录需要跳到登录页,登录后返回
+      return;
+    }
+    this.courseCourseList();
     //相机授权
 		// this.userConfirmInfoDetail().then(res => {
 			
@@ -785,9 +786,6 @@ export default {
     // websocket.sendMsg("delAction");
   },
   mounted() {
-    if (this.courseId) {
-      this.originOnMount()
-    }
   },
   methods: {
     ...mapMutations(["updateChapterOpen","updateLiveLast"]),

+ 8 - 16
pages3/polyv/detail.vue

@@ -711,17 +711,15 @@ export default {
       this.informId = option.informId
       this.clickOfficial()
     }
-    if (this.$method.isGoLogin()) { // 从公众号消息进来的没登录需要跳到登录页,登录后返回
-      return;
-    }
-    this.courseCourseList();
+    
     this.$store.getters.dictObj;
   },
   onShow() {
-    console.log('onShowonShowonShowonShow')
-    if (this.courseId) {
-      this.originOnShow()
+    if (this.$method.isGoLogin()) { // 从公众号消息进来的没登录需要跳到登录页,登录后返回
+      return;
     }
+    console.log('onShowonShowonShowonShow', this.courseId,)
+    this.courseCourseList();
     
   },
   onUnload() {
@@ -756,10 +754,6 @@ export default {
     // websocket.sendMsg("delAction");
   },
   mounted() {
-    console.log('mountedmountedmounted')
-    if (this.courseId) {
-      this.originMounted()
-    }
   },
   methods: {
     ...mapMutations(["updateChapterOpen","updateLiveLast"]),
@@ -776,6 +770,7 @@ export default {
       })
     },
     courseCourseList() {
+      console.log('ahhhhhhhhhhhhh')
       // /course/courseList查询商品下的课程列表
       this.$api.courseCourseList({
         pageNum: 1,
@@ -787,7 +782,6 @@ export default {
         if (res.data.code == 200) {
           this.courseList.push.apply(this.courseList, res.data.rows)
           this.courseTotal = res.data.total || 0
-          console.log("total", res.data.rows.length)
           if (res.data.rows.length) {
             this.courseBusiness(res.data.rows[0].businessId)
           }
@@ -834,7 +828,7 @@ export default {
     },
     // 原来onshow里面的内容
     originOnShow() {
-      console.log('originOnShow')
+      console.log('原来onshow里面的originOnShow')
       if(this.isOther) {
         this.showMark = true;
         return;
@@ -2300,7 +2294,6 @@ export default {
                 },
               });
             } else {
-              console.log("无需压缩");
               const waitUpload = await self.uploadFile(self.avatarUrl, 0);
               resolve(waitUpload);
             }
@@ -2678,7 +2671,6 @@ export default {
     },
     getMenuList() {
       let self = this;
-      console.log('-------------------------------------')
       // /course/menuList 查询课程目录结构列表
       this.$api
         .reMenuList({ courseId: this.courseId, gradeId: this.gradeId,orderGoodsId: this.orderGoodsId, })
@@ -2692,7 +2684,7 @@ export default {
               item.menuType = item.type;
             }
             self.menuList = res.data.rows;
-console.log('======menuList', this.menuList)
+            console.log('======menuList', this.menuList)
             this.reStart = true
             for (let i = 0; i < res.data.rows.length; i++) {
               if (res.data.rows[i].type == 1) {