Преглед на файлове

Merge branch '2025北京诚祥' of https://gogs.mtavip.com/wangguoyu/uniProject into 2025北京诚祥

tanxue преди 2 месеца
родител
ревизия
9e2248f90b

+ 3 - 3
components/listCard/kaoshiCard.vue

@@ -3,12 +3,12 @@
 		<!-- card title -->
 		<view class="card-head-box">
 			<view class="card-line-title">考试</view>
-			<view class="card-more" @click="checkMore" v-if="!data.count">更多<text class="more-num">{{data.count}}</text><icon class="more-jt"></icon></view>
+			<view class="card-more" @click="checkMore" v-if="data.count">更多<text class="more-num">{{data.count}}</text><icon class="more-jt"></icon></view>
 		</view>
 		
 		<!-- kaoshi title -->
 		<view class="card-name-box"> 	
-			<view class="card-name" v-if="data.ksName"><icon></icon>{{data.ksName}}</view>
+			<view class="card-name" v-if="data.zyName"><icon></icon>{{data.zyName}}</view>
 			<text class="card-level">{{data.zyLevelName}}</text>
 			<!-- <view class="card-name"><icon></icon>考试名称</view>
 			<text class="card-level">初级</text> -->
@@ -84,7 +84,7 @@
 	// 修改身份
 	function handleChangeIdentification() {
 		uni.navigateTo({
-			url:'/pages/client/my/info?from=shouye'
+			url:'/pages/client/my/myInfo?from=shouye'
 		})
 	}
 	

+ 1 - 1
components/listCard/kechengCard.vue

@@ -7,7 +7,7 @@
 		</view>
 		<!-- kaoshi title -->
 		<view class="card-name-box">
-			<view class="card-name" v-if="data.name"><icon></icon>{{data.name}}</view>
+			<view class="card-name" v-if="data.zyName"><icon></icon>{{data.zyName}}</view>
 			<text class="card-level">{{data.zyLevelName}}</text>
 		</view>
 		<!-- 内容区域 -->

+ 3 - 3
components/listCard/lianxiCard.vue

@@ -7,18 +7,18 @@
 		</view>
 		<!-- kaoshi title -->
 		<view class="card-name-box">
-			<view class="card-name" v-if="data.lxName"><icon></icon>{{data.lxName}}</view>
+			<view class="card-name" v-if="data.zyName"><icon></icon>{{data.zyName}}</view>
 			<text class="card-level">{{data.zyLevelName}}</text>
 		</view>
 		<!-- 内容区域 -->
 		<view class="card-content-box kaoshi-content-box">
-			<view class="card-content-item">
+			<!-- <view class="card-content-item">
 				<icon class="card-time-icon"></icon>
 				<view class="content-text-box">
 					<text>时间</text>
 					<view>{{data.totalTm}}分钟</view>
 				</view>
-			</view>
+			</view> -->
 			<view class="card-content-item">
 				<icon class="card-sum-icon"></icon>
 				<view class="content-text-box">

+ 17 - 9
pages/client/Chengji/ksScoreShijuan.vue

@@ -268,15 +268,23 @@
 	
 	
 	function handleBack() {
-		if (data.from == 'chengjiList') {
-			uni.redirectTo({
-				url: "/pages/client/Chengji/list"
-			})
-		} else if (data.from == 'kaoshi'){
-			uni.redirectTo({
-				url: "/pages/client/Kaoshi/list"
-			})
-		} 
+		
+		const pages = getCurrentPages();
+		if (pages.length>1) {
+			uni.navigateBack()
+		} else {
+			if (data.from == 'chengjiList') {
+				uni.redirectTo({
+					url: "/pages/client/Chengji/list"
+				})
+			} else if (data.from == 'kaoshi'){
+				uni.redirectTo({
+					url: "/pages/client/Kaoshi/list"
+				})
+			} 
+		}
+		
+
 	}
 	
 	

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

@@ -14,7 +14,7 @@
 							<view class="item-card-row">
 								<!-- 数量 -->
 								<view class="ks-item-top">
-									<view class="ks-name">{{item.ksName}}</view>
+									<view class="ks-name">{{item.zyName}}</view>
 									<view class="ks-zyLevelName">{{item.zyLevelName}}</view>
 								</view>
 								<!-- 时间 -->
