dedsudiyu 6 days ago
parent
commit
5c08f8ab29

+ 7 - 2
pages_safetyEducationExamination/utils/index.js

@@ -14,6 +14,9 @@ export async function goToExamPage(item, callbacks = {}) {
 	if (item.conditionType == 1) {
 	if (item.conditionType == 1) {
 		if (item.examStudy && item.courseId) {
 		if (item.examStudy && item.courseId) {
 			// 学习课程 — 等待后续逻辑
 			// 学习课程 — 等待后续逻辑
+			uni.navigateTo({
+				url: `/pages_safetyEducationExamination/views/webViewPage/courseLearning?courseId=${item.courseId}&examId=${item.examId}`,
+			});
 		} else {
 		} else {
 			if (item.knowledgePointIds && item.knowledgePointIds.length > 0) {
 			if (item.knowledgePointIds && item.knowledgePointIds.length > 0) {
 				const ids = Array.isArray(item.knowledgePointIds)
 				const ids = Array.isArray(item.knowledgePointIds)
@@ -28,8 +31,10 @@ export async function goToExamPage(item, callbacks = {}) {
 		}
 		}
 
 
 	} else if (item.conditionType == 2) {
 	} else if (item.conditionType == 2) {
-		// 学习课程 — 等待后续逻辑
-
+		// 学习课程
+		uni.navigateTo({
+			url: `/pages_safetyEducationExamination/views/webViewPage/courseLearning?courseId=${item.courseId}&examId=${item.examId}`,
+		});
 	} else if (item.conditionType == 3) {
 	} else if (item.conditionType == 3) {
 		if (item.mockExamId) {
 		if (item.mockExamId) {
 			const examData = encodeURIComponent(JSON.stringify(item));
 			const examData = encodeURIComponent(JSON.stringify(item));

+ 9 - 3
pages_safetyEducationExamination/views/webViewPage/courseLearning.vue

@@ -1,7 +1,7 @@
 <!-- 课程学习 -->
 <!-- 课程学习 -->
 <template>
 <template>
 	<view id="courseLearning-web-view">
 	<view id="courseLearning-web-view">
-		<web-view v-if="webViewType" :src="baseUrl + dataText"></web-view>
+		<web-view v-if="webViewType" :src="dataText"></web-view>
 	</view>
 	</view>
 </template>
 </template>
 
 
@@ -11,12 +11,18 @@
 		data() {
 		data() {
 			return {
 			return {
 				webViewType: false,
 				webViewType: false,
-				baseUrl: config.saoCodeTypeUrl,
 				dataText:'',
 				dataText:'',
 			}
 			}
 		},
 		},
 		onLoad(option) {
 		onLoad(option) {
-			
+			this.$set(this,'dataText',
+				uni.getStorageSync('cameraExtranetAgent')+
+				// 'http://192.168.1.8/stream/#/'+
+				'?pageType=learningCourse&touken='+uni.getStorageSync('token')+
+				'&courseId='+option.courseId+
+				'&examId='+option.examId
+			);
+			this.$set(this,'webViewType',true);
 		},
 		},
 		mounted() {
 		mounted() {
 
 

+ 3 - 3
pages_safetyEducationExamination/views/webViewPage/coursewareLearning.vue

@@ -12,13 +12,13 @@
 		data() {
 		data() {
 			return {
 			return {
 				webViewType: false,
 				webViewType: false,
-				dataText:'http://192.168.1.10/#/?pageType=learningMaterials&touken=d050fc42-0005-4eff-a3cc-5c3bb76a1d52&coursewareId=2092529570460073986',
+				dataText:'',
 			}
 			}
 		},
 		},
 		onLoad(option) {
 		onLoad(option) {
 			this.$set(this,'dataText',
 			this.$set(this,'dataText',
-				// uni.getStorageSync('cameraExtranetAgent')+
-				'http://192.168.1.8/stream/#/'+
+				uni.getStorageSync('cameraExtranetAgent')+
+				// 'http://192.168.1.8/stream/#/'+
 				'?pageType=learningMaterials&touken='+uni.getStorageSync('token')+
 				'?pageType=learningMaterials&touken='+uni.getStorageSync('token')+
 				'&coursewareId='+option.coursewareId
 				'&coursewareId='+option.coursewareId
 			);
 			);