去掉无用文件
This commit is contained in:
		
							parent
							
								
									5a09d2daf8
								
							
						
					
					
						commit
						831dcdd030
					
				
							
								
								
									
										10
									
								
								entry/src/main/ets/IdlServiceExt/i_idl_service_ext.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								entry/src/main/ets/IdlServiceExt/i_idl_service_ext.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,10 @@ | |||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | export default interface IIdlServiceExt { | ||||||
|  |     processData(data: string, callback: processDataCallback): void; | ||||||
|  |     insertDataToMap(key: string, val: number, callback: insertDataToMapCallback): void; | ||||||
|  | } | ||||||
|  | export type processDataCallback = (errCode: number, returnValue: string) => void; | ||||||
|  | export type insertDataToMapCallback = (errCode: number) => void; | ||||||
|  | 
 | ||||||
							
								
								
									
										45
									
								
								entry/src/main/ets/IdlServiceExt/idl_service_ext_impl.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								entry/src/main/ets/IdlServiceExt/idl_service_ext_impl.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,45 @@ | |||||||
|  | import IdlServiceExtStub from './idl_service_ext_stub'; | ||||||
|  | import hilog from '@ohos.hilog'; | ||||||
|  | import type { insertDataToMapCallback } from './i_idl_service_ext'; | ||||||
|  | import type { processDataCallback } from './i_idl_service_ext'; | ||||||
|  | import request from '../common/utils/request'; | ||||||
|  | import pasteboard from '@ohos.pasteboard'; | ||||||
|  | 
 | ||||||
|  | const ERR_OK = 0; | ||||||
|  | const TAG: string = "[IdlServiceExtImpl]"; | ||||||
|  | const DOMAIN_NUMBER: number = 0xFF00; | ||||||
|  | 
 | ||||||
|  | // 开发者需要在这个类型里对接口进行实现
 | ||||||