@@ -71,19 +71,19 @@
 
 	function goUpPage() {
 		if (data.from == 'my') {
-			uni.redirectTo({
+			uni.navigateTo({
 				url: '/pages/client/my/index'
 			})
 		} else if (data.from == 'kaoshi') {
-			uni.redirectTo({
+			uni.navigateTo({
 				url: '/pages/client/Kaoshi/list'
 			})
 		} else if (data.from == 'shouye'){
-			uni.redirectTo({
+			uni.navigateTo({
 				url: '/pages/client/ShouYe/shouye'
 			})
 		} else {
-			uni.redirectTo({
+			uni.navigateTo({
 				url: '/pages/client/ShouYe/shouye'
 			})
 		}

+ 9 - 3
pages/client/Chengji/lxScoreShijuan.vue

@@ -288,9 +288,15 @@
 
 
 	function handleBack() {
-		uni.redirectTo({
-			url: "/pages/client/Lianxi/list"
-		})
+		const pages = getCurrentPages();
+		if (pages.length>1) {
+			uni.navigateBack()
+		} else {
+			uni.redirectTo({
+				url: "/pages/client/Lianxi/list"
+			})
+		}
+		
 	}
 
 

+ 23 - 17
pages/client/Kaoshi/exam.vue

@@ -225,9 +225,7 @@
 	
 	
 	function handleScoreClose() {
-		uni.redirectTo({
-			url: '/pages/client/Kaoshi/list'
-		})
+		handleBack()
 	}
 	
 	// 考试得分相关 start
@@ -478,19 +476,27 @@
 	}
 
 	function handleBack() {
-		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"
-			})
-		}
+		
+		 const pages = getCurrentPages();
+		 if (pages.length>1) {
+			 uni.navigateBack()
+		 } else {
+			 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() {
@@ -697,7 +703,7 @@
 			formatKaoshiData();
 			// 设置抓拍监听
 			zhuapaiRef.value.init({
-				zhuapai: zhuapai || 1,
+				zhuapai: zhuapai,
 				operId: operId
 			});
 			// 设置切屏监听

+ 10 - 4
pages/client/Kaoshi/list.vue

@@ -15,7 +15,7 @@
 							<view class="item-card-row">
 								<!-- 考试名 + 等级 -->
 								<view class="ks-item-top">
-									<view class="ks-name">{{item.ksName}}</view>
+									<view class="ks-name">{{item.zyName}}</view>
 									<view class="ks-zyLevelName">{{item.zyLevelName}}</view>
 								</view>
 								<!-- 时间 -->
@@ -54,7 +54,7 @@
 		reactive
 	} from "vue";
 	import {
-		onLoad
+		onLoad, onShow
 	} from "@dcloudio/uni-app";
 	import * as kaoshiApi from "@/api/kaoshi.js";
 	
@@ -86,8 +86,8 @@
 	}
 	// 修改身份
 	function handleChangeIdentification() {
-		uni.redirectTo({
-			url:'/pages/client/my/info?from=kaoshiList'
+		uni.navigateTo({
+			url:'/pages/client/my/myInfo?from=kaoshiList'
 		})
 	}
 	
@@ -124,6 +124,9 @@
 	}
 
 	function checkKaoshi(item) {
+		// #ifdef H5
+		history.replaceState({ ...history.state, newKey: 'newValue' }, '', window.location.href);
+		// #endif
 		uni.navigateTo({
 			url: `/pages/client/Kaoshi/exam?ksId=${item.ksId}&zhuapai=${activeks.value.zhuapai}&from=kaoshiList`
 		})
@@ -195,6 +198,9 @@
 
 	onLoad((options) => {
 		data.from = options.from
+	})
+	
+	onShow(() => {
 		getMore()
 	})
 </script>

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

@@ -14,7 +14,7 @@
 							<view class="item-card-row">
 								<!-- 数量 -->
 								<view class="ks-item-top">
-									<view>{{item.name}}</view>
+									<view>{{item.zyName}}</view>
 									<view class="ks-zyLevelName">{{item.zyLevelName}}</view>
 								</view>
 								<view class="ks-totalTm">
@@ -42,7 +42,7 @@
 		reactive
 	} from "vue";
 	import {
-		onLoad
+		onLoad, onShow
 	} from "@dcloudio/uni-app";
 	import * as kechengApi from "@/api/kecheng.js"
 	import {formatSecondsToCnhms} from "@/utils/common.js"
@@ -74,7 +74,7 @@
 	}
 
 	function checkKecheng(item) {
-		uni.redirectTo({
+		uni.navigateTo({
 			url: `/pages/client/Kecheng/study?kcId=${item.kcId}&from=kechengList`
 		})
 	}
@@ -144,8 +144,11 @@
 
 	onLoad((options) => {
 		data.from = options.from;
-		getMore()
 	})
+	
+	onShow(() => {
+		getMore()
+	}) 
 </script>
 
 <style lang="scss" scoped>

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

@@ -133,18 +133,23 @@
 				console.log('end')
 			},
 			goUpPage() {
-				if (this.from == 'kechengList') {
-					uni.redirectTo({
-						url: '/pages/client/Kecheng/list'
-					})
-				} else if (this.from == 'shouye') {
-					uni.redirectTo({
-						url: '/pages/client/ShouYe/shouye'
-					})
+				const pages = getCurrentPages();
+				if (pages.length>1) {
+					uni.navigateBack()
 				} else {
-					uni.redirectTo({
-						url: '/pages/client/ShouYe/shouye'
-					})
+					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'
+						})
+					}
 				}
 				
 			},

+ 20 - 17
pages/client/Lianxi/exam.vue

@@ -197,21 +197,8 @@
 	
 	
 	function handleScoreClose() {
-		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"
-			})
-		}
 		
-	
+		handleBack()
 	}
 	
 	// 考试得分相关 start
@@ -364,9 +351,25 @@
 	}
 
 	function handleBack() {
-		uni.redirectTo({
-			url: "/pages/client/Lianxi/list"
-		})
+		const pages = getCurrentPages();
+		if (pages.length>1) {
+			uni.navigateBack()
+		} else {
+			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"
+				})
+			}
+		}
+		
 	}
 
 	function showAnswerCard() {

+ 8 - 5
pages/client/Lianxi/list.vue

@@ -15,13 +15,13 @@
 							<view class="item-card-row">
 								<!-- 考试名 + 等级 -->
 								<view class="ks-item-top">
-									<view class="ks-name">{{item.lxName}}</view>
+									<view class="ks-name">{{item.zyName}}</view>
 									<view class="ks-zyLevelName">{{item.zyLevelName}}</view>
 								</view>
 								<!-- 时间 -->
-								<view class="ks-totalTm">
+								<!-- <view class="ks-totalTm">
 									<icon class="phone-time-icon" />时间:{{item.totalTm}}分钟
-								</view>
+								</view> -->
 								<!-- 分数 -->
 								<view class="ks-score-content">
 									<view class="ks-score">
@@ -56,7 +56,7 @@
 		reactive
 	} from "vue";
 	import {
-		onLoad
+		onLoad, onShow
 	} from "@dcloudio/uni-app";
 	
 	const lxxzRef = ref(null);
