Explorar el Código

考试跳转调整

wangxy hace 1 mes
padre
commit
b5e2a1f368

+ 1 - 1
components/custom-tabbar/custom-tabbar-client.vue

@@ -42,7 +42,7 @@
 					// 同页面不刷新
 					return;
 				}
-				uni.reLaunch({url: path});
+				uni.redirectTo({url: path});
 			},
 		},
 	}

+ 9 - 3
components/listCard/kaoshiCard.vue

@@ -112,9 +112,15 @@
 	}
 	
 	function checkKaoshi(item) {
-		uni.navigateTo({
-			url: `/pages/client/Kaoshi/examCamera?ksId=${item.ksId}&zhuapai=${activeks.value.zhuapai}&userKaozhengId=${activeks.value.userKaozhengId}&from=shouye`
-		})
+    if (activeks.value.zhuapai){
+      uni.navigateTo({
+        url: `/pages/client/Kaoshi/examCamera?ksId=${item.ksId}&zhuapai=${activeks.value.zhuapai}&userKaozhengId=${activeks.value.userKaozhengId}&from=shouye`
+      })
+    } else {
+      uni.navigateTo({
+        url: `/pages/client/Kaoshi/exam?ksId=${item.ksId}&zhuapai=${activeks.value.zhuapai}&userKaozhengId=${activeks.value.userKaozhengId}&from=shouye`
+      })
+    }
 	}
 	
 	function handleContinue(data) {

+ 14 - 5
pages/client/Kaoshi/list.vue

@@ -158,14 +158,23 @@
 
 	function checkKaoshi(item) {
 		// #ifdef H5
-		history.replaceState({
+		/* history.replaceState({
 			...history.state,
 			newKey: 'newValue'
-		}, '', window.location.href);
+		}, '', window.location.href); */
 		// #endif
-		uni.navigateTo({
-			url: `/pages/client/Kaoshi/examCamera?ksId=${item.ksId}&zhuapai=${activeks.value.zhuapai}&userKaozhengId=${activeks.value.userKaozhengId}&from=kaoshiList`
-		})
+		// 判断是否有抓拍,有抓拍需要跳转到验证页面
+		if (activeks.value.zhuapai) {
+			uni.navigateTo({
+				url: `/pages/client/Kaoshi/examCamera?ksId=${item.ksId}&zhuapai=${activeks.value.zhuapai}&userKaozhengId=${activeks.value.userKaozhengId}&from=kaoshiList`
+			})
+		} else {
+			uni.navigateTo({
+				url: `/pages/client/Kaoshi/exam?ksId=${item.ksId}&zhuapai=${activeks.value.zhuapai}&userKaozhengId=${activeks.value.userKaozhengId}&from=kaoshiList`
+			})
+		}
+		
+
 	}
 
 	function onRefresh() {