|  | export default class ServiceExtImpl extends IdlServiceExtStub { | ||||||
|  |   processData(data: string, callback: processDataCallback): void { | ||||||
|  |     // 开发者自行实现业务逻辑
 | ||||||
|  |     hilog.info(DOMAIN_NUMBER, TAG, `js-test ServiceExtensionAbility--processData: ${data}`); | ||||||
|  |     console.log("lixiao receive", data) | ||||||
|  |     pasteboard.getSystemPasteboard().getData().then((res) => { | ||||||
|  |       let pasteData = res.getPrimaryText() | ||||||
|  |       console.log("lixiao receive paste", pasteData) | ||||||
|  |       request(JSON.parse(pasteData)).then(response => { | ||||||
|  |         console.log("lixiao success", JSON.stringify(response)) | ||||||
|  |         callback(0, JSON.stringify({ | ||||||
|  |           code: 0, | ||||||
|  |           data: response | ||||||
|  |         })); | ||||||
|  |         // callback(0, JSON.stringify(response));
 | ||||||
|  |       }).catch(async (err) => { | ||||||
|  |         callback(0, JSON.stringify({ | ||||||
|  |           code: 1, | ||||||
|  |           data: JSON.stringify(err) | ||||||
|  |         })); | ||||||
|  |         console.log("lixiao error", JSON.stringify(err)) | ||||||
|  |       }) | ||||||
|  |     }).catch(err => { | ||||||
|  |       console.log("lixiao paste error", JSON.stringify(err)) | ||||||
|  |     }) | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|  |   insertDataToMap(key: string, val: number, callback: insertDataToMapCallback): void { | ||||||
|  |     // 开发者自行实现业务逻辑
 | ||||||
|  |     hilog.info(DOMAIN_NUMBER, TAG, `js-test ServiceExtensionAbility--insertDataToMap, key: ${key}  val: ${val}`); | ||||||
|  |     callback(ERR_OK); | ||||||
|  |   } | ||||||
|  | } | ||||||
							
								
								
									
										57
									
								
								entry/src/main/ets/IdlServiceExt/idl_service_ext_proxy.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										57
									
								
								entry/src/main/ets/IdlServiceExt/idl_service_ext_proxy.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,57 @@ | |||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | import {processDataCallback} from "./i_idl_service_ext"; | ||||||
|  | import {insertDataToMapCallback} from "./i_idl_service_ext"; | ||||||
|  | import IIdlServiceExt from "./i_idl_service_ext"; | ||||||
|  | import rpc from "@ohos.rpc"; | ||||||
|  | 
 | ||||||
|  | export default class IdlServiceExtProxy implements IIdlServiceExt { | ||||||
|  |     constructor(proxy) { | ||||||
|  |         this.proxy = proxy; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     processData(data: string, callback: processDataCallback): void | ||||||
|  |     { | ||||||
|  |         let _option = new rpc.MessageOption(); | ||||||
|  |         let _data = new rpc.MessageParcel(); | ||||||
|  |         let _reply = new rpc.MessageParcel(); | ||||||
|  |         // _data.writeString(data);
 | ||||||
|  |         _data.writeString(data) | ||||||
|  |         this.proxy.sendRequest(IdlServiceExtProxy.COMMAND_PROCESS_DATA, _data, _reply, _option).then(function(result) { | ||||||
|  |             if (result.errCode === 0) { | ||||||
|  |                 let _errCode = result.reply.readInt(); | ||||||
|  |                 if (_errCode != 0) { | ||||||
|  |                     let _returnValue = undefined; | ||||||
|  |                     callback(_errCode, _returnValue); | ||||||
|  |                     return; | ||||||
|  |                 } | ||||||
|  |                 let _returnValue = result.reply.readString(); | ||||||
|  |                 callback(_errCode, _returnValue); | ||||||
|  |             } else { | ||||||
|  |                 console.log("sendRequest failed, errCode: " + result.errCode); | ||||||
|  |             } | ||||||
|  |         }) | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     insertDataToMap(key: string, val: number, callback: insertDataToMapCallback): void | ||||||
|  |     { | ||||||
|  |         let _option = new rpc.MessageOption(); | ||||||
|  |         let _data = new rpc.MessageParcel(); | ||||||
|  |         let _reply = new rpc.MessageParcel(); | ||||||
|  |         _data.writeString(key); | ||||||
|  |         _data.writeInt(val); | ||||||
|  |         this.proxy.sendRequest(IdlServiceExtProxy.COMMAND_INSERT_DATA_TO_MAP, _data, _reply, _option).then(function(result) { | ||||||
|  |             if (result.errCode === 0) { | ||||||
|  |                 let _errCode = result.reply.readInt(); | ||||||
|  |                 callback(_errCode); | ||||||
|  |             } else { | ||||||
|  |                 console.log("sendRequest failed, errCode: " + result.errCode); | ||||||
|  |             } | ||||||
|  |         }) | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     static readonly COMMAND_PROCESS_DATA = 1; | ||||||
|  |     static readonly COMMAND_INSERT_DATA_TO_MAP = 2; | ||||||
|  |     private proxy | ||||||
|  | } | ||||||
|  | 
 | ||||||
							
								
								
									
										86
									
								
								entry/src/main/ets/IdlServiceExt/idl_service_ext_stub.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										86
									
								
								entry/src/main/ets/IdlServiceExt/idl_service_ext_stub.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,86 @@ | |||||||
|  | import { processDataCallback } from "./i_idl_service_ext"; | ||||||
|  | import { insertDataToMapCallback } from "./i_idl_service_ext"; | ||||||
|  | import IIdlServiceExt from "./i_idl_service_ext"; | ||||||
|  | import rpc from "@ohos.rpc"; | ||||||
|  | import common from '@ohos.app.ability.common'; | ||||||
|  | 
 | ||||||
|  | export default class IdlServiceExtStub extends rpc.RemoteObject implements IIdlServiceExt { | ||||||
|  |   protected context: common.ServiceExtensionContext | ||||||
|  | 
 | ||||||
|  |   constructor(des: string, context: common.ServiceExtensionContext) { | ||||||
|  |     super(des); | ||||||
|  |     this.context = context; | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|  |   onRemoteMessageRequest(code: number, data: rpc.MessageSequence, reply: rpc.MessageSequence, option): Promise<boolean> { | ||||||
|  |     console.log("lixiao onRemoteRequest called, code = " + code); | ||||||
|  |     return new Promise<boolean>((resolve, reject) => { | ||||||
|  |       switch (code) { | ||||||
|  |         case IdlServiceExtStub.COMMAND_PROCESS_DATA: { | ||||||
|  |           // let _data = data.readString();
 | ||||||
|  |           let _data = data.readString() | ||||||
|  |           this.processData(_data, (errCode, returnValue) => { | ||||||
|  |             console.log("lixiao callback", returnValue); | ||||||
|  |             console.log("lixiao errCode", errCode); | ||||||
|  |             reply.writeInt(errCode); | ||||||
|  |             reply.writeString(returnValue); | ||||||
|  |             resolve(true) | ||||||
|  |           }); | ||||||
|  |           break | ||||||
|  |         } | ||||||
|  |         case IdlServiceExtStub.COMMAND_INSERT_DATA_TO_MAP: { | ||||||
|  |           let _key = data.readString(); | ||||||
|  |           let _val = data.readInt(); | ||||||
|  |           this.insertDataToMap(_key, _val, (errCode) => { | ||||||
|  |             reply.writeInt(errCode); | ||||||
|  |             resolve(true) | ||||||
|  |           }); | ||||||
|  |           break | ||||||
|  |         } | ||||||
|  |         default: { | ||||||
|  |           console.log("invalid request code" + code); | ||||||
|  |           reject(true) | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     }) | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|  |   // onRemoteRequest(code: number, data, reply, option): boolean {
 | ||||||
|  |   //   console.log("lixiao onRemoteRequest called, code = " + code);
 | ||||||
|  |   //   switch (code) {
 | ||||||
|  |   //     case IdlServiceExtStub.COMMAND_PROCESS_DATA: {
 | ||||||
|  |   //       let _data = data.readString();
 | ||||||
|  |   //       this.processData(_data, (errCode, returnValue) => {
 | ||||||
|  |   //         reply.writeInt(errCode);
 | ||||||
|  |   //         if (errCode == 0) {
 | ||||||
|  |   //           reply.writeString(returnValue);
 | ||||||
|  |   //         }
 | ||||||
|  |   //       });
 | ||||||
|  |   //       return true;
 | ||||||
|  |   //     }
 | ||||||
|  |   //     case IdlServiceExtStub.COMMAND_INSERT_DATA_TO_MAP: {
 | ||||||
|  |   //       let _key = data.readString();
 | ||||||
|  |   //       let _val = data.readInt();
 | ||||||
|  |   //       this.insertDataToMap(_key, _val, (errCode) => {
 | ||||||
|  |   //         reply.writeInt(errCode);
 | ||||||
|  |   //       });
 | ||||||
|  |   //       return true;
 | ||||||
|  |   //     }
 | ||||||
|  |   //     default: {
 | ||||||
|  |   //       console.log("invalid request code" + code);
 | ||||||
|  |   //       break;
 | ||||||
|  |   //     }
 | ||||||
|  |   //   }
 | ||||||
|  |   //   return false;
 | ||||||
|  |   // }
 | ||||||
|  | 
 | ||||||
|  |   processData(data: string, callback: processDataCallback): void { | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|  |   insertDataToMap(key: string, val: number, callback: insertDataToMapCallback): void { | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|  |   static readonly COMMAND_PROCESS_DATA = 1; | ||||||
|  |   static readonly COMMAND_INSERT_DATA_TO_MAP = 2; | ||||||
|  | } | ||||||
|  | 
 | ||||||
							
								
								
									
										36
									
								
								entry/src/main/ets/ServiceExtAbility/ServiceExtAbility.ets
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								entry/src/main/ets/ServiceExtAbility/ServiceExtAbility.ets
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,36 @@ | |||||||
|  | import ServiceExtension from '@ohos.app.ability.ServiceExtensionAbility' | ||||||
|  | 
 | ||||||
|  | // import { ServiceExtensionAbility, Want } from '@kit.AbilityKit'; | ||||||
|  | // import { rpc } from '@kit.IPCKit'; | ||||||
|  | import  hilog  from '@ohos.hilog'; | ||||||
|  | import ServiceExtImpl from '../IdlServiceExt/idl_service_ext_impl'; | ||||||
|  | 
 | ||||||
|  | const TAG: string = '[ServiceExtAbility]'; | ||||||
|  | const DOMAIN_NUMBER: number = 0xFF00; | ||||||
|  | 
 | ||||||
|  | export default class ServiceExtAbility extends ServiceExtension { | ||||||
|  |   serviceExtImpl: ServiceExtImpl = new ServiceExtImpl('ExtImpl', this.context); | ||||||
|  | 
 | ||||||
|  |   onCreate(want): void { | ||||||
|  |     // let serviceExtensionContext = this.context; | ||||||
|  |     hilog.info(DOMAIN_NUMBER, TAG, `js-test ServiceExtensionAbility-- onCreate, want: ${want.abilityName}`); | ||||||
|  |   }; | ||||||
|  | 
 | ||||||
|  |   onRequest(want, startId: number): void { | ||||||
|  |     hilog.info(DOMAIN_NUMBER, TAG, `js-test ServiceExtensionAbility--onRequest, want: ${want.abilityName}`); | ||||||
|  |   }; | ||||||
|  | 
 | ||||||
|  |   onConnect(want) { | ||||||
|  |     hilog.info(DOMAIN_NUMBER, TAG, `js-test ServiceExtensionAbility--onConnect, want: ${want.abilityName}`); | ||||||
|  |     // 返回ServiceExtImpl对象,客户端获取后便可以与ServiceExtensionAbility进行通信 | ||||||
|  |     return this.serviceExtImpl; | ||||||
|  |   }; | ||||||
|  | 
 | ||||||
|  |   onDisconnect(want): void { | ||||||
|  |     hilog.info(DOMAIN_NUMBER, TAG, `js-test ServiceExtensionAbility--onDisconnect, want: ${want.abilityName}`); | ||||||
|  |   }; | ||||||
|  | 
 | ||||||
|  |   onDestroy(): void { | ||||||
|  |     hilog.info(DOMAIN_NUMBER, TAG, 'js-test ServiceExtensionAbility--onDestroy'); | ||||||
|  |   }; | ||||||
|  | }; | ||||||
							
								
								
									
										26
									
								
								entry/src/main/ets/ServiceExtAbility/ServiceInteractive.ets
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								entry/src/main/ets/ServiceExtAbility/ServiceInteractive.ets
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,26 @@ | |||||||
|  | import common from '@ohos.app.ability.common'; | ||||||
|  | import hilog from '@ohos.hilog'; | ||||||
|  | import Want from '@ohos.app.ability.Want'; | ||||||
|  | 
 | ||||||
|  | const DOMAIN_NUMBER: number = 0xFF00; | ||||||
|  | // import { BusinessError } from '@ohos.base'; | ||||||
|  | import promptAction from '@ohos.promptAction'; | ||||||
|  | 
 | ||||||
|  | const TAG: string = '[ServiceInteractive]'; | ||||||
|  | let context: common.UIAbilityContext = getContext(this) as common.UIAbilityContext; // UIAbilityContext | ||||||
|  | let want: Want = { | ||||||
|  |   deviceId: '', | ||||||
|  |   bundleName: 'com.oh.dts', | ||||||
|  |   abilityName: 'ServiceExtAbility' | ||||||
|  | }; | ||||||
|  | context.startServiceExtensionAbility(want).then(() => { | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |   hilog.info(DOMAIN_NUMBER, TAG, `js-test ServiceInteractive-- Succeeded in starting ServiceExtensionAbility, want: ${want.abilityName}`); | ||||||
|  |   // // 成功启动后台服务 | ||||||
|  |   // promptAction.showToast({ | ||||||
|  |   //   message: $r('app.string.SuccessfullyStartBackendService') | ||||||
|  |   // }); | ||||||
|  | }).catch((err) => { | ||||||
|  |   hilog.error(DOMAIN_NUMBER, TAG, `Failed to start ServiceExtensionAbility. Code is ${err.code}, message is ${err.message}`); | ||||||
|  | }); | ||||||
							
								
								
									
										1
									
								
								entry/src/main/ets/api/test.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								entry/src/main/ets/api/test.ts
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										38
									
								
								entry/src/main/ets/common/utils/tempLogger.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								entry/src/main/ets/common/utils/tempLogger.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,38 @@ | |||||||
|  | import fs from '@ohos.file.fs' | ||||||
|  | 
 | ||||||
|  | function getTime() { | ||||||
|  |   let time = new Date() | ||||||
|  |   let year = time.getFullYear() | ||||||
|  |   let month = time.getMonth() + 1 | ||||||
|  |   let day = time.getDate() | ||||||
|  |   let hour = time.getHours() | ||||||
|  |   let minute = time.getMinutes() | ||||||
|  |   let second = time.getSeconds() | ||||||
|  |   return `${year}-${month}-${day} ${hour}:${minute}:${second}` | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | export class TempLogger { | ||||||
|  |   private static configFilePath: string = '/mnt/hmdfs/100/account/device_view/local/files/config' | ||||||
|  |   private static configFileName: string = 'logger.log' | ||||||
|  |   private static file: fs.File | ||||||
|  | 
 | ||||||
|  |   static init() { | ||||||
|  |     if (!fs.accessSync(this.configFilePath)) { | ||||||
|  |       fs.mkdirSync(this.configFilePath) | ||||||
|  |     } | ||||||
|  |     this.file = fs.openSync(this.configFilePath + '/' + this.configFileName, fs.OpenMode.CREATE | fs.OpenMode.READ_WRITE | fs.OpenMode.APPEND) | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|  |   static info(message: string) { | ||||||
|  |     fs.writeSync(this.file.fd, `[${getTime()}][info]: ${message}\n`) | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|  |   static error(message: string) { | ||||||
|  |     fs.writeSync(this.file.fd, `[${getTime()}][error]: ${message}\n`) | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|  |   static destroy() { | ||||||
|  |     fs.closeSync(this.file.fd) | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | 
 | ||||||
							
								
								
									
										110
									
								
								entry/src/main/ets/entryability/EntryAbility.ets
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										110
									
								
								entry/src/main/ets/entryability/EntryAbility.ets
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,110 @@ | |||||||
|  | import UIAbility from '@ohos.app.ability.UIAbility'; | ||||||
|  | import hilog from '@ohos.hilog'; | ||||||
|  | import window from '@ohos.window'; | ||||||
|  | import relationalStore from '@ohos.data.relationalStore' | ||||||
|  | import abilityAccessCtrl, { Permissions } from '@ohos.abilityAccessCtrl'; | ||||||
|  | // import featureAbility from '@ohos.ability.featureAbility' | ||||||
|  | import { makedir } from '../common/service/fileService' | ||||||
|  | import { Array2Byte } from '../common/utils/tools' | ||||||
|  | import { GlobalConfig } from '../config/global' | ||||||
|  | import { tcpUtil } from '../common/utils/TcpRequest'; | ||||||
|  | import { TempLogger } from '../common/utils/TempLogger'; | ||||||
|  | import DB from '../common/database/DbSql'; | ||||||
|  | import { initTable } from '../common/service/initable'; | ||||||
|  | 
 | ||||||
|  | export default class EntryAbility extends UIAbility { | ||||||
|  |   async onCreate(want, launchParam) { | ||||||
|  |     try { | ||||||
|  |       console.log("sql first") | ||||||
|  |       await DB.init(this.context) | ||||||
|  |       // 创建一个user表 | ||||||
|  |       await initTable() | ||||||
|  |       console.log("sql first success") | ||||||
|  |     } catch (e) { | ||||||
|  |       console.error('sql first error', e) | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate'); | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|  |   onDestroy() { | ||||||
|  |     const arrClose = [0x55, 0xaa, 0x01, 0x00, 0x02, 0x00, 0x03, 0x00] | ||||||
|  |     const arrCloseBuffer = Array2Byte(arrClose).buffer | ||||||
|  |     globalThis?.lightLineUdp?.send(arrCloseBuffer); | ||||||
|  |     hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy'); | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|  |   async onWindowStageCreate(windowStage: window.WindowStage) { | ||||||
|  |     // this.context | ||||||
|  |     // Main window is created, set main page for this ability | ||||||
|  |     hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     globalThis.carInfo = {} | ||||||
|  |     globalThis.examinerInfo = {} | ||||||
|  |     globalThis.deviceNo = ''; | ||||||
|  |     globalThis.hasAuth = false | ||||||
|  | 
 | ||||||
|  |     // globalThis.judgeVersion ='2024.08.24.1' | ||||||
|  |     // globalThis.version ='2023.12.13.01'; | ||||||
|  |     globalThis.version = GlobalConfig.version.jn.km3[0]; | ||||||
|  |     globalThis.judgeVersion = GlobalConfig.version.jn.km3[1]; | ||||||
|  |     globalThis.tcpSendNum = 0 | ||||||
|  |     globalThis.videoVersion = '1.0' | ||||||
|  | 
 | ||||||
|  |     //视频遮挡 | ||||||
|  |     globalThis.spzd = { | ||||||
|  |       spzd1: false, | ||||||
|  |       spzd2: false, | ||||||
|  |       spzd3: false, | ||||||
|  |       spzd4: false, | ||||||
|  |     } | ||||||
|  |     globalThis.signNum = 0 //心跳指令编号 | ||||||
|  |     globalThis.lsh = '0000000000000' //学员流水号 | ||||||
|  |     globalThis.ratio = 1700 / 960 //适配比例 | ||||||
|  |     globalThis.statue = 1 //考试状态 | ||||||
|  |     globalThis.pathDir = this.context.filesDir; | ||||||
|  |     globalThis.context = this.context; | ||||||
|  |     globalThis.isJudgeInitBool = false | ||||||
|  |     console.info('jiangsong globalThis.pathDir = ' + globalThis.pathDir); | ||||||
|  |     // this.requestPermission(this.context) | ||||||
|  |     // this.featureAbilityAuth() | ||||||
|  |     TempLogger.init() | ||||||
|  |     await tcpUtil.init() | ||||||
|  | 
 | ||||||
|  |     const windowClass = await windowStage.getMainWindow(); | ||||||
|  |     globalThis.windowClass = windowClass | ||||||
|  |     // await windowClass.setWindowLayoutFullScreen(true) | ||||||
|  |     await windowClass.setWindowSystemBarEnable([]) //全屏 | ||||||
|  |     // await windowClass.setWindowSystemBarEnable(['navi gation']) | ||||||
|  | 
 | ||||||
|  |     windowStage.loadContent('pages/Index', (err, data) => { | ||||||
|  |       if (err.code) { | ||||||
|  |         hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); | ||||||
|  |         return; | ||||||
|  |       } | ||||||
|  |       hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', JSON.stringify(data) ?? ''); | ||||||
|  |     }); | ||||||
|  | 
 | ||||||
|  |     this.creatFiles(); | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|  |   onWindowStageDestroy() { | ||||||
|  |     // Main window is destroyed, release UI related resources | ||||||
|  |     hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|  |   onForeground() { | ||||||
|  |     // Ability has brought to foreground | ||||||
|  |     hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground'); | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|  |   onBackground() { | ||||||
|  |     // Ability has back to background | ||||||
|  |     hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground'); | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|  |   creatFiles() { | ||||||
|  |     makedir('/testFile'); | ||||||
|  |   } | ||||||
|  | } | ||||||
							
								
								
									
										16
									
								
								entry/src/main/profile.cer
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								entry/src/main/profile.cer
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,16 @@ | |||||||
|  | -----BEGIN CERTIFICATE----- | ||||||
|  | MIICFDCCAZugAwIBAgIIbCabrHLc1nQwCgYIKoZIzj0EAwMwYzELMAkGA1UEBhMC | ||||||
|  | Q04xFDASBgNVBAoTC09wZW5IYXJtb255MRkwFwYDVQQLExBPcGVuSGFybW9ueSBU | ||||||
|  | ZWFtMSMwIQYDVQQDExpPcGVuSGFybW9ueSBBcHBsaWNhdGlvbiBDQTAeFw0yNTAy | ||||||
|  | MjgwMjMwMTdaFw0zNTAyMjYwMjMwMTdaMEoxFTATBgNVBAMMDGlkZV9kZW1vX2Fw | ||||||
|  | cDENMAsGA1UECxMEVW5pdDEVMBMGA1UEChMMT3JnYW5pemF0aW9uMQswCQYDVQQG | ||||||
|  | EwJDTjBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABOFq48bclfywoLttIlG/YDMM | ||||||
|  | Xlm2fo7BMAagThiUCBf9Bs2Bok2OZDNJiwEHaLs9u3hy0m0lzW0y2gNfoPtfxt2j | ||||||
|  | UjBQMB0GA1UdDgQWBBTG5WaMCuxFkT65zsvOv/hX8GUPVDAOBgNVHQ8BAf8EBAMC | ||||||
|  | B4AwHwYDVR0jBBgwFoAU24a3IhbVC6FLt90le7nxBX2iLUcwCgYIKoZIzj0EAwMD | ||||||
|  | ZwAwZAIwTQYw6FkHfu9pzL2wQLrx6+di2h/pDIWxQ+GZpx/whBbTlB0O9qL5IKqk | ||||||
|  | YMuXDxsAAjASc4/mVZ9n/o8XAV1CnPzLAP8hdZhTUTRY6vnf+5oKrl+VQWtsfmlT | ||||||
|  | v4R8JxW/Pf0= | ||||||
|  | -----END CERTIFICATE----- | ||||||
|  | 
 | ||||||
|  | 73706A370E90F2232DCA48943881E8AE44A27ADFBD6C25EE22CE13ED941EEE7C | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user