@@ -96,7 +96,7 @@
 	}
 	
 	function checkKaoshi(item) {
-		uni.redirectTo({
+		uni.navigateTo({
 			url: `/pages/client/Lianxi/exam?lxId=${item.lxId}&from=lianxiList`
 		})
 	}
@@ -167,6 +167,9 @@
 	
 	onLoad((options) => {
 		data.from = options.from;
+	})
+	
+	onShow(() => {
 		getMore()
 	})
 	

+ 4 - 1
pages/client/ShouYe/shouye.vue

@@ -22,7 +22,7 @@
 
 	import * as httpApi from "@/api/shouye.js"
 	import {
-		onLoad
+		onLoad, onShow
 	} from "@dcloudio/uni-app"
 	import {
 		reactive
@@ -63,6 +63,9 @@
 	onLoad(() => {
 		const auth = cacheManager.get('auth');
 		data.realName = auth.realName;
+	})
+	
+	onShow(() => {
 		initPage();
 	})
 </script>

+ 2 - 2
pages/client/my/index.vue

@@ -137,11 +137,11 @@
 		})
 	}
 	onLoad(() => {
-    getMyInit()
+    
 	})
 
   onShow(() => {
-
+	getMyInit()
   })
 </script>
 

+ 16 - 11
pages/client/my/myInfo.vue

@@ -171,18 +171,23 @@
 	}
 
 	function handleBack() {
-		if (data.from == 'my') {
-			uni.navigateTo({
-				url: '/pages/client/my/index'
-			})
-		} else if (data.from == 'kaoshi') {
-			uni.navigateTo({
-				url: '/pages/client/ShouYe/shouye'
-			})
+		const pages = getCurrentPages();
+		if (pages.length>1) {
+			uni.navigateBack()
 		} else {
-			uni.navigateTo({
-				url: '/pages/client/my/index'
-			})
+			if (data.from == 'my') {
+				uni.redirectTo({
+					url: '/pages/client/my/index'
+				})
+			} else if (data.from == 'kaoshi') {
+				uni.redirectTo({
+					url: '/pages/client/ShouYe/shouye'
+				})
+			} else {
+				uni.redirectTo({
+					url: '/pages/client/my/index'
+				})
+			}
 		}
 	}