This commit is contained in:
lixiao 2025-05-15 15:47:13 +08:00
parent a1d348f1c2
commit e5baf451a6
4 changed files with 31 additions and 18 deletions

View File

@ -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(){

View File

@ -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;

View File

@ -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,

View File

@ -1,5 +1,7 @@
//考试回放开关
export const judgeConfig = {
// 外壳版本号
version: "2025.05.15.01",
//本地目录开关
isTrajectoryOpen: false,
//是否开启拍照