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 context = getContext(this) as common.UIAbilityContext;
private serviceExtProxy: IdlServiceExtProxy private serviceExtProxy: IdlServiceExtProxy
@State judgeVersion: string = "" @State judgeVersion: string = ""
private version: string = "2025.05.09.01" private version: string = judgeConfig.version
@Styles @Styles
commStyle(){ commStyle(){

View File

@ -3,8 +3,9 @@ import Judge from '../../judgeSDK/utils/judgeReal';
import { MarkRule, Project, ProjectObj } from '../../judgeSDK/api/judgeSDK.d'; import { MarkRule, Project, ProjectObj } from '../../judgeSDK/api/judgeSDK.d';
import common from '@ohos.app.ability.common'; import common from '@ohos.app.ability.common';
import { import {
examJudgeMapSetScaling examJudgeMapSetScaling, examJudgeVersion
} from '../../judgeSDK/api' } from '../../judgeSDK/api'
import { judgeConfig } from '../../judgeSDK/utils/judgeConfig';
interface RoadDataType { interface RoadDataType {
name: string, name: string,
@ -30,6 +31,8 @@ export default struct RealTime {
@State ratio: number = 1 @State ratio: number = 1
@State lane: Object = {} @State lane: Object = {}
@State timer:number = 0 @State timer:number = 0
@State version: string = ""
constructor() { constructor() {
super() super()
@ -67,11 +70,11 @@ export default struct RealTime {
Column() { Column() {
if (this.draw) { if (this.draw) {
Stack({ alignContent: Alignment.TopEnd }) {
XComponent({ XComponent({
id: 'duolun_plugin_id_draw', //显示轨迹窗口id名称注意这个ID要和C++侧一致,不能变 id: 'duolun_plugin_id_draw', //显示轨迹窗口id名称注意这个ID要和C++侧一致,不能变
type: 'surface', type: 'surface',
libraryname: 'JudgeSdk' libraryname: 'JudgeSdk'
// libraryname: 'judgesdk'
}) })
.width(this.widthNumber) .width(this.widthNumber)
.height(this.heightNumber) .height(this.heightNumber)
@ -83,6 +86,12 @@ export default struct RealTime {
this.draw = false; this.draw = false;
clearInterval(globalThis.realTimer) clearInterval(globalThis.realTimer)
}) })
}.width(this.widthNumber)
.height(this.heightNumber)
Row() {
Text(this.version).margin({ right: 10 }).fontSize(14).fontColor(0x333333)
}
} else { } else {
Column() { Column() {
} }
@ -109,6 +118,8 @@ export default struct RealTime {
clearInterval(this.timer) clearInterval(this.timer)
} }
async aboutToAppear() { async aboutToAppear() {
this.version = (await examJudgeVersion()) + "/" + judgeConfig.version
const judge = new Judge(this) const judge = new Judge(this)
let timer = setInterval(()=>{ let timer = setInterval(()=>{
this.lane = globalThis.laneData; this.lane = globalThis.laneData;

View File

@ -745,7 +745,7 @@ export default class Judge {
const sdkver = await examJudgeVersion(); const sdkver = await examJudgeVersion();
const initInfo = { const initInfo = {
sdkver, sdkver,
appver: globalThis.version, appver: judgeConfig.version,
kskm: examSubject * 1, kskm: examSubject * 1,
kchp: plateNo, kchp: plateNo,
kchm: carId * 1, kchm: carId * 1,

View File

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