Browse Source

五期2bug

chenxiong 3 years ago
parent
commit
6d662b44f5
5 changed files with 44 additions and 11 deletions
  1. 5 1
      pages2/verify/input.vue
  2. 4 1
      pages2/verify/input2.vue
  3. 19 3
      pages2/wd/class.vue
  4. 5 1
      pages2/wd/course.vue
  5. 11 5
      pages3/polyv/detail.vue

+ 5 - 1
pages2/verify/input.vue

@@ -499,13 +499,15 @@ export default {
 				]
 			},
 			apply_post_disabled:false,
-			isRequired: false
+			isRequired: false,
+			orderGoodsId:0,
 		};
 	},
 	created() {
 		this.$store.getters.dictObj;
 	},
 	async onLoad(option) {
+		this.orderGoodsId = Number(option.orderGoodsId)
 		this.goodsId = Number(option.id);
 		await this.getGoodsDetail()
 		this.getInfo();
@@ -620,6 +622,7 @@ export default {
 				var datas = {
 					id: this.id,
 					goodsId: this.goodsId,
+					orderGoodsId:this.orderGoodsId,
 					keyValue: JSON.stringify(arsty)
 				};
 				if(this.isUploading) {
@@ -652,6 +655,7 @@ export default {
 				var datas = {
 					goodsId: this.goodsId,
 					profileTpId: this.goodsId,
+					orderGoodsId:this.orderGoodsId,
 					keyValue: JSON.stringify(objs)
 				};
 				if(this.isUploading) {

+ 4 - 1
pages2/verify/input2.vue

@@ -87,11 +87,13 @@ export default {
 						trigger: ['change', 'blur']
 					}
 				]
-			}
+			},
+			orderGoodsId:0
 		};
 	},
 	created() {},
 	onLoad(option) {
+		this.orderGoodsId = Number(option.orderGoodsId)
 		this.goodsId = Number(option.id);
 		this.getInfo();
 	},
@@ -228,6 +230,7 @@ export default {
 				};
 			}
 			var datas = {
+				orderGoodsId:this.orderGoodsId,
 				goodsId: self.goodsId,
 				keyValue: JSON.stringify(objs)
 			};

+ 19 - 3
pages2/wd/class.vue

@@ -165,7 +165,7 @@
 					<view class="box_progress">
 						<view style="width: 60%;"><u-line-progress :showText="false" height="22" active-color="#ff9900" :show-percent="false" :percent="(item.stuAllNum / item.secAllNum) * 100"></u-line-progress></view>
 						
-						<view><u-button :class="{disabled:sysTime <= item.studyStartTime || sysTime >= item.studyEndTime || (item.classStartTime && sysTime <= item.classStartTime) || (item.classEndTime && sysTime >= item.classEndTime) || item.learningStatus == 2 || item.classStatus == 0 || (item.learningStatus == 3 && sysTime < item.learningTimeStart)}" type="warning" size="mini" @click.stop="studyIn(item.goodsId,item.gradeId,item,index)">进入学习</u-button></view>
+						<view><u-button :class="{disabled:(item.interfacePushId > 0 && item.officialStatus != 1) || sysTime <= item.studyStartTime || sysTime >= item.studyEndTime || (item.classStartTime && sysTime <= item.classStartTime) || (item.classEndTime && sysTime >= item.classEndTime) || item.learningStatus == 2 || item.classStatus == 0 || (item.learningStatus == 3 && sysTime < item.learningTimeStart)}" type="warning" size="mini" @click.stop="studyIn(item.goodsId,item.gradeId,item,index)">进入学习</u-button></view>
 					</view>
 					<view class="box_progress" v-if="item.applyStatus === 1">
 						<view style="flex:1;margin-right:10rpx;">
@@ -352,6 +352,22 @@ export default {
 			});
 		},
 		async studyIn(v,i,item,index) {
+			
+			if(item.learnStatus == 1) { //跳转第三方h5
+				uni.navigateTo({
+					url:'/pages/webview/index?url='+item.officialLearningUrl
+				})
+				return;
+			}
+			
+			//内部系统
+			if(item.interfacePushId > 0 && item.officialStatus != 1) {
+				uni.showModal({
+					showCancel: false,
+					content:'机构正在为您报名中,请耐心等待,有疑问请联系020-87085982!'
+				});
+				return;
+			}
 			if(this.sysTime <= item.studyStartTime || this.sysTime >= item.studyEndTime ) {
 				uni.showToast({
 					icon:'none',
@@ -422,13 +438,13 @@ export default {
 				}).then(res => {
 					if(res.data.code == 200) {
 						uni.navigateTo({
-							url:`/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}`
+							url:`/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}`
 						})
 					}
 				});
 				return;
 			}
-			this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}`);
+			this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);
 		},
 		/**
 		 * @param {Object} goodsId 商品id

+ 5 - 1
pages2/wd/course.vue

@@ -30,6 +30,7 @@ export default {
 			goodsId: 0,
 			gradeId:0,
 			courseList: [],
+			orderGoodsId:0,
 			param:{
 				pageNum: 1,
 				pageSize: 10,
@@ -41,6 +42,7 @@ export default {
 	onLoad(option) {
 		this.goodsId = Number(option.id);
 		this.gradeId = Number(option.gid)
+		this.orderGoodsId = Number(option.orderGoodsId)
 		// uni.setStorageSync('courseGoodsId', this.goodsId);
 		this.courseCourseList();
 		this.$store.getters.dictObj
@@ -85,6 +87,7 @@ export default {
 			 this.$navTo.togo('/pages3/polyv/detail', {
 				id: item.courseId,
 				goodsId: this.goodsId,
+				orderGoodsId:this.orderGoodsId
 			}); 
 		},
 		studyIn(item,index) {
@@ -99,7 +102,8 @@ export default {
 			}
 			this.$navTo.togo('/pages3/polyv/detail', {
 				id: item.courseId,
-				goodsId: this.goodsId
+				goodsId: this.goodsId,
+				orderGoodsId:this.orderGoodsId
 			});
 			// this.$navTo.togo('/pages2/verify/input');
 		},

+ 11 - 5
pages3/polyv/detail.vue

@@ -47,7 +47,7 @@
 						<view class="video_t1">{{ detail.courseName }}</view>
 					</u-col>
 					<u-col span="2" >
-						<div class="notice_wrap" v-if="noticeShow">
+						<div class="notice_wrap" v-if="goodsData.buyNote">
 							<view class="video_t1_t" @click="studyNotice">
 								学员须知
 							</view>
@@ -246,6 +246,7 @@ export default {
 	},
 	data() {
 		return {
+			orderGoodsId:0,
 			noticeShow:false,
 			navShow:true,
 			enableAutoRotation:true,
@@ -332,6 +333,7 @@ export default {
 	onLoad(option) {
 		this.courseId = Number(option.id);
 		this.goodsId = Number(option.goodsId);
+		this.orderGoodsId = Number(option.orderGoodsId)
 		this.courseDetail();
 		this.getGoodsDetail();
 		this.getAnswerList();
@@ -378,7 +380,8 @@ export default {
 													success: function(resultst) {
 														if (resultst.confirm) {
 															self.$navTo.togo('/pages2/verify/input', {
-																id: self.goodsId
+																id: self.goodsId,
+																orderGoodsId:self.orderGoodsId
 															});
 														}
 														if (resultst.cancel) {
@@ -394,7 +397,8 @@ export default {
 													success: function(resultst) {
 														if (resultst.confirm) {
 															self.$navTo.togo('/pages2/verify/input', {
-																id: self.goodsId
+																id: self.goodsId,
+																orderGoodsId:self.orderGoodsId
 															});
 														}
 														if (resultst.cancel) {
@@ -416,7 +420,8 @@ export default {
 																success: function(resultst) {
 																	if (resultst.confirm) {
 																		self.$navTo.togo('/pages2/verify/input2', {
-																			id: self.goodsId
+																			id: self.goodsId,
+																			orderGoodsId:self.orderGoodsId
 																		});
 																	}
 																	if (resultst.cancel) {
@@ -432,7 +437,8 @@ export default {
 																success: function(resultst) {
 																	if (resultst.confirm) {
 																		self.$navTo.togo('/pages2/verify/input2', {
-																			id: self.goodsId
+																			id: self.goodsId,
+																			orderGoodsId:self.orderGoodsId
 																		});
 																	}
 																	if (resultst.cancel) {