优化
This commit is contained in:
		
							parent
							
								
									a1d348f1c2
								
							
						
					
					
						commit
						e5baf451a6
					
				| @ -62,7 +62,7 @@ struct Index { | ||||
|   private context = getContext(this) as common.UIAbilityContext; | ||||
|   private serviceExtProxy: IdlServiceExtProxy | ||||
|   @State judgeVersion: string = "" | ||||
|   private version: string = "2025.05.09.01" | ||||
|   private version: string = judgeConfig.version | ||||
| 
 | ||||
|   @Styles | ||||
|   commStyle(){ | ||||
|  | ||||
| @ -3,8 +3,9 @@ import Judge from '../../judgeSDK/utils/judgeReal'; | ||||
| import { MarkRule, Project, ProjectObj } from '../../judgeSDK/api/judgeSDK.d'; | ||||
| import common from '@ohos.app.ability.common'; | ||||
| import { | ||||
|   examJudgeMapSetScaling | ||||
|   examJudgeMapSetScaling, examJudgeVersion | ||||
| } from '../../judgeSDK/api' | ||||
| import { judgeConfig } from '../../judgeSDK/utils/judgeConfig'; | ||||
| 
 | ||||
| interface RoadDataType { | ||||
|   name: string, | ||||
| @ -30,6 +31,8 @@ export default struct RealTime { | ||||
|   @State ratio: number = 1 | ||||
|   @State lane: Object = {} | ||||
|   @State timer:number = 0 | ||||
|   @State version: string = "" | ||||
| 
 | ||||
| 
 | ||||
|   constructor() { | ||||
|     super() | ||||
| @ -67,11 +70,11 @@ export default struct RealTime { | ||||
| 
 | ||||
|       Column() { | ||||
|         if (this.draw) { | ||||
|           Stack({ alignContent: Alignment.TopEnd }) { | ||||
|             XComponent({ | ||||
|               id: 'duolun_plugin_id_draw', //显示轨迹窗口id名称,注意这个ID要和C++侧一致,不能变 | ||||
|               type: 'surface', | ||||
|               libraryname: 'JudgeSdk' | ||||
|             // libraryname: 'judgesdk' | ||||
|             }) | ||||
|               .width(this.widthNumber) | ||||
|               .height(this.heightNumber) | ||||
| @ -83,6 +86,12 @@ export default struct RealTime { | ||||
|                 this.draw = false; | ||||
|                 clearInterval(globalThis.realTimer) | ||||
|               }) | ||||
| 
 | ||||
|           }.width(this.widthNumber) | ||||
|           .height(this.heightNumber) | ||||
|           Row() { | ||||
|             Text(this.version).margin({ right: 10 }).fontSize(14).fontColor(0x333333) | ||||
|           } | ||||
|         } else { | ||||
|           Column() { | ||||
|           } | ||||
| @ -109,6 +118,8 @@ export default struct RealTime { | ||||
|     clearInterval(this.timer) | ||||
|   } | ||||
|   async aboutToAppear() { | ||||
|     this.version = (await examJudgeVersion()) + "/" + judgeConfig.version | ||||
| 
 | ||||
|     const judge = new Judge(this) | ||||
|     let timer = setInterval(()=>{ | ||||
|       this.lane = globalThis.laneData; | ||||
|  | ||||
| @ -745,7 +745,7 @@ export default class Judge { | ||||
|     const sdkver = await examJudgeVersion(); | ||||
|     const initInfo = { | ||||
|       sdkver, | ||||
|       appver: globalThis.version, | ||||
|       appver: judgeConfig.version, | ||||
|       kskm: examSubject * 1, | ||||
|       kchp: plateNo, | ||||
|       kchm: carId * 1, | ||||
|  | ||||
| @ -1,5 +1,7 @@ | ||||
| //考试回放开关
 | ||||
| export const judgeConfig = { | ||||
|   // 外壳版本号
 | ||||
|   version: "2025.05.15.01", | ||||
|   //本地目录开关
 | ||||
|   isTrajectoryOpen: false, | ||||
|   //是否开启拍照
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user