Ver código fonte

调整页面

wangxy 2 meses atrás
pai
commit
63956b52c2

+ 4 - 3
components/listCard/kaoshiCard.vue

@@ -77,7 +77,7 @@
 	
 	function checkMore() {
 		uni.redirectTo({
-			url: '/pages/client/Kaoshi/list'
+			url: '/pages/client/Kaoshi/list?from=shouye'
 		})
 	}
 	
@@ -112,12 +112,13 @@
 	}
 	
 	function checkKaoshi(item) {
-		uni.navigateTo({
-			url: `/pages/client/Kaoshi/exam?ksId=${item.ksId}&zhuapai=${activeks.value.zhuapai}`
+		uni.redirectTo({
+			url: `/pages/client/Kaoshi/exam?ksId=${item.ksId}&zhuapai=${activeks.value.zhuapai}?from=shouye`
 		})
 	}
 	
 	function handleContinue(data) {
+		activeks.value = data;
 		// 考试中 直接进入考试
 		checkKaoshi(data)
 	}

+ 1 - 1
components/listCard/kechengCard.vue

@@ -37,7 +37,7 @@
 	
 	function checkMore() {
 		uni.redirectTo({
-			url:"/pages/client/Kecheng/list"
+			url:"/pages/client/Kecheng/list?from=shouye"
 		})
 	}
 </script>

+ 3 - 3
components/listCard/lianxiCard.vue

@@ -58,7 +58,7 @@
 	
 	function checkMore() {
 		uni.redirectTo({
-			url: '/pages/client/Lianxi/list'
+			url: '/pages/client/Lianxi/list?from=shouye'
 		})
 	}
 	
@@ -71,8 +71,8 @@
 	}
 	
 	function checkKaoshi(item) {
-		uni.navigateTo({
-			url: `/pages/client/Lianxi/exam?lxId=${item.lxId}`
+		uni.redirectTo({
+			url: `/pages/client/Lianxi/exam?lxId=${item.lxId}?from=shouye`
 		})
 	}
 	

+ 13 - 4
pages/client/Chengji/ksScoreShijuan.vue

@@ -115,7 +115,8 @@
 		userScore: '',
 		ksScore: 0,
 		StListForSearch: [],
-		duanluo: []
+		duanluo: [],
+		from: ''
 	})
 	
 	const questionData = ref([]);
@@ -225,6 +226,7 @@
 	
 	onLoad((options) => {
 		hisId.value = options.hisId;
+		data.from = options.from;
 		initPage()
 	})
 	
@@ -263,9 +265,16 @@
 	
 	
 	function handleBack() {
-		uni.redirectTo({
-			url: "/pages/admin/Lianxi/list"
-		})
+		if (data.from == 'chengjiList') {
+			uni.redirectTo({
+				url: "/pages/client/Chengji/list"
+			})
+		} else if (data.from == 'kaoshi'){
+			uni.redirectTo({
+				url: "/pages/client/Kaoshi/list"
+			})
+		}
+		
 	}
 	
 	

+ 12 - 5
pages/client/Chengji/list.vue

@@ -72,13 +72,20 @@
 			contentdown: '查看更多',
 			contentrefresh: '加载中',
 			contentnomore: '没有更多'
-		}
+		},
+		from: ''
 	})
 
 	function goUpPage() {
-		uni.redirectTo({
-			url: '/pages/client/ShouYe/shouye'
-		})
+		if (data.from == 'my') {
+			uni.redirectTo({
+				url: '/pages/client/my/index'
+			})
+		} else if (data.from == 'kaoshi') {
+			uni.redirectTo({
+				url: '/pages/client/Kaoshi/list'
+			})
+		}
 	}
 
 	function handleSearch() {
@@ -88,7 +95,7 @@
 
 	function checkKecheng(item) {
 		uni.navigateTo({
-			url: `/pages/client/Chengji/ksScoreShijuan?hisId=${item.hisId}`
+			url: `/pages/client/Chengji/ksScoreShijuan?hisId=${item.hisId}&from=chengjiList`
 		})
 	}
 

+ 1 - 1
pages/client/Chengji/lxScoreShijuan.vue

@@ -115,7 +115,7 @@
 		userScore: '',
 		ksScore: 0,
 		StListForSearch: [],
-		duanluo: []
+		duanluo: [],
 	})
 	
 	const questionData = ref([]);

