Compare commits
6 Commits
51f73f8be6
...
18b31dfdd4
| Author | SHA1 | Date | |
|---|---|---|---|
| 18b31dfdd4 | |||
| 17a52af998 | |||
| 23e115e89e | |||
| 37f135744f | |||
| 49e62fa685 | |||
| e8bd7a00ec |
@ -5,9 +5,9 @@
|
||||
"name": "default",
|
||||
"material": {
|
||||
"certpath": "C:\\Users\\93218\\.ohos\\config\\openharmony\\auto_ohos_default_subject-two_com.oh.dts.cer",
|
||||
"storePassword": "0000001A1DDAA4ACBCE726491F94C3AF56A2540582DD64F1D58054FCE4F27EB1EA3AB9254BF5C318282B",
|
||||
"storePassword": "0000001B6B286329D0B89755E137765E5E3EC92AFE4D235E753CC849068623687DD2FB932E88F0E1176076",
|
||||
"keyAlias": "debugKey",
|
||||
"keyPassword": "0000001AD378A9170F3E15A274CD444FCF00FAF0839F218288C28EC15366295413D9CB4926E710B7AEE8",
|
||||
"keyPassword": "0000001B82C966539FBC43A53702ADEAB4BC43B1A454A0645D48C22CC3BCDD977F0F98415E532D6094CF4C",
|
||||
"profile": "C:\\Users\\93218\\.ohos\\config\\openharmony\\auto_ohos_default_subject-two_com.oh.dts.p7b",
|
||||
"signAlg": "SHA256withECDSA",
|
||||
"storeFile": "C:\\Users\\93218\\.ohos\\config\\openharmony\\auto_ohos_default_subject-two_com.oh.dts.p12"
|
||||
|
||||
@ -7,7 +7,12 @@ export async function timeSynchronize() {
|
||||
let date = new Date();
|
||||
console.info('jiangsong1:timeSynchronization begin ');
|
||||
|
||||
let params = { time: dateFormat(date), deviceNo: globalThis.deviceNo,version:globalThis.version,judgeVersion:globalThis.judgeVersion}
|
||||
let params = {
|
||||
time: dateFormat(date),
|
||||
deviceNo: globalThis.deviceNo,
|
||||
version: globalThis.version,
|
||||
judgeVersion: globalThis.judgeVersion
|
||||
}
|
||||
let res: any = await timeSynchronization(params)
|
||||
res = res.timeSynchronizationRsp;
|
||||
globalThis.timeInfo = res.body
|
||||
|
||||
@ -4,6 +4,7 @@ import prompt from '@ohos.prompt';
|
||||
import { tcpUtil } from './TcpRequest';
|
||||
import Prompt from '@system.prompt';
|
||||
import tempRequest from './tempRequest';
|
||||
import connection from '@ohos.net.connection';
|
||||
|
||||
export function tcpRequest<T>(req: any): Promise<T> {
|
||||
return new Promise((resolve, reject) => {
|
||||
@ -89,6 +90,17 @@ export function tcpRequest<T>(req: any): Promise<T> {
|
||||
})
|
||||
}
|
||||
|
||||
function getNetWorkStatus() {
|
||||
connection.getDefaultNet().then(handle => {
|
||||
console.log("[http request] network handle", JSON.stringify(handle))
|
||||
connection.getNetCapabilities(handle).then(res => {
|
||||
console.log("[http request] network result", JSON.stringify(res))
|
||||
})
|
||||
}).catch(err => {
|
||||
console.log("[http request] network error", JSON.stringify(err))
|
||||
})
|
||||
}
|
||||
|
||||
export default async function request<T>(req: any): Promise<T> {
|
||||
return new Promise((resolve, reject) => {
|
||||
tempRequest(req).then((response) => {
|
||||
@ -97,6 +109,8 @@ export default async function request<T>(req: any): Promise<T> {
|
||||
}).catch(err => {
|
||||
console.log("[http request] only http request error")
|
||||
reject(err)
|
||||
}).finally(() => {
|
||||
getNetWorkStatus()
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
@ -23,8 +23,6 @@ import IdlServiceExtProxy from '../IdlServiceExt/idl_service_ext_proxy';
|
||||
import Want from '@ohos.app.ability.Want';
|
||||
import emitter from '@ohos.events.emitter';
|
||||
|
||||
// import VoiceAnnounce from './judgeSDK/utils/voiceAnnouncements';
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
struct Index {
|
||||
@ -55,13 +53,9 @@ struct Index {
|
||||
}),
|
||||
customStyle: true,
|
||||
alignment: DialogAlignment.Center,
|
||||
},
|
||||
)
|
||||
private fileUtil: FileUtil
|
||||
})
|
||||
private interval = null;
|
||||
// private vocObj = null;
|
||||
private avPlayer
|
||||
private workerInstance = null;
|
||||
private context = getContext(this) as common.UIAbilityContext;
|
||||
private serviceExtProxy: IdlServiceExtProxy
|
||||
|
||||
@ -114,14 +108,7 @@ struct Index {
|
||||
imageBtn({ btnWidth: '28%', btnHeight: '71%', imgSrc: $r('app.media.index_lw') })
|
||||
.margin({ left: 80 * globalThis.ratio })
|
||||
.onClick(async () => {
|
||||
// this.vocObj.playAudio({
|
||||
// type: 1,
|
||||
// name: 'button_media.wav'
|
||||
// })
|
||||
// ||!this.initParamFlag
|
||||
if (this.loading) {
|
||||
// globalThis.title = '正在初始化,请等待5s后重试'
|
||||
// this.errorDialog.open()
|
||||
return
|
||||
}
|
||||
setTimeout(() => {
|
||||
@ -130,29 +117,29 @@ struct Index {
|
||||
this.angle = 0
|
||||
if (!globalThis.timeInfo) {
|
||||
globalThis.type = '1'
|
||||
globalThis.title = '时间同步接口连接失败'
|
||||
globalThis.title = '时间同步接口连接失败,尝试重新同步,请稍后'
|
||||
this.errorDialog.open()
|
||||
promptAction.showToast({
|
||||
message: `时间同步接口连接失败`,
|
||||
message: `时间同步接口连接失败,尝试重新同步,请稍后`,
|
||||
duration: 3000
|
||||
});
|
||||
this.loading = false
|
||||
await this.initParams()
|
||||
return
|
||||
}
|
||||
if (!globalThis.carInfo) {
|
||||
globalThis.type = '1'
|
||||
globalThis.title = '车辆信息接口获取失败,尝试重新获取,请稍后'
|
||||
this.errorDialog.open()
|
||||
promptAction.showToast({
|
||||
message: `车辆信息接口获取失败`,
|
||||
message: `车辆信息接口获取失败,尝试重新获取,请稍后`,
|
||||
duration: 3000
|
||||
});
|
||||
globalThis.type = '1'
|
||||
globalThis.title = '车辆信息接口获取失败'
|
||||
this.errorDialog.open()
|
||||
this.loading = false
|
||||
await this.initParams()
|
||||
return
|
||||
}
|
||||
this.testXMLToJSONInWorker()
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
if (this.isSingle) {
|
||||
@ -413,20 +400,6 @@ struct Index {
|
||||
}
|
||||
|
||||
async aboutToAppear() {
|
||||
// setInterval(() => {
|
||||
// let date = new Date();
|
||||
// console.info('jiangsong1:timeSynchronization begin ');
|
||||
// uploadProgressData()
|
||||
// let params = {
|
||||
// time: dateFormat(date),
|
||||
// deviceNo: globalThis.deviceNo,
|
||||
// version: globalThis.version,
|
||||
// judgeVersion: globalThis.judgeVersion
|
||||
// }
|
||||
// timeSynchronizationHTTP(params)
|
||||
// }, 1000)
|
||||
|
||||
console.log('diyidiy')
|
||||
emitter.on({
|
||||
eventId: 1
|
||||
}, async () => {
|
||||
@ -544,47 +517,6 @@ struct Index {
|
||||
|
||||
}
|
||||
})
|
||||
// workerInstance.postMessage(param);
|
||||
// workerInstance.onmessage = (e: MessageEvents): void => {
|
||||
// console.log("baoyihu after postMessage :", JSON.stringify(e.data));
|
||||
// // @ts-ignore
|
||||
// let workData: WorkData = e.data;
|
||||
// this.loading = false
|
||||
// if (workData.isComplete) {
|
||||
// if(globalThis.singlePlay){
|
||||
// router.pushUrl({
|
||||
// url: 'pages/UserInfo',
|
||||
// }, router.RouterMode.Single)
|
||||
// return
|
||||
// }
|
||||
// getSyncData('MA_SYSSET').then(data => {
|
||||
// console.log('datadata', JSON.stringify(data))
|
||||
// // @ts-ignore
|
||||
// data.forEach(sys => {
|
||||
// //判断是否能点开始考试
|
||||
// if(sys.v_no === '854'){
|
||||
// globalThis.param854Str=sys.v_value
|
||||
// }
|
||||
// if (sys.v_no === '824'&&decodeURIComponent(sys.v_value)=='0') {
|
||||
// // this.Param612Str= decodeURIComponent(sys.v_value)
|
||||
// router.pushUrl({
|
||||
// url:'pages/CarCheck',
|
||||
// params: {
|
||||
// 'fromIndex':true
|
||||
// }
|
||||
// }, router.RouterMode.Single)
|
||||
// }else{
|
||||
// router.pushUrl({
|
||||
// url: 'pages/ExaminerLogin',
|
||||
// }, router.RouterMode.Single)
|
||||
// }
|
||||
// })
|
||||
// });
|
||||
//
|
||||
// }
|
||||
// workerInstance.terminate();
|
||||
//
|
||||
// }
|
||||
}
|
||||
|
||||
async heartMsg() {
|
||||
@ -610,7 +542,6 @@ struct Index {
|
||||
}
|
||||
|
||||
async onPageShow() {
|
||||
console.log('ttttt', 1111)
|
||||
await this.userAuth();
|
||||
console.log('globalThis.singlePlay', globalThis.singlePlay)
|
||||
if (globalThis.singlePlay == undefined || globalThis.singlePlay == null) {
|
||||
@ -680,12 +611,9 @@ struct Index {
|
||||
}
|
||||
|
||||
async initParams() {
|
||||
// deleteAllFIleLog(GlobalConfig.comoonfileWriteAddress + '/PLC/')
|
||||
//设置plc udp 同步requesthost
|
||||
await getUDP(this.context, false)
|
||||
this.loading = false
|
||||
await getDeviceInfo(this.context)
|
||||
|
||||
await getCarInfo()
|
||||
await getUDP2(this.context, false)
|
||||
getTCP()
|
||||
@ -715,15 +643,6 @@ struct Index {
|
||||
}
|
||||
}, 1000)
|
||||
this.createAlbum()
|
||||
// clearInterval(globalThis.demo)
|
||||
// globalThis.demo= setInterval(()=>{
|
||||
// const str= {"carId":"1062","examinationRoomId":"2","videoVersion":"1.0","judgeVersion":"2023.09.30.1","shellVersion":"2023.12.13.01","host":"http://172.37.55.191:8082"}
|
||||
// initialization(str)
|
||||
// },10000)
|
||||
//下载模型
|
||||
// await this.getModel()
|
||||
// const arr = [0x55, 0xaa, 0x01, 0x00, 0x02, 0x01, 0x03, 0x00]
|
||||
// globalThis.udpClientByTopLine.sendMsg(Array2Byte(arr).buffer)
|
||||
}
|
||||
|
||||
async getModel() {
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICFTCCAZugAwIBAgIIGq+f00ke04IwCgYIKoZIzj0EAwMwYzELMAkGA1UEBhMC
|
||||
Q04xFDASBgNVBAoTC09wZW5IYXJtb255MRkwFwYDVQQLExBPcGVuSGFybW9ueSBU
|
||||
ZWFtMSMwIQYDVQQDExpPcGVuSGFybW9ueSBBcHBsaWNhdGlvbiBDQTAeFw0yNTAz
|
||||
MDUwNjM2NTBaFw0zNTAzMDMwNjM2NTBaMEoxFTATBgNVBAMMDGlkZV9kZW1vX2Fw
|
||||
cDENMAsGA1UECxMEVW5pdDEVMBMGA1UEChMMT3JnYW5p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fdJXu58QV9oi1HMAoGCCqGSM49BAMD
|
||||
A2cAMGQCMDKcLnkiXSuvLjIQyhOq7wnWo9ObxlcqBajieyv4vZiCf90h58KQHfFN
|
||||
rvIdAFQfhwIwV3FJqf1/pNueUg5417N3Dm05QrzMtrnDOaf0gSGTuQSu9LHCaKhq
|
||||
nGU1PJErkcGu
|
||||
-----END CERTIFICATE-----
|
||||
843EBF354F774A955869BD3344B657552D16C547E46E1F6CEDCB79CEF80628A4
|
||||
331EC6F78C0039676593BE2FBC4BBC6BD25651900D97CDA9DC5D16C896FC9614
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user