第一次提交
This commit is contained in:
parent
25e596b591
commit
f9d7986df0
1
.hvigor/cache/meta.json
vendored
Normal file
1
.hvigor/cache/meta.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"compileSdkVersion":"5.0.4(16)","hvigorVersion":"5.16.2","toolChainsVersion":"5.0.4.150"}
|
||||||
1
.hvigor/dependencyMap/Home/oh-package.json5
Normal file
1
.hvigor/dependencyMap/Home/oh-package.json5
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"name":"home","version":"1.0.0","description":"Please describe the basic information.","main":"Index.ets","author":"","license":"Apache-2.0","dependencies":{"@itcast/basic":"file:../../commons/basic"}}
|
||||||
1
.hvigor/dependencyMap/basic/oh-package.json5
Normal file
1
.hvigor/dependencyMap/basic/oh-package.json5
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"name":"@itcast/basic","version":"1.0.0","description":"Please describe the basic information.","main":"Index.ets","author":"","license":"Apache-2.0","dependencies":{}}
|
||||||
1
.hvigor/dependencyMap/default/oh-package.json5
Normal file
1
.hvigor/dependencyMap/default/oh-package.json5
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"name":"expert","version":"1.0.0","description":"Please describe the basic information.","main":"","author":"","license":"","dependencies":{"@itcast/basic":"file:../../commons/basic","utils":"file:../../commons/utils","mypage":"file:../../features/mypage","home":"file:../../features/Home","register":"file:../../features/register"}}
|
||||||
1
.hvigor/dependencyMap/dependencyMap.json5
Normal file
1
.hvigor/dependencyMap/dependencyMap.json5
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"basePath":"/Users/gandanxiangzhao/Downloads/Expert/harmony/.hvigor/dependencyMap/dependencyMap.json5","rootDependency":"./oh-package.json5","dependencyMap":{"default":"./default/oh-package.json5","uicomponents":"./uicomponents/oh-package.json5","utils":"./utils/oh-package.json5","mypage":"./mypage/oh-package.json5","basic":"./basic/oh-package.json5","Home":"./Home/oh-package.json5","register":"./register/oh-package.json5"},"modules":[{"name":"default","srcPath":"../../../products/expert"},{"name":"uicomponents","srcPath":"../../../commons/uicomponents"},{"name":"utils","srcPath":"../../../commons/utils"},{"name":"mypage","srcPath":"../../../features/mypage"},{"name":"basic","srcPath":"../../../commons/basic"},{"name":"Home","srcPath":"../../../features/Home"},{"name":"register","srcPath":"../../../features/register"}]}
|
||||||
1
.hvigor/dependencyMap/mypage/oh-package.json5
Normal file
1
.hvigor/dependencyMap/mypage/oh-package.json5
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"name":"mypage","version":"1.0.0","description":"Please describe the basic information.","main":"Index.ets","author":"","license":"Apache-2.0","dependencies":{"@itcast/basic":"file:../../commons/basic"}}
|
||||||
1
.hvigor/dependencyMap/oh-package.json5
Normal file
1
.hvigor/dependencyMap/oh-package.json5
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"modelVersion":"5.0.2","description":"Please describe the basic information.","dependencies":{"@ohos/crypto-js":"^2.0.4"},"devDependencies":{"@ohos/hypium":"1.0.21","@ohos/hamock":"1.0.0"},"dynamicDependencies":{}}
|
||||||
1
.hvigor/dependencyMap/register/oh-package.json5
Normal file
1
.hvigor/dependencyMap/register/oh-package.json5
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"name":"register","version":"1.0.0","description":"Please describe the basic information.","main":"Index.ets","author":"","license":"Apache-2.0","dependencies":{"@itcast/basic":"file:../../commons/basic"}}
|
||||||
1
.hvigor/dependencyMap/uicomponents/oh-package.json5
Normal file
1
.hvigor/dependencyMap/uicomponents/oh-package.json5
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"name":"uicomponents","version":"1.0.0","description":"Please describe the basic information.","main":"Index.ets","author":"","license":"Apache-2.0","dependencies":{}}
|
||||||
1
.hvigor/dependencyMap/utils/oh-package.json5
Normal file
1
.hvigor/dependencyMap/utils/oh-package.json5
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"name":"utils","version":"1.0.0","description":"Please describe the basic information.","main":"Index.ets","author":"","license":"Apache-2.0","dependencies":{"@ohos/crypto-js":"^2.0.4"},"devDependencies":{},"dynamicDependencies":{}}
|
||||||
506
.hvigor/outputs/build-logs/build.log
Normal file
506
.hvigor/outputs/build-logs/build.log
Normal file
@ -0,0 +1,506 @@
|
|||||||
|
[2025-05-09T15:47:09.084] [DEBUG] debug-file - env: nodejsVersion=v18.20.1
|
||||||
|
[2025-05-09T15:47:09.301] [DEBUG] debug-file - Hvigor init with startParameters:{
|
||||||
|
hvigorfileTypeCheck: false,
|
||||||
|
parallelExecution: true,
|
||||||
|
incrementalExecution: true,
|
||||||
|
printStackTrace: true,
|
||||||
|
daemon: false,
|
||||||
|
analyze: 0,
|
||||||
|
logLevel: Level { level: 20000, levelStr: 'INFO', colour: 'green' }
|
||||||
|
}
|
||||||
|
[2025-05-09T15:47:09.311] [DEBUG] debug-file - hvigorfile, resolving /Users/gandanxiangzhao/Downloads/Expert/harmony/hvigorfile.ts
|
||||||
|
[2025-05-09T15:47:09.974] [DEBUG] debug-file - hvigorfile, require result: { default: { system: [Function: appTasks], plugins: [] } }
|
||||||
|
[2025-05-09T15:47:10.071] [DEBUG] debug-file - Start initialize project's product build option map with build mode debug.
|
||||||
|
[2025-05-09T15:47:10.073] [DEBUG] debug-file - Product 'default' using build option: {
|
||||||
|
"debuggable": true,
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
}
|
||||||
|
} in this build.
|
||||||
|
[2025-05-09T15:47:10.084] [DEBUG] debug-file - Local scan or download HarmonyOS sdk components toolchains,ets,js,native,previewer
|
||||||
|
[2025-05-09T15:47:10.087] [DEBUG] debug-file - Local scan or download hmscore sdk components toolchains,ets,native
|
||||||
|
[2025-05-09T15:47:10.089] [DEBUG] debug-file - Start recording SDK configuration permission data.
|
||||||
|
[2025-05-09T15:47:10.102] [DEBUG] debug-file - Sdk init in 19 ms
|
||||||
|
[2025-05-09T15:47:10.109] [DEBUG] debug-file - Project task initialization takes 7 ms
|
||||||
|
[2025-05-09T15:47:10.112] [DEBUG] debug-file - hvigorfile, resolving /Users/gandanxiangzhao/Downloads/Expert/harmony/products/expert/hvigorfile.ts
|
||||||
|
[2025-05-09T15:47:10.120] [DEBUG] debug-file - Start initialize module-target build option map, moduleName=default, buildMode=debug
|
||||||
|
[2025-05-09T15:47:10.123] [DEBUG] debug-file - Module default task initialization takes 2 ms
|
||||||
|
[2025-05-09T15:47:10.126] [DEBUG] debug-file - hvigorfile, resolving /Users/gandanxiangzhao/Downloads/Expert/harmony/commons/uicomponents/hvigorfile.ts
|
||||||
|
[2025-05-09T15:47:10.147] [DEBUG] debug-file - Start initialize module-target build option map, moduleName=uicomponents, buildMode=debug
|
||||||
|
[2025-05-09T15:47:10.148] [DEBUG] debug-file - Module uicomponents task initialization takes 1 ms
|
||||||
|
[2025-05-09T15:47:10.151] [DEBUG] debug-file - hvigorfile, resolving /Users/gandanxiangzhao/Downloads/Expert/harmony/commons/utils/hvigorfile.ts
|
||||||
|
[2025-05-09T15:47:10.156] [DEBUG] debug-file - Module utils task initialization takes 1 ms
|
||||||
|
[2025-05-09T15:47:10.155] [DEBUG] debug-file - Start initialize module-target build option map, moduleName=utils, buildMode=debug
|
||||||
|
[2025-05-09T15:47:10.158] [DEBUG] debug-file - hvigorfile, resolving /Users/gandanxiangzhao/Downloads/Expert/harmony/features/mypage/hvigorfile.ts
|
||||||
|
[2025-05-09T15:47:10.164] [DEBUG] debug-file - Module mypage task initialization takes 1 ms
|
||||||
|
[2025-05-09T15:47:10.168] [DEBUG] debug-file - hvigorfile, resolving /Users/gandanxiangzhao/Downloads/Expert/harmony/commons/basic/hvigorfile.ts
|
||||||
|
[2025-05-09T15:47:10.163] [DEBUG] debug-file - Start initialize module-target build option map, moduleName=mypage, buildMode=debug
|
||||||
|
[2025-05-09T15:47:10.172] [DEBUG] debug-file - Module basic task initialization takes 1 ms
|
||||||
|
[2025-05-09T15:47:10.171] [DEBUG] debug-file - Start initialize module-target build option map, moduleName=basic, buildMode=debug
|
||||||
|
[2025-05-09T15:47:10.175] [DEBUG] debug-file - hvigorfile, resolving /Users/gandanxiangzhao/Downloads/Expert/harmony/features/Home/hvigorfile.ts
|
||||||
|
[2025-05-09T15:47:10.179] [DEBUG] debug-file - Start initialize module-target build option map, moduleName=Home, buildMode=debug
|
||||||
|
[2025-05-09T15:47:10.180] [DEBUG] debug-file - Module Home task initialization takes 1 ms
|
||||||
|
[2025-05-09T15:47:10.182] [DEBUG] debug-file - hvigorfile, resolving /Users/gandanxiangzhao/Downloads/Expert/harmony/features/register/hvigorfile.ts
|
||||||
|
[2025-05-09T15:47:10.185] [DEBUG] debug-file - Start initialize module-target build option map, moduleName=register, buildMode=debug
|
||||||
|
[2025-05-09T15:47:10.186] [DEBUG] debug-file - Module register task initialization takes 1 ms
|
||||||
|
[2025-05-09T15:47:10.187] [DEBUG] debug-file - project has submodules:default,uicomponents,utils,mypage,basic,Home,register
|
||||||
|
[2025-05-09T15:47:10.205] [DEBUG] debug-file - Configuration task cost before running: 919 ms
|
||||||
|
[2025-05-09T15:47:10.230] [DEBUG] debug-file - default : clean cost memory -8.51708984375
|
||||||
|
[2025-05-09T15:47:10.206] [DEBUG] debug-file - Executing task :default:clean
|
||||||
|
[2025-05-09T15:47:10.232] [DEBUG] debug-file - Executing task :uicomponents:clean
|
||||||
|
[2025-05-09T15:47:10.233] [DEBUG] debug-file - Executing task :utils:clean
|
||||||
|
[2025-05-09T15:47:10.232] [DEBUG] debug-file - uicomponents : clean cost memory 0.20479583740234375
|
||||||
|
[2025-05-09T15:47:10.235] [DEBUG] debug-file - utils : clean cost memory 0.2655181884765625
|
||||||
|
[2025-05-09T15:47:10.237] [DEBUG] debug-file - mypage : clean cost memory 0.26578521728515625
|
||||||
|
[2025-05-09T15:47:10.238] [DEBUG] debug-file - Executing task :basic:clean
|
||||||
|
[2025-05-09T15:47:10.236] [DEBUG] debug-file - Executing task :mypage:clean
|
||||||
|
[2025-05-09T15:47:10.240] [DEBUG] debug-file - basic : clean cost memory 0.2654876708984375
|
||||||
|
[2025-05-09T15:47:10.240] [DEBUG] debug-file - Executing task :Home:clean
|
||||||
|
[2025-05-09T15:47:10.243] [DEBUG] debug-file - Executing task :register:clean
|
||||||
|
[2025-05-09T15:47:10.243] [DEBUG] debug-file - Home : clean cost memory 0.26555633544921875
|
||||||
|
[2025-05-09T15:47:10.249] [DEBUG] debug-file - Module 'default' target 'default' using build option: {
|
||||||
|
"debuggable": true,
|
||||||
|
"copyFrom": "default",
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "debug"
|
||||||
|
} in this build.
|
||||||
|
[2025-05-09T15:47:10.245] [DEBUG] debug-file - register : clean cost memory 0.265716552734375
|
||||||
|
[2025-05-09T15:47:09.086] [DEBUG] debug-file - env: hvigor-config.json5 content = {
|
||||||
|
modelVersion: '5.0.2',
|
||||||
|
dependencies: {},
|
||||||
|
execution: {},
|
||||||
|
logging: {},
|
||||||
|
debugging: { stacktrace: true },
|
||||||
|
nodeOptions: {}
|
||||||
|
}
|
||||||
|
[2025-05-09T15:47:09.302] [DEBUG] debug-file - Since current hvigor version 5.16.2 differs from last hvigor version
|
||||||
|
undefined, delete file-cache.json and task-cache.json.
|
||||||
|
[2025-05-09T15:47:09.975] [DEBUG] debug-file - hvigorfile, binding system plugins [Function: appTasks]
|
||||||
|
[2025-05-09T15:47:10.072] [DEBUG] debug-file - Picking option from product 'default' with build mode 'debug'.
|
||||||
|
[2025-05-09T15:47:10.082] [DEBUG] debug-file - No signingConfig found, initRemoteHspCache failed.
|
||||||
|
[2025-05-09T15:47:10.109] [DEBUG] debug-file - hvigorfile, binding custom plugins []
|
||||||
|
[2025-05-09T15:47:10.115] [DEBUG] debug-file - hvigorfile, require result: { default: { system: [Function: hapTasks], plugins: [] } }
|
||||||
|
[2025-05-09T15:47:10.120] [DEBUG] debug-file - Target 'default' config: {}
|
||||||
|
[2025-05-09T15:47:10.123] [DEBUG] debug-file - hvigorfile, binding custom plugins []
|
||||||
|
[2025-05-09T15:47:10.128] [DEBUG] debug-file - hvigorfile, require result: { default: { system: [Function: harTasks], plugins: [] } }
|
||||||
|
[2025-05-09T15:47:10.147] [DEBUG] debug-file - Target 'default' config: {}
|
||||||
|
[2025-05-09T15:47:10.148] [DEBUG] debug-file - hvigorfile, binding custom plugins []
|
||||||
|
[2025-05-09T15:47:10.153] [DEBUG] debug-file - hvigorfile, require result: { default: { system: [Function: harTasks], plugins: [] } }
|
||||||
|
[2025-05-09T15:47:10.267] [DEBUG] debug-file - Create resident worker with id: 0.
|
||||||
|
[2025-05-09T15:47:10.156] [DEBUG] debug-file - hvigorfile, binding custom plugins []
|
||||||
|
[2025-05-09T15:47:10.155] [DEBUG] debug-file - Target 'default' config: {}
|
||||||
|
[2025-05-09T15:47:10.161] [DEBUG] debug-file - hvigorfile, require result: { default: { system: [Function: harTasks], plugins: [] } }
|
||||||
|
[2025-05-09T15:47:10.165] [DEBUG] debug-file - hvigorfile, binding custom plugins []
|
||||||
|
[2025-05-09T15:47:10.169] [DEBUG] debug-file - hvigorfile, require result: { default: { system: [Function: harTasks], plugins: [] } }
|
||||||
|
[2025-05-09T15:47:10.163] [DEBUG] debug-file - Target 'default' config: {}
|
||||||
|
[2025-05-09T15:47:10.173] [DEBUG] debug-file - hvigorfile, binding custom plugins []
|
||||||
|
[2025-05-09T15:47:10.171] [DEBUG] debug-file - Target 'default' config: {}
|
||||||
|
[2025-05-09T15:47:10.177] [DEBUG] debug-file - hvigorfile, require result: { default: { system: [Function: harTasks], plugins: [] } }
|
||||||
|
[2025-05-09T15:47:10.179] [DEBUG] debug-file - Target 'default' config: {}
|
||||||
|
[2025-05-09T15:47:10.180] [DEBUG] debug-file - hvigorfile, binding custom plugins []
|
||||||
|
[2025-05-09T15:47:10.183] [DEBUG] debug-file - hvigorfile, require result: { default: { system: [Function: harTasks], plugins: [] } }
|
||||||
|
[2025-05-09T15:47:10.185] [DEBUG] debug-file - Target 'default' config: {}
|
||||||
|
[2025-05-09T15:47:10.186] [DEBUG] debug-file - hvigorfile, binding custom plugins []
|
||||||
|
[2025-05-09T15:47:10.187] [DEBUG] debug-file - module:uicomponents no need to execute packageHap
|
||||||
|
[2025-05-09T15:47:10.230] [DEBUG] debug-file - runTaskFromQueue task cost before running: 944 ms
|
||||||
|
[2025-05-09T15:47:10.206] [DEBUG] debug-file - clean: Worker pool is inactive.
|
||||||
|
[2025-05-09T15:47:10.232] [DEBUG] debug-file - clean: Worker pool is inactive.
|
||||||
|
[2025-05-09T15:47:10.233] [DEBUG] debug-file - clean: Worker pool is inactive.
|
||||||
|
[2025-05-09T15:47:10.233] [DEBUG] debug-file - runTaskFromQueue task cost before running: 946 ms
|
||||||
|
[2025-05-09T15:47:10.235] [DEBUG] debug-file - runTaskFromQueue task cost before running: 948 ms
|
||||||
|
[2025-05-09T15:47:10.237] [DEBUG] debug-file - runTaskFromQueue task cost before running: 951 ms
|
||||||
|
[2025-05-09T15:47:10.238] [DEBUG] debug-file - clean: Worker pool is inactive.
|
||||||
|
[2025-05-09T15:47:10.236] [DEBUG] debug-file - clean: Worker pool is inactive.
|
||||||
|
[2025-05-09T15:47:10.240] [DEBUG] debug-file - runTaskFromQueue task cost before running: 953 ms
|
||||||
|
[2025-05-09T15:47:10.240] [DEBUG] debug-file - clean: Worker pool is inactive.
|
||||||
|
[2025-05-09T15:47:10.243] [DEBUG] debug-file - clean: Worker pool is inactive.
|
||||||
|
[2025-05-09T15:47:10.243] [DEBUG] debug-file - runTaskFromQueue task cost before running: 956 ms
|
||||||
|
[2025-05-09T15:47:10.250] [DEBUG] debug-file - Module 'default' target 'ohosTest' using build option: {
|
||||||
|
"debuggable": true,
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "default"
|
||||||
|
} in this build.
|
||||||
|
[2025-05-09T15:47:10.245] [DEBUG] debug-file - runTaskFromQueue task cost before running: 958 ms
|
||||||
|
[2025-05-09T15:47:09.086] [DEBUG] debug-file - env: daemon=false
|
||||||
|
[2025-05-09T15:47:09.302] [DEBUG] debug-file - Cache service initialization finished in 1 ms
|
||||||
|
[2025-05-09T15:47:10.072] [DEBUG] debug-file - Product 'default' build option: {}
|
||||||
|
[2025-05-09T15:47:10.109] [DEBUG] debug-file - hvigorfile, no custom plugins were found in /Users/gandanxiangzhao/Downloads/Expert/harmony/hvigorfile.ts
|
||||||
|
[2025-05-09T15:47:10.115] [DEBUG] debug-file - hvigorfile, binding system plugins [Function: hapTasks]
|
||||||
|
[2025-05-09T15:47:10.120] [DEBUG] debug-file - Target 'ohosTest' config: {}
|
||||||
|
[2025-05-09T15:47:10.123] [DEBUG] debug-file - hvigorfile, no custom plugins were found in /Users/gandanxiangzhao/Downloads/Expert/harmony/products/expert/hvigorfile.ts
|
||||||
|
[2025-05-09T15:47:10.128] [DEBUG] debug-file - hvigorfile, binding system plugins [Function: harTasks]
|
||||||
|
[2025-05-09T15:47:10.147] [DEBUG] debug-file - Target 'ohosTest' config: {}
|
||||||
|
[2025-05-09T15:47:10.148] [DEBUG] debug-file - hvigorfile, no custom plugins were found in /Users/gandanxiangzhao/Downloads/Expert/harmony/commons/uicomponents/hvigorfile.ts
|
||||||
|
[2025-05-09T15:47:10.153] [DEBUG] debug-file - hvigorfile, binding system plugins [Function: harTasks]
|
||||||
|
[2025-05-09T15:47:10.268] [DEBUG] debug-file - Create resident worker with id: 1.
|
||||||
|
[2025-05-09T15:47:10.156] [DEBUG] debug-file - hvigorfile, no custom plugins were found in /Users/gandanxiangzhao/Downloads/Expert/harmony/commons/utils/hvigorfile.ts
|
||||||
|
[2025-05-09T15:47:10.155] [DEBUG] debug-file - Target 'ohosTest' config: {}
|
||||||
|
[2025-05-09T15:47:10.161] [DEBUG] debug-file - hvigorfile, binding system plugins [Function: harTasks]
|
||||||
|
[2025-05-09T15:47:10.165] [DEBUG] debug-file - hvigorfile, no custom plugins were found in /Users/gandanxiangzhao/Downloads/Expert/harmony/features/mypage/hvigorfile.ts
|
||||||
|
[2025-05-09T15:47:10.169] [DEBUG] debug-file - hvigorfile, binding system plugins [Function: harTasks]
|
||||||
|
[2025-05-09T15:47:10.163] [DEBUG] debug-file - Target 'ohosTest' config: {}
|
||||||
|
[2025-05-09T15:47:10.173] [DEBUG] debug-file - hvigorfile, no custom plugins were found in /Users/gandanxiangzhao/Downloads/Expert/harmony/commons/basic/hvigorfile.ts
|
||||||
|
[2025-05-09T15:47:10.172] [DEBUG] debug-file - Target 'ohosTest' config: {}
|
||||||
|
[2025-05-09T15:47:10.177] [DEBUG] debug-file - hvigorfile, binding system plugins [Function: harTasks]
|
||||||
|
[2025-05-09T15:47:10.179] [DEBUG] debug-file - Target 'ohosTest' config: {}
|
||||||
|
[2025-05-09T15:47:10.180] [DEBUG] debug-file - hvigorfile, no custom plugins were found in /Users/gandanxiangzhao/Downloads/Expert/harmony/features/Home/hvigorfile.ts
|
||||||
|
[2025-05-09T15:47:10.183] [DEBUG] debug-file - hvigorfile, binding system plugins [Function: harTasks]
|
||||||
|
[2025-05-09T15:47:10.185] [DEBUG] debug-file - Target 'ohosTest' config: {}
|
||||||
|
[2025-05-09T15:47:10.186] [DEBUG] debug-file - hvigorfile, no custom plugins were found in /Users/gandanxiangzhao/Downloads/Expert/harmony/features/register/hvigorfile.ts
|
||||||
|
[2025-05-09T15:47:10.187] [DEBUG] debug-file - module:utils no need to execute packageHap
|
||||||
|
[2025-05-09T15:47:10.231] [INFO] debug-file - Finished :default:clean... after 25 ms
|
||||||
|
[2025-05-09T15:47:10.233] [INFO] debug-file - Finished :uicomponents:clean... after 1 ms
|
||||||
|
[2025-05-09T15:47:10.235] [INFO] debug-file - Finished :utils:clean... after 2 ms
|
||||||
|
[2025-05-09T15:47:10.237] [INFO] debug-file - Finished :mypage:clean... after 2 ms
|
||||||
|
[2025-05-09T15:47:10.240] [INFO] debug-file - Finished :basic:clean... after 2 ms
|
||||||
|
[2025-05-09T15:47:10.243] [INFO] debug-file - Finished :Home:clean... after 3 ms
|
||||||
|
[2025-05-09T15:47:10.252] [DEBUG] debug-file - Module 'uicomponents' target 'default' using build option: {
|
||||||
|
"debuggable": true,
|
||||||
|
"copyFrom": "default",
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "debug"
|
||||||
|
} in this build.
|
||||||
|
[2025-05-09T15:47:10.245] [INFO] debug-file - Finished :register:clean... after 2 ms
|
||||||
|
[2025-05-09T15:47:09.086] [DEBUG] debug-file - no-daemon, use the parent process.execArgv --max-old-space-size=8192,--expose-gc
|
||||||
|
[2025-05-09T15:47:10.072] [DEBUG] debug-file - End initialize project's product build option map with build mode 'debug'.
|
||||||
|
[2025-05-09T15:47:10.109] [DEBUG] debug-file - hvigorfile, resolve finished /Users/gandanxiangzhao/Downloads/Expert/harmony/hvigorfile.ts
|
||||||
|
[2025-05-09T15:47:10.120] [DEBUG] debug-file - Module 'default' target 'default' build option: {
|
||||||
|
"debuggable": true,
|
||||||
|
"copyFrom": "default",
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "debug"
|
||||||
|
}
|
||||||
|
[2025-05-09T15:47:10.123] [DEBUG] debug-file - hvigorfile, resolve finished /Users/gandanxiangzhao/Downloads/Expert/harmony/products/expert/hvigorfile.ts
|
||||||
|
[2025-05-09T15:47:10.147] [DEBUG] debug-file - Module 'uicomponents' target 'default' build option: {
|
||||||
|
"debuggable": true,
|
||||||
|
"copyFrom": "default",
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "debug"
|
||||||
|
}
|
||||||
|
[2025-05-09T15:47:10.148] [DEBUG] debug-file - hvigorfile, resolve finished /Users/gandanxiangzhao/Downloads/Expert/harmony/commons/uicomponents/hvigorfile.ts
|
||||||
|
[2025-05-09T15:47:10.269] [DEBUG] debug-file - Current worker pool is stopped or closed.
|
||||||
|
[2025-05-09T15:47:10.156] [DEBUG] debug-file - hvigorfile, resolve finished /Users/gandanxiangzhao/Downloads/Expert/harmony/commons/utils/hvigorfile.ts
|
||||||
|
[2025-05-09T15:47:10.155] [DEBUG] debug-file - Module 'utils' target 'default' build option: {
|
||||||
|
"debuggable": true,
|
||||||
|
"copyFrom": "default",
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "debug"
|
||||||
|
}
|
||||||
|
[2025-05-09T15:47:10.165] [DEBUG] debug-file - hvigorfile, resolve finished /Users/gandanxiangzhao/Downloads/Expert/harmony/features/mypage/hvigorfile.ts
|
||||||
|
[2025-05-09T15:47:10.163] [DEBUG] debug-file - Module 'mypage' target 'default' build option: {
|
||||||
|
"debuggable": true,
|
||||||
|
"copyFrom": "default",
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "debug"
|
||||||
|
}
|
||||||
|
[2025-05-09T15:47:10.173] [DEBUG] debug-file - hvigorfile, resolve finished /Users/gandanxiangzhao/Downloads/Expert/harmony/commons/basic/hvigorfile.ts
|
||||||
|
[2025-05-09T15:47:10.172] [DEBUG] debug-file - Module 'basic' target 'default' build option: {
|
||||||
|
"debuggable": true,
|
||||||
|
"copyFrom": "default",
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "debug"
|
||||||
|
}
|
||||||
|
[2025-05-09T15:47:10.179] [DEBUG] debug-file - Module 'Home' target 'default' build option: {
|
||||||
|
"debuggable": true,
|
||||||
|
"copyFrom": "default",
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "debug"
|
||||||
|
}
|
||||||
|
[2025-05-09T15:47:10.180] [DEBUG] debug-file - hvigorfile, resolve finished /Users/gandanxiangzhao/Downloads/Expert/harmony/features/Home/hvigorfile.ts
|
||||||
|
[2025-05-09T15:47:10.185] [DEBUG] debug-file - Module 'register' target 'default' build option: {
|
||||||
|
"debuggable": true,
|
||||||
|
"copyFrom": "default",
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "debug"
|
||||||
|
}
|
||||||
|
[2025-05-09T15:47:10.186] [DEBUG] debug-file - hvigorfile, resolve finished /Users/gandanxiangzhao/Downloads/Expert/harmony/features/register/hvigorfile.ts
|
||||||
|
[2025-05-09T15:47:10.187] [DEBUG] debug-file - module:mypage no need to execute packageHap
|
||||||
|
[2025-05-09T15:47:10.253] [DEBUG] debug-file - Module 'utils' target 'default' using build option: {
|
||||||
|
"debuggable": true,
|
||||||
|
"copyFrom": "default",
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "debug"
|
||||||
|
} in this build.
|
||||||
|
[2025-05-09T15:47:10.245] [DEBUG] debug-file - Executing task ::clean
|
||||||
|
[2025-05-09T15:47:10.120] [DEBUG] debug-file - Module 'default' target 'ohosTest' build option: {
|
||||||
|
"debuggable": true,
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "default"
|
||||||
|
}
|
||||||
|
[2025-05-09T15:47:10.147] [DEBUG] debug-file - Module 'uicomponents' target 'ohosTest' build option: {
|
||||||
|
"debuggable": true,
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "default"
|
||||||
|
}
|
||||||
|
[2025-05-09T15:47:10.269] [DEBUG] debug-file - Clear worker 0.
|
||||||
|
[2025-05-09T15:47:10.155] [DEBUG] debug-file - Module 'utils' target 'ohosTest' build option: {
|
||||||
|
"debuggable": true,
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "default"
|
||||||
|
}
|
||||||
|
[2025-05-09T15:47:10.163] [DEBUG] debug-file - Module 'mypage' target 'ohosTest' build option: {
|
||||||
|
"debuggable": true,
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "default"
|
||||||
|
}
|
||||||
|
[2025-05-09T15:47:10.172] [DEBUG] debug-file - Module 'basic' target 'ohosTest' build option: {
|
||||||
|
"debuggable": true,
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "default"
|
||||||
|
}
|
||||||
|
[2025-05-09T15:47:10.179] [DEBUG] debug-file - Module 'Home' target 'ohosTest' build option: {
|
||||||
|
"debuggable": true,
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "default"
|
||||||
|
}
|
||||||
|
[2025-05-09T15:47:10.185] [DEBUG] debug-file - Module 'register' target 'ohosTest' build option: {
|
||||||
|
"debuggable": true,
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "default"
|
||||||
|
}
|
||||||
|
[2025-05-09T15:47:10.187] [DEBUG] debug-file - module:basic no need to execute packageHap
|
||||||
|
[2025-05-09T15:47:10.255] [DEBUG] debug-file - Module 'mypage' target 'default' using build option: {
|
||||||
|
"debuggable": true,
|
||||||
|
"copyFrom": "default",
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "debug"
|
||||||
|
} in this build.
|
||||||
|
[2025-05-09T15:47:10.245] [DEBUG] debug-file - clean: Worker pool is inactive.
|
||||||
|
[2025-05-09T15:47:10.120] [DEBUG] debug-file - End initialize module-target build option map, moduleName=default
|
||||||
|
[2025-05-09T15:47:10.147] [DEBUG] debug-file - End initialize module-target build option map, moduleName=uicomponents
|
||||||
|
[2025-05-09T15:47:10.269] [DEBUG] debug-file - Worker 0 has been cleared.
|
||||||
|
[2025-05-09T15:47:10.155] [DEBUG] debug-file - End initialize module-target build option map, moduleName=utils
|
||||||
|
[2025-05-09T15:47:10.163] [DEBUG] debug-file - End initialize module-target build option map, moduleName=mypage
|
||||||
|
[2025-05-09T15:47:10.172] [DEBUG] debug-file - End initialize module-target build option map, moduleName=basic
|
||||||
|
[2025-05-09T15:47:10.179] [DEBUG] debug-file - End initialize module-target build option map, moduleName=Home
|
||||||
|
[2025-05-09T15:47:10.185] [DEBUG] debug-file - End initialize module-target build option map, moduleName=register
|
||||||
|
[2025-05-09T15:47:10.187] [DEBUG] debug-file - module:Home no need to execute packageHap
|
||||||
|
[2025-05-09T15:47:10.257] [DEBUG] debug-file - Module 'basic' target 'default' using build option: {
|
||||||
|
"debuggable": true,
|
||||||
|
"copyFrom": "default",
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "debug"
|
||||||
|
} in this build.
|
||||||
|
[2025-05-09T15:47:10.245] [DEBUG] debug-file - harmony : clean cost memory 0.027099609375
|
||||||
|
[2025-05-09T15:47:10.120] [DEBUG] debug-file - Module 'default' target 'default' using build option: {
|
||||||
|
"debuggable": true,
|
||||||
|
"copyFrom": "default",
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "debug"
|
||||||
|
} in this build.
|
||||||
|
[2025-05-09T15:47:10.147] [DEBUG] debug-file - Module 'uicomponents' target 'default' using build option: {
|
||||||
|
"debuggable": true,
|
||||||
|
"copyFrom": "default",
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "debug"
|
||||||
|
} in this build.
|
||||||
|
[2025-05-09T15:47:10.269] [DEBUG] debug-file - Current idle worker size: 1.
|
||||||
|
[2025-05-09T15:47:10.155] [DEBUG] debug-file - Module 'utils' target 'default' using build option: {
|
||||||
|
"debuggable": true,
|
||||||
|
"copyFrom": "default",
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "debug"
|
||||||
|
} in this build.
|
||||||
|
[2025-05-09T15:47:10.163] [DEBUG] debug-file - Module 'mypage' target 'default' using build option: {
|
||||||
|
"debuggable": true,
|
||||||
|
"copyFrom": "default",
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "debug"
|
||||||
|
} in this build.
|
||||||
|
[2025-05-09T15:47:10.172] [DEBUG] debug-file - Module 'basic' target 'default' using build option: {
|
||||||
|
"debuggable": true,
|
||||||
|
"copyFrom": "default",
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "debug"
|
||||||
|
} in this build.
|
||||||
|
[2025-05-09T15:47:10.179] [DEBUG] debug-file - Module 'Home' target 'default' using build option: {
|
||||||
|
"debuggable": true,
|
||||||
|
"copyFrom": "default",
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "debug"
|
||||||
|
} in this build.
|
||||||
|
[2025-05-09T15:47:10.185] [DEBUG] debug-file - Module 'register' target 'default' using build option: {
|
||||||
|
"debuggable": true,
|
||||||
|
"copyFrom": "default",
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "debug"
|
||||||
|
} in this build.
|
||||||
|
[2025-05-09T15:47:10.187] [DEBUG] debug-file - module:register no need to execute packageHap
|
||||||
|
[2025-05-09T15:47:10.258] [DEBUG] debug-file - Module 'Home' target 'default' using build option: {
|
||||||
|
"debuggable": true,
|
||||||
|
"copyFrom": "default",
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "debug"
|
||||||
|
} in this build.
|
||||||
|
[2025-05-09T15:47:10.245] [DEBUG] debug-file - runTaskFromQueue task cost before running: 959 ms
|
||||||
|
[2025-05-09T15:47:10.269] [DEBUG] debug-file - Current busy worker size: 0.
|
||||||
|
[2025-05-09T15:47:10.187] [DEBUG] debug-file - start to load updatedOhPackageInfo to the disk
|
||||||
|
[2025-05-09T15:47:10.260] [DEBUG] debug-file - Module 'register' target 'default' using build option: {
|
||||||
|
"debuggable": true,
|
||||||
|
"copyFrom": "default",
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "debug"
|
||||||
|
} in this build.
|
||||||
|
[2025-05-09T15:47:10.245] [INFO] debug-file - Finished ::clean... after 1 ms
|
||||||
|
[2025-05-09T15:47:10.269] [DEBUG] debug-file - Clear worker 1.
|
||||||
|
[2025-05-09T15:47:10.189] [DEBUG] debug-file - load to the disk finished
|
||||||
|
[2025-05-09T15:47:10.266] [DEBUG] debug-file - Since there is no instance or instance is terminated, create a new worker pool.
|
||||||
|
[2025-05-09T15:47:10.245] [DEBUG] debug-file - Executing task :default:init
|
||||||
|
[2025-05-09T15:47:10.269] [DEBUG] debug-file - Worker 1 has been cleared.
|
||||||
|
[2025-05-09T15:47:10.190] [DEBUG] debug-file - Start to initialize dependency information.
|
||||||
|
[2025-05-09T15:47:10.266] [DEBUG] debug-file - Worker pool is initialized with config: {
|
||||||
|
minPoolNum: 2,
|
||||||
|
maxPoolNum: undefined,
|
||||||
|
maxCoreSize: undefined,
|
||||||
|
cacheCapacity: undefined,
|
||||||
|
cacheTtl: undefined
|
||||||
|
}
|
||||||
|
[2025-05-09T15:47:10.245] [DEBUG] debug-file - default : init cost memory 0.010162353515625
|
||||||
|
[2025-05-09T15:47:10.269] [DEBUG] debug-file - Current idle worker size: 0.
|
||||||
|
[2025-05-09T15:47:10.193] [DEBUG] debug-file - Module harmony Collected Dependency: /Users/gandanxiangzhao/Downloads/Expert/harmony/oh_modules/.ohpm/@ohos+crypto-js@2.0.4/oh_modules/@ohos/crypto-js
|
||||||
|
[2025-05-09T15:47:10.245] [DEBUG] debug-file - runTaskFromQueue task cost before running: 959 ms
|
||||||
|
[2025-05-09T15:47:10.269] [DEBUG] debug-file - Current busy worker size: 0.
|
||||||
|
[2025-05-09T15:47:10.193] [DEBUG] debug-file - Module harmony's total dependency: 1
|
||||||
|
[2025-05-09T15:47:10.245] [INFO] debug-file - Finished :default:init... after 1 ms
|
||||||
|
[2025-05-09T15:47:10.269] [DEBUG] debug-file - hvigor build process will be closed.
|
||||||
|
[2025-05-09T15:47:10.193] [DEBUG] debug-file - Start to initialize dependency information.
|
||||||
|
[2025-05-09T15:47:10.246] [DEBUG] debug-file - Executing task :uicomponents:init
|
||||||
|
[2025-05-09T15:47:10.273] [DEBUG] debug-file - worker[0] exits with exit code 0.
|
||||||
|
[2025-05-09T15:47:10.195] [DEBUG] debug-file - Module default Collected Dependency: /Users/gandanxiangzhao/Downloads/Expert/harmony/commons/basic,/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/utils,/Users/gandanxiangzhao/Downloads/Expert/harmony/features/mypage,/Users/gandanxiangzhao/Downloads/Expert/harmony/features/Home,/Users/gandanxiangzhao/Downloads/Expert/harmony/features/register,/Users/gandanxiangzhao/Downloads/Expert/harmony/oh_modules/.ohpm/@ohos+crypto-js@2.0.4/oh_modules/@ohos/crypto-js
|
||||||
|
[2025-05-09T15:47:10.246] [DEBUG] debug-file - uicomponents : init cost memory 0.0080413818359375
|
||||||
|
[2025-05-09T15:47:10.273] [DEBUG] debug-file - worker[1] exits with exit code 0.
|
||||||
|
[2025-05-09T15:47:10.195] [DEBUG] debug-file - Module default's total dependency: 6
|
||||||
|
[2025-05-09T15:47:10.246] [DEBUG] debug-file - runTaskFromQueue task cost before running: 959 ms
|
||||||
|
[2025-05-09T15:47:10.273] [DEBUG] debug-file - Current worker pool is terminated.
|
||||||
|
[2025-05-09T15:47:10.197] [DEBUG] debug-file - Start to initialize dependency information.
|
||||||
|
[2025-05-09T15:47:10.246] [INFO] debug-file - Finished :uicomponents:init... after 1 ms
|
||||||
|
[2025-05-09T15:47:10.198] [DEBUG] debug-file - Module uicomponents Collected Dependency: /Users/gandanxiangzhao/Downloads/Expert/harmony/oh_modules/.ohpm/@ohos+crypto-js@2.0.4/oh_modules/@ohos/crypto-js
|
||||||
|
[2025-05-09T15:47:10.246] [DEBUG] debug-file - Executing task :utils:init
|
||||||
|
[2025-05-09T15:47:10.198] [DEBUG] debug-file - Module uicomponents's total dependency: 1
|
||||||
|
[2025-05-09T15:47:10.246] [DEBUG] debug-file - utils : init cost memory 0.00803375244140625
|
||||||
|
[2025-05-09T15:47:10.198] [DEBUG] debug-file - Start to initialize dependency information.
|
||||||
|
[2025-05-09T15:47:10.246] [DEBUG] debug-file - runTaskFromQueue task cost before running: 959 ms
|
||||||
|
[2025-05-09T15:47:10.199] [DEBUG] debug-file - Module utils Collected Dependency: /Users/gandanxiangzhao/Downloads/Expert/harmony/oh_modules/.ohpm/@ohos+crypto-js@2.0.4/oh_modules/@ohos/crypto-js
|
||||||
|
[2025-05-09T15:47:10.246] [INFO] debug-file - Finished :utils:init... after 1 ms
|
||||||
|
[2025-05-09T15:47:10.199] [DEBUG] debug-file - Module utils's total dependency: 1
|
||||||
|
[2025-05-09T15:47:10.246] [DEBUG] debug-file - Executing task :mypage:init
|
||||||
|
[2025-05-09T15:47:10.199] [DEBUG] debug-file - Start to initialize dependency information.
|
||||||
|
[2025-05-09T15:47:10.246] [DEBUG] debug-file - mypage : init cost memory 0.00803375244140625
|
||||||
|
[2025-05-09T15:47:10.200] [DEBUG] debug-file - Module mypage Collected Dependency: /Users/gandanxiangzhao/Downloads/Expert/harmony/commons/basic,/Users/gandanxiangzhao/Downloads/Expert/harmony/oh_modules/.ohpm/@ohos+crypto-js@2.0.4/oh_modules/@ohos/crypto-js
|
||||||
|
[2025-05-09T15:47:10.246] [DEBUG] debug-file - runTaskFromQueue task cost before running: 959 ms
|
||||||
|
[2025-05-09T15:47:10.200] [DEBUG] debug-file - Module mypage's total dependency: 2
|
||||||
|
[2025-05-09T15:47:10.246] [INFO] debug-file - Finished :mypage:init... after 1 ms
|
||||||
|
[2025-05-09T15:47:10.200] [DEBUG] debug-file - Start to initialize dependency information.
|
||||||
|
[2025-05-09T15:47:10.246] [DEBUG] debug-file - Executing task :basic:init
|
||||||
|
[2025-05-09T15:47:10.200] [DEBUG] debug-file - Module basic Collected Dependency: /Users/gandanxiangzhao/Downloads/Expert/harmony/oh_modules/.ohpm/@ohos+crypto-js@2.0.4/oh_modules/@ohos/crypto-js
|
||||||
|
[2025-05-09T15:47:10.246] [DEBUG] debug-file - basic : init cost memory 0.00803375244140625
|
||||||
|
[2025-05-09T15:47:10.200] [DEBUG] debug-file - Module basic's total dependency: 1
|
||||||
|
[2025-05-09T15:47:10.246] [DEBUG] debug-file - runTaskFromQueue task cost before running: 959 ms
|
||||||
|
[2025-05-09T15:47:10.201] [DEBUG] debug-file - Start to initialize dependency information.
|
||||||
|
[2025-05-09T15:47:10.246] [INFO] debug-file - Finished :basic:init... after 1 ms
|
||||||
|
[2025-05-09T15:47:10.201] [DEBUG] debug-file - Module Home Collected Dependency: /Users/gandanxiangzhao/Downloads/Expert/harmony/commons/basic,/Users/gandanxiangzhao/Downloads/Expert/harmony/oh_modules/.ohpm/@ohos+crypto-js@2.0.4/oh_modules/@ohos/crypto-js
|
||||||
|
[2025-05-09T15:47:10.246] [DEBUG] debug-file - Executing task :Home:init
|
||||||
|
[2025-05-09T15:47:10.201] [DEBUG] debug-file - Module Home's total dependency: 2
|
||||||
|
[2025-05-09T15:47:10.246] [DEBUG] debug-file - Home : init cost memory 0.00803375244140625
|
||||||
|
[2025-05-09T15:47:10.201] [DEBUG] debug-file - Start to initialize dependency information.
|
||||||
|
[2025-05-09T15:47:10.246] [DEBUG] debug-file - runTaskFromQueue task cost before running: 960 ms
|
||||||
|
[2025-05-09T15:47:10.202] [DEBUG] debug-file - Module register Collected Dependency: /Users/gandanxiangzhao/Downloads/Expert/harmony/commons/basic,/Users/gandanxiangzhao/Downloads/Expert/harmony/oh_modules/.ohpm/@ohos+crypto-js@2.0.4/oh_modules/@ohos/crypto-js
|
||||||
|
[2025-05-09T15:47:10.246] [INFO] debug-file - Finished :Home:init... after 1 ms
|
||||||
|
[2025-05-09T15:47:10.202] [DEBUG] debug-file - Module register's total dependency: 2
|
||||||
|
[2025-05-09T15:47:10.246] [DEBUG] debug-file - Executing task :register:init
|
||||||
|
[2025-05-09T15:47:10.202] [DEBUG] debug-file - Configuration phase cost:896 ms
|
||||||
|
[2025-05-09T15:47:10.246] [DEBUG] debug-file - register : init cost memory 0.00803375244140625
|
||||||
|
[2025-05-09T15:47:10.246] [DEBUG] debug-file - runTaskFromQueue task cost before running: 960 ms
|
||||||
|
[2025-05-09T15:47:10.246] [INFO] debug-file - Finished :register:init... after 1 ms
|
||||||
|
[2025-05-09T15:47:10.246] [DEBUG] debug-file - Executing task ::init
|
||||||
|
[2025-05-09T15:47:10.246] [DEBUG] debug-file - harmony : init cost memory 0.00946044921875
|
||||||
|
[2025-05-09T15:47:10.246] [DEBUG] debug-file - runTaskFromQueue task cost before running: 960 ms
|
||||||
|
[2025-05-09T15:47:10.246] [INFO] debug-file - Finished ::init... after 1 ms
|
||||||
1
.hvigor/outputs/sync/fileCache.json
Normal file
1
.hvigor/outputs/sync/fileCache.json
Normal file
File diff suppressed because one or more lines are too long
718
.hvigor/outputs/sync/output.json
Normal file
718
.hvigor/outputs/sync/output.json
Normal file
@ -0,0 +1,718 @@
|
|||||||
|
{
|
||||||
|
"ohos-module-default": {
|
||||||
|
"SELECT_TARGET": "default",
|
||||||
|
"MODULE_BUILD_DIR": "/Users/gandanxiangzhao/Downloads/Expert/harmony/products/expert/build",
|
||||||
|
"DEPENDENCY_INFO": {
|
||||||
|
"@itcast/basic": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/basic",
|
||||||
|
"utils": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/utils",
|
||||||
|
"mypage": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/mypage",
|
||||||
|
"home": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/Home",
|
||||||
|
"register": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/register",
|
||||||
|
"@ohos/crypto-js": "/Users/gandanxiangzhao/Downloads/Expert/harmony/oh_modules/.ohpm/@ohos+crypto-js@2.0.4/oh_modules/@ohos/crypto-js"
|
||||||
|
},
|
||||||
|
"TARGETS": {
|
||||||
|
"default": {
|
||||||
|
"SOURCE_ROOT": "/Users/gandanxiangzhao/Downloads/Expert/harmony/products/expert/src/main",
|
||||||
|
"RESOURCES_PATH": [
|
||||||
|
"/Users/gandanxiangzhao/Downloads/Expert/harmony/products/expert/src/main/resources"
|
||||||
|
],
|
||||||
|
"BUILD_PATH": {
|
||||||
|
"OUTPUT_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/products/expert/build/default/outputs/default",
|
||||||
|
"INTERMEDIA_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/products/expert/build/default/intermediates",
|
||||||
|
"JS_ASSETS_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/products/expert/build/default/intermediates/loader_out/default",
|
||||||
|
"JS_LITE_ASSETS_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/products/expert/build/default/intermediates/loader_out_lite/default",
|
||||||
|
"RES_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/products/expert/build/default/intermediates/res/default",
|
||||||
|
"RES_PROFILE_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/products/expert/build/default/intermediates/res/default/resources/base/profile",
|
||||||
|
"ETS_SUPER_VISUAL_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/products/expert/build/default/cache/default/default@CompileArkTS/esmodule",
|
||||||
|
"JS_SUPER_VISUAL_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/products/expert/build/default/cache/default/default@CompileJS/jsbundle",
|
||||||
|
"WORKER_LOADER": "/Users/gandanxiangzhao/Downloads/Expert/harmony/products/expert/build/default/intermediates/loader/default/loader.json",
|
||||||
|
"MANIFEST_JSON": "/Users/gandanxiangzhao/Downloads/Expert/harmony/products/expert/build/default/intermediates/manifest/default",
|
||||||
|
"OUTPUT_METADATA_JSON": "/Users/gandanxiangzhao/Downloads/Expert/harmony/products/expert/build/default/intermediates/hap_metadata/default/output_metadata.json",
|
||||||
|
"SOURCE_MAP_DIR": "/Users/gandanxiangzhao/Downloads/Expert/harmony/products/expert/build/default/intermediates/source_map/default"
|
||||||
|
},
|
||||||
|
"BUILD_OPTION": {
|
||||||
|
"debuggable": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ohosTest": {
|
||||||
|
"SOURCE_ROOT": "/Users/gandanxiangzhao/Downloads/Expert/harmony/products/expert/src/ohosTest",
|
||||||
|
"RESOURCES_PATH": [
|
||||||
|
"/Users/gandanxiangzhao/Downloads/Expert/harmony/products/expert/src/ohosTest/resources"
|
||||||
|
],
|
||||||
|
"BUILD_PATH": {
|
||||||
|
"OUTPUT_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/products/expert/build/default/outputs/ohosTest",
|
||||||
|
"INTERMEDIA_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/products/expert/build/default/intermediates",
|
||||||
|
"JS_ASSETS_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/products/expert/build/default/intermediates/loader_out/ohosTest",
|
||||||
|
"JS_LITE_ASSETS_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/products/expert/build/default/intermediates/loader_out_lite/ohosTest",
|
||||||
|
"RES_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/products/expert/build/default/intermediates/res/ohosTest",
|
||||||
|
"RES_PROFILE_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/products/expert/build/default/intermediates/res/ohosTest/resources/base/profile",
|
||||||
|
"ETS_SUPER_VISUAL_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/products/expert/build/default/cache/ohosTest/ohosTest@OhosTestCompileArkTS/esmodule",
|
||||||
|
"JS_SUPER_VISUAL_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/products/expert/build/default/cache/ohosTest/ohosTest@OhosTestCompileJS/jsbundle",
|
||||||
|
"WORKER_LOADER": "/Users/gandanxiangzhao/Downloads/Expert/harmony/products/expert/build/default/intermediates/loader/ohosTest/loader.json",
|
||||||
|
"MANIFEST_JSON": "/Users/gandanxiangzhao/Downloads/Expert/harmony/products/expert/build/default/intermediates/manifest/ohosTest",
|
||||||
|
"OUTPUT_METADATA_JSON": "/Users/gandanxiangzhao/Downloads/Expert/harmony/products/expert/build/default/intermediates/hap_metadata/ohosTest/output_metadata.json",
|
||||||
|
"SOURCE_MAP_DIR": "/Users/gandanxiangzhao/Downloads/Expert/harmony/products/expert/build/default/intermediates/source_map/ohosTest"
|
||||||
|
},
|
||||||
|
"BUILD_OPTION": {
|
||||||
|
"debuggable": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"BUILD_OPTION": {
|
||||||
|
"default-default": {
|
||||||
|
"debuggable": true,
|
||||||
|
"copyFrom": "default",
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "debug"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"BUILD_PROFILE_OPT": {
|
||||||
|
"apiType": "stageMode",
|
||||||
|
"buildOption": {},
|
||||||
|
"buildOptionSet": [
|
||||||
|
{
|
||||||
|
"name": "release",
|
||||||
|
"arkOptions": {
|
||||||
|
"obfuscation": {
|
||||||
|
"ruleOptions": {
|
||||||
|
"enable": false,
|
||||||
|
"files": [
|
||||||
|
"./obfuscation-rules.txt"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "default"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "debug"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"name": "default"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ohosTest"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"BUILD_CACHE_DIR": ""
|
||||||
|
},
|
||||||
|
"ohos-module-uicomponents": {
|
||||||
|
"SELECT_TARGET": "default",
|
||||||
|
"MODULE_BUILD_DIR": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/uicomponents/build",
|
||||||
|
"DEPENDENCY_INFO": {
|
||||||
|
"@ohos/crypto-js": "/Users/gandanxiangzhao/Downloads/Expert/harmony/oh_modules/.ohpm/@ohos+crypto-js@2.0.4/oh_modules/@ohos/crypto-js"
|
||||||
|
},
|
||||||
|
"TARGETS": {
|
||||||
|
"default": {
|
||||||
|
"SOURCE_ROOT": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/uicomponents/src/main",
|
||||||
|
"RESOURCES_PATH": [
|
||||||
|
"/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/uicomponents/src/main/resources"
|
||||||
|
],
|
||||||
|
"BUILD_PATH": {
|
||||||
|
"OUTPUT_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/uicomponents/build/default/outputs/default",
|
||||||
|
"INTERMEDIA_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/uicomponents/build/default/intermediates",
|
||||||
|
"JS_ASSETS_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/uicomponents/build/default/intermediates/loader_out/default",
|
||||||
|
"JS_LITE_ASSETS_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/uicomponents/build/default/intermediates/loader_out_lite/default",
|
||||||
|
"RES_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/uicomponents/build/default/intermediates/res/default",
|
||||||
|
"RES_PROFILE_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/uicomponents/build/default/intermediates/res/default/resources/base/profile",
|
||||||
|
"ETS_SUPER_VISUAL_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/uicomponents/build/default/cache/default/default@HarCompileArkTS/esmodule",
|
||||||
|
"JS_SUPER_VISUAL_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/uicomponents/build/default/cache/default/default@HarCompileJS/jsbundle",
|
||||||
|
"WORKER_LOADER": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/uicomponents/build/default/intermediates/loader/default/loader.json",
|
||||||
|
"MANIFEST_JSON": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/uicomponents/build/default/intermediates/manifest/default",
|
||||||
|
"OUTPUT_METADATA_JSON": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/uicomponents/build/default/intermediates/hap_metadata/default/output_metadata.json",
|
||||||
|
"SOURCE_MAP_DIR": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/uicomponents/build/default/intermediates/source_map/default"
|
||||||
|
},
|
||||||
|
"BUILD_OPTION": {
|
||||||
|
"debuggable": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"BUILD_OPTION": {
|
||||||
|
"default-default": {
|
||||||
|
"debuggable": true,
|
||||||
|
"copyFrom": "default",
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "debug"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"BUILD_PROFILE_OPT": {
|
||||||
|
"apiType": "stageMode",
|
||||||
|
"buildOption": {},
|
||||||
|
"buildOptionSet": [
|
||||||
|
{
|
||||||
|
"name": "release",
|
||||||
|
"arkOptions": {
|
||||||
|
"obfuscation": {
|
||||||
|
"ruleOptions": {
|
||||||
|
"enable": false,
|
||||||
|
"files": [
|
||||||
|
"./obfuscation-rules.txt"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"consumerFiles": [
|
||||||
|
"./consumer-rules.txt"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "default"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "debug"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"name": "default"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ohosTest"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"BUILD_CACHE_DIR": ""
|
||||||
|
},
|
||||||
|
"ohos-module-utils": {
|
||||||
|
"SELECT_TARGET": "default",
|
||||||
|
"MODULE_BUILD_DIR": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/utils/build",
|
||||||
|
"DEPENDENCY_INFO": {
|
||||||
|
"@ohos/crypto-js": "/Users/gandanxiangzhao/Downloads/Expert/harmony/oh_modules/.ohpm/@ohos+crypto-js@2.0.4/oh_modules/@ohos/crypto-js"
|
||||||
|
},
|
||||||
|
"TARGETS": {
|
||||||
|
"default": {
|
||||||
|
"SOURCE_ROOT": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/utils/src/main",
|
||||||
|
"RESOURCES_PATH": [
|
||||||
|
"/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/utils/src/main/resources"
|
||||||
|
],
|
||||||
|
"BUILD_PATH": {
|
||||||
|
"OUTPUT_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/utils/build/default/outputs/default",
|
||||||
|
"INTERMEDIA_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/utils/build/default/intermediates",
|
||||||
|
"JS_ASSETS_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/utils/build/default/intermediates/loader_out/default",
|
||||||
|
"JS_LITE_ASSETS_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/utils/build/default/intermediates/loader_out_lite/default",
|
||||||
|
"RES_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/utils/build/default/intermediates/res/default",
|
||||||
|
"RES_PROFILE_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/utils/build/default/intermediates/res/default/resources/base/profile",
|
||||||
|
"ETS_SUPER_VISUAL_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/utils/build/default/cache/default/default@HarCompileArkTS/esmodule",
|
||||||
|
"JS_SUPER_VISUAL_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/utils/build/default/cache/default/default@HarCompileJS/jsbundle",
|
||||||
|
"WORKER_LOADER": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/utils/build/default/intermediates/loader/default/loader.json",
|
||||||
|
"MANIFEST_JSON": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/utils/build/default/intermediates/manifest/default",
|
||||||
|
"OUTPUT_METADATA_JSON": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/utils/build/default/intermediates/hap_metadata/default/output_metadata.json",
|
||||||
|
"SOURCE_MAP_DIR": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/utils/build/default/intermediates/source_map/default"
|
||||||
|
},
|
||||||
|
"BUILD_OPTION": {
|
||||||
|
"debuggable": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"BUILD_OPTION": {
|
||||||
|
"default-default": {
|
||||||
|
"debuggable": true,
|
||||||
|
"copyFrom": "default",
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "debug"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"BUILD_PROFILE_OPT": {
|
||||||
|
"apiType": "stageMode",
|
||||||
|
"buildOption": {},
|
||||||
|
"buildOptionSet": [
|
||||||
|
{
|
||||||
|
"name": "release",
|
||||||
|
"arkOptions": {
|
||||||
|
"obfuscation": {
|
||||||
|
"ruleOptions": {
|
||||||
|
"enable": false,
|
||||||
|
"files": [
|
||||||
|
"./obfuscation-rules.txt"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"consumerFiles": [
|
||||||
|
"./consumer-rules.txt"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "default"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "debug"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"name": "default"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ohosTest"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"BUILD_CACHE_DIR": ""
|
||||||
|
},
|
||||||
|
"ohos-module-mypage": {
|
||||||
|
"SELECT_TARGET": "default",
|
||||||
|
"MODULE_BUILD_DIR": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/mypage/build",
|
||||||
|
"DEPENDENCY_INFO": {
|
||||||
|
"@itcast/basic": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/basic",
|
||||||
|
"@ohos/crypto-js": "/Users/gandanxiangzhao/Downloads/Expert/harmony/oh_modules/.ohpm/@ohos+crypto-js@2.0.4/oh_modules/@ohos/crypto-js"
|
||||||
|
},
|
||||||
|
"TARGETS": {
|
||||||
|
"default": {
|
||||||
|
"SOURCE_ROOT": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/mypage/src/main",
|
||||||
|
"RESOURCES_PATH": [
|
||||||
|
"/Users/gandanxiangzhao/Downloads/Expert/harmony/features/mypage/src/main/resources"
|
||||||
|
],
|
||||||
|
"BUILD_PATH": {
|
||||||
|
"OUTPUT_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/mypage/build/default/outputs/default",
|
||||||
|
"INTERMEDIA_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/mypage/build/default/intermediates",
|
||||||
|
"JS_ASSETS_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/mypage/build/default/intermediates/loader_out/default",
|
||||||
|
"JS_LITE_ASSETS_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/mypage/build/default/intermediates/loader_out_lite/default",
|
||||||
|
"RES_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/mypage/build/default/intermediates/res/default",
|
||||||
|
"RES_PROFILE_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/mypage/build/default/intermediates/res/default/resources/base/profile",
|
||||||
|
"ETS_SUPER_VISUAL_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/mypage/build/default/cache/default/default@HarCompileArkTS/esmodule",
|
||||||
|
"JS_SUPER_VISUAL_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/mypage/build/default/cache/default/default@HarCompileJS/jsbundle",
|
||||||
|
"WORKER_LOADER": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/mypage/build/default/intermediates/loader/default/loader.json",
|
||||||
|
"MANIFEST_JSON": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/mypage/build/default/intermediates/manifest/default",
|
||||||
|
"OUTPUT_METADATA_JSON": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/mypage/build/default/intermediates/hap_metadata/default/output_metadata.json",
|
||||||
|
"SOURCE_MAP_DIR": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/mypage/build/default/intermediates/source_map/default"
|
||||||
|
},
|
||||||
|
"BUILD_OPTION": {
|
||||||
|
"debuggable": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"BUILD_OPTION": {
|
||||||
|
"default-default": {
|
||||||
|
"debuggable": true,
|
||||||
|
"copyFrom": "default",
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "debug"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"BUILD_PROFILE_OPT": {
|
||||||
|
"apiType": "stageMode",
|
||||||
|
"buildOption": {},
|
||||||
|
"buildOptionSet": [
|
||||||
|
{
|
||||||
|
"name": "release",
|
||||||
|
"arkOptions": {
|
||||||
|
"obfuscation": {
|
||||||
|
"ruleOptions": {
|
||||||
|
"enable": false,
|
||||||
|
"files": [
|
||||||
|
"./obfuscation-rules.txt"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"consumerFiles": [
|
||||||
|
"./consumer-rules.txt"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "default"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "debug"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"name": "default"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ohosTest"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"BUILD_CACHE_DIR": ""
|
||||||
|
},
|
||||||
|
"ohos-module-basic": {
|
||||||
|
"SELECT_TARGET": "default",
|
||||||
|
"MODULE_BUILD_DIR": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/basic/build",
|
||||||
|
"DEPENDENCY_INFO": {
|
||||||
|
"@ohos/crypto-js": "/Users/gandanxiangzhao/Downloads/Expert/harmony/oh_modules/.ohpm/@ohos+crypto-js@2.0.4/oh_modules/@ohos/crypto-js"
|
||||||
|
},
|
||||||
|
"TARGETS": {
|
||||||
|
"default": {
|
||||||
|
"SOURCE_ROOT": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/basic/src/main",
|
||||||
|
"RESOURCES_PATH": [
|
||||||
|
"/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/basic/src/main/resources"
|
||||||
|
],
|
||||||
|
"BUILD_PATH": {
|
||||||
|
"OUTPUT_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/basic/build/default/outputs/default",
|
||||||
|
"INTERMEDIA_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/basic/build/default/intermediates",
|
||||||
|
"JS_ASSETS_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/basic/build/default/intermediates/loader_out/default",
|
||||||
|
"JS_LITE_ASSETS_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/basic/build/default/intermediates/loader_out_lite/default",
|
||||||
|
"RES_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/basic/build/default/intermediates/res/default",
|
||||||
|
"RES_PROFILE_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/basic/build/default/intermediates/res/default/resources/base/profile",
|
||||||
|
"ETS_SUPER_VISUAL_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/basic/build/default/cache/default/default@HarCompileArkTS/esmodule",
|
||||||
|
"JS_SUPER_VISUAL_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/basic/build/default/cache/default/default@HarCompileJS/jsbundle",
|
||||||
|
"WORKER_LOADER": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/basic/build/default/intermediates/loader/default/loader.json",
|
||||||
|
"MANIFEST_JSON": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/basic/build/default/intermediates/manifest/default",
|
||||||
|
"OUTPUT_METADATA_JSON": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/basic/build/default/intermediates/hap_metadata/default/output_metadata.json",
|
||||||
|
"SOURCE_MAP_DIR": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/basic/build/default/intermediates/source_map/default"
|
||||||
|
},
|
||||||
|
"BUILD_OPTION": {
|
||||||
|
"debuggable": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"BUILD_OPTION": {
|
||||||
|
"default-default": {
|
||||||
|
"debuggable": true,
|
||||||
|
"copyFrom": "default",
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "debug"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"BUILD_PROFILE_OPT": {
|
||||||
|
"apiType": "stageMode",
|
||||||
|
"buildOption": {},
|
||||||
|
"buildOptionSet": [
|
||||||
|
{
|
||||||
|
"name": "release",
|
||||||
|
"arkOptions": {
|
||||||
|
"obfuscation": {
|
||||||
|
"ruleOptions": {
|
||||||
|
"enable": false,
|
||||||
|
"files": [
|
||||||
|
"./obfuscation-rules.txt"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"consumerFiles": [
|
||||||
|
"./consumer-rules.txt"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "default"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "debug"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"name": "default"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ohosTest"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"BUILD_CACHE_DIR": ""
|
||||||
|
},
|
||||||
|
"ohos-module-Home": {
|
||||||
|
"SELECT_TARGET": "default",
|
||||||
|
"MODULE_BUILD_DIR": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/Home/build",
|
||||||
|
"DEPENDENCY_INFO": {
|
||||||
|
"@itcast/basic": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/basic",
|
||||||
|
"@ohos/crypto-js": "/Users/gandanxiangzhao/Downloads/Expert/harmony/oh_modules/.ohpm/@ohos+crypto-js@2.0.4/oh_modules/@ohos/crypto-js"
|
||||||
|
},
|
||||||
|
"TARGETS": {
|
||||||
|
"default": {
|
||||||
|
"SOURCE_ROOT": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/Home/src/main",
|
||||||
|
"RESOURCES_PATH": [
|
||||||
|
"/Users/gandanxiangzhao/Downloads/Expert/harmony/features/Home/src/main/resources"
|
||||||
|
],
|
||||||
|
"BUILD_PATH": {
|
||||||
|
"OUTPUT_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/Home/build/default/outputs/default",
|
||||||
|
"INTERMEDIA_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/Home/build/default/intermediates",
|
||||||
|
"JS_ASSETS_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/Home/build/default/intermediates/loader_out/default",
|
||||||
|
"JS_LITE_ASSETS_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/Home/build/default/intermediates/loader_out_lite/default",
|
||||||
|
"RES_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/Home/build/default/intermediates/res/default",
|
||||||
|
"RES_PROFILE_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/Home/build/default/intermediates/res/default/resources/base/profile",
|
||||||
|
"ETS_SUPER_VISUAL_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/Home/build/default/cache/default/default@HarCompileArkTS/esmodule",
|
||||||
|
"JS_SUPER_VISUAL_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/Home/build/default/cache/default/default@HarCompileJS/jsbundle",
|
||||||
|
"WORKER_LOADER": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/Home/build/default/intermediates/loader/default/loader.json",
|
||||||
|
"MANIFEST_JSON": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/Home/build/default/intermediates/manifest/default",
|
||||||
|
"OUTPUT_METADATA_JSON": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/Home/build/default/intermediates/hap_metadata/default/output_metadata.json",
|
||||||
|
"SOURCE_MAP_DIR": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/Home/build/default/intermediates/source_map/default"
|
||||||
|
},
|
||||||
|
"BUILD_OPTION": {
|
||||||
|
"debuggable": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"BUILD_OPTION": {
|
||||||
|
"default-default": {
|
||||||
|
"debuggable": true,
|
||||||
|
"copyFrom": "default",
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "debug"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"BUILD_PROFILE_OPT": {
|
||||||
|
"apiType": "stageMode",
|
||||||
|
"buildOption": {},
|
||||||
|
"buildOptionSet": [
|
||||||
|
{
|
||||||
|
"name": "release",
|
||||||
|
"arkOptions": {
|
||||||
|
"obfuscation": {
|
||||||
|
"ruleOptions": {
|
||||||
|
"enable": false,
|
||||||
|
"files": [
|
||||||
|
"./obfuscation-rules.txt"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"consumerFiles": [
|
||||||
|
"./consumer-rules.txt"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "default"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "debug"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"name": "default"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ohosTest"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"BUILD_CACHE_DIR": ""
|
||||||
|
},
|
||||||
|
"ohos-module-register": {
|
||||||
|
"SELECT_TARGET": "default",
|
||||||
|
"MODULE_BUILD_DIR": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/register/build",
|
||||||
|
"DEPENDENCY_INFO": {
|
||||||
|
"@itcast/basic": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/basic",
|
||||||
|
"@ohos/crypto-js": "/Users/gandanxiangzhao/Downloads/Expert/harmony/oh_modules/.ohpm/@ohos+crypto-js@2.0.4/oh_modules/@ohos/crypto-js"
|
||||||
|
},
|
||||||
|
"TARGETS": {
|
||||||
|
"default": {
|
||||||
|
"SOURCE_ROOT": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/register/src/main",
|
||||||
|
"RESOURCES_PATH": [
|
||||||
|
"/Users/gandanxiangzhao/Downloads/Expert/harmony/features/register/src/main/resources"
|
||||||
|
],
|
||||||
|
"BUILD_PATH": {
|
||||||
|
"OUTPUT_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/register/build/default/outputs/default",
|
||||||
|
"INTERMEDIA_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/register/build/default/intermediates",
|
||||||
|
"JS_ASSETS_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/register/build/default/intermediates/loader_out/default",
|
||||||
|
"JS_LITE_ASSETS_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/register/build/default/intermediates/loader_out_lite/default",
|
||||||
|
"RES_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/register/build/default/intermediates/res/default",
|
||||||
|
"RES_PROFILE_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/register/build/default/intermediates/res/default/resources/base/profile",
|
||||||
|
"ETS_SUPER_VISUAL_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/register/build/default/cache/default/default@HarCompileArkTS/esmodule",
|
||||||
|
"JS_SUPER_VISUAL_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/register/build/default/cache/default/default@HarCompileJS/jsbundle",
|
||||||
|
"WORKER_LOADER": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/register/build/default/intermediates/loader/default/loader.json",
|
||||||
|
"MANIFEST_JSON": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/register/build/default/intermediates/manifest/default",
|
||||||
|
"OUTPUT_METADATA_JSON": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/register/build/default/intermediates/hap_metadata/default/output_metadata.json",
|
||||||
|
"SOURCE_MAP_DIR": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/register/build/default/intermediates/source_map/default"
|
||||||
|
},
|
||||||
|
"BUILD_OPTION": {
|
||||||
|
"debuggable": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"BUILD_OPTION": {
|
||||||
|
"default-default": {
|
||||||
|
"debuggable": true,
|
||||||
|
"copyFrom": "default",
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
},
|
||||||
|
"name": "debug"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"BUILD_PROFILE_OPT": {
|
||||||
|
"apiType": "stageMode",
|
||||||
|
"buildOption": {},
|
||||||
|
"buildOptionSet": [
|
||||||
|
{
|
||||||
|
"name": "release",
|
||||||
|
"arkOptions": {
|
||||||
|
"obfuscation": {
|
||||||
|
"ruleOptions": {
|
||||||
|
"enable": false,
|
||||||
|
"files": [
|
||||||
|
"./obfuscation-rules.txt"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"consumerFiles": [
|
||||||
|
"./consumer-rules.txt"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "default"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "debug"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"name": "default"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ohosTest"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"BUILD_CACHE_DIR": ""
|
||||||
|
},
|
||||||
|
"ohos-project": {
|
||||||
|
"SELECT_PRODUCT_NAME": "default",
|
||||||
|
"MODULE_BUILD_DIR": "/Users/gandanxiangzhao/Downloads/Expert/harmony/build",
|
||||||
|
"BUNDLE_NAME": "com.example.expert",
|
||||||
|
"BUILD_PATH": {
|
||||||
|
"OUTPUT_PATH": "/Users/gandanxiangzhao/Downloads/Expert/harmony/build/outputs/default"
|
||||||
|
},
|
||||||
|
"MODULES": [
|
||||||
|
{
|
||||||
|
"name": "default",
|
||||||
|
"srcPath": "/Users/gandanxiangzhao/Downloads/Expert/harmony/products/expert",
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"name": "default",
|
||||||
|
"applyToProducts": [
|
||||||
|
"default"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"belongProjectPath": "/Users/gandanxiangzhao/Downloads/Expert/harmony"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "uicomponents",
|
||||||
|
"srcPath": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/uicomponents",
|
||||||
|
"belongProjectPath": "/Users/gandanxiangzhao/Downloads/Expert/harmony"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "utils",
|
||||||
|
"srcPath": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/utils",
|
||||||
|
"belongProjectPath": "/Users/gandanxiangzhao/Downloads/Expert/harmony"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "mypage",
|
||||||
|
"srcPath": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/mypage",
|
||||||
|
"belongProjectPath": "/Users/gandanxiangzhao/Downloads/Expert/harmony"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "basic",
|
||||||
|
"srcPath": "/Users/gandanxiangzhao/Downloads/Expert/harmony/commons/basic",
|
||||||
|
"belongProjectPath": "/Users/gandanxiangzhao/Downloads/Expert/harmony"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Home",
|
||||||
|
"srcPath": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/Home",
|
||||||
|
"belongProjectPath": "/Users/gandanxiangzhao/Downloads/Expert/harmony"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "register",
|
||||||
|
"srcPath": "/Users/gandanxiangzhao/Downloads/Expert/harmony/features/register",
|
||||||
|
"belongProjectPath": "/Users/gandanxiangzhao/Downloads/Expert/harmony"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"PROFILE_OPT": {
|
||||||
|
"app": {
|
||||||
|
"signingConfigs": [],
|
||||||
|
"products": [
|
||||||
|
{
|
||||||
|
"name": "default",
|
||||||
|
"signingConfig": "default",
|
||||||
|
"compatibleSdkVersion": "5.0.2(14)",
|
||||||
|
"runtimeOS": "HarmonyOS",
|
||||||
|
"buildOption": {
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"buildModeSet": [
|
||||||
|
{
|
||||||
|
"name": "debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "release"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"modules": [
|
||||||
|
{
|
||||||
|
"name": "default",
|
||||||
|
"srcPath": "./products/expert",
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"name": "default",
|
||||||
|
"applyToProducts": [
|
||||||
|
"default"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "uicomponents",
|
||||||
|
"srcPath": "./commons/uicomponents"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "utils",
|
||||||
|
"srcPath": "./commons/utils"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "mypage",
|
||||||
|
"srcPath": "./features/mypage"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "basic",
|
||||||
|
"srcPath": "./commons/basic"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Home",
|
||||||
|
"srcPath": "./features/Home"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "register",
|
||||||
|
"srcPath": "./features/register"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CONFIG_PROPERTIES": {
|
||||||
|
"enableSignTask": true,
|
||||||
|
"skipNativeIncremental": false,
|
||||||
|
"hvigor.keepDependency": true
|
||||||
|
},
|
||||||
|
"OVERALL_PROJECT_PATHS": [
|
||||||
|
"/Users/gandanxiangzhao/Downloads/Expert/harmony"
|
||||||
|
],
|
||||||
|
"BUILD_CACHE_DIR": ""
|
||||||
|
},
|
||||||
|
"version": 1
|
||||||
|
}
|
||||||
10
AppScope/app.json5
Normal file
10
AppScope/app.json5
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"app": {
|
||||||
|
"bundleName": "com.example.expert",
|
||||||
|
"vendor": "example",
|
||||||
|
"versionCode": 1000000,
|
||||||
|
"versionName": "1.0.0",
|
||||||
|
"icon": "$media:layered_image",
|
||||||
|
"label": "$string:app_name"
|
||||||
|
}
|
||||||
|
}
|
||||||
8
AppScope/resources/base/element/string.json
Normal file
8
AppScope/resources/base/element/string.json
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"string": [
|
||||||
|
{
|
||||||
|
"name": "app_name",
|
||||||
|
"value": "Expert"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
BIN
AppScope/resources/base/media/background.png
Normal file
BIN
AppScope/resources/base/media/background.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 90 KiB |
BIN
AppScope/resources/base/media/foreground.png
Normal file
BIN
AppScope/resources/base/media/foreground.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.6 KiB |
7
AppScope/resources/base/media/layered_image.json
Normal file
7
AppScope/resources/base/media/layered_image.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"layered-image":
|
||||||
|
{
|
||||||
|
"background" : "$media:background",
|
||||||
|
"foreground" : "$media:foreground"
|
||||||
|
}
|
||||||
|
}
|
||||||
65
build-profile.json5
Normal file
65
build-profile.json5
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
{
|
||||||
|
"app": {
|
||||||
|
"signingConfigs": [],
|
||||||
|
"products": [
|
||||||
|
{
|
||||||
|
"name": "default",
|
||||||
|
"signingConfig": "default",
|
||||||
|
"compatibleSdkVersion": "5.0.2(14)",
|
||||||
|
"runtimeOS": "HarmonyOS",
|
||||||
|
"buildOption": {
|
||||||
|
"strictMode": {
|
||||||
|
"caseSensitiveCheck": true,
|
||||||
|
"useNormalizedOHMUrl": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"buildModeSet": [
|
||||||
|
{
|
||||||
|
"name": "debug",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "release"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"modules": [
|
||||||
|
{
|
||||||
|
"name": "default",
|
||||||
|
"srcPath": "./products/expert",
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"name": "default",
|
||||||
|
"applyToProducts": [
|
||||||
|
"default"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "uicomponents",
|
||||||
|
"srcPath": "./commons/uicomponents",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "utils",
|
||||||
|
"srcPath": "./commons/utils",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "mypage",
|
||||||
|
"srcPath": "./features/mypage"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "basic",
|
||||||
|
"srcPath": "./commons/basic",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Home",
|
||||||
|
"srcPath": "./features/Home",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "register",
|
||||||
|
"srcPath": "./features/register",
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
32
code-linter.json5
Normal file
32
code-linter.json5
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"files": [
|
||||||
|
"**/*.ets"
|
||||||
|
],
|
||||||
|
"ignore": [
|
||||||
|
"**/src/ohosTest/**/*",
|
||||||
|
"**/src/test/**/*",
|
||||||
|
"**/src/mock/**/*",
|
||||||
|
"**/node_modules/**/*",
|
||||||
|
"**/oh_modules/**/*",
|
||||||
|
"**/build/**/*",
|
||||||
|
"**/.preview/**/*"
|
||||||
|
],
|
||||||
|
"ruleSet": [
|
||||||
|
"plugin:@performance/recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended"
|
||||||
|
],
|
||||||
|
"rules": {
|
||||||
|
"@security/no-unsafe-aes": "error",
|
||||||
|
"@security/no-unsafe-hash": "error",
|
||||||
|
"@security/no-unsafe-mac": "warn",
|
||||||
|
"@security/no-unsafe-dh": "error",
|
||||||
|
"@security/no-unsafe-dsa": "error",
|
||||||
|
"@security/no-unsafe-ecdsa": "error",
|
||||||
|
"@security/no-unsafe-rsa-encrypt": "error",
|
||||||
|
"@security/no-unsafe-rsa-sign": "error",
|
||||||
|
"@security/no-unsafe-rsa-key": "error",
|
||||||
|
"@security/no-unsafe-dsa-key": "error",
|
||||||
|
"@security/no-unsafe-dh-key": "error",
|
||||||
|
"@security/no-unsafe-3des": "error"
|
||||||
|
}
|
||||||
|
}
|
||||||
6
commons/basic/.gitignore
vendored
Normal file
6
commons/basic/.gitignore
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
/node_modules
|
||||||
|
/oh_modules
|
||||||
|
/.preview
|
||||||
|
/build
|
||||||
|
/.cxx
|
||||||
|
/.test
|
||||||
17
commons/basic/BuildProfile.ets
Normal file
17
commons/basic/BuildProfile.ets
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
/**
|
||||||
|
* Use these variables when you tailor your ArkTS code. They must be of the const type.
|
||||||
|
*/
|
||||||
|
export const HAR_VERSION = '1.0.0';
|
||||||
|
export const BUILD_MODE_NAME = 'debug';
|
||||||
|
export const DEBUG = true;
|
||||||
|
export const TARGET_NAME = 'default';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* BuildProfile Class is used only for compatibility purposes.
|
||||||
|
*/
|
||||||
|
export default class BuildProfile {
|
||||||
|
static readonly HAR_VERSION = HAR_VERSION;
|
||||||
|
static readonly BUILD_MODE_NAME = BUILD_MODE_NAME;
|
||||||
|
static readonly DEBUG = DEBUG;
|
||||||
|
static readonly TARGET_NAME = TARGET_NAME;
|
||||||
|
}
|
||||||
27
commons/basic/Index.ets
Normal file
27
commons/basic/Index.ets
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
export { hdHttp, HdResponse } from './src/main/ets/utils/request'
|
||||||
|
|
||||||
|
export { authStore, HdUser, AUTH_STORE_KEY } from './src/main/ets/utils/auth'
|
||||||
|
|
||||||
|
export { logger } from './src/main/ets/utils/logger'
|
||||||
|
|
||||||
|
export { getTimeText, getPercentText } from './src/main/ets/utils/base'
|
||||||
|
|
||||||
|
export { themeManager } from './src/main/ets/utils/themeManager'
|
||||||
|
|
||||||
|
export { Base64Util } from './src/main/ets/utils/Base64Util'
|
||||||
|
|
||||||
|
export { ChangeUtil } from './src/main/ets/utils/ChangeUtil'
|
||||||
|
|
||||||
|
export { HdNav } from './src/main/ets/components/HdNav'
|
||||||
|
|
||||||
|
export { BasicConstant } from './src/main/ets/constants/BasicConstant'
|
||||||
|
|
||||||
|
export { preferenceStore } from './src/main/ets/utils/PreferenceStore'
|
||||||
|
|
||||||
|
export { LoginInfo,Data } from './src/main/ets/models/LoginInfoModel'
|
||||||
|
|
||||||
|
export { DataWebModel } from './src/main/ets/models/DataWebModel'
|
||||||
|
|
||||||
|
export { PromptActionClass } from './src/main/ets/components/PromptActionClass'
|
||||||
|
|
||||||
|
export { RequestDefaultModel } from './src/main/ets/models/RequestDefaultModel'
|
||||||
31
commons/basic/build-profile.json5
Normal file
31
commons/basic/build-profile.json5
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"apiType": "stageMode",
|
||||||
|
"buildOption": {
|
||||||
|
},
|
||||||
|
"buildOptionSet": [
|
||||||
|
{
|
||||||
|
"name": "release",
|
||||||
|
"arkOptions": {
|
||||||
|
"obfuscation": {
|
||||||
|
"ruleOptions": {
|
||||||
|
"enable": false,
|
||||||
|
"files": [
|
||||||
|
"./obfuscation-rules.txt"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"consumerFiles": [
|
||||||
|
"./consumer-rules.txt"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"name": "default"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ohosTest"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
0
commons/basic/consumer-rules.txt
Normal file
0
commons/basic/consumer-rules.txt
Normal file
6
commons/basic/hvigorfile.ts
Normal file
6
commons/basic/hvigorfile.ts
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import { harTasks } from '@ohos/hvigor-ohos-plugin';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
system: harTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
|
||||||
|
plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
|
||||||
|
}
|
||||||
23
commons/basic/obfuscation-rules.txt
Normal file
23
commons/basic/obfuscation-rules.txt
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# Define project specific obfuscation rules here.
|
||||||
|
# You can include the obfuscation configuration files in the current module's build-profile.json5.
|
||||||
|
#
|
||||||
|
# For more details, see
|
||||||
|
# https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5
|
||||||
|
|
||||||
|
# Obfuscation options:
|
||||||
|
# -disable-obfuscation: disable all obfuscations
|
||||||
|
# -enable-property-obfuscation: obfuscate the property names
|
||||||
|
# -enable-toplevel-obfuscation: obfuscate the names in the global scope
|
||||||
|
# -compact: remove unnecessary blank spaces and all line feeds
|
||||||
|
# -remove-log: remove all console.* statements
|
||||||
|
# -print-namecache: print the name cache that contains the mapping from the old names to new names
|
||||||
|
# -apply-namecache: reuse the given cache file
|
||||||
|
|
||||||
|
# Keep options:
|
||||||
|
# -keep-property-name: specifies property names that you want to keep
|
||||||
|
# -keep-global-name: specifies names that you want to keep in the global scope
|
||||||
|
|
||||||
|
-enable-property-obfuscation
|
||||||
|
-enable-toplevel-obfuscation
|
||||||
|
-enable-filename-obfuscation
|
||||||
|
-enable-export-obfuscation
|
||||||
9
commons/basic/oh-package.json5
Normal file
9
commons/basic/oh-package.json5
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"name": "@itcast/basic",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "Please describe the basic information.",
|
||||||
|
"main": "Index.ets",
|
||||||
|
"author": "",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {}
|
||||||
|
}
|
||||||
90
commons/basic/src/main/ets/components/HdNav.ets
Normal file
90
commons/basic/src/main/ets/components/HdNav.ets
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
import { router } from '@kit.ArkUI'
|
||||||
|
|
||||||
|
@Builder
|
||||||
|
function defaultBuilder(): void {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Component
|
||||||
|
export struct HdNav {
|
||||||
|
@StorageProp('topHeight')
|
||||||
|
topHeight: number = 0
|
||||||
|
@Prop
|
||||||
|
title: string = ''
|
||||||
|
@Prop
|
||||||
|
textColor: ResourceStr = $r('app.color.top_title')
|
||||||
|
@Prop
|
||||||
|
bgColor: ResourceStr = $r('app.color.top_bg')
|
||||||
|
@Prop
|
||||||
|
hasBorder: boolean = false
|
||||||
|
@Prop
|
||||||
|
leftIcon: ResourceStr = $r('app.media.top_back')
|
||||||
|
@Prop
|
||||||
|
rightIcon: ResourceStr = $r('sys.media.ohos_ic_public_more')
|
||||||
|
@Prop
|
||||||
|
showRightIcon: boolean = true
|
||||||
|
@Prop
|
||||||
|
showLeftIcon: boolean = true
|
||||||
|
@Prop
|
||||||
|
showRightText: boolean = false
|
||||||
|
@Prop
|
||||||
|
rightText: string = ''
|
||||||
|
@BuilderParam
|
||||||
|
titleBuilder: () => void = defaultBuilder
|
||||||
|
@BuilderParam
|
||||||
|
menuBuilder: () => void = defaultBuilder
|
||||||
|
|
||||||
|
build() {
|
||||||
|
Row({ space: 16 }) {
|
||||||
|
if (this.showLeftIcon) {
|
||||||
|
Image(this.leftIcon)
|
||||||
|
.size({ width: 24, height: 24 })
|
||||||
|
.margin({left:-5})
|
||||||
|
.onClick(() => router.back())
|
||||||
|
.fillColor($r('app.color.black'))
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Blank()
|
||||||
|
.width(24)
|
||||||
|
}
|
||||||
|
Row() {
|
||||||
|
if (this.title) {
|
||||||
|
Text(this.title)
|
||||||
|
.fontWeight(600)
|
||||||
|
.layoutWeight(1)
|
||||||
|
.textAlign(TextAlign.Center)
|
||||||
|
.fontSize(20)
|
||||||
|
.fontColor(this.textColor)
|
||||||
|
.maxLines(1)
|
||||||
|
.textOverflow({ overflow: TextOverflow.Ellipsis })
|
||||||
|
} else if (this.titleBuilder) {
|
||||||
|
this.titleBuilder()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.height(56)
|
||||||
|
.layoutWeight(1)
|
||||||
|
|
||||||
|
if (this.showRightIcon) {
|
||||||
|
Image(this.rightIcon)
|
||||||
|
.size({ width: 24, height: 24 })
|
||||||
|
.objectFit(ImageFit.Contain)
|
||||||
|
.bindMenu(this.menuBuilder)
|
||||||
|
} else if (this.showRightText)
|
||||||
|
{
|
||||||
|
Text(this.rightText)
|
||||||
|
.fontSize(16)
|
||||||
|
.fontColor(this.textColor)
|
||||||
|
.margin({right:10})
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Blank()
|
||||||
|
.width(24)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.padding({ left: 16, right: 16, top: this.topHeight })
|
||||||
|
.height(56 + this.topHeight)
|
||||||
|
.width('100%')
|
||||||
|
.backgroundColor(this.bgColor)
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
24
commons/basic/src/main/ets/components/HdWeb.ets
Normal file
24
commons/basic/src/main/ets/components/HdWeb.ets
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
import { webview } from '@kit.ArkWeb'
|
||||||
|
import { logger } from '../utils/logger'
|
||||||
|
|
||||||
|
@Component
|
||||||
|
export struct HdWeb {
|
||||||
|
layoutMode: WebLayoutMode = WebLayoutMode.NONE
|
||||||
|
src: ResourceStr = $rawfile('detail.html')
|
||||||
|
onLoad: () => void = () => {
|
||||||
|
}
|
||||||
|
controller: webview.WebviewController = new webview.WebviewController()
|
||||||
|
|
||||||
|
build() {
|
||||||
|
Web({ src: this.src, controller: this.controller })
|
||||||
|
.javaScriptAccess(true)
|
||||||
|
.onPageEnd(() => {
|
||||||
|
this.onLoad()
|
||||||
|
})
|
||||||
|
.onErrorReceive(event => {
|
||||||
|
logger.error(event!.error.getErrorInfo())
|
||||||
|
})
|
||||||
|
.layoutMode(this.layoutMode)
|
||||||
|
.layoutWeight(1)
|
||||||
|
}
|
||||||
|
}
|
||||||
62
commons/basic/src/main/ets/components/PromptActionClass.ets
Normal file
62
commons/basic/src/main/ets/components/PromptActionClass.ets
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
import { BusinessError } from '@kit.BasicServicesKit';
|
||||||
|
import { ComponentContent, promptAction, UIContext } from '@kit.ArkUI';
|
||||||
|
|
||||||
|
export class PromptActionClass {
|
||||||
|
static ctx: UIContext;
|
||||||
|
static contentNode: ComponentContent<Object>;
|
||||||
|
static options: promptAction.BaseDialogOptions;
|
||||||
|
|
||||||
|
static setContext(context: UIContext) {
|
||||||
|
PromptActionClass.ctx = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
static setContentNode(node: ComponentContent<Object>) {
|
||||||
|
PromptActionClass.contentNode = node;
|
||||||
|
}
|
||||||
|
|
||||||
|
static setOptions(options: promptAction.BaseDialogOptions) {
|
||||||
|
PromptActionClass.options = options;
|
||||||
|
}
|
||||||
|
|
||||||
|
static openDialog() {
|
||||||
|
if (PromptActionClass.contentNode !== null) {
|
||||||
|
PromptActionClass.ctx.getPromptAction().openCustomDialog(PromptActionClass.contentNode, PromptActionClass.options)
|
||||||
|
.then(() => {
|
||||||
|
console.info('OpenCustomDialog complete.')
|
||||||
|
})
|
||||||
|
.catch((error: BusinessError) => {
|
||||||
|
let message = (error as BusinessError).message;
|
||||||
|
let code = (error as BusinessError).code;
|
||||||
|
console.error(`OpenCustomDialog args error code is ${code}, message is ${message}`);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static closeDialog() {
|
||||||
|
if (PromptActionClass.contentNode !== null) {
|
||||||
|
PromptActionClass.ctx.getPromptAction().closeCustomDialog(PromptActionClass.contentNode)
|
||||||
|
.then(() => {
|
||||||
|
console.info('CloseCustomDialog complete.')
|
||||||
|
})
|
||||||
|
.catch((error: BusinessError) => {
|
||||||
|
let message = (error as BusinessError).message;
|
||||||
|
let code = (error as BusinessError).code;
|
||||||
|
console.error(`CloseCustomDialog args error code is ${code}, message is ${message}`);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static updateDialog(options: promptAction.BaseDialogOptions) {
|
||||||
|
if (PromptActionClass.contentNode !== null) {
|
||||||
|
PromptActionClass.ctx.getPromptAction().updateCustomDialog(PromptActionClass.contentNode, options)
|
||||||
|
.then(() => {
|
||||||
|
console.info('UpdateCustomDialog complete.')
|
||||||
|
})
|
||||||
|
.catch((error: BusinessError) => {
|
||||||
|
let message = (error as BusinessError).message;
|
||||||
|
let code = (error as BusinessError).code;
|
||||||
|
console.error(`UpdateCustomDialog args error code is ${code}, message is ${message}`);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
18
commons/basic/src/main/ets/constants/BasicConstant.ets
Normal file
18
commons/basic/src/main/ets/constants/BasicConstant.ets
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
export class BasicConstant {
|
||||||
|
static readonly SPACE_SM = 4
|
||||||
|
static readonly SPACE_MD = 10
|
||||||
|
static readonly SPACE_LG = 16
|
||||||
|
static readonly getyyzc="https://doc.igandan.com/app/integral/permission_expert.html";//隐私政策
|
||||||
|
static readonly getzcxy = "http://app.igandan.com/expert_zcxy.jsp";// 注册协议正式地址
|
||||||
|
|
||||||
|
//测试环境
|
||||||
|
static readonly urlimage = "https://dev-app.igandan.com/app/";
|
||||||
|
static readonly urlmyLan = "https://dev-app.igandan.com/app/expertAPI/";
|
||||||
|
static readonly urlapp = "https://dev-app.igandan.com//app/expertApp/"
|
||||||
|
static readonly urlHtml = "http://dev-doc.igandan.com/app/"
|
||||||
|
static readonly imageHeader = "http://doc.igandan.com/app/"
|
||||||
|
static readonly urlExpert = "https://dev-app.igandan.com/app/expert/"
|
||||||
|
|
||||||
|
|
||||||
|
static readonly getStartpage=BasicConstant.urlapp + "startpage";
|
||||||
|
}
|
||||||
4
commons/basic/src/main/ets/models/DataWebModel.ets
Normal file
4
commons/basic/src/main/ets/models/DataWebModel.ets
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export class DataWebModel {
|
||||||
|
url: string = '';
|
||||||
|
title: string = '';
|
||||||
|
}
|
||||||
55
commons/basic/src/main/ets/models/LoginInfoModel.ets
Normal file
55
commons/basic/src/main/ets/models/LoginInfoModel.ets
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
import { List } from '@kit.ArkTS';
|
||||||
|
export interface LoginInfo{
|
||||||
|
special: List<SpecialDisease> ;
|
||||||
|
YX_accid:string ;
|
||||||
|
code:string;
|
||||||
|
data:Data;
|
||||||
|
YX_token:string;
|
||||||
|
nginxPath:string;
|
||||||
|
message:string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface SpecialDisease{
|
||||||
|
diseaseName:string;
|
||||||
|
diseaseUuid:string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Data{
|
||||||
|
isEnable:number;
|
||||||
|
isVisit:number;
|
||||||
|
modifyDate:string;
|
||||||
|
currentSpec:string;
|
||||||
|
deviceType:number;
|
||||||
|
currentType:number;
|
||||||
|
deviceSpec:string;
|
||||||
|
positionName:string;
|
||||||
|
userName:string;
|
||||||
|
createDate:string;
|
||||||
|
password:string;
|
||||||
|
officeName:string;
|
||||||
|
certificateImg:string;
|
||||||
|
birthDate:string;
|
||||||
|
isStar:number;
|
||||||
|
countyId:number;
|
||||||
|
cityId:number;
|
||||||
|
email:string;
|
||||||
|
photo:string;
|
||||||
|
qrcode:string;
|
||||||
|
mobile:string;
|
||||||
|
hospitalName:string;
|
||||||
|
officeUuid:string;
|
||||||
|
checkInfo:string;
|
||||||
|
hospitalUuid:string;
|
||||||
|
officePhone:string;
|
||||||
|
positionUuid:string;
|
||||||
|
nation:number;
|
||||||
|
wechat_qrcode:string;
|
||||||
|
sex:number;
|
||||||
|
provId:number;
|
||||||
|
uuid:string;
|
||||||
|
intro:string;
|
||||||
|
certificate:string;
|
||||||
|
state:number;
|
||||||
|
realName:string;
|
||||||
|
specialy:Array<object>;
|
||||||
|
}
|
||||||
13
commons/basic/src/main/ets/models/RequestDefaultModel.ets
Normal file
13
commons/basic/src/main/ets/models/RequestDefaultModel.ets
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
export interface RequestDefaultModel{
|
||||||
|
code:string;
|
||||||
|
data:DefaulyData[];
|
||||||
|
message:string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface DefaulyData {
|
||||||
|
'officeName':string;
|
||||||
|
'officeUuid':string;
|
||||||
|
'name':string;
|
||||||
|
'uuid':string;
|
||||||
|
}
|
||||||
84
commons/basic/src/main/ets/utils/Base64Util.ets
Normal file
84
commons/basic/src/main/ets/utils/Base64Util.ets
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
import util from '@ohos.util';
|
||||||
|
|
||||||
|
import { buffer } from '@kit.ArkTS';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base64 工具类
|
||||||
|
* author: 鸿蒙布道师
|
||||||
|
* since: 2025/03/31
|
||||||
|
*/
|
||||||
|
export class Base64Util {
|
||||||
|
/**
|
||||||
|
* 创建 Base64Helper 实例
|
||||||
|
* @returns Base64Helper 实例
|
||||||
|
*/
|
||||||
|
private static createBase64Helper(): util.Base64Helper {
|
||||||
|
return new util.Base64Helper();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编码为 Uint8Array(异步)
|
||||||
|
* @param array 输入的 Uint8Array 数据
|
||||||
|
* @returns 编码后的 Uint8Array 对象
|
||||||
|
*/
|
||||||
|
static encode(array: Uint8Array): Promise<Uint8Array> {
|
||||||
|
const base64 = Base64Util.createBase64Helper();
|
||||||
|
return base64.encode(array);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编码为 Uint8Array(同步)
|
||||||
|
* @param array 输入的 Uint8Array 数据
|
||||||
|
* @returns 编码后的 Uint8Array 对象
|
||||||
|
*/
|
||||||
|
static encodeSync(array: Uint8Array): Uint8Array {
|
||||||
|
const base64 = Base64Util.createBase64Helper();
|
||||||
|
return base64.encodeSync(array);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编码为字符串(异步)
|
||||||
|
* @param array 输入的 Uint8Array 数据
|
||||||
|
* @param options 可选参数
|
||||||
|
* @returns 编码后的字符串
|
||||||
|
*/
|
||||||
|
static encodeToStr(array: Uint8Array, options?: util.Type): Promise<string> {
|
||||||
|
const base64 = Base64Util.createBase64Helper();
|
||||||
|
return base64.encodeToString(array, options);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编码为字符串(同步)
|
||||||
|
* @param array 输入的 Uint8Array 数据
|
||||||
|
* @param options 可选参数
|
||||||
|
* @returns 编码后的字符串
|
||||||
|
*/
|
||||||
|
static encodeToStrSync(keyValueStr:string): string {
|
||||||
|
let array: Uint8Array=new Uint8Array(buffer.from(keyValueStr, 'utf-8').buffer)
|
||||||
|
const base64 = Base64Util.createBase64Helper();
|
||||||
|
|
||||||
|
return base64.encodeToStringSync(array, util.Type.BASIC).replaceAll("=", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解码为 Uint8Array(异步)
|
||||||
|
* @param input 输入的 Uint8Array 或字符串
|
||||||
|
* @param options 可选参数
|
||||||
|
* @returns 解码后的 Uint8Array 对象
|
||||||
|
*/
|
||||||
|
static decode(input: Uint8Array | string, options?: util.Type): Promise<Uint8Array> {
|
||||||
|
const base64 = Base64Util.createBase64Helper();
|
||||||
|
return base64.decode(input, options);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解码为 Uint8Array(同步)
|
||||||
|
* @param input 输入的 Uint8Array 或字符串
|
||||||
|
* @param options 可选参数
|
||||||
|
* @returns 解码后的 Uint8Array 对象
|
||||||
|
*/
|
||||||
|
static decodeSync(input: Uint8Array | string, options?: util.Type): Uint8Array {
|
||||||
|
const base64 = Base64Util.createBase64Helper();
|
||||||
|
return base64.decodeSync(input, options);
|
||||||
|
}
|
||||||
|
}
|
||||||
58
commons/basic/src/main/ets/utils/ChangeUtil.ets
Normal file
58
commons/basic/src/main/ets/utils/ChangeUtil.ets
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
import HashMap from '@ohos.util.HashMap';
|
||||||
|
import { Base64Util } from './Base64Util';
|
||||||
|
import { CryptoJS } from '@ohos/crypto-js';
|
||||||
|
|
||||||
|
|
||||||
|
export class ChangeUtil {
|
||||||
|
/**
|
||||||
|
* 将HashMap转成JsonString
|
||||||
|
* @param map
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
static map2Json(map:HashMap<string, string>): string {
|
||||||
|
let jsonObject: Record<string, Object> = {};
|
||||||
|
map.forEach((value, key) => {
|
||||||
|
if(key != undefined && value != undefined){
|
||||||
|
jsonObject[key] = value;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return JSON.stringify(jsonObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
static getSign(extraDatas1: HashMap<string, string>, secret: string): string {
|
||||||
|
if(secret!=null) {
|
||||||
|
let keyValueStr: string = "";
|
||||||
|
let entriesArray: Array<string> = Array.from(extraDatas1.keys());
|
||||||
|
entriesArray.sort();
|
||||||
|
|
||||||
|
let sortedMap:HashMap<string, string> = new HashMap();
|
||||||
|
entriesArray.forEach((value: string, index: number) => {
|
||||||
|
sortedMap.set(value,extraDatas1.get(value));
|
||||||
|
keyValueStr +=value+extraDatas1.get(value)
|
||||||
|
});
|
||||||
|
keyValueStr = keyValueStr.replace(" ", "");
|
||||||
|
keyValueStr = keyValueStr + CryptoJS.MD5(secret).toString();
|
||||||
|
let Md5keyValueStr: string = CryptoJS.MD5(keyValueStr).toString();
|
||||||
|
let base64Str:string=Base64Util.encodeToStrSync(Md5keyValueStr);
|
||||||
|
return base64Str;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static isMobileNum(mobiles:string): boolean {
|
||||||
|
const reg2: RegExp = new RegExp('^(1[3-9])[0-9]{9}$')
|
||||||
|
|
||||||
|
return reg2.test(mobiles);
|
||||||
|
}
|
||||||
|
static isPassword(password:string): boolean {
|
||||||
|
const reg2: RegExp = new RegExp('^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$')
|
||||||
|
|
||||||
|
return reg2.test(password);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
44
commons/basic/src/main/ets/utils/PreferenceStore.ets
Normal file
44
commons/basic/src/main/ets/utils/PreferenceStore.ets
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import { preferences } from '@kit.ArkData'
|
||||||
|
|
||||||
|
class PreferenceStore {
|
||||||
|
KEY = 'gdxz_config'
|
||||||
|
store: preferences.Preferences | null = null
|
||||||
|
|
||||||
|
getStore() {
|
||||||
|
if (!this.store) {
|
||||||
|
this.store = preferences.getPreferencesSync(getContext(), { name: this.KEY })
|
||||||
|
}
|
||||||
|
return this.store
|
||||||
|
}
|
||||||
|
setItemString(keyword: string,value:string) {
|
||||||
|
this.getStore().putSync(keyword, value)
|
||||||
|
this.getStore().flush()
|
||||||
|
}
|
||||||
|
setItemBoolean(keyword: string,value:boolean) {
|
||||||
|
this.getStore().putSync(keyword, value)
|
||||||
|
this.getStore().flush()
|
||||||
|
}
|
||||||
|
delItem(keyword: string) {
|
||||||
|
this.getStore().deleteSync(keyword)
|
||||||
|
this.getStore().flush()
|
||||||
|
}
|
||||||
|
getItemString(keyword: string) {
|
||||||
|
return this.getStore().getSync(keyword,'')
|
||||||
|
}
|
||||||
|
getItemBooleanT(keyword: string):boolean {
|
||||||
|
return this.getStore().getSync(keyword,true) as boolean
|
||||||
|
}
|
||||||
|
getItemBooleanF(keyword: string):boolean {
|
||||||
|
return this.getStore().getSync(keyword,false) as boolean
|
||||||
|
}
|
||||||
|
clear() {
|
||||||
|
this.getStore().clearSync()
|
||||||
|
}
|
||||||
|
|
||||||
|
getAll() {
|
||||||
|
const obj = this.getStore().getAllSync()
|
||||||
|
return Object.keys(obj)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export const preferenceStore = new PreferenceStore()
|
||||||
73
commons/basic/src/main/ets/utils/auth.ets
Normal file
73
commons/basic/src/main/ets/utils/auth.ets
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
import { preferences } from '@kit.ArkData'
|
||||||
|
import { router } from '@kit.ArkUI'
|
||||||
|
import { Data } from '../models/LoginInfoModel'
|
||||||
|
|
||||||
|
export interface HdUser {
|
||||||
|
id: string
|
||||||
|
username: string
|
||||||
|
avatar: string
|
||||||
|
token: string
|
||||||
|
refreshToken: string
|
||||||
|
nickName?: string
|
||||||
|
totalTime?: number
|
||||||
|
clockinNumbers?: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export const AUTH_STORE_KEY = 'authStore'
|
||||||
|
|
||||||
|
class AuthStore {
|
||||||
|
store: preferences.Preferences | null = null
|
||||||
|
|
||||||
|
getStore() {
|
||||||
|
if (!this.store) {
|
||||||
|
this.store = preferences.getPreferencesSync(getContext(), { name: AUTH_STORE_KEY })
|
||||||
|
}
|
||||||
|
return this.store
|
||||||
|
}
|
||||||
|
|
||||||
|
async setUser(user: Data) {
|
||||||
|
AppStorage.setOrCreate('user', user)
|
||||||
|
await this.getStore().put(AUTH_STORE_KEY, JSON.stringify(user))
|
||||||
|
await this.getStore().flush()
|
||||||
|
}
|
||||||
|
|
||||||
|
async delUser() {
|
||||||
|
AppStorage.setOrCreate('user', {})
|
||||||
|
await this.getStore().put(AUTH_STORE_KEY, '{}')
|
||||||
|
await this.getStore().flush()
|
||||||
|
}
|
||||||
|
|
||||||
|
initUser() {
|
||||||
|
const json = this.getStore().getSync(AUTH_STORE_KEY, '{}') as string
|
||||||
|
AppStorage.setOrCreate('user', JSON.parse(json))
|
||||||
|
}
|
||||||
|
|
||||||
|
getUser() {
|
||||||
|
return AppStorage.get<Data>('user') || {} as Data
|
||||||
|
}
|
||||||
|
|
||||||
|
checkAuth(options: router.RouterOptions | Function) {
|
||||||
|
// if (this.getUser().token) {
|
||||||
|
// if (typeof options === 'function') {
|
||||||
|
// options()
|
||||||
|
// } else {
|
||||||
|
// router.pushUrl(options)
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// if (typeof options === 'function') {
|
||||||
|
// router.pushUrl({
|
||||||
|
// url: 'pages/LoginPage',
|
||||||
|
// })
|
||||||
|
// } else {
|
||||||
|
// const params = options.params as Record<string, string> || {}
|
||||||
|
// params.return_path = options.url
|
||||||
|
// router.pushUrl({
|
||||||
|
// url: 'pages/LoginPage',
|
||||||
|
// params: params
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export const authStore = new AuthStore()
|
||||||
10
commons/basic/src/main/ets/utils/base.ets
Normal file
10
commons/basic/src/main/ets/utils/base.ets
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
export const getTimeText = (time: number = 0, hasUnit = true) => {
|
||||||
|
if (time < 3600) {
|
||||||
|
return String(Math.floor(time / 60)) + (hasUnit ? ' 分钟' : '')
|
||||||
|
} else {
|
||||||
|
return String(Math.round(time / 3600 * 10) / 10) + (hasUnit ? ' 小时' : '')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getPercentText =
|
||||||
|
(value: number, total: number) => Math.round(value / total * 100) + '%'
|
||||||
289
commons/basic/src/main/ets/utils/expert_request.ets
Normal file
289
commons/basic/src/main/ets/utils/expert_request.ets
Normal file
@ -0,0 +1,289 @@
|
|||||||
|
import { http } from '@kit.NetworkKit';
|
||||||
|
import { authStore } from './auth';
|
||||||
|
import { promptAction, router } from '@kit.ArkUI';
|
||||||
|
import { BusinessError } from '@ohos.base';
|
||||||
|
import { logger } from './logger';
|
||||||
|
import { HashMap } from '@kit.ArkTS';
|
||||||
|
import { CryptoJS } from '@ohos/crypto-js'
|
||||||
|
import { Base64Util } from './Base64Util';
|
||||||
|
import { ChangeUtil } from './ChangeUtil'
|
||||||
|
|
||||||
|
interface HdRequestOptions {
|
||||||
|
baseURL?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
type HdParams = Record<string, string | number | boolean>
|
||||||
|
|
||||||
|
export interface HdResponse<T> {
|
||||||
|
code: number
|
||||||
|
message: string
|
||||||
|
data: T
|
||||||
|
}
|
||||||
|
export interface TimestampBean {
|
||||||
|
timestamp:string
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
class HdHttp {
|
||||||
|
baseURL: string
|
||||||
|
|
||||||
|
constructor(options: HdRequestOptions) {
|
||||||
|
this.baseURL = options.baseURL || ''
|
||||||
|
}
|
||||||
|
|
||||||
|
private request1<T>(path: string, method: http.RequestMethod = http.RequestMethod.GET, extraDatas:HashMap<string, string>) {
|
||||||
|
const httpInstance = http.createHttp()
|
||||||
|
let fullUrl = this.baseURL + path
|
||||||
|
let promise = httpInstance.request(
|
||||||
|
// 请求url地址
|
||||||
|
fullUrl,
|
||||||
|
{
|
||||||
|
// 请求方式
|
||||||
|
method: http.RequestMethod.POST,
|
||||||
|
// 可选,默认为60s
|
||||||
|
connectTimeout: 60000,
|
||||||
|
// 可选,默认为60s
|
||||||
|
readTimeout: 60000,
|
||||||
|
// 开发者根据自身业务需要添加header字段
|
||||||
|
header: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
'sign':this.getSign(extraDatas)
|
||||||
|
},
|
||||||
|
extraData:ChangeUtil.map2Json(extraDatas)
|
||||||
|
});
|
||||||
|
logger.info('Response JSON.stringify(extraDatas)' + ChangeUtil.map2Json(extraDatas))
|
||||||
|
return promise.then((data) => {
|
||||||
|
logger.info('Response request:' + data.result);
|
||||||
|
if (data.result) {
|
||||||
|
const result = data.result as HdResponse<T>
|
||||||
|
logger.info('Response result:' + result);
|
||||||
|
return result
|
||||||
|
|
||||||
|
}
|
||||||
|
return Promise.reject(data.result)
|
||||||
|
// if (data.responseCode === http.ResponseCode.OK) {
|
||||||
|
// console.info('Response request:' + data.result);
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// return Promise.reject(data.result)
|
||||||
|
}
|
||||||
|
|
||||||
|
).catch((err:BusinessError) => {
|
||||||
|
logger.info('Response httpReq request:' + JSON.stringify(err));
|
||||||
|
return Promise.reject(err)
|
||||||
|
|
||||||
|
}).finally(() => {
|
||||||
|
httpInstance.destroy()
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
private request<T>(path: string, method: http.RequestMethod = http.RequestMethod.POST, extraDatas :HashMap<string, string>) {
|
||||||
|
const httpInstance = http.createHttp()
|
||||||
|
|
||||||
|
const options: http.HttpRequestOptions = {
|
||||||
|
method: http.RequestMethod.POST,
|
||||||
|
// 可选,默认为60s
|
||||||
|
connectTimeout: 60000,
|
||||||
|
// 可选,默认为60s
|
||||||
|
readTimeout: 60000,
|
||||||
|
// 开发者根据自身业务需要添加header字段
|
||||||
|
header: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
'sign':this.getSign(extraDatas)
|
||||||
|
},
|
||||||
|
extraData:ChangeUtil.map2Json(extraDatas)
|
||||||
|
}
|
||||||
|
|
||||||
|
let fullUrl = this.baseURL + path
|
||||||
|
|
||||||
|
|
||||||
|
return httpInstance.request(fullUrl, options).then((res) => {
|
||||||
|
logger.info('Response fullUrl:' +fullUrl+ res.result);
|
||||||
|
const result = res.result as HdResponse<T>
|
||||||
|
return result
|
||||||
|
}).catch((err: BusinessError) => {
|
||||||
|
logger.info(fullUrl+`Response succeeded: ${err}`);
|
||||||
|
promptAction.showToast({ message: err.message || '网络错误' })
|
||||||
|
return Promise.reject(err)
|
||||||
|
}).finally(() => {
|
||||||
|
httpInstance.destroy()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private requestafter<T>(path: string, method: http.RequestMethod = http.RequestMethod.GET, extraData?: Object) {
|
||||||
|
const httpInstance = http.createHttp()
|
||||||
|
|
||||||
|
const options: http.HttpRequestOptions = {
|
||||||
|
method: http.RequestMethod.GET,
|
||||||
|
// 可选,默认为60s
|
||||||
|
connectTimeout: 60000,
|
||||||
|
// 可选,默认为60s
|
||||||
|
readTimeout: 60000,
|
||||||
|
// 开发者根据自身业务需要添加header字段
|
||||||
|
header: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let fullUrl = this.baseURL + path
|
||||||
|
if (method === http.RequestMethod.GET && extraData) {
|
||||||
|
const strArr = Object.keys(extraData)
|
||||||
|
.filter(key => (extraData as HdParams)[key] !== undefined)
|
||||||
|
.map(key => `${key}=${(extraData as HdParams)[key]}`)
|
||||||
|
fullUrl += `?${strArr.join('&')}`
|
||||||
|
} else {
|
||||||
|
options.extraData = extraData
|
||||||
|
}
|
||||||
|
|
||||||
|
return httpInstance.request(fullUrl, options).then((res) => {
|
||||||
|
return Promise.reject(res.result)
|
||||||
|
}).catch((err: BusinessError) => {
|
||||||
|
logger.error(fullUrl+`Response succeeded: ${err}+${err.name}+${err.message}+${err.data}+${err.stack}`);
|
||||||
|
// logger.error(fullUrl, err.code?.toString(), err.message)
|
||||||
|
promptAction.showToast({ message: err.message || '网络错误' })
|
||||||
|
return Promise.reject(err)
|
||||||
|
}).finally(() => {
|
||||||
|
httpInstance.destroy()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
get<T>(url: string, data?: Object): Promise<HdResponse<T>> {
|
||||||
|
return this.requestafter<T>(url, http.RequestMethod.GET, data)
|
||||||
|
}
|
||||||
|
|
||||||
|
post<T>(url: string, data?: Object): Promise<HdResponse<T>> {
|
||||||
|
return this.requestafter<T>(url, http.RequestMethod.POST, data)
|
||||||
|
}
|
||||||
|
|
||||||
|
put<T>(url: string, data?: Object): Promise<HdResponse<T>> {
|
||||||
|
return this.requestafter<T>(url, http.RequestMethod.PUT, data)
|
||||||
|
}
|
||||||
|
|
||||||
|
delete<T>(url: string, data?: Object): Promise<HdResponse<T>> {
|
||||||
|
return this.requestafter<T>(url, http.RequestMethod.DELETE, data)
|
||||||
|
}
|
||||||
|
posts<T>(url: string, data: HashMap<string, string>): Promise<HdResponse<T>> {
|
||||||
|
return this.request<T>(url, http.RequestMethod.POST, data)
|
||||||
|
}
|
||||||
|
httpReq<T>(url: string, datas: HashMap<string, string>): Promise<HdResponse<T>> {
|
||||||
|
|
||||||
|
// 创建httpRequest对象。
|
||||||
|
let httpRequest = http.createHttp();
|
||||||
|
let url1 = "https://dev-app.igandan.com/app/manager/getSystemTimeStamp";
|
||||||
|
let promise = httpRequest.request(
|
||||||
|
// 请求url地址
|
||||||
|
url1,
|
||||||
|
{
|
||||||
|
// 请求方式
|
||||||
|
method: http.RequestMethod.GET,
|
||||||
|
// 可选,默认为60s
|
||||||
|
connectTimeout: 60000,
|
||||||
|
// 可选,默认为60s
|
||||||
|
readTimeout: 60000,
|
||||||
|
// 开发者根据自身业务需要添加header字段
|
||||||
|
header: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 处理响应结果。
|
||||||
|
return promise.then((data) => {
|
||||||
|
if (data.responseCode === http.ResponseCode.OK) {
|
||||||
|
logger.info('Response httpReq:' + data.result);
|
||||||
|
let json:TimestampBean = JSON.parse(data.result.toString()) as TimestampBean;
|
||||||
|
let tp = json.timestamp;
|
||||||
|
datas.set("user_uuid", '');
|
||||||
|
datas.set("client_type", 'A');
|
||||||
|
datas.set("version",'4.0.0' );
|
||||||
|
datas.set('timestamp',tp+'');
|
||||||
|
|
||||||
|
return this.posts<T>(url, datas);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return this.posts<T>(url, datas);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
).catch((err:BusinessError) => {
|
||||||
|
logger.info('Response httpReq error:' + JSON.stringify(err));
|
||||||
|
return Promise.reject(err);
|
||||||
|
|
||||||
|
}).finally(() => {
|
||||||
|
httpRequest.destroy()
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
httpReqSimply<T>(url: string) {
|
||||||
|
|
||||||
|
// 创建httpRequest对象。
|
||||||
|
let httpRequest = http.createHttp();
|
||||||
|
|
||||||
|
let promise = httpRequest.request(
|
||||||
|
// 请求url地址
|
||||||
|
url,
|
||||||
|
{
|
||||||
|
// 请求方式
|
||||||
|
method: http.RequestMethod.POST,
|
||||||
|
// 可选,默认为60s
|
||||||
|
connectTimeout: 60000,
|
||||||
|
// 可选,默认为60s
|
||||||
|
readTimeout: 60000,
|
||||||
|
// 开发者根据自身业务需要添加header字段
|
||||||
|
header: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 处理响应结果。
|
||||||
|
return promise.then((data) => {
|
||||||
|
logger.info('Response httpReqSimply:' + JSON.stringify(data));
|
||||||
|
const result = data.result as HdResponse<T>
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
|
).catch((err:BusinessError) => {
|
||||||
|
logger.info('Response httpReq error:' + JSON.stringify(err));
|
||||||
|
return Promise.reject(err);
|
||||||
|
|
||||||
|
}).finally(() => {
|
||||||
|
httpRequest.destroy()
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
getSign(extraDatas1:HashMap<string, string>): string {
|
||||||
|
let secret= extraDatas1.get("timestamp")
|
||||||
|
if(secret!=null) {
|
||||||
|
let keyValueStr: string = "";
|
||||||
|
let entriesArray: Array<string> = Array.from(extraDatas1.keys());
|
||||||
|
entriesArray.sort();
|
||||||
|
|
||||||
|
let sortedMap:HashMap<string, string> = new HashMap();
|
||||||
|
entriesArray.forEach((value: string, index: number) => {
|
||||||
|
sortedMap.set(value,extraDatas1.get(value));
|
||||||
|
keyValueStr +=value+extraDatas1.get(value)
|
||||||
|
});
|
||||||
|
keyValueStr = keyValueStr.replace(" ", "");
|
||||||
|
keyValueStr = keyValueStr + CryptoJS.MD5(secret).toString();
|
||||||
|
let Md5keyValueStr: string = CryptoJS.MD5(keyValueStr).toString();
|
||||||
|
let base64Str:string=Base64Util.encodeToStrSync(Md5keyValueStr);
|
||||||
|
return base64Str;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export const hdHttp = new HdHttp({ baseURL: '' })
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
33
commons/basic/src/main/ets/utils/logger.ets
Normal file
33
commons/basic/src/main/ets/utils/logger.ets
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
import hilog from '@ohos.hilog'
|
||||||
|
|
||||||
|
const DOMAIN = 0xFF09
|
||||||
|
const PREFIX = 'PASS_INTERVIEW_LOGGER'
|
||||||
|
const FORMAT = '%{public}s, %{public}s'
|
||||||
|
|
||||||
|
class Logger {
|
||||||
|
debug(...args: string[]) {
|
||||||
|
hilog.debug(DOMAIN, PREFIX, FORMAT, args)
|
||||||
|
}
|
||||||
|
|
||||||
|
info(...args: string[]) {
|
||||||
|
hilog.info(DOMAIN, PREFIX, FORMAT, args)
|
||||||
|
}
|
||||||
|
|
||||||
|
warn(...args: string[]) {
|
||||||
|
hilog.warn(DOMAIN, PREFIX, FORMAT, args)
|
||||||
|
}
|
||||||
|
|
||||||
|
error(...args: string[]) {
|
||||||
|
hilog.error(DOMAIN, PREFIX, FORMAT, args)
|
||||||
|
}
|
||||||
|
|
||||||
|
fatal(...args: string[]) {
|
||||||
|
hilog.fatal(DOMAIN, PREFIX, FORMAT, args)
|
||||||
|
}
|
||||||
|
|
||||||
|
isLoggable(level: hilog.LogLevel) {
|
||||||
|
hilog.isLoggable(DOMAIN, PREFIX, level)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export const logger = new Logger()
|
||||||
290
commons/basic/src/main/ets/utils/request.ets
Normal file
290
commons/basic/src/main/ets/utils/request.ets
Normal file
@ -0,0 +1,290 @@
|
|||||||
|
import { http } from '@kit.NetworkKit';
|
||||||
|
import { authStore } from './auth';
|
||||||
|
import { promptAction, router } from '@kit.ArkUI';
|
||||||
|
import { BusinessError } from '@ohos.base';
|
||||||
|
import { logger } from './logger';
|
||||||
|
import { HashMap } from '@kit.ArkTS';
|
||||||
|
import { CryptoJS } from '@ohos/crypto-js'
|
||||||
|
import { Base64Util } from './Base64Util';
|
||||||
|
import { ChangeUtil } from './ChangeUtil'
|
||||||
|
import { BasicConstant } from '../constants/BasicConstant'
|
||||||
|
|
||||||
|
interface HdRequestOptions {
|
||||||
|
baseURL?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
type HdParams = Record<string, string | number | boolean>
|
||||||
|
|
||||||
|
export interface HdResponse<T> {
|
||||||
|
code: number
|
||||||
|
message: string
|
||||||
|
data: T
|
||||||
|
}
|
||||||
|
export interface TimestampBean {
|
||||||
|
timestamp:string
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
class HdHttp {
|
||||||
|
baseURL: string
|
||||||
|
|
||||||
|
constructor(options: HdRequestOptions) {
|
||||||
|
this.baseURL = options.baseURL || ''
|
||||||
|
}
|
||||||
|
|
||||||
|
private request1<T>(path: string, method: http.RequestMethod = http.RequestMethod.GET, extraDatas:HashMap<string, string>) {
|
||||||
|
const httpInstance = http.createHttp()
|
||||||
|
let fullUrl = this.baseURL + path
|
||||||
|
let promise = httpInstance.request(
|
||||||
|
// 请求url地址
|
||||||
|
fullUrl,
|
||||||
|
{
|
||||||
|
// 请求方式
|
||||||
|
method: http.RequestMethod.POST,
|
||||||
|
// 可选,默认为60s
|
||||||
|
connectTimeout: 60000,
|
||||||
|
// 可选,默认为60s
|
||||||
|
readTimeout: 60000,
|
||||||
|
// 开发者根据自身业务需要添加header字段
|
||||||
|
header: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
'sign':this.getSign(extraDatas)
|
||||||
|
},
|
||||||
|
extraData:ChangeUtil.map2Json(extraDatas)
|
||||||
|
});
|
||||||
|
logger.info('Response JSON.stringify(extraDatas)' + ChangeUtil.map2Json(extraDatas))
|
||||||
|
return promise.then((data) => {
|
||||||
|
logger.info('Response request:' + data.result);
|
||||||
|
if (data.result) {
|
||||||
|
const result = data.result as HdResponse<T>
|
||||||
|
logger.info('Response result:' + result);
|
||||||
|
return result
|
||||||
|
|
||||||
|
}
|
||||||
|
return Promise.reject(data.result)
|
||||||
|
// if (data.responseCode === http.ResponseCode.OK) {
|
||||||
|
// console.info('Response request:' + data.result);
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// return Promise.reject(data.result)
|
||||||
|
}
|
||||||
|
|
||||||
|
).catch((err:BusinessError) => {
|
||||||
|
logger.info('Response httpReq request:' + JSON.stringify(err));
|
||||||
|
return Promise.reject(err)
|
||||||
|
|
||||||
|
}).finally(() => {
|
||||||
|
httpInstance.destroy()
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
private request<T>(path: string, method: http.RequestMethod = http.RequestMethod.POST, extraDatas :HashMap<string, string>) {
|
||||||
|
const httpInstance = http.createHttp()
|
||||||
|
|
||||||
|
const options: http.HttpRequestOptions = {
|
||||||
|
method: http.RequestMethod.POST,
|
||||||
|
// 可选,默认为60s
|
||||||
|
connectTimeout: 60000,
|
||||||
|
// 可选,默认为60s
|
||||||
|
readTimeout: 60000,
|
||||||
|
// 开发者根据自身业务需要添加header字段
|
||||||
|
header: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
'sign':this.getSign(extraDatas)
|
||||||
|
},
|
||||||
|
extraData:ChangeUtil.map2Json(extraDatas)
|
||||||
|
}
|
||||||
|
|
||||||
|
let fullUrl = this.baseURL + path
|
||||||
|
|
||||||
|
|
||||||
|
return httpInstance.request(fullUrl, options).then((res) => {
|
||||||
|
logger.info('Response fullUrl:' +fullUrl+ res.result);
|
||||||
|
const result = res.result as HdResponse<T>
|
||||||
|
return result
|
||||||
|
}).catch((err: BusinessError) => {
|
||||||
|
logger.info(fullUrl+`Response succeeded: ${err}`);
|
||||||
|
promptAction.showToast({ message: err.message || '网络错误' })
|
||||||
|
return Promise.reject(err)
|
||||||
|
}).finally(() => {
|
||||||
|
httpInstance.destroy()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private requestafter<T>(path: string, method: http.RequestMethod = http.RequestMethod.GET, extraData?: Object) {
|
||||||
|
const httpInstance = http.createHttp()
|
||||||
|
|
||||||
|
const options: http.HttpRequestOptions = {
|
||||||
|
method: http.RequestMethod.GET,
|
||||||
|
// 可选,默认为60s
|
||||||
|
connectTimeout: 60000,
|
||||||
|
// 可选,默认为60s
|
||||||
|
readTimeout: 60000,
|
||||||
|
// 开发者根据自身业务需要添加header字段
|
||||||
|
header: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let fullUrl = this.baseURL + path
|
||||||
|
if (method === http.RequestMethod.GET && extraData) {
|
||||||
|
const strArr = Object.keys(extraData)
|
||||||
|
.filter(key => (extraData as HdParams)[key] !== undefined)
|
||||||
|
.map(key => `${key}=${(extraData as HdParams)[key]}`)
|
||||||
|
fullUrl += `?${strArr.join('&')}`
|
||||||
|
} else {
|
||||||
|
options.extraData = extraData
|
||||||
|
}
|
||||||
|
|
||||||
|
return httpInstance.request(fullUrl, options).then((res) => {
|
||||||
|
return Promise.reject(res.result)
|
||||||
|
}).catch((err: BusinessError) => {
|
||||||
|
logger.error(fullUrl+`Response succeeded: ${err}+${err.name}+${err.message}+${err.data}+${err.stack}`);
|
||||||
|
// logger.error(fullUrl, err.code?.toString(), err.message)
|
||||||
|
promptAction.showToast({ message: err.message || '网络错误' })
|
||||||
|
return Promise.reject(err)
|
||||||
|
}).finally(() => {
|
||||||
|
httpInstance.destroy()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
get<T>(url: string, data?: Object): Promise<HdResponse<T>> {
|
||||||
|
return this.requestafter<T>(url, http.RequestMethod.GET, data)
|
||||||
|
}
|
||||||
|
|
||||||
|
post<T>(url: string, data?: Object): Promise<HdResponse<T>> {
|
||||||
|
return this.requestafter<T>(url, http.RequestMethod.POST, data)
|
||||||
|
}
|
||||||
|
|
||||||
|
put<T>(url: string, data?: Object): Promise<HdResponse<T>> {
|
||||||
|
return this.requestafter<T>(url, http.RequestMethod.PUT, data)
|
||||||
|
}
|
||||||
|
|
||||||
|
delete<T>(url: string, data?: Object): Promise<HdResponse<T>> {
|
||||||
|
return this.requestafter<T>(url, http.RequestMethod.DELETE, data)
|
||||||
|
}
|
||||||
|
posts<T>(url: string, data: HashMap<string, string>): Promise<HdResponse<T>> {
|
||||||
|
return this.request<T>(url, http.RequestMethod.POST, data)
|
||||||
|
}
|
||||||
|
httpReq<T>(url: string, datas: HashMap<string, string>): Promise<HdResponse<T>> {
|
||||||
|
|
||||||
|
// 创建httpRequest对象。
|
||||||
|
let httpRequest = http.createHttp();
|
||||||
|
let url1 = "https://dev-app.igandan.com/app/manager/getSystemTimeStamp";
|
||||||
|
let promise = httpRequest.request(
|
||||||
|
// 请求url地址
|
||||||
|
url1,
|
||||||
|
{
|
||||||
|
// 请求方式
|
||||||
|
method: http.RequestMethod.GET,
|
||||||
|
// 可选,默认为60s
|
||||||
|
connectTimeout: 60000,
|
||||||
|
// 可选,默认为60s
|
||||||
|
readTimeout: 60000,
|
||||||
|
// 开发者根据自身业务需要添加header字段
|
||||||
|
header: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 处理响应结果。
|
||||||
|
return promise.then((data) => {
|
||||||
|
if (data.responseCode === http.ResponseCode.OK) {
|
||||||
|
logger.info('Response httpReq:' + data.result);
|
||||||
|
let json:TimestampBean = JSON.parse(data.result.toString()) as TimestampBean;
|
||||||
|
let tp = json.timestamp;
|
||||||
|
datas.set("user_uuid", authStore.getUser().uuid?authStore.getUser().uuid:'');
|
||||||
|
datas.set("client_type", 'A');
|
||||||
|
datas.set("version",'4.0.0' );
|
||||||
|
datas.set('timestamp',tp+'');
|
||||||
|
|
||||||
|
return this.posts<T>(url, datas);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return this.posts<T>(url, datas);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
).catch((err:BusinessError) => {
|
||||||
|
logger.info('Response httpReq error:' + JSON.stringify(err));
|
||||||
|
return Promise.reject(err);
|
||||||
|
|
||||||
|
}).finally(() => {
|
||||||
|
httpRequest.destroy()
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
httpReqSimply<T>(url: string) {
|
||||||
|
|
||||||
|
// 创建httpRequest对象。
|
||||||
|
let httpRequest = http.createHttp();
|
||||||
|
|
||||||
|
let promise = httpRequest.request(
|
||||||
|
// 请求url地址
|
||||||
|
url,
|
||||||
|
{
|
||||||
|
// 请求方式
|
||||||
|
method: http.RequestMethod.POST,
|
||||||
|
// 可选,默认为60s
|
||||||
|
connectTimeout: 60000,
|
||||||
|
// 可选,默认为60s
|
||||||
|
readTimeout: 60000,
|
||||||
|
// 开发者根据自身业务需要添加header字段
|
||||||
|
header: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 处理响应结果。
|
||||||
|
return promise.then((data) => {
|
||||||
|
logger.info('Response httpReqSimply:' + JSON.stringify(data));
|
||||||
|
const result = data.result as HdResponse<T>
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
|
).catch((err:BusinessError) => {
|
||||||
|
logger.info('Response httpReq error:' + JSON.stringify(err));
|
||||||
|
return Promise.reject(err);
|
||||||
|
|
||||||
|
}).finally(() => {
|
||||||
|
httpRequest.destroy()
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
getSign(extraDatas1:HashMap<string, string>): string {
|
||||||
|
let secret= extraDatas1.get("timestamp")
|
||||||
|
if(secret!=null) {
|
||||||
|
let keyValueStr: string = "";
|
||||||
|
let entriesArray: Array<string> = Array.from(extraDatas1.keys());
|
||||||
|
entriesArray.sort();
|
||||||
|
|
||||||
|
let sortedMap:HashMap<string, string> = new HashMap();
|
||||||
|
entriesArray.forEach((value: string, index: number) => {
|
||||||
|
sortedMap.set(value,extraDatas1.get(value));
|
||||||
|
keyValueStr +=value+extraDatas1.get(value)
|
||||||
|
});
|
||||||
|
keyValueStr = keyValueStr.replace(" ", "");
|
||||||
|
keyValueStr = keyValueStr + CryptoJS.MD5(secret).toString();
|
||||||
|
let Md5keyValueStr: string = CryptoJS.MD5(keyValueStr).toString();
|
||||||
|
let base64Str:string=Base64Util.encodeToStrSync(Md5keyValueStr);
|
||||||
|
return base64Str;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export const hdHttp = new HdHttp({ baseURL: '' })
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
83
commons/basic/src/main/ets/utils/themeManager.ets
Normal file
83
commons/basic/src/main/ets/utils/themeManager.ets
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
/**
|
||||||
|
* 1. 主题设置
|
||||||
|
* 2. 沉浸式设置
|
||||||
|
* 3. 通知栏设置
|
||||||
|
*/
|
||||||
|
import { ConfigurationConstant } from '@kit.AbilityKit'
|
||||||
|
import { window } from '@kit.ArkUI'
|
||||||
|
import { logger } from './logger'
|
||||||
|
|
||||||
|
class ThemeManager {
|
||||||
|
windowStage: window.Window | null = null
|
||||||
|
|
||||||
|
async getWindowStage() {
|
||||||
|
if (this.windowStage) {
|
||||||
|
return this.windowStage
|
||||||
|
} else {
|
||||||
|
return await window.getLastWindow(getContext())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
initThemeSetting() {
|
||||||
|
const app = getContext().getApplicationContext()
|
||||||
|
app.on('environment', {
|
||||||
|
onConfigurationUpdated: (config) => {
|
||||||
|
logger.info('===', JSON.stringify(config))
|
||||||
|
if (config.colorMode === ConfigurationConstant.ColorMode.COLOR_MODE_LIGHT) {
|
||||||
|
this.settingStatusBarBlack()
|
||||||
|
}
|
||||||
|
if (config.colorMode === ConfigurationConstant.ColorMode.COLOR_MODE_DARK) {
|
||||||
|
this.settingStatusBarWhite()
|
||||||
|
}
|
||||||
|
if (config.colorMode === ConfigurationConstant.ColorMode.COLOR_MODE_NOT_SET) {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onMemoryLevel: (_level) => {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 获取应用当前主题
|
||||||
|
PersistentStorage.persistProp<ConfigurationConstant.ColorMode>('appColorMode',
|
||||||
|
ConfigurationConstant.ColorMode.COLOR_MODE_LIGHT)
|
||||||
|
const appColorMode = AppStorage.get<ConfigurationConstant.ColorMode>('appColorMode')
|
||||||
|
app.setColorMode(appColorMode)
|
||||||
|
}
|
||||||
|
|
||||||
|
settingStatusBarWhite() {
|
||||||
|
this.settingStatusBar({ statusBarContentColor: '#FFFFFF' })
|
||||||
|
}
|
||||||
|
|
||||||
|
settingStatusBarBlack() {
|
||||||
|
this.settingStatusBar({ statusBarContentColor: '#000000' })
|
||||||
|
}
|
||||||
|
|
||||||
|
settingStatusBar(config: window.SystemBarProperties) {
|
||||||
|
this.getWindowStage()
|
||||||
|
.then((windowStage: window.Window) => {
|
||||||
|
windowStage.setWindowSystemBarProperties(config)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
enableFullScreen() {
|
||||||
|
this.getWindowStage()
|
||||||
|
.then((windowStage: window.Window) => {
|
||||||
|
windowStage.setWindowLayoutFullScreen(true)
|
||||||
|
const topArea = windowStage.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM)
|
||||||
|
AppStorage.setOrCreate('topHeight', px2vp(topArea.topRect.height))
|
||||||
|
const bottomArea = windowStage.getWindowAvoidArea(window.AvoidAreaType.TYPE_NAVIGATION_INDICATOR)
|
||||||
|
AppStorage.setOrCreate('bottomHeight', px2vp(bottomArea.bottomRect.height))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
disableFullScreen() {
|
||||||
|
this.getWindowStage()
|
||||||
|
.then((windowStage: window.Window) => {
|
||||||
|
windowStage.setWindowLayoutFullScreen(false)
|
||||||
|
AppStorage.setOrCreate('topHeight', 0)
|
||||||
|
AppStorage.setOrCreate('bottomHeight', 0)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export const themeManager = new ThemeManager()
|
||||||
11
commons/basic/src/main/module.json5
Normal file
11
commons/basic/src/main/module.json5
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"module": {
|
||||||
|
"name": "basic",
|
||||||
|
"type": "har",
|
||||||
|
"deviceTypes": [
|
||||||
|
"default",
|
||||||
|
"tablet",
|
||||||
|
"2in1"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
64
commons/basic/src/main/resources/base/element/color.json
Normal file
64
commons/basic/src/main/resources/base/element/color.json
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
{
|
||||||
|
"color": [
|
||||||
|
{
|
||||||
|
"name": "common_gray_01",
|
||||||
|
"value": "#222222"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "common_gray_02",
|
||||||
|
"value": "#ffbebbb4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "common_gray_03",
|
||||||
|
"value": "#666666"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "common_gray_bg",
|
||||||
|
"value": "#f3f4f5"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "common_gray_border",
|
||||||
|
"value": "#e8e7ee"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "common_main_color",
|
||||||
|
"value": "#FA6D1D"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "common_green",
|
||||||
|
"value": "#41B883"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "common_blue",
|
||||||
|
"value": "#3266EE"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "common_blue_bg",
|
||||||
|
"value": "#EDF2FF"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "black",
|
||||||
|
"value": "#131313"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "white",
|
||||||
|
"value": "#ffffff"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "home_gray",
|
||||||
|
"value": "#EDECF2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "top_title",
|
||||||
|
"value": "#8D2316"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "top_bg",
|
||||||
|
"value": "#FFEFEFEF"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "main_color",
|
||||||
|
"value": "#923C35"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
100
commons/basic/src/main/resources/base/element/float.json
Normal file
100
commons/basic/src/main/resources/base/element/float.json
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
{
|
||||||
|
"float": [
|
||||||
|
{
|
||||||
|
"name": "common_border_width",
|
||||||
|
"value": "0.5vp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "common_gutter",
|
||||||
|
"value": "16vp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "navigation_title_font20",
|
||||||
|
"value": "20fp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "common_font14",
|
||||||
|
"value": "14fp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "common_font12",
|
||||||
|
"value": "12fp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "common_font10",
|
||||||
|
"value": "10fp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "common_font8",
|
||||||
|
"value": "8fp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "common_space4",
|
||||||
|
"value": "4vp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "common_space10",
|
||||||
|
"value": "10vp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "common_space16",
|
||||||
|
"value": "16vp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hd_search_icon_size",
|
||||||
|
"value": "14vp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hd_search_height",
|
||||||
|
"value": "32vp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hd_search_radius",
|
||||||
|
"value": "16vp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hd_clock_font",
|
||||||
|
"value": "18fp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hd_clock_text_width",
|
||||||
|
"value": "50vp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hd_clock_width",
|
||||||
|
"value": "74vp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hd_clock_height",
|
||||||
|
"value": "28vp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hd_tag_width",
|
||||||
|
"value": "34vp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hd_tag_height",
|
||||||
|
"value": "18vp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hd_tag_radius",
|
||||||
|
"value": "2vp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hd_list_load_height",
|
||||||
|
"value": "80vp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hd_list_load_font",
|
||||||
|
"value": "14fp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hd_list_load_icon",
|
||||||
|
"value": "24vp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "page_text_font_size",
|
||||||
|
"value": "50fp"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
40
commons/basic/src/main/resources/base/element/string.json
Normal file
40
commons/basic/src/main/resources/base/element/string.json
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"string": [
|
||||||
|
{
|
||||||
|
"name": "hd_search_placeholder",
|
||||||
|
"value": "搜索题目"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hd_clock_continue",
|
||||||
|
"value": "已连续打卡"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hd_clock_day",
|
||||||
|
"value": " 天"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hd_tag_simple",
|
||||||
|
"value": "简单"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hd_tag_general",
|
||||||
|
"value": "一般"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hd_tag_difficult",
|
||||||
|
"value": "困难"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hd_list_loading",
|
||||||
|
"value": "加载中..."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hd_list_finished",
|
||||||
|
"value": "没有更多了~"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hd_clock_in",
|
||||||
|
"value": "打卡"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" viewBox="0 0 24 24" version="1.1">
|
||||||
|
<title>Public/ic_public_back</title>
|
||||||
|
<defs>
|
||||||
|
<path d="M5.31079777,13.7499686 L11.2803301,19.7196699 L11.3140714,19.7556673 C11.5727547,20.0502619 11.5615076,20.4991526 11.2803301,20.7803301 C10.9991526,21.0615076 10.5502619,21.0727547 10.2556673,20.8140714 L10.2196699,20.7803301 L3.18929777,13.7499686 L5.31079777,13.7499686 Z M11.2803301,3.21966991 C11.5615076,3.5008474 11.5727547,3.94973814 11.3140714,4.24433269 L11.2803301,4.28033009 L4.3105,11.25 L21,11.25 C21.3994202,11.25 21.7259152,11.56223 21.7487268,11.9559318 L21.75,12 C21.75,12.3994202 21.43777,12.7259152 21.0440682,12.7487268 L21,12.75 L3.10355339,12.75 C2.8383369,12.75 2.58398299,12.6446432 2.39644661,12.4571068 C2.01893979,12.0796 2.00635623,11.4753589 2.35869593,11.0827365 L2.39644661,11.0428932 L10.2196699,3.21966991 C10.5125631,2.9267767 10.9874369,2.9267767 11.2803301,3.21966991 Z" id="_path-1"/>
|
||||||
|
</defs>
|
||||||
|
<g id="_Public/ic_public_back" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<mask id="_mask-2" fill="white">
|
||||||
|
<use xlink:href="#_path-1"/>
|
||||||
|
</mask>
|
||||||
|
<use id="_形状结合" fill="#000000" fill-rule="nonzero" xlink:href="#_path-1"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.4 KiB |
BIN
commons/basic/src/main/resources/base/media/top_back.png
Normal file
BIN
commons/basic/src/main/resources/base/media/top_back.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 276 KiB |
35
commons/basic/src/ohosTest/ets/test/Ability.test.ets
Normal file
35
commons/basic/src/ohosTest/ets/test/Ability.test.ets
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
import { hilog } from '@kit.PerformanceAnalysisKit';
|
||||||
|
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
|
||||||
|
|
||||||
|
export default function abilityTest() {
|
||||||
|
describe('ActsAbilityTest', () => {
|
||||||
|
// Defines a test suite. Two parameters are supported: test suite name and test suite function.
|
||||||
|
beforeAll(() => {
|
||||||
|
// Presets an action, which is performed only once before all test cases of the test suite start.
|
||||||
|
// This API supports only one parameter: preset action function.
|
||||||
|
})
|
||||||
|
beforeEach(() => {
|
||||||
|
// Presets an action, which is performed before each unit test case starts.
|
||||||
|
// The number of execution times is the same as the number of test cases defined by **it**.
|
||||||
|
// This API supports only one parameter: preset action function.
|
||||||
|
})
|
||||||
|
afterEach(() => {
|
||||||
|
// Presets a clear action, which is performed after each unit test case ends.
|
||||||
|
// The number of execution times is the same as the number of test cases defined by **it**.
|
||||||
|
// This API supports only one parameter: clear action function.
|
||||||
|
})
|
||||||
|
afterAll(() => {
|
||||||
|
// Presets a clear action, which is performed after all test cases of the test suite end.
|
||||||
|
// This API supports only one parameter: clear action function.
|
||||||
|
})
|
||||||
|
it('assertContain', 0, () => {
|
||||||
|
// Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function.
|
||||||
|
hilog.info(0x0000, 'testTag', '%{public}s', 'it begin');
|
||||||
|
let a = 'abc';
|
||||||
|
let b = 'b';
|
||||||
|
// Defines a variety of assertion methods, which are used to declare expected boolean conditions.
|
||||||
|
expect(a).assertContain(b);
|
||||||
|
expect(a).assertEqual(a);
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
5
commons/basic/src/ohosTest/ets/test/List.test.ets
Normal file
5
commons/basic/src/ohosTest/ets/test/List.test.ets
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import abilityTest from './Ability.test';
|
||||||
|
|
||||||
|
export default function testsuite() {
|
||||||
|
abilityTest();
|
||||||
|
}
|
||||||
13
commons/basic/src/ohosTest/module.json5
Normal file
13
commons/basic/src/ohosTest/module.json5
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"module": {
|
||||||
|
"name": "basic_test",
|
||||||
|
"type": "feature",
|
||||||
|
"deviceTypes": [
|
||||||
|
"default",
|
||||||
|
"tablet",
|
||||||
|
"2in1"
|
||||||
|
],
|
||||||
|
"deliveryWithInstall": true,
|
||||||
|
"installationFree": false
|
||||||
|
}
|
||||||
|
}
|
||||||
5
commons/basic/src/test/List.test.ets
Normal file
5
commons/basic/src/test/List.test.ets
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import localUnitTest from './LocalUnit.test';
|
||||||
|
|
||||||
|
export default function testsuite() {
|
||||||
|
localUnitTest();
|
||||||
|
}
|
||||||
33
commons/basic/src/test/LocalUnit.test.ets
Normal file
33
commons/basic/src/test/LocalUnit.test.ets
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
|
||||||
|
|
||||||
|
export default function localUnitTest() {
|
||||||
|
describe('localUnitTest', () => {
|
||||||
|
// Defines a test suite. Two parameters are supported: test suite name and test suite function.
|
||||||
|
beforeAll(() => {
|
||||||
|
// Presets an action, which is performed only once before all test cases of the test suite start.
|
||||||
|
// This API supports only one parameter: preset action function.
|
||||||
|
});
|
||||||
|
beforeEach(() => {
|
||||||
|
// Presets an action, which is performed before each unit test case starts.
|
||||||
|
// The number of execution times is the same as the number of test cases defined by **it**.
|
||||||
|
// This API supports only one parameter: preset action function.
|
||||||
|
});
|
||||||
|
afterEach(() => {
|
||||||
|
// Presets a clear action, which is performed after each unit test case ends.
|
||||||
|
// The number of execution times is the same as the number of test cases defined by **it**.
|
||||||
|
// This API supports only one parameter: clear action function.
|
||||||
|
});
|
||||||
|
afterAll(() => {
|
||||||
|
// Presets a clear action, which is performed after all test cases of the test suite end.
|
||||||
|
// This API supports only one parameter: clear action function.
|
||||||
|
});
|
||||||
|
it('assertContain', 0, () => {
|
||||||
|
// Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function.
|
||||||
|
let a = 'abc';
|
||||||
|
let b = 'b';
|
||||||
|
// Defines a variety of assertion methods, which are used to declare expected boolean conditions.
|
||||||
|
expect(a).assertContain(b);
|
||||||
|
expect(a).assertEqual(a);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
6
commons/uicomponents/.gitignore
vendored
Normal file
6
commons/uicomponents/.gitignore
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
/node_modules
|
||||||
|
/oh_modules
|
||||||
|
/.preview
|
||||||
|
/build
|
||||||
|
/.cxx
|
||||||
|
/.test
|
||||||
1
commons/uicomponents/Index.ets
Normal file
1
commons/uicomponents/Index.ets
Normal file
@ -0,0 +1 @@
|
|||||||
|
export { MainPage } from './src/main/ets/components/MainPage';
|
||||||
31
commons/uicomponents/build-profile.json5
Normal file
31
commons/uicomponents/build-profile.json5
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"apiType": "stageMode",
|
||||||
|
"buildOption": {
|
||||||
|
},
|
||||||
|
"buildOptionSet": [
|
||||||
|
{
|
||||||
|
"name": "release",
|
||||||
|
"arkOptions": {
|
||||||
|
"obfuscation": {
|
||||||
|
"ruleOptions": {
|
||||||
|
"enable": false,
|
||||||
|
"files": [
|
||||||
|
"./obfuscation-rules.txt"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"consumerFiles": [
|
||||||
|
"./consumer-rules.txt"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"name": "default"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ohosTest"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
0
commons/uicomponents/consumer-rules.txt
Normal file
0
commons/uicomponents/consumer-rules.txt
Normal file
6
commons/uicomponents/hvigorfile.ts
Normal file
6
commons/uicomponents/hvigorfile.ts
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import { harTasks } from '@ohos/hvigor-ohos-plugin';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
system: harTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
|
||||||
|
plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
|
||||||
|
}
|
||||||
23
commons/uicomponents/obfuscation-rules.txt
Normal file
23
commons/uicomponents/obfuscation-rules.txt
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# Define project specific obfuscation rules here.
|
||||||
|
# You can include the obfuscation configuration files in the current module's build-profile.json5.
|
||||||
|
#
|
||||||
|
# For more details, see
|
||||||
|
# https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5
|
||||||
|
|
||||||
|
# Obfuscation options:
|
||||||
|
# -disable-obfuscation: disable all obfuscations
|
||||||
|
# -enable-property-obfuscation: obfuscate the property names
|
||||||
|
# -enable-toplevel-obfuscation: obfuscate the names in the global scope
|
||||||
|
# -compact: remove unnecessary blank spaces and all line feeds
|
||||||
|
# -remove-log: remove all console.* statements
|
||||||
|
# -print-namecache: print the name cache that contains the mapping from the old names to new names
|
||||||
|
# -apply-namecache: reuse the given cache file
|
||||||
|
|
||||||
|
# Keep options:
|
||||||
|
# -keep-property-name: specifies property names that you want to keep
|
||||||
|
# -keep-global-name: specifies names that you want to keep in the global scope
|
||||||
|
|
||||||
|
-enable-property-obfuscation
|
||||||
|
-enable-toplevel-obfuscation
|
||||||
|
-enable-filename-obfuscation
|
||||||
|
-enable-export-obfuscation
|
||||||
9
commons/uicomponents/oh-package.json5
Normal file
9
commons/uicomponents/oh-package.json5
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"name": "uicomponents",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "Please describe the basic information.",
|
||||||
|
"main": "Index.ets",
|
||||||
|
"author": "",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {}
|
||||||
|
}
|
||||||
19
commons/uicomponents/src/main/ets/components/MainPage.ets
Normal file
19
commons/uicomponents/src/main/ets/components/MainPage.ets
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
@Component
|
||||||
|
export struct MainPage {
|
||||||
|
@State message: string = 'Hello World';
|
||||||
|
|
||||||
|
build() {
|
||||||
|
Row() {
|
||||||
|
Column() {
|
||||||
|
Text(this.message)
|
||||||
|
.fontSize($r('app.float.page_text_font_size'))
|
||||||
|
.fontWeight(FontWeight.Bold)
|
||||||
|
.onClick(() => {
|
||||||
|
this.message = 'Welcome';
|
||||||
|
})
|
||||||
|
}
|
||||||
|
.width('100%')
|
||||||
|
}
|
||||||
|
.height('100%')
|
||||||
|
}
|
||||||
|
}
|
||||||
11
commons/uicomponents/src/main/module.json5
Normal file
11
commons/uicomponents/src/main/module.json5
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"module": {
|
||||||
|
"name": "uicomponents",
|
||||||
|
"type": "har",
|
||||||
|
"deviceTypes": [
|
||||||
|
"default",
|
||||||
|
"tablet",
|
||||||
|
"2in1"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"float": [
|
||||||
|
{
|
||||||
|
"name": "page_text_font_size",
|
||||||
|
"value": "50fp"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"string": [
|
||||||
|
{
|
||||||
|
"name": "page_show",
|
||||||
|
"value": "page from package"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
35
commons/uicomponents/src/ohosTest/ets/test/Ability.test.ets
Normal file
35
commons/uicomponents/src/ohosTest/ets/test/Ability.test.ets
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
import { hilog } from '@kit.PerformanceAnalysisKit';
|
||||||
|
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
|
||||||
|
|
||||||
|
export default function abilityTest() {
|
||||||
|
describe('ActsAbilityTest', () => {
|
||||||
|
// Defines a test suite. Two parameters are supported: test suite name and test suite function.
|
||||||
|
beforeAll(() => {
|
||||||
|
// Presets an action, which is performed only once before all test cases of the test suite start.
|
||||||
|
// This API supports only one parameter: preset action function.
|
||||||
|
})
|
||||||
|
beforeEach(() => {
|
||||||
|
// Presets an action, which is performed before each unit test case starts.
|
||||||
|
// The number of execution times is the same as the number of test cases defined by **it**.
|
||||||
|
// This API supports only one parameter: preset action function.
|
||||||
|
})
|
||||||
|
afterEach(() => {
|
||||||
|
// Presets a clear action, which is performed after each unit test case ends.
|
||||||
|
// The number of execution times is the same as the number of test cases defined by **it**.
|
||||||
|
// This API supports only one parameter: clear action function.
|
||||||
|
})
|
||||||
|
afterAll(() => {
|
||||||
|
// Presets a clear action, which is performed after all test cases of the test suite end.
|
||||||
|
// This API supports only one parameter: clear action function.
|
||||||
|
})
|
||||||
|
it('assertContain', 0, () => {
|
||||||
|
// Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function.
|
||||||
|
hilog.info(0x0000, 'testTag', '%{public}s', 'it begin');
|
||||||
|
let a = 'abc';
|
||||||
|
let b = 'b';
|
||||||
|
// Defines a variety of assertion methods, which are used to declare expected boolean conditions.
|
||||||
|
expect(a).assertContain(b);
|
||||||
|
expect(a).assertEqual(a);
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
5
commons/uicomponents/src/ohosTest/ets/test/List.test.ets
Normal file
5
commons/uicomponents/src/ohosTest/ets/test/List.test.ets
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import abilityTest from './Ability.test';
|
||||||
|
|
||||||
|
export default function testsuite() {
|
||||||
|
abilityTest();
|
||||||
|
}
|
||||||
13
commons/uicomponents/src/ohosTest/module.json5
Normal file
13
commons/uicomponents/src/ohosTest/module.json5
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"module": {
|
||||||
|
"name": "uicomponents_test",
|
||||||
|
"type": "feature",
|
||||||
|
"deviceTypes": [
|
||||||
|
"default",
|
||||||
|
"tablet",
|
||||||
|
"2in1"
|
||||||
|
],
|
||||||
|
"deliveryWithInstall": true,
|
||||||
|
"installationFree": false
|
||||||
|
}
|
||||||
|
}
|
||||||
5
commons/uicomponents/src/test/List.test.ets
Normal file
5
commons/uicomponents/src/test/List.test.ets
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import localUnitTest from './LocalUnit.test';
|
||||||
|
|
||||||
|
export default function testsuite() {
|
||||||
|
localUnitTest();
|
||||||
|
}
|
||||||
33
commons/uicomponents/src/test/LocalUnit.test.ets
Normal file
33
commons/uicomponents/src/test/LocalUnit.test.ets
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
|
||||||
|
|
||||||
|
export default function localUnitTest() {
|
||||||
|
describe('localUnitTest', () => {
|
||||||
|
// Defines a test suite. Two parameters are supported: test suite name and test suite function.
|
||||||
|
beforeAll(() => {
|
||||||
|
// Presets an action, which is performed only once before all test cases of the test suite start.
|
||||||
|
// This API supports only one parameter: preset action function.
|
||||||
|
});
|
||||||
|
beforeEach(() => {
|
||||||
|
// Presets an action, which is performed before each unit test case starts.
|
||||||
|
// The number of execution times is the same as the number of test cases defined by **it**.
|
||||||
|
// This API supports only one parameter: preset action function.
|
||||||
|
});
|
||||||
|
afterEach(() => {
|
||||||
|
// Presets a clear action, which is performed after each unit test case ends.
|
||||||
|
// The number of execution times is the same as the number of test cases defined by **it**.
|
||||||
|
// This API supports only one parameter: clear action function.
|
||||||
|
});
|
||||||
|
afterAll(() => {
|
||||||
|
// Presets a clear action, which is performed after all test cases of the test suite end.
|
||||||
|
// This API supports only one parameter: clear action function.
|
||||||
|
});
|
||||||
|
it('assertContain', 0, () => {
|
||||||
|
// Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function.
|
||||||
|
let a = 'abc';
|
||||||
|
let b = 'b';
|
||||||
|
// Defines a variety of assertion methods, which are used to declare expected boolean conditions.
|
||||||
|
expect(a).assertContain(b);
|
||||||
|
expect(a).assertEqual(a);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
6
commons/utils/.gitignore
vendored
Normal file
6
commons/utils/.gitignore
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
/node_modules
|
||||||
|
/oh_modules
|
||||||
|
/.preview
|
||||||
|
/build
|
||||||
|
/.cxx
|
||||||
|
/.test
|
||||||
17
commons/utils/BuildProfile.ets
Normal file
17
commons/utils/BuildProfile.ets
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
/**
|
||||||
|
* Use these variables when you tailor your ArkTS code. They must be of the const type.
|
||||||
|
*/
|
||||||
|
export const HAR_VERSION = '1.0.0';
|
||||||
|
export const BUILD_MODE_NAME = 'debug';
|
||||||
|
export const DEBUG = true;
|
||||||
|
export const TARGET_NAME = 'default';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* BuildProfile Class is used only for compatibility purposes.
|
||||||
|
*/
|
||||||
|
export default class BuildProfile {
|
||||||
|
static readonly HAR_VERSION = HAR_VERSION;
|
||||||
|
static readonly BUILD_MODE_NAME = BUILD_MODE_NAME;
|
||||||
|
static readonly DEBUG = DEBUG;
|
||||||
|
static readonly TARGET_NAME = TARGET_NAME;
|
||||||
|
}
|
||||||
4
commons/utils/Index.ets
Normal file
4
commons/utils/Index.ets
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export { logger } from './src/main/ets/request/logger'
|
||||||
|
export { Base64Util } from './src/main/ets/request/Base64Util'
|
||||||
|
export { HdResponse } from './src/main/ets/request/request'
|
||||||
|
export { ChangeUtil } from './src/main/ets/request/ChangeUtil'
|
||||||
31
commons/utils/build-profile.json5
Normal file
31
commons/utils/build-profile.json5
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"apiType": "stageMode",
|
||||||
|
"buildOption": {
|
||||||
|
},
|
||||||
|
"buildOptionSet": [
|
||||||
|
{
|
||||||
|
"name": "release",
|
||||||
|
"arkOptions": {
|
||||||
|
"obfuscation": {
|
||||||
|
"ruleOptions": {
|
||||||
|
"enable": false,
|
||||||
|
"files": [
|
||||||
|
"./obfuscation-rules.txt"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"consumerFiles": [
|
||||||
|
"./consumer-rules.txt"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"name": "default"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ohosTest"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
0
commons/utils/consumer-rules.txt
Normal file
0
commons/utils/consumer-rules.txt
Normal file
6
commons/utils/hvigorfile.ts
Normal file
6
commons/utils/hvigorfile.ts
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import { harTasks } from '@ohos/hvigor-ohos-plugin';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
system: harTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
|
||||||
|
plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
|
||||||
|
}
|
||||||
23
commons/utils/obfuscation-rules.txt
Normal file
23
commons/utils/obfuscation-rules.txt
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# Define project specific obfuscation rules here.
|
||||||
|
# You can include the obfuscation configuration files in the current module's build-profile.json5.
|
||||||
|
#
|
||||||
|
# For more details, see
|
||||||
|
# https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5
|
||||||
|
|
||||||
|
# Obfuscation options:
|
||||||
|
# -disable-obfuscation: disable all obfuscations
|
||||||
|
# -enable-property-obfuscation: obfuscate the property names
|
||||||
|
# -enable-toplevel-obfuscation: obfuscate the names in the global scope
|
||||||
|
# -compact: remove unnecessary blank spaces and all line feeds
|
||||||
|
# -remove-log: remove all console.* statements
|
||||||
|
# -print-namecache: print the name cache that contains the mapping from the old names to new names
|
||||||
|
# -apply-namecache: reuse the given cache file
|
||||||
|
|
||||||
|
# Keep options:
|
||||||
|
# -keep-property-name: specifies property names that you want to keep
|
||||||
|
# -keep-global-name: specifies names that you want to keep in the global scope
|
||||||
|
|
||||||
|
-enable-property-obfuscation
|
||||||
|
-enable-toplevel-obfuscation
|
||||||
|
-enable-filename-obfuscation
|
||||||
|
-enable-export-obfuscation
|
||||||
19
commons/utils/oh-package-lock.json5
Normal file
19
commons/utils/oh-package-lock.json5
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"meta": {
|
||||||
|
"stableOrder": true
|
||||||
|
},
|
||||||
|
"lockfileVersion": 3,
|
||||||
|
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
|
||||||
|
"specifiers": {
|
||||||
|
"@ohos/crypto-js@^2.0.4": "@ohos/crypto-js@2.0.4"
|
||||||
|
},
|
||||||
|
"packages": {
|
||||||
|
"@ohos/crypto-js@2.0.4": {
|
||||||
|
"name": "@ohos/crypto-js",
|
||||||
|
"version": "2.0.4",
|
||||||
|
"integrity": "sha512-589ur6oqU1UNibqefMly2cwEeEhkSoCAA3uc+oNUwRnYYtevn/kQnO+Coi36N+VJSeeg/uFzZk1K/wUMdovpOA==",
|
||||||
|
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/crypto-js/-/crypto-js-2.0.4.har",
|
||||||
|
"registryType": "ohpm"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
13
commons/utils/oh-package.json5
Normal file
13
commons/utils/oh-package.json5
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"name": "utils",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "Please describe the basic information.",
|
||||||
|
"main": "Index.ets",
|
||||||
|
"author": "",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@ohos/crypto-js": "^2.0.4"
|
||||||
|
},
|
||||||
|
"devDependencies": {},
|
||||||
|
"dynamicDependencies": {}
|
||||||
|
}
|
||||||
84
commons/utils/src/main/ets/request/Base64Util.ets
Normal file
84
commons/utils/src/main/ets/request/Base64Util.ets
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
import util from '@ohos.util';
|
||||||
|
|
||||||
|
import { buffer } from '@kit.ArkTS';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base64 工具类
|
||||||
|
* author: 鸿蒙布道师
|
||||||
|
* since: 2025/03/31
|
||||||
|
*/
|
||||||
|
export class Base64Util {
|
||||||
|
/**
|
||||||
|
* 创建 Base64Helper 实例
|
||||||
|
* @returns Base64Helper 实例
|
||||||
|
*/
|
||||||
|
private static createBase64Helper(): util.Base64Helper {
|
||||||
|
return new util.Base64Helper();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编码为 Uint8Array(异步)
|
||||||
|
* @param array 输入的 Uint8Array 数据
|
||||||
|
* @returns 编码后的 Uint8Array 对象
|
||||||
|
*/
|
||||||
|
static encode(array: Uint8Array): Promise<Uint8Array> {
|
||||||
|
const base64 = Base64Util.createBase64Helper();
|
||||||
|
return base64.encode(array);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编码为 Uint8Array(同步)
|
||||||
|
* @param array 输入的 Uint8Array 数据
|
||||||
|
* @returns 编码后的 Uint8Array 对象
|
||||||
|
*/
|
||||||
|
static encodeSync(array: Uint8Array): Uint8Array {
|
||||||
|
const base64 = Base64Util.createBase64Helper();
|
||||||
|
return base64.encodeSync(array);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编码为字符串(异步)
|
||||||
|
* @param array 输入的 Uint8Array 数据
|
||||||
|
* @param options 可选参数
|
||||||
|
* @returns 编码后的字符串
|
||||||
|
*/
|
||||||
|
static encodeToStr(array: Uint8Array, options?: util.Type): Promise<string> {
|
||||||
|
const base64 = Base64Util.createBase64Helper();
|
||||||
|
return base64.encodeToString(array, options);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编码为字符串(同步)
|
||||||
|
* @param array 输入的 Uint8Array 数据
|
||||||
|
* @param options 可选参数
|
||||||
|
* @returns 编码后的字符串
|
||||||
|
*/
|
||||||
|
static encodeToStrSync(keyValueStr:string): string {
|
||||||
|
let array: Uint8Array=new Uint8Array(buffer.from(keyValueStr, 'utf-8').buffer)
|
||||||
|
const base64 = Base64Util.createBase64Helper();
|
||||||
|
|
||||||
|
return base64.encodeToStringSync(array, util.Type.BASIC).replaceAll("=", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解码为 Uint8Array(异步)
|
||||||
|
* @param input 输入的 Uint8Array 或字符串
|
||||||
|
* @param options 可选参数
|
||||||
|
* @returns 解码后的 Uint8Array 对象
|
||||||
|
*/
|
||||||
|
static decode(input: Uint8Array | string, options?: util.Type): Promise<Uint8Array> {
|
||||||
|
const base64 = Base64Util.createBase64Helper();
|
||||||
|
return base64.decode(input, options);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解码为 Uint8Array(同步)
|
||||||
|
* @param input 输入的 Uint8Array 或字符串
|
||||||
|
* @param options 可选参数
|
||||||
|
* @returns 解码后的 Uint8Array 对象
|
||||||
|
*/
|
||||||
|
static decodeSync(input: Uint8Array | string, options?: util.Type): Uint8Array {
|
||||||
|
const base64 = Base64Util.createBase64Helper();
|
||||||
|
return base64.decodeSync(input, options);
|
||||||
|
}
|
||||||
|
}
|
||||||
61
commons/utils/src/main/ets/request/ChangeUtil.ets
Normal file
61
commons/utils/src/main/ets/request/ChangeUtil.ets
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
|
||||||
|
import HashMap from '@ohos.util.HashMap';
|
||||||
|
import { Base64Util } from './Base64Util';
|
||||||
|
|
||||||
|
|
||||||
|
export class ChangeUtil {
|
||||||
|
/**
|
||||||
|
* 将HashMap转成JsonString
|
||||||
|
* @param map
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
static map2Json(map:HashMap<string, string>): string {
|
||||||
|
let jsonObject: Record<string, Object> = {};
|
||||||
|
map.forEach((value, key) => {
|
||||||
|
if(key != undefined && value != undefined){
|
||||||
|
jsonObject[key] = value;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return JSON.stringify(jsonObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
static getSign(extraDatas1:HashMap<string, string>): string {
|
||||||
|
let secret= extraDatas1.get("timestamp")
|
||||||
|
if(secret!=null) {
|
||||||
|
let keyValueStr: string = "";
|
||||||
|
let entriesArray: Array<string> = Array.from(extraDatas1.keys());
|
||||||
|
entriesArray.sort();
|
||||||
|
|
||||||
|
let sortedMap:HashMap<string, string> = new HashMap();
|
||||||
|
entriesArray.forEach((value: string, index: number) => {
|
||||||
|
sortedMap.set(value,extraDatas1.get(value));
|
||||||
|
keyValueStr +=value+extraDatas1.get(value)
|
||||||
|
});
|
||||||
|
keyValueStr = keyValueStr.replace(" ", "");
|
||||||
|
keyValueStr = keyValueStr + CryptoJS.MD5(secret).toString();
|
||||||
|
let Md5keyValueStr: string = CryptoJS.MD5(keyValueStr).toString();
|
||||||
|
let base64Str:string=Base64Util.encodeToStrSync(Md5keyValueStr);
|
||||||
|
return base64Str;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static isMobileNum(mobiles:string): boolean {
|
||||||
|
const reg2: RegExp = new RegExp('^(1[3-9])[0-9]{9}$')
|
||||||
|
|
||||||
|
return reg2.test(mobiles);
|
||||||
|
}
|
||||||
|
static isPassword(password:string): boolean {
|
||||||
|
const reg2: RegExp = new RegExp('^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$')
|
||||||
|
|
||||||
|
return reg2.test(password);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
33
commons/utils/src/main/ets/request/logger.ets
Normal file
33
commons/utils/src/main/ets/request/logger.ets
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
import hilog from '@ohos.hilog'
|
||||||
|
|
||||||
|
const DOMAIN = 0xFF09
|
||||||
|
const PREFIX = 'PASS_INTERVIEW_LOGGER'
|
||||||
|
const FORMAT = '%{public}s, %{public}s'
|
||||||
|
|
||||||
|
class Logger {
|
||||||
|
debug(...args: string[]) {
|
||||||
|
hilog.debug(DOMAIN, PREFIX, FORMAT, args)
|
||||||
|
}
|
||||||
|
|
||||||
|
info(...args: string[]) {
|
||||||
|
hilog.info(DOMAIN, PREFIX, FORMAT, args)
|
||||||
|
}
|
||||||
|
|
||||||
|
warn(...args: string[]) {
|
||||||
|
hilog.warn(DOMAIN, PREFIX, FORMAT, args)
|
||||||
|
}
|
||||||
|
|
||||||
|
error(...args: string[]) {
|
||||||
|
hilog.error(DOMAIN, PREFIX, FORMAT, args)
|
||||||
|
}
|
||||||
|
|
||||||
|
fatal(...args: string[]) {
|
||||||
|
hilog.fatal(DOMAIN, PREFIX, FORMAT, args)
|
||||||
|
}
|
||||||
|
|
||||||
|
isLoggable(level: hilog.LogLevel) {
|
||||||
|
hilog.isLoggable(DOMAIN, PREFIX, level)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export const logger = new Logger()
|
||||||
288
commons/utils/src/main/ets/request/request.ets
Normal file
288
commons/utils/src/main/ets/request/request.ets
Normal file
@ -0,0 +1,288 @@
|
|||||||
|
import { http } from '@kit.NetworkKit';
|
||||||
|
import { promptAction, router } from '@kit.ArkUI';
|
||||||
|
import { BusinessError } from '@ohos.base';
|
||||||
|
import { HashMap } from '@kit.ArkTS';
|
||||||
|
import { CryptoJS } from '@ohos/crypto-js'
|
||||||
|
import { Base64Util } from './Base64Util';
|
||||||
|
import { ChangeUtil } from './ChangeUtil'
|
||||||
|
import { logger } from './logger'
|
||||||
|
|
||||||
|
interface HdRequestOptions {
|
||||||
|
baseURL?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
type HdParams = Record<string, string | number | boolean>
|
||||||
|
|
||||||
|
export interface HdResponse<T> {
|
||||||
|
code: number
|
||||||
|
message: string
|
||||||
|
data: T
|
||||||
|
}
|
||||||
|
export interface TimestampBean {
|
||||||
|
timestamp:string
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
class HdHttp {
|
||||||
|
baseURL: string
|
||||||
|
|
||||||
|
constructor(options: HdRequestOptions) {
|
||||||
|
this.baseURL = options.baseURL || ''
|
||||||
|
}
|
||||||
|
|
||||||
|
private request1<T>(path: string, method: http.RequestMethod = http.RequestMethod.GET, extraDatas:HashMap<string, string>) {
|
||||||
|
const httpInstance = http.createHttp()
|
||||||
|
let fullUrl = this.baseURL + path
|
||||||
|
let promise = httpInstance.request(
|
||||||
|
// 请求url地址
|
||||||
|
fullUrl,
|
||||||
|
{
|
||||||
|
// 请求方式
|
||||||
|
method: http.RequestMethod.POST,
|
||||||
|
// 可选,默认为60s
|
||||||
|
connectTimeout: 60000,
|
||||||
|
// 可选,默认为60s
|
||||||
|
readTimeout: 60000,
|
||||||
|
// 开发者根据自身业务需要添加header字段
|
||||||
|
header: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
'sign':this.getSign(extraDatas)
|
||||||
|
},
|
||||||
|
extraData:ChangeUtil.map2Json(extraDatas)
|
||||||
|
});
|
||||||
|
logger.info('Response JSON.stringify(extraDatas)' + ChangeUtil.map2Json(extraDatas))
|
||||||
|
return promise.then((data) => {
|
||||||
|
logger.info('Response request:' + data.result);
|
||||||
|
if (data.result) {
|
||||||
|
const result = data.result as HdResponse<T>
|
||||||
|
logger.info('Response result:' + result);
|
||||||
|
return result
|
||||||
|
|
||||||
|
}
|
||||||
|
return Promise.reject(data.result)
|
||||||
|
// if (data.responseCode === http.ResponseCode.OK) {
|
||||||
|
// console.info('Response request:' + data.result);
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// return Promise.reject(data.result)
|
||||||
|
}
|
||||||
|
|
||||||
|
).catch((err:BusinessError) => {
|
||||||
|
logger.info('Response httpReq request:' + JSON.stringify(err));
|
||||||
|
return Promise.reject(err)
|
||||||
|
|
||||||
|
}).finally(() => {
|
||||||
|
httpInstance.destroy()
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
private request<T>(path: string, method: http.RequestMethod = http.RequestMethod.POST, extraDatas :HashMap<string, string>) {
|
||||||
|
const httpInstance = http.createHttp()
|
||||||
|
|
||||||
|
const options: http.HttpRequestOptions = {
|
||||||
|
method: http.RequestMethod.POST,
|
||||||
|
// 可选,默认为60s
|
||||||
|
connectTimeout: 60000,
|
||||||
|
// 可选,默认为60s
|
||||||
|
readTimeout: 60000,
|
||||||
|
// 开发者根据自身业务需要添加header字段
|
||||||
|
header: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
'sign':this.getSign(extraDatas)
|
||||||
|
},
|
||||||
|
extraData:ChangeUtil.map2Json(extraDatas)
|
||||||
|
}
|
||||||
|
|
||||||
|
let fullUrl = this.baseURL + path
|
||||||
|
|
||||||
|
|
||||||
|
return httpInstance.request(fullUrl, options).then((res) => {
|
||||||
|
logger.info('Response fullUrl:' +fullUrl+ res.result);
|
||||||
|
const result = res.result as HdResponse<T>
|
||||||
|
return result
|
||||||
|
}).catch((err: BusinessError) => {
|
||||||
|
logger.info(fullUrl+`Response succeeded: ${err}`);
|
||||||
|
promptAction.showToast({ message: err.message || '网络错误' })
|
||||||
|
return Promise.reject(err)
|
||||||
|
}).finally(() => {
|
||||||
|
httpInstance.destroy()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private requestafter<T>(path: string, method: http.RequestMethod = http.RequestMethod.GET, extraData?: Object) {
|
||||||
|
const httpInstance = http.createHttp()
|
||||||
|
|
||||||
|
const options: http.HttpRequestOptions = {
|
||||||
|
method: http.RequestMethod.GET,
|
||||||
|
// 可选,默认为60s
|
||||||
|
connectTimeout: 60000,
|
||||||
|
// 可选,默认为60s
|
||||||
|
readTimeout: 60000,
|
||||||
|
// 开发者根据自身业务需要添加header字段
|
||||||
|
header: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let fullUrl = this.baseURL + path
|
||||||
|
if (method === http.RequestMethod.GET && extraData) {
|
||||||
|
const strArr = Object.keys(extraData)
|
||||||
|
.filter(key => (extraData as HdParams)[key] !== undefined)
|
||||||
|
.map(key => `${key}=${(extraData as HdParams)[key]}`)
|
||||||
|
fullUrl += `?${strArr.join('&')}`
|
||||||
|
} else {
|
||||||
|
options.extraData = extraData
|
||||||
|
}
|
||||||
|
|
||||||
|
return httpInstance.request(fullUrl, options).then((res) => {
|
||||||
|
return Promise.reject(res.result)
|
||||||
|
}).catch((err: BusinessError) => {
|
||||||
|
logger.error(fullUrl+`Response succeeded: ${err}+${err.name}+${err.message}+${err.data}+${err.stack}`);
|
||||||
|
// logger.error(fullUrl, err.code?.toString(), err.message)
|
||||||
|
promptAction.showToast({ message: err.message || '网络错误' })
|
||||||
|
return Promise.reject(err)
|
||||||
|
}).finally(() => {
|
||||||
|
httpInstance.destroy()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
get<T>(url: string, data?: Object): Promise<HdResponse<T>> {
|
||||||
|
return this.requestafter<T>(url, http.RequestMethod.GET, data)
|
||||||
|
}
|
||||||
|
|
||||||
|
post<T>(url: string, data?: Object): Promise<HdResponse<T>> {
|
||||||
|
return this.requestafter<T>(url, http.RequestMethod.POST, data)
|
||||||
|
}
|
||||||
|
|
||||||
|
put<T>(url: string, data?: Object): Promise<HdResponse<T>> {
|
||||||
|
return this.requestafter<T>(url, http.RequestMethod.PUT, data)
|
||||||
|
}
|
||||||
|
|
||||||
|
delete<T>(url: string, data?: Object): Promise<HdResponse<T>> {
|
||||||
|
return this.requestafter<T>(url, http.RequestMethod.DELETE, data)
|
||||||
|
}
|
||||||
|
posts<T>(url: string, data: HashMap<string, string>): Promise<HdResponse<T>> {
|
||||||
|
return this.request<T>(url, http.RequestMethod.POST, data)
|
||||||
|
}
|
||||||
|
httpReq<T>(url: string, datas: HashMap<string, string>): Promise<HdResponse<T>> {
|
||||||
|
|
||||||
|
// 创建httpRequest对象。
|
||||||
|
let httpRequest = http.createHttp();
|
||||||
|
let url1 = "https://dev-app.igandan.com/app/manager/getSystemTimeStamp";
|
||||||
|
let promise = httpRequest.request(
|
||||||
|
// 请求url地址
|
||||||
|
url1,
|
||||||
|
{
|
||||||
|
// 请求方式
|
||||||
|
method: http.RequestMethod.GET,
|
||||||
|
// 可选,默认为60s
|
||||||
|
connectTimeout: 60000,
|
||||||
|
// 可选,默认为60s
|
||||||
|
readTimeout: 60000,
|
||||||
|
// 开发者根据自身业务需要添加header字段
|
||||||
|
header: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 处理响应结果。
|
||||||
|
return promise.then((data) => {
|
||||||
|
if (data.responseCode === http.ResponseCode.OK) {
|
||||||
|
logger.info('Response httpReq:' + data.result);
|
||||||
|
let json:TimestampBean = JSON.parse(data.result.toString()) as TimestampBean;
|
||||||
|
let tp = json.timestamp;
|
||||||
|
datas.set("user_uuid", '');
|
||||||
|
datas.set("client_type", 'A');
|
||||||
|
datas.set("version",'4.0.0' );
|
||||||
|
datas.set('timestamp',tp+'');
|
||||||
|
|
||||||
|
return this.posts<T>(url, datas);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return this.posts<T>(url, datas);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
).catch((err:BusinessError) => {
|
||||||
|
logger.info('Response httpReq error:' + JSON.stringify(err));
|
||||||
|
return Promise.reject(err);
|
||||||
|
|
||||||
|
}).finally(() => {
|
||||||
|
httpRequest.destroy()
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
httpReqSimply<T>(url: string) {
|
||||||
|
|
||||||
|
// 创建httpRequest对象。
|
||||||
|
let httpRequest = http.createHttp();
|
||||||
|
|
||||||
|
let promise = httpRequest.request(
|
||||||
|
// 请求url地址
|
||||||
|
url,
|
||||||
|
{
|
||||||
|
// 请求方式
|
||||||
|
method: http.RequestMethod.POST,
|
||||||
|
// 可选,默认为60s
|
||||||
|
connectTimeout: 60000,
|
||||||
|
// 可选,默认为60s
|
||||||
|
readTimeout: 60000,
|
||||||
|
// 开发者根据自身业务需要添加header字段
|
||||||
|
header: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 处理响应结果。
|
||||||
|
return promise.then((data) => {
|
||||||
|
logger.info('Response httpReqSimply:' + JSON.stringify(data));
|
||||||
|
const result = data.result as HdResponse<T>
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
|
).catch((err:BusinessError) => {
|
||||||
|
logger.info('Response httpReq error:' + JSON.stringify(err));
|
||||||
|
return Promise.reject(err);
|
||||||
|
|
||||||
|
}).finally(() => {
|
||||||
|
httpRequest.destroy()
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
getSign(extraDatas1:HashMap<string, string>): string {
|
||||||
|
let secret= extraDatas1.get("timestamp")
|
||||||
|
if(secret!=null) {
|
||||||
|
let keyValueStr: string = "";
|
||||||
|
let entriesArray: Array<string> = Array.from(extraDatas1.keys());
|
||||||
|
entriesArray.sort();
|
||||||
|
|
||||||
|
let sortedMap:HashMap<string, string> = new HashMap();
|
||||||
|
entriesArray.forEach((value: string, index: number) => {
|
||||||
|
sortedMap.set(value,extraDatas1.get(value));
|
||||||
|
keyValueStr +=value+extraDatas1.get(value)
|
||||||
|
});
|
||||||
|
keyValueStr = keyValueStr.replace(" ", "");
|
||||||
|
keyValueStr = keyValueStr + CryptoJS.MD5(secret).toString();
|
||||||
|
let Md5keyValueStr: string = CryptoJS.MD5(keyValueStr).toString();
|
||||||
|
let base64Str:string=Base64Util.encodeToStrSync(Md5keyValueStr);
|
||||||
|
return base64Str;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export const hdHttp = new HdHttp({ baseURL: '' })
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
11
commons/utils/src/main/module.json5
Normal file
11
commons/utils/src/main/module.json5
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"module": {
|
||||||
|
"name": "utils",
|
||||||
|
"type": "har",
|
||||||
|
"deviceTypes": [
|
||||||
|
"default",
|
||||||
|
"tablet",
|
||||||
|
"2in1"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
8
commons/utils/src/main/resources/base/element/float.json
Normal file
8
commons/utils/src/main/resources/base/element/float.json
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"float": [
|
||||||
|
{
|
||||||
|
"name": "page_text_font_size",
|
||||||
|
"value": "50fp"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"string": [
|
||||||
|
{
|
||||||
|
"name": "page_show",
|
||||||
|
"value": "page from package"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
35
commons/utils/src/ohosTest/ets/test/Ability.test.ets
Normal file
35
commons/utils/src/ohosTest/ets/test/Ability.test.ets
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
import { hilog } from '@kit.PerformanceAnalysisKit';
|
||||||
|
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
|
||||||
|
|
||||||
|
export default function abilityTest() {
|
||||||
|
describe('ActsAbilityTest', () => {
|
||||||
|
// Defines a test suite. Two parameters are supported: test suite name and test suite function.
|
||||||
|
beforeAll(() => {
|
||||||
|
// Presets an action, which is performed only once before all test cases of the test suite start.
|
||||||
|
// This API supports only one parameter: preset action function.
|
||||||
|
})
|
||||||
|
beforeEach(() => {
|
||||||
|
// Presets an action, which is performed before each unit test case starts.
|
||||||
|
// The number of execution times is the same as the number of test cases defined by **it**.
|
||||||
|
// This API supports only one parameter: preset action function.
|
||||||
|
})
|
||||||
|
afterEach(() => {
|
||||||
|
// Presets a clear action, which is performed after each unit test case ends.
|
||||||
|
// The number of execution times is the same as the number of test cases defined by **it**.
|
||||||
|
// This API supports only one parameter: clear action function.
|
||||||
|
})
|
||||||
|
afterAll(() => {
|
||||||
|
// Presets a clear action, which is performed after all test cases of the test suite end.
|
||||||
|
// This API supports only one parameter: clear action function.
|
||||||
|
})
|
||||||
|
it('assertContain', 0, () => {
|
||||||
|
// Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function.
|
||||||
|
hilog.info(0x0000, 'testTag', '%{public}s', 'it begin');
|
||||||
|
let a = 'abc';
|
||||||
|
let b = 'b';
|
||||||
|
// Defines a variety of assertion methods, which are used to declare expected boolean conditions.
|
||||||
|
expect(a).assertContain(b);
|
||||||
|
expect(a).assertEqual(a);
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
5
commons/utils/src/ohosTest/ets/test/List.test.ets
Normal file
5
commons/utils/src/ohosTest/ets/test/List.test.ets
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import abilityTest from './Ability.test';
|
||||||
|
|
||||||
|
export default function testsuite() {
|
||||||
|
abilityTest();
|
||||||
|
}
|
||||||
13
commons/utils/src/ohosTest/module.json5
Normal file
13
commons/utils/src/ohosTest/module.json5
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"module": {
|
||||||
|
"name": "utils_test",
|
||||||
|
"type": "feature",
|
||||||
|
"deviceTypes": [
|
||||||
|
"default",
|
||||||
|
"tablet",
|
||||||
|
"2in1"
|
||||||
|
],
|
||||||
|
"deliveryWithInstall": true,
|
||||||
|
"installationFree": false
|
||||||
|
}
|
||||||
|
}
|
||||||
5
commons/utils/src/test/List.test.ets
Normal file
5
commons/utils/src/test/List.test.ets
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import localUnitTest from './LocalUnit.test';
|
||||||
|
|
||||||
|
export default function testsuite() {
|
||||||
|
localUnitTest();
|
||||||
|
}
|
||||||
33
commons/utils/src/test/LocalUnit.test.ets
Normal file
33
commons/utils/src/test/LocalUnit.test.ets
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
|
||||||
|
|
||||||
|
export default function localUnitTest() {
|
||||||
|
describe('localUnitTest', () => {
|
||||||
|
// Defines a test suite. Two parameters are supported: test suite name and test suite function.
|
||||||
|
beforeAll(() => {
|
||||||
|
// Presets an action, which is performed only once before all test cases of the test suite start.
|
||||||
|
// This API supports only one parameter: preset action function.
|
||||||
|
});
|
||||||
|
beforeEach(() => {
|
||||||
|
// Presets an action, which is performed before each unit test case starts.
|
||||||
|
// The number of execution times is the same as the number of test cases defined by **it**.
|
||||||
|
// This API supports only one parameter: preset action function.
|
||||||
|
});
|
||||||
|
afterEach(() => {
|
||||||
|
// Presets a clear action, which is performed after each unit test case ends.
|
||||||
|
// The number of execution times is the same as the number of test cases defined by **it**.
|
||||||
|
// This API supports only one parameter: clear action function.
|
||||||
|
});
|
||||||
|
afterAll(() => {
|
||||||
|
// Presets a clear action, which is performed after all test cases of the test suite end.
|
||||||
|
// This API supports only one parameter: clear action function.
|
||||||
|
});
|
||||||
|
it('assertContain', 0, () => {
|
||||||
|
// Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function.
|
||||||
|
let a = 'abc';
|
||||||
|
let b = 'b';
|
||||||
|
// Defines a variety of assertion methods, which are used to declare expected boolean conditions.
|
||||||
|
expect(a).assertContain(b);
|
||||||
|
expect(a).assertEqual(a);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
6
features/Home/.gitignore
vendored
Normal file
6
features/Home/.gitignore
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
/node_modules
|
||||||
|
/oh_modules
|
||||||
|
/.preview
|
||||||
|
/build
|
||||||
|
/.cxx
|
||||||
|
/.test
|
||||||
17
features/Home/BuildProfile.ets
Normal file
17
features/Home/BuildProfile.ets
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
/**
|
||||||
|
* Use these variables when you tailor your ArkTS code. They must be of the const type.
|
||||||
|
*/
|
||||||
|
export const HAR_VERSION = '1.0.0';
|
||||||
|
export const BUILD_MODE_NAME = 'debug';
|
||||||
|
export const DEBUG = true;
|
||||||
|
export const TARGET_NAME = 'default';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* BuildProfile Class is used only for compatibility purposes.
|
||||||
|
*/
|
||||||
|
export default class BuildProfile {
|
||||||
|
static readonly HAR_VERSION = HAR_VERSION;
|
||||||
|
static readonly BUILD_MODE_NAME = BUILD_MODE_NAME;
|
||||||
|
static readonly DEBUG = DEBUG;
|
||||||
|
static readonly TARGET_NAME = TARGET_NAME;
|
||||||
|
}
|
||||||
3
features/Home/Index.ets
Normal file
3
features/Home/Index.ets
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export { HomePage } from './src/main/ets/pages/HomePage';
|
||||||
|
|
||||||
|
export { VideoPage } from './src/main/ets/pages/VideoPage';
|
||||||
31
features/Home/build-profile.json5
Normal file
31
features/Home/build-profile.json5
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"apiType": "stageMode",
|
||||||
|
"buildOption": {
|
||||||
|
},
|
||||||
|
"buildOptionSet": [
|
||||||
|
{
|
||||||
|
"name": "release",
|
||||||
|
"arkOptions": {
|
||||||
|
"obfuscation": {
|
||||||
|
"ruleOptions": {
|
||||||
|
"enable": false,
|
||||||
|
"files": [
|
||||||
|
"./obfuscation-rules.txt"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"consumerFiles": [
|
||||||
|
"./consumer-rules.txt"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"name": "default"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ohosTest"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
0
features/Home/consumer-rules.txt
Normal file
0
features/Home/consumer-rules.txt
Normal file
6
features/Home/hvigorfile.ts
Normal file
6
features/Home/hvigorfile.ts
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import { harTasks } from '@ohos/hvigor-ohos-plugin';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
system: harTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
|
||||||
|
plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
|
||||||
|
}
|
||||||
23
features/Home/obfuscation-rules.txt
Normal file
23
features/Home/obfuscation-rules.txt
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# Define project specific obfuscation rules here.
|
||||||
|
# You can include the obfuscation configuration files in the current module's build-profile.json5.
|
||||||
|
#
|
||||||
|
# For more details, see
|
||||||
|
# https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5
|
||||||
|
|
||||||
|
# Obfuscation options:
|
||||||
|
# -disable-obfuscation: disable all obfuscations
|
||||||
|
# -enable-property-obfuscation: obfuscate the property names
|
||||||
|
# -enable-toplevel-obfuscation: obfuscate the names in the global scope
|
||||||
|
# -compact: remove unnecessary blank spaces and all line feeds
|
||||||
|
# -remove-log: remove all console.* statements
|
||||||
|
# -print-namecache: print the name cache that contains the mapping from the old names to new names
|
||||||
|
# -apply-namecache: reuse the given cache file
|
||||||
|
|
||||||
|
# Keep options:
|
||||||
|
# -keep-property-name: specifies property names that you want to keep
|
||||||
|
# -keep-global-name: specifies names that you want to keep in the global scope
|
||||||
|
|
||||||
|
-enable-property-obfuscation
|
||||||
|
-enable-toplevel-obfuscation
|
||||||
|
-enable-filename-obfuscation
|
||||||
|
-enable-export-obfuscation
|
||||||
18
features/Home/oh-package-lock.json5
Normal file
18
features/Home/oh-package-lock.json5
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"meta": {
|
||||||
|
"stableOrder": true
|
||||||
|
},
|
||||||
|
"lockfileVersion": 3,
|
||||||
|
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
|
||||||
|
"specifiers": {
|
||||||
|
"@itcast/basic@../../commons/basic": "@itcast/basic@../../commons/basic"
|
||||||
|
},
|
||||||
|
"packages": {
|
||||||
|
"@itcast/basic@../../commons/basic": {
|
||||||
|
"name": "@itcast/basic",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "../../commons/basic",
|
||||||
|
"registryType": "local"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user