+ 16 - 4
pages/client/Kaoshi/exam.vue

@@ -137,7 +137,8 @@
 
 	onLoad((option) => {
 		data.ksId = option.ksId;
-		data.zhuapai = option.zhuapai
+		data.zhuapai = option.zhuapai;
+		data.from = option.from;
 
 		if (data.zhuapai && data.zhuapai != 0) {
 			// 考试前确认摄像头
@@ -174,6 +175,7 @@
 		zhuapai: 0,
 		duanluo: [],
 		StListForSearch: [],
+		from: ''
 	})
 	
 	const markDB = ref([]);
@@ -468,9 +470,19 @@
 	}
 
 	function handleBack() {
-		uni.redirectTo({
-			url: "/pages/client/Kaoshi/list"
-		})
+		if (data.from == 'shouye') {
+			uni.redirectTo({
+				url: "/pages/client/ShouYe/shouye"
+			})
+		} else if (data.from == 'kaoshiList') {
+			uni.redirectTo({
+				url: "/pages/client/Kaoshi/list"
+			})
+		} else {
+			uni.redirectTo({
+				url: "/pages/client/ShouYe/shouye"
+			})
+		}
 	}
 
 	function showAnswerCard() {

+ 18 - 6
pages/client/Kaoshi/list.vue

@@ -75,13 +75,24 @@
 			contentdown: '查看更多',
 			contentrefresh: '加载中',
 			contentnomore: '没有更多'
-		}
+		},
+		from: ''
 	})
 	
 	function goUpPage() {
-		uni.redirectTo({
-			url: '/pages/client/ShouYe/shouye'
-		})
+		if ( data.from == 'shouye') {
+			uni.redirectTo({
+				url: '/pages/client/ShouYe/shouye'
+			})
+		} else if (data.from = 'my'){
+			uni.redirectTo({
+				url: '/pages/client/my/index'
+			})
+		} else {
+			uni.redirectTo({
+				url: '/pages/client/ShouYe/shouye'
+			})
+		}
 	}
 	// 修改身份
 	function handleChangeIdentification() {
@@ -124,7 +135,7 @@
 
 	function checkKaoshi(item) {
 		uni.navigateTo({
-			url: `/pages/client/Kaoshi/exam?ksId=${item.ksId}&zhuapai=${activeks.value.zhuapai}`
+			url: `/pages/client/Kaoshi/exam?ksId=${item.ksId}&zhuapai=${activeks.value.zhuapai}&from=kaoshiList`
 		})
 	}
 
@@ -192,7 +203,8 @@
 		})
 	}
 
-	onLoad(() => {
+	onLoad((options) => {
+		data.from = options.from
 		getMore()
 	})
 </script>

+ 19 - 7
pages/client/Kecheng/list.vue

@@ -58,13 +58,24 @@
 			contentdown: '查看更多',
 			contentrefresh: '加载中',
 			contentnomore: '没有更多'
-		}
+		},
+		from: ''
 	})
 
 	function goUpPage() {
-		uni.redirectTo({
-			url: '/pages/client/ShouYe/shouye'
-		})
+		if ( data.from == 'shouye') {
+			uni.redirectTo({
+				url: '/pages/client/ShouYe/shouye'
+			})
+		} else if (data.from == 'my'){
+			uni.redirectTo({
+				url: '/pages/client/my/index'
+			})
+		} else {
+			uni.redirectTo({
+				url: '/pages/client/ShouYe/shouye'
+			})
+		}
 	}
 
 	function handleSearch() {
@@ -73,8 +84,8 @@
 	}
 
 	function checkKecheng(item) {
-		uni.navigateTo({
-			url: `/pages/client/Kecheng/study?kcId=${item.kcId}`
+		uni.redirectTo({
+			url: `/pages/client/Kecheng/study?kcId=${item.kcId}&from=kechengList`
 		})
 	}
 
@@ -141,7 +152,8 @@
 		})
 	}
 
-	onLoad(() => {
+	onLoad((options) => {
+		data.from = options.from;
 		getMore()
 	})
 </script>

+ 16 - 3
pages/client/Kecheng/study.vue

@@ -75,10 +75,12 @@
 				curPlayData: null,
 				timer1: null,
 				kcId: null,
+				from: ''
 			}
 		},
 		onLoad(options) {
 			this.kcId = options.kcId;
+			this.from = options.from;
 			this.init();
 		},
 		methods: {
@@ -131,9 +133,20 @@
 				console.log('end')
 			},
 			goUpPage() {
-				uni.redirectTo({
-					url: '/pages/admin/Kecheng/list'
-				})
+				if (this.from == 'kechengList') {
+					uni.redirectTo({
+						url: '/pages/client/Kecheng/list'
+					})
+				} else if (this.from == 'shouye') {
+					uni.redirectTo({
+						url: '/pages/client/ShouYe/shouye'
+					})
+				} else {
+					uni.redirectTo({
+						url: '/pages/client/ShouYe/shouye'
+					})
+				}
+				
 			},
 			onClickItem(e) {
 				if (this.current !== e.currentIndex) {

+ 19 - 5
pages/client/Lianxi/exam.vue

@@ -117,7 +117,8 @@
 
 	onLoad((option) => {
 		data.lxId = option.lxId;
-		data.zhuapai = option.zhuapai
+		data.zhuapai = option.zhuapai;
+		data.from = option.from;
 		initKaoshi();
 	})
 
@@ -144,6 +145,7 @@
 		zhuapai: 0,
 		duanluo: [],
 		StListForSearch: [],
+		from: ''
 	})
 	
 	const markDB = ref([]);
@@ -194,15 +196,27 @@
 	
 	
 	function handleScoreClose() {
-		uni.redirectTo({
-			url: '/pages/client/Lianxi/list'
-		})
+		if (data.from == 'shouye') {
+			uni.redirectTo({
+				url: '/pages/client/ShouYe/shouye'
+			})
+		} else if (data.from == 'lianxiList') {
+			uni.redirectTo({
+				url: '/pages/client/Lianxi/list'
+			})
+		} else {
+			uni.redirectTo({
+				url: "/pages/client/ShouYe/shouye"
+			})
+		}
+		
+	
 	}
 	
 	// 考试得分相关 start
 	function handleScoreConfirm() {
 		uni.redirectTo({
-			url: '/pages/client/Chengji/lxScoreShijuan'
+			url: '/pages/client/Chengji/lxScoreShijuan?from="kaoshi"'
 		})
 	}
 	

+ 18 - 6
pages/client/Lianxi/list.vue

@@ -72,7 +72,8 @@
 			contentdown: '查看更多',
 			contentrefresh: '加载中',
 			contentnomore: '没有更多'
-		}
+		},
+		from: ''
 	})
 	
 	function checkKsXz(data) {
@@ -84,9 +85,19 @@
 	}
 	
 	function goUpPage() {
-		uni.redirectTo({
-			url: '/pages/client/ShouYe/shouye'
-		})
+		if ( data.from == 'shouye') {
+			uni.redirectTo({
+				url: '/pages/client/ShouYe/shouye'
+			})
+		} else if (data.from == 'my') {
+			uni.redirectTo({
+				url: '/pages/client/my/index'
+			})
+		} else {
+			uni.redirectTo({
+				url: '/pages/client/ShouYe/shouye'
+			})
+		}
 	}
 	
 	function handleSearch() {
@@ -96,7 +107,7 @@
 	
 	function checkKaoshi(item) {
 		uni.redirectTo({
-			url: `/pages/client/Lianxi/exam?lxId=${item.lxId}`
+			url: `/pages/client/Lianxi/exam?lxId=${item.lxId}&from=lianxiList`
 		})
 	}
 	
@@ -164,7 +175,8 @@
 		})
 	}
 	
-	onLoad(() => {
+	onLoad((options) => {
+		data.from = options.from;
 		getMore()
 	})
 	

+ 3 - 3
pages/client/ShouYe/shouye.vue

@@ -51,11 +51,11 @@
 			} = res.data;
 			
 			data.kaoshiCount = kaoshiCount;
-			data.kaoshiList = kaoshiList;
+			data.kaoshiList = kaoshiList || [];
 			data.kechengCount = kechengCount;
-			data.kechengList = kechengList;
+			data.kechengList = kechengList || [];
 			data.lianxiCount = lianxiCount;
-			data.lianxiList = lianxiList;
+			data.lianxiList = lianxiList || [];
 		})
 	}