Эх сурвалжийг харах

1.feat:选购中心—新增进入页面携带参数匹配筛选

xiexaing 1 жил өмнө
parent
commit
602d7e7ad7
1 өөрчлөгдсөн 40 нэмэгдсэн , 0 устгасан
  1. 40 0
      pages/course/index.vue

+ 40 - 0
pages/course/index.vue

@@ -125,6 +125,46 @@
 			// }, 500);
 		},
 		onLoad(option) {
+			console.log(option, '------option------')
+			const activeTypeData = {
+				// 一建继续教育
+				'1': {
+					educationId: "2",
+					projectId: "2",
+					businessId: "2",
+					subjectId: "",
+					sortType: 1
+				},
+				// 二建继续教育
+				'2': {
+					educationId: "2",
+					projectId: "2",
+					businessId: "3",
+					subjectId: "",
+					sortType: 1
+				},
+				// 职称继续教育 
+				'3': {
+					educationId: "2",
+					projectId: "111",
+					businessId: "242",
+					subjectId: "",
+					sortType: 1
+				},
+				// 安管人员考前培训
+				'4': {
+					educationId: "3",
+					projectId: "24",
+					businessId: "65",
+					subjectId: "",
+					sortType: 1
+				}
+			};
+			// 判断是否携带筛选条件businessKey
+			if (activeTypeData.hasOwnProperty(option.businessKey)) {
+				this.activeData = activeTypeData[option.businessKey];
+			}
+
 			if (option.current) {
 				this.$store.state.current = Number(option.current)
 			}