Browse Source

学习页限制调整

En route 1 year ago
parent
commit
f3c30cf6cb
2 changed files with 16 additions and 7 deletions
  1. 2 4
      pages/learn/index.vue
  2. 14 3
      pages3/polyv/detail.vue

+ 2 - 4
pages/learn/index.vue

@@ -1036,9 +1036,7 @@
                   item.goodsId
                 }&orderGoodsId=${item.orderGoodsId}&gradeId=${
                   item.gradeId
-                }&periodWaitTime=${item.periodWaitTime ? 1 : ""}&isQ=${
-                  item.orderYear ? 1 : ""
-                }`,
+                }&periodWaitTime=${item.periodWaitTime ? 1 : ""}`,
 								});
 							} else if (res.data.total == 1) {
 								uni.navigateTo({
@@ -1048,7 +1046,7 @@
                   item.orderGoodsId
                 }&gradeId=${item.gradeId}&periodWaitTime=${
                   item.periodWaitTime ? "" : 1
-                }&isQ=${item.orderYear ? 1 : ""}`,
+                }`,
 								});
 							} else {
 								uni.showToast({

+ 14 - 3
pages3/polyv/detail.vue

@@ -899,6 +899,17 @@
 						let {
 							data
 						} = res.data;
+						if(data && data.endTime > parseInt(new Date().getTime() / 1000)){
+							uni.showModal({
+								showCancel: false,
+								title: "提示",
+								content: "当前无法学习,"+ this.$method.timestampToTime(data.endTime,false) +"过后可继续学习",
+								success: (resultst) => {
+									uni.navigateBack();
+								},
+							});
+							return
+						}
 						if (!data.sectionId) {
 							data = this.menuAllList[0];
 						}
@@ -1068,7 +1079,7 @@
 				return Promise.resolve();
 			},
 			async isCanLearn() {
-				this.option.isQ !== "" && (await this.qCheckIsCanLearn());
+				await this.qCheckIsCanLearn();
 				await this.getGradeInfo();
 				await this.getGoodsDetail();
 			},
@@ -1636,7 +1647,7 @@
 				this.goodsData = data.data;
 				if (data.data.firstChoiceStatus) {
 					uni.redirectTo({
-						url: `/pages3/polyv/preference?courseId=${this.courseId}&goodsId=${data.data.goodsId}&orderGoodsId=${this.orderGoodsId}&gradeId=${data.data.gradeId}&periodWaitTime=${this.option.periodWaitTime ? 1 : ""}&isQ=${this.option.isQ}&minClassHour=${data.data.minClassHour || 0}`,
+						url: `/pages3/polyv/preference?courseId=${this.courseId}&goodsId=${data.data.goodsId}&orderGoodsId=${this.orderGoodsId}&gradeId=${data.data.gradeId}&minClassHour=${data.data.minClassHour || 0}`,
 					});
 					return
 				}
@@ -1647,7 +1658,7 @@
 					await this.userConfirmInfoDetail();
 				}
 				if (this.erJianErZao) {
-					this.option.periodWaitTime && (await this.checkFinishRequiredCourse());
+					await this.checkFinishRequiredCourse()
 				}
 				this.goodsData.buyNote && this.baseHandoutTipList();
 				!this.gradeId && (this.gradeId = this.goodsData.gradeId);