Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f2868c2de3 | ||
|
|
86f95a4732 | ||
|
|
09a6f13e1d | ||
|
|
e215f73788 | ||
|
|
f821535e18 | ||
|
|
f44649d8dc | ||
|
|
7f8c81dc66 | ||
|
|
15f7f114c4 | ||
|
|
8908fa3cc9 | ||
|
|
bed645747d | ||
|
|
b2bdaeaff3 | ||
|
|
2c3f44b362 | ||
|
|
1a0b9e0436 | ||
|
|
ab1f72ba6c | ||
|
|
3d1c988435 | ||
|
|
ae3b458c02 | ||
|
|
bc9817efe7 | ||
|
|
338a890d4a | ||
|
|
468f966a7e | ||
|
|
afa8c2d17f | ||
|
|
8be5369c25 | ||
|
|
da5a1b603c | ||
|
|
b11b4b65db | ||
|
|
c8184e2b32 | ||
|
|
7de570c9d8 | ||
|
|
80351c6ca2 | ||
|
|
ae211c8b35 | ||
|
|
d9449ec9fa | ||
|
|
76df9928f4 | ||
|
|
8d5973df8d | ||
|
|
e9bb89b90a | ||
|
|
962e4c6725 | ||
|
|
e8c8f73568 | ||
|
|
bbecb72aec | ||
|
|
becf6e12c3 | ||
|
|
f9d7986df0 | ||
|
|
b3dae046d1 | ||
|
|
25e596b591 | ||
|
|
eab0c6de60 |
@@ -0,0 +1,64 @@
|
||||
Language: Cpp
|
||||
# BasedOnStyle: LLVM
|
||||
ColumnLimit: 120
|
||||
SortIncludes: CaseSensitive
|
||||
TabWidth: 4
|
||||
IndentWidth: 4
|
||||
UseTab: Never
|
||||
AccessModifierOffset: -4
|
||||
ContinuationIndentWidth: 4
|
||||
IndentCaseBlocks: false
|
||||
IndentCaseLabels: false
|
||||
IndentGotoLabels: true
|
||||
IndentWrappedFunctionNames: false
|
||||
SortUsingDeclarations: false
|
||||
NamespaceIndentation: None
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceAfterLogicalNot: false
|
||||
SpaceAfterTemplateKeyword: true
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeCaseColon: false
|
||||
SpaceBeforeCpp11BracedList: false
|
||||
SpaceBeforeCtorInitializerColon: true
|
||||
SpaceBeforeInheritanceColon: true
|
||||
SpaceBeforeRangeBasedForLoopColon: true
|
||||
SpaceBeforeSquareBrackets: false
|
||||
SpaceInEmptyBlock: false
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesInAngles: false
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInConditionalStatement: false
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
AlignTrailingComments: true
|
||||
AlignAfterOpenBracket: true
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortEnumsOnASingleLine: true
|
||||
AllowShortFunctionsOnASingleLine: All
|
||||
AllowShortIfStatementsOnASingleLine: Never
|
||||
AllowShortLambdasOnASingleLine: All
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakTemplateDeclarations: MultiLine
|
||||
BinPackArguments: true
|
||||
BinPackParameters: true
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializers: BeforeColon
|
||||
BreakInheritanceList: BeforeColon
|
||||
BreakStringLiterals: true
|
||||
InsertBraces: false
|
||||
IndentExternBlock: NoIndent
|
||||
BreakBeforeBraces: Custom
|
||||
BraceWrapping:
|
||||
AfterCaseLabel: false
|
||||
AfterClass: false
|
||||
AfterControlStatement: Never
|
||||
AfterEnum: false
|
||||
AfterFunction: false
|
||||
AfterNamespace: false
|
||||
AfterStruct: false
|
||||
AfterUnion: false
|
||||
AfterExternBlock: false
|
||||
BeforeCatch: false
|
||||
BeforeElse: false
|
||||
ReflowComments: true
|
||||
MaxEmptyLinesToKeep: 2
|
||||
@@ -0,0 +1,38 @@
|
||||
HELP.md
|
||||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target/
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
*.log
|
||||
oh_modules/
|
||||
features/Home/build/
|
||||
.hvigor/
|
||||
.hvigor/outputs/
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
@@ -0,0 +1 @@
|
||||
{"compileSdkVersion":"5.0.2(14)","hvigorVersion":"5.14.3","toolChainsVersion":"5.0.2.123"}
|
||||
@@ -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"}}
|
||||
@@ -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":{}}
|
||||
@@ -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"}}
|
||||
@@ -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"}]}
|
||||
@@ -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"}}
|
||||
@@ -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":{}}
|
||||
@@ -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"}}
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"uicomponents","version":"1.0.0","description":"Please describe the basic information.","main":"Index.ets","author":"","license":"Apache-2.0","dependencies":{}}
|
||||
@@ -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":{}}
|
||||
@@ -0,0 +1,718 @@
|
||||
{
|
||||
"ohos-module-default": {
|
||||
"SELECT_TARGET": "default",
|
||||
"MODULE_BUILD_DIR": "D:\\202076work\\hongmeng\\newExpert\\harmony\\products\\expert\\build",
|
||||
"DEPENDENCY_INFO": {
|
||||
"@itcast/basic": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\basic",
|
||||
"utils": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\utils",
|
||||
"mypage": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\mypage",
|
||||
"home": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\Home",
|
||||
"register": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\register",
|
||||
"@ohos/crypto-js": "D:\\202076work\\hongmeng\\newExpert\\harmony\\oh_modules\\.ohpm\\@ohos+crypto-js@2.0.4\\oh_modules\\@ohos\\crypto-js"
|
||||
},
|
||||
"TARGETS": {
|
||||
"default": {
|
||||
"SOURCE_ROOT": "D:\\202076work\\hongmeng\\newExpert\\harmony\\products\\expert\\src\\main",
|
||||
"RESOURCES_PATH": [
|
||||
"D:\\202076work\\hongmeng\\newExpert\\harmony\\products\\expert\\src\\main\\resources"
|
||||
],
|
||||
"BUILD_PATH": {
|
||||
"OUTPUT_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\products\\expert\\build\\default\\outputs\\default",
|
||||
"INTERMEDIA_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\products\\expert\\build\\default\\intermediates",
|
||||
"JS_ASSETS_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\products\\expert\\build\\default\\intermediates\\loader_out\\default",
|
||||
"JS_LITE_ASSETS_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\products\\expert\\build\\default\\intermediates\\loader_out_lite\\default",
|
||||
"RES_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\products\\expert\\build\\default\\intermediates\\res\\default",
|
||||
"RES_PROFILE_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\products\\expert\\build\\default\\intermediates\\res\\default\\resources\\base\\profile",
|
||||
"ETS_SUPER_VISUAL_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\products\\expert\\build\\default\\cache\\default\\default@CompileArkTS\\esmodule",
|
||||
"JS_SUPER_VISUAL_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\products\\expert\\build\\default\\cache\\default\\default@CompileJS\\jsbundle",
|
||||
"WORKER_LOADER": "D:\\202076work\\hongmeng\\newExpert\\harmony\\products\\expert\\build\\default\\intermediates\\loader\\default\\loader.json",
|
||||
"MANIFEST_JSON": "D:\\202076work\\hongmeng\\newExpert\\harmony\\products\\expert\\build\\default\\intermediates\\manifest\\default",
|
||||
"OUTPUT_METADATA_JSON": "D:\\202076work\\hongmeng\\newExpert\\harmony\\products\\expert\\build\\default\\intermediates\\hap_metadata\\default\\output_metadata.json",
|
||||
"SOURCE_MAP_DIR": "D:\\202076work\\hongmeng\\newExpert\\harmony\\products\\expert\\build\\default\\intermediates\\source_map\\default"
|
||||
},
|
||||
"BUILD_OPTION": {
|
||||
"debuggable": true
|
||||
}
|
||||
},
|
||||
"ohosTest": {
|
||||
"SOURCE_ROOT": "D:\\202076work\\hongmeng\\newExpert\\harmony\\products\\expert\\src\\ohosTest",
|
||||
"RESOURCES_PATH": [
|
||||
"D:\\202076work\\hongmeng\\newExpert\\harmony\\products\\expert\\src\\ohosTest\\resources"
|
||||
],
|
||||
"BUILD_PATH": {
|
||||
"OUTPUT_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\products\\expert\\build\\default\\outputs\\ohosTest",
|
||||
"INTERMEDIA_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\products\\expert\\build\\default\\intermediates",
|
||||
"JS_ASSETS_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\products\\expert\\build\\default\\intermediates\\loader_out\\ohosTest",
|
||||
"JS_LITE_ASSETS_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\products\\expert\\build\\default\\intermediates\\loader_out_lite\\ohosTest",
|
||||
"RES_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\products\\expert\\build\\default\\intermediates\\res\\ohosTest",
|
||||
"RES_PROFILE_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\products\\expert\\build\\default\\intermediates\\res\\ohosTest\\resources\\base\\profile",
|
||||
"ETS_SUPER_VISUAL_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\products\\expert\\build\\default\\cache\\ohosTest\\ohosTest@OhosTestCompileArkTS\\esmodule",
|
||||
"JS_SUPER_VISUAL_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\products\\expert\\build\\default\\cache\\ohosTest\\ohosTest@OhosTestCompileJS\\jsbundle",
|
||||
"WORKER_LOADER": "D:\\202076work\\hongmeng\\newExpert\\harmony\\products\\expert\\build\\default\\intermediates\\loader\\ohosTest\\loader.json",
|
||||
"MANIFEST_JSON": "D:\\202076work\\hongmeng\\newExpert\\harmony\\products\\expert\\build\\default\\intermediates\\manifest\\ohosTest",
|
||||
"OUTPUT_METADATA_JSON": "D:\\202076work\\hongmeng\\newExpert\\harmony\\products\\expert\\build\\default\\intermediates\\hap_metadata\\ohosTest\\output_metadata.json",
|
||||
"SOURCE_MAP_DIR": "D:\\202076work\\hongmeng\\newExpert\\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": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\uicomponents\\build",
|
||||
"DEPENDENCY_INFO": {
|
||||
"@ohos/crypto-js": "D:\\202076work\\hongmeng\\newExpert\\harmony\\oh_modules\\.ohpm\\@ohos+crypto-js@2.0.4\\oh_modules\\@ohos\\crypto-js"
|
||||
},
|
||||
"TARGETS": {
|
||||
"default": {
|
||||
"SOURCE_ROOT": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\uicomponents\\src\\main",
|
||||
"RESOURCES_PATH": [
|
||||
"D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\uicomponents\\src\\main\\resources"
|
||||
],
|
||||
"BUILD_PATH": {
|
||||
"OUTPUT_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\uicomponents\\build\\default\\outputs\\default",
|
||||
"INTERMEDIA_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\uicomponents\\build\\default\\intermediates",
|
||||
"JS_ASSETS_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\uicomponents\\build\\default\\intermediates\\loader_out\\default",
|
||||
"JS_LITE_ASSETS_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\uicomponents\\build\\default\\intermediates\\loader_out_lite\\default",
|
||||
"RES_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\uicomponents\\build\\default\\intermediates\\res\\default",
|
||||
"RES_PROFILE_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\uicomponents\\build\\default\\intermediates\\res\\default\\resources\\base\\profile",
|
||||
"ETS_SUPER_VISUAL_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\uicomponents\\build\\default\\cache\\default\\default@HarCompileArkTS\\esmodule",
|
||||
"JS_SUPER_VISUAL_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\uicomponents\\build\\default\\cache\\default\\default@HarCompileJS\\jsbundle",
|
||||
"WORKER_LOADER": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\uicomponents\\build\\default\\intermediates\\loader\\default\\loader.json",
|
||||
"MANIFEST_JSON": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\uicomponents\\build\\default\\intermediates\\manifest\\default",
|
||||
"OUTPUT_METADATA_JSON": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\uicomponents\\build\\default\\intermediates\\hap_metadata\\default\\output_metadata.json",
|
||||
"SOURCE_MAP_DIR": "D:\\202076work\\hongmeng\\newExpert\\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": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\utils\\build",
|
||||
"DEPENDENCY_INFO": {
|
||||
"@ohos/crypto-js": "D:\\202076work\\hongmeng\\newExpert\\harmony\\oh_modules\\.ohpm\\@ohos+crypto-js@2.0.4\\oh_modules\\@ohos\\crypto-js"
|
||||
},
|
||||
"TARGETS": {
|
||||
"default": {
|
||||
"SOURCE_ROOT": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\utils\\src\\main",
|
||||
"RESOURCES_PATH": [
|
||||
"D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\utils\\src\\main\\resources"
|
||||
],
|
||||
"BUILD_PATH": {
|
||||
"OUTPUT_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\utils\\build\\default\\outputs\\default",
|
||||
"INTERMEDIA_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\utils\\build\\default\\intermediates",
|
||||
"JS_ASSETS_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\utils\\build\\default\\intermediates\\loader_out\\default",
|
||||
"JS_LITE_ASSETS_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\utils\\build\\default\\intermediates\\loader_out_lite\\default",
|
||||
"RES_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\utils\\build\\default\\intermediates\\res\\default",
|
||||
"RES_PROFILE_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\utils\\build\\default\\intermediates\\res\\default\\resources\\base\\profile",
|
||||
"ETS_SUPER_VISUAL_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\utils\\build\\default\\cache\\default\\default@HarCompileArkTS\\esmodule",
|
||||
"JS_SUPER_VISUAL_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\utils\\build\\default\\cache\\default\\default@HarCompileJS\\jsbundle",
|
||||
"WORKER_LOADER": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\utils\\build\\default\\intermediates\\loader\\default\\loader.json",
|
||||
"MANIFEST_JSON": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\utils\\build\\default\\intermediates\\manifest\\default",
|
||||
"OUTPUT_METADATA_JSON": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\utils\\build\\default\\intermediates\\hap_metadata\\default\\output_metadata.json",
|
||||
"SOURCE_MAP_DIR": "D:\\202076work\\hongmeng\\newExpert\\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": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\mypage\\build",
|
||||
"DEPENDENCY_INFO": {
|
||||
"@itcast/basic": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\basic",
|
||||
"@ohos/crypto-js": "D:\\202076work\\hongmeng\\newExpert\\harmony\\oh_modules\\.ohpm\\@ohos+crypto-js@2.0.4\\oh_modules\\@ohos\\crypto-js"
|
||||
},
|
||||
"TARGETS": {
|
||||
"default": {
|
||||
"SOURCE_ROOT": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\mypage\\src\\main",
|
||||
"RESOURCES_PATH": [
|
||||
"D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\mypage\\src\\main\\resources"
|
||||
],
|
||||
"BUILD_PATH": {
|
||||
"OUTPUT_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\mypage\\build\\default\\outputs\\default",
|
||||
"INTERMEDIA_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\mypage\\build\\default\\intermediates",
|
||||
"JS_ASSETS_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\mypage\\build\\default\\intermediates\\loader_out\\default",
|
||||
"JS_LITE_ASSETS_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\mypage\\build\\default\\intermediates\\loader_out_lite\\default",
|
||||
"RES_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\mypage\\build\\default\\intermediates\\res\\default",
|
||||
"RES_PROFILE_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\mypage\\build\\default\\intermediates\\res\\default\\resources\\base\\profile",
|
||||
"ETS_SUPER_VISUAL_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\mypage\\build\\default\\cache\\default\\default@HarCompileArkTS\\esmodule",
|
||||
"JS_SUPER_VISUAL_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\mypage\\build\\default\\cache\\default\\default@HarCompileJS\\jsbundle",
|
||||
"WORKER_LOADER": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\mypage\\build\\default\\intermediates\\loader\\default\\loader.json",
|
||||
"MANIFEST_JSON": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\mypage\\build\\default\\intermediates\\manifest\\default",
|
||||
"OUTPUT_METADATA_JSON": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\mypage\\build\\default\\intermediates\\hap_metadata\\default\\output_metadata.json",
|
||||
"SOURCE_MAP_DIR": "D:\\202076work\\hongmeng\\newExpert\\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": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\basic\\build",
|
||||
"DEPENDENCY_INFO": {
|
||||
"@ohos/crypto-js": "D:\\202076work\\hongmeng\\newExpert\\harmony\\oh_modules\\.ohpm\\@ohos+crypto-js@2.0.4\\oh_modules\\@ohos\\crypto-js"
|
||||
},
|
||||
"TARGETS": {
|
||||
"default": {
|
||||
"SOURCE_ROOT": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\basic\\src\\main",
|
||||
"RESOURCES_PATH": [
|
||||
"D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\basic\\src\\main\\resources"
|
||||
],
|
||||
"BUILD_PATH": {
|
||||
"OUTPUT_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\basic\\build\\default\\outputs\\default",
|
||||
"INTERMEDIA_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\basic\\build\\default\\intermediates",
|
||||
"JS_ASSETS_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\basic\\build\\default\\intermediates\\loader_out\\default",
|
||||
"JS_LITE_ASSETS_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\basic\\build\\default\\intermediates\\loader_out_lite\\default",
|
||||
"RES_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\basic\\build\\default\\intermediates\\res\\default",
|
||||
"RES_PROFILE_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\basic\\build\\default\\intermediates\\res\\default\\resources\\base\\profile",
|
||||
"ETS_SUPER_VISUAL_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\basic\\build\\default\\cache\\default\\default@HarCompileArkTS\\esmodule",
|
||||
"JS_SUPER_VISUAL_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\basic\\build\\default\\cache\\default\\default@HarCompileJS\\jsbundle",
|
||||
"WORKER_LOADER": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\basic\\build\\default\\intermediates\\loader\\default\\loader.json",
|
||||
"MANIFEST_JSON": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\basic\\build\\default\\intermediates\\manifest\\default",
|
||||
"OUTPUT_METADATA_JSON": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\basic\\build\\default\\intermediates\\hap_metadata\\default\\output_metadata.json",
|
||||
"SOURCE_MAP_DIR": "D:\\202076work\\hongmeng\\newExpert\\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": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\Home\\build",
|
||||
"DEPENDENCY_INFO": {
|
||||
"@itcast/basic": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\basic",
|
||||
"@ohos/crypto-js": "D:\\202076work\\hongmeng\\newExpert\\harmony\\oh_modules\\.ohpm\\@ohos+crypto-js@2.0.4\\oh_modules\\@ohos\\crypto-js"
|
||||
},
|
||||
"TARGETS": {
|
||||
"default": {
|
||||
"SOURCE_ROOT": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\Home\\src\\main",
|
||||
"RESOURCES_PATH": [
|
||||
"D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\Home\\src\\main\\resources"
|
||||
],
|
||||
"BUILD_PATH": {
|
||||
"OUTPUT_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\Home\\build\\default\\outputs\\default",
|
||||
"INTERMEDIA_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\Home\\build\\default\\intermediates",
|
||||
"JS_ASSETS_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\Home\\build\\default\\intermediates\\loader_out\\default",
|
||||
"JS_LITE_ASSETS_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\Home\\build\\default\\intermediates\\loader_out_lite\\default",
|
||||
"RES_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\Home\\build\\default\\intermediates\\res\\default",
|
||||
"RES_PROFILE_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\Home\\build\\default\\intermediates\\res\\default\\resources\\base\\profile",
|
||||
"ETS_SUPER_VISUAL_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\Home\\build\\default\\cache\\default\\default@HarCompileArkTS\\esmodule",
|
||||
"JS_SUPER_VISUAL_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\Home\\build\\default\\cache\\default\\default@HarCompileJS\\jsbundle",
|
||||
"WORKER_LOADER": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\Home\\build\\default\\intermediates\\loader\\default\\loader.json",
|
||||
"MANIFEST_JSON": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\Home\\build\\default\\intermediates\\manifest\\default",
|
||||
"OUTPUT_METADATA_JSON": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\Home\\build\\default\\intermediates\\hap_metadata\\default\\output_metadata.json",
|
||||
"SOURCE_MAP_DIR": "D:\\202076work\\hongmeng\\newExpert\\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": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\register\\build",
|
||||
"DEPENDENCY_INFO": {
|
||||
"@itcast/basic": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\basic",
|
||||
"@ohos/crypto-js": "D:\\202076work\\hongmeng\\newExpert\\harmony\\oh_modules\\.ohpm\\@ohos+crypto-js@2.0.4\\oh_modules\\@ohos\\crypto-js"
|
||||
},
|
||||
"TARGETS": {
|
||||
"default": {
|
||||
"SOURCE_ROOT": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\register\\src\\main",
|
||||
"RESOURCES_PATH": [
|
||||
"D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\register\\src\\main\\resources"
|
||||
],
|
||||
"BUILD_PATH": {
|
||||
"OUTPUT_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\register\\build\\default\\outputs\\default",
|
||||
"INTERMEDIA_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\register\\build\\default\\intermediates",
|
||||
"JS_ASSETS_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\register\\build\\default\\intermediates\\loader_out\\default",
|
||||
"JS_LITE_ASSETS_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\register\\build\\default\\intermediates\\loader_out_lite\\default",
|
||||
"RES_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\register\\build\\default\\intermediates\\res\\default",
|
||||
"RES_PROFILE_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\register\\build\\default\\intermediates\\res\\default\\resources\\base\\profile",
|
||||
"ETS_SUPER_VISUAL_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\register\\build\\default\\cache\\default\\default@HarCompileArkTS\\esmodule",
|
||||
"JS_SUPER_VISUAL_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\register\\build\\default\\cache\\default\\default@HarCompileJS\\jsbundle",
|
||||
"WORKER_LOADER": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\register\\build\\default\\intermediates\\loader\\default\\loader.json",
|
||||
"MANIFEST_JSON": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\register\\build\\default\\intermediates\\manifest\\default",
|
||||
"OUTPUT_METADATA_JSON": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\register\\build\\default\\intermediates\\hap_metadata\\default\\output_metadata.json",
|
||||
"SOURCE_MAP_DIR": "D:\\202076work\\hongmeng\\newExpert\\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": "D:\\202076work\\hongmeng\\newExpert\\harmony\\build",
|
||||
"BUNDLE_NAME": "com.example.expert",
|
||||
"BUILD_PATH": {
|
||||
"OUTPUT_PATH": "D:\\202076work\\hongmeng\\newExpert\\harmony\\build\\outputs\\default"
|
||||
},
|
||||
"MODULES": [
|
||||
{
|
||||
"name": "default",
|
||||
"srcPath": "D:\\202076work\\hongmeng\\newExpert\\harmony\\products\\expert",
|
||||
"targets": [
|
||||
{
|
||||
"name": "default",
|
||||
"applyToProducts": [
|
||||
"default"
|
||||
]
|
||||
}
|
||||
],
|
||||
"belongProjectPath": "D:\\202076work\\hongmeng\\newExpert\\harmony"
|
||||
},
|
||||
{
|
||||
"name": "uicomponents",
|
||||
"srcPath": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\uicomponents",
|
||||
"belongProjectPath": "D:\\202076work\\hongmeng\\newExpert\\harmony"
|
||||
},
|
||||
{
|
||||
"name": "utils",
|
||||
"srcPath": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\utils",
|
||||
"belongProjectPath": "D:\\202076work\\hongmeng\\newExpert\\harmony"
|
||||
},
|
||||
{
|
||||
"name": "mypage",
|
||||
"srcPath": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\mypage",
|
||||
"belongProjectPath": "D:\\202076work\\hongmeng\\newExpert\\harmony"
|
||||
},
|
||||
{
|
||||
"name": "basic",
|
||||
"srcPath": "D:\\202076work\\hongmeng\\newExpert\\harmony\\commons\\basic",
|
||||
"belongProjectPath": "D:\\202076work\\hongmeng\\newExpert\\harmony"
|
||||
},
|
||||
{
|
||||
"name": "Home",
|
||||
"srcPath": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\Home",
|
||||
"belongProjectPath": "D:\\202076work\\hongmeng\\newExpert\\harmony"
|
||||
},
|
||||
{
|
||||
"name": "register",
|
||||
"srcPath": "D:\\202076work\\hongmeng\\newExpert\\harmony\\features\\register",
|
||||
"belongProjectPath": "D:\\202076work\\hongmeng\\newExpert\\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": [
|
||||
"D:\\202076work\\hongmeng\\newExpert\\harmony"
|
||||
],
|
||||
"BUILD_CACHE_DIR": ""
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"string": [
|
||||
{
|
||||
"name": "app_name",
|
||||
"value": "Expert"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 90 KiB |
|
After Width: | Height: | Size: 8.6 KiB |
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"layered-image":
|
||||
{
|
||||
"background" : "$media:background",
|
||||
"foreground" : "$media:foreground"
|
||||
}
|
||||
}
|
||||
@@ -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": "mypage",
|
||||
"srcPath": "./features/mypage"
|
||||
},
|
||||
{
|
||||
"name": "basic",
|
||||
"srcPath": "./commons/basic",
|
||||
},
|
||||
{
|
||||
"name": "Home",
|
||||
"srcPath": "./features/Home",
|
||||
},
|
||||
{
|
||||
"name": "register",
|
||||
"srcPath": "./features/register",
|
||||
},
|
||||
{
|
||||
"name": "polyv",
|
||||
"srcPath": "./polyv"
|
||||
},
|
||||
{
|
||||
"name": "scene_single_video",
|
||||
"srcPath": "./scene_single_video"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
/node_modules
|
||||
/oh_modules
|
||||
/.preview
|
||||
/build
|
||||
/.cxx
|
||||
/.test
|
||||
@@ -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;
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
export { hdHttp, HdResponse } from './src/main/ets/utils/request'
|
||||
|
||||
export { authStore, HdUser, AUTH_STORE_KEY } from './src/main/ets/utils/auth'
|
||||
|
||||
export { perfactAuth } from './src/main/ets/utils/PerfactAuth'
|
||||
|
||||
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,DataWebModels } from './src/main/ets/models/DataWebModel'
|
||||
|
||||
export { PromptActionClass } from './src/main/ets/components/PromptActionClass'
|
||||
|
||||
export { RequestDefaultModel,ExpertData } from './src/main/ets/models/RequestDefaultModel'
|
||||
|
||||
export { HdList, HdListController } from './src/main/ets/components/HdList'
|
||||
|
||||
export { AESEncryptionDecryption } from './src/main/ets/utils/AESEncryptionDecryption'
|
||||
|
||||
export { HdGrid } from './src/main/ets/components/HdGrid'
|
||||
|
||||
export { PhotoActionSheet } from './src/main/ets/Views/PhotoActionSheet'
|
||||
|
||||
export { DatePickerDialog } from './src/main/ets/Views/DatePickerDialog'
|
||||
|
||||
export { OfficeSelectedSheet } from './src/main/ets/Views/OfficeSelectedSheet'
|
||||
|
||||
export { PositionSelectedSheet } from './src/main/ets/Views/PositionSelectedSheet'
|
||||
|
||||
export { SpecialitySelectedSheet } from './src/main/ets/Views/SpecialitySelectedSheet'
|
||||
|
||||
|
||||
@@ -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,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. */
|
||||
}
|
||||
@@ -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
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"meta": {
|
||||
"stableOrder": true
|
||||
},
|
||||
"lockfileVersion": 3,
|
||||
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
|
||||
"specifiers": {},
|
||||
"packages": {}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "@itcast/basic",
|
||||
"version": "1.0.0",
|
||||
"description": "Please describe the basic information.",
|
||||
"main": "Index.ets",
|
||||
"author": "",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"mypage": "file:../../features/mypage"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
import { formatDate } from '../utils/DateUtils'
|
||||
import { authStore } from '../utils/auth'
|
||||
|
||||
@CustomDialog
|
||||
export struct DatePickerDialog {
|
||||
@Prop selectedDateString:string = formatDate(new Date(),'YYYY-MM-DD');
|
||||
controller: CustomDialogController;
|
||||
|
||||
// 添加回调函数属性
|
||||
private dateSelected: (date: string) => void = () => {};
|
||||
|
||||
// 修改构造函数
|
||||
constructor(controller: CustomDialogController, dateSelected: (date: string) => void) {
|
||||
super();
|
||||
this.controller = controller;
|
||||
this.dateSelected = dateSelected;
|
||||
}
|
||||
|
||||
// 初始化日期范围(示例为1930-至今)
|
||||
private dateOptions: DatePickerOptions = {
|
||||
start: new Date('1930-01-01'),
|
||||
end: new Date(this.selectedDateString),
|
||||
selected: new Date(authStore.getUser().birthDate?authStore.getUser().birthDate:'1930-01-01'),
|
||||
}
|
||||
|
||||
build() {
|
||||
Column() {
|
||||
// 操作按钮区域
|
||||
Row({space:70}) {
|
||||
Button('取消')
|
||||
.layoutWeight(1)
|
||||
.backgroundColor(Color.Transparent)
|
||||
.fontColor($r('app.color.main_color'))
|
||||
.backgroundColor(Color.White)
|
||||
.width(80)
|
||||
.onClick(() => {
|
||||
this.controller.close()
|
||||
})
|
||||
|
||||
Text('请选择出生日期')
|
||||
.fontSize(15)
|
||||
.fontColor('#666666')
|
||||
|
||||
Button('确定')
|
||||
.layoutWeight(1)
|
||||
.backgroundColor(Color.Transparent)
|
||||
.fontColor($r('app.color.main_color'))
|
||||
.backgroundColor(Color.White)
|
||||
.width(80)
|
||||
.onClick(() => {
|
||||
this.controller.close()
|
||||
this.dateSelected(this.selectedDateString)
|
||||
})
|
||||
}
|
||||
.height(40)
|
||||
|
||||
// 日期选择器主体
|
||||
DatePicker(this.dateOptions)
|
||||
.lunar(false) // 禁用农历显示[1](@ref)
|
||||
.selectedTextStyle({
|
||||
color: '#007AFF',
|
||||
font: { size: 20, weight: FontWeight.Medium }
|
||||
})
|
||||
.onDateChange((selected:Date)=>{
|
||||
this.selectedDateString = formatDate(selected,'YYYY-MM-DD');
|
||||
console.info('select current date is: ' + formatDate(selected,'YYYY-MM-DD'));
|
||||
})
|
||||
}
|
||||
.width('100%')
|
||||
.height(240)
|
||||
.backgroundColor(Color.White)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
@Component
|
||||
export struct EditUserDataItem {
|
||||
private label: string = ''
|
||||
private required: boolean = false
|
||||
@Prop content: string = ''
|
||||
private hasArrow: boolean = false
|
||||
@Prop isLine:boolean = true;
|
||||
|
||||
build() {
|
||||
Column() {
|
||||
Row() {
|
||||
Row() {
|
||||
Text(this.label)
|
||||
.fontSize(16)
|
||||
.fontColor('#333333')
|
||||
.margin({ left: this.isLine?15:10 })
|
||||
if (this.required) {
|
||||
Text('*')
|
||||
.margin({ left: 0 })
|
||||
.fontSize(16)
|
||||
.fontColor($r('app.color.main_color'))
|
||||
}
|
||||
}
|
||||
.layoutWeight(1)//权重自定义
|
||||
.justifyContent(FlexAlign.Start)
|
||||
|
||||
Row({space:5}) {
|
||||
if (this.label == '头像') {
|
||||
Image(this.content)
|
||||
.alt(this.isLine?$r('app.media.userPhoto_default'):$r('app.media.icon_touxiang_persion_ws'))
|
||||
.onComplete(() => console.log('图片加载完成'))
|
||||
.onError(() => console.error('图片加载失败'+this.content))
|
||||
.width(40)
|
||||
.height(40)
|
||||
.margin({ right: this.hasArrow?0:10 })
|
||||
.borderRadius(8)
|
||||
} else if (this.label == '执业医师证图片或胸牌') {
|
||||
Image(this.content)
|
||||
.alt(this.isLine?null:$r('app.media.icon_xiongpai_ws'))
|
||||
.onComplete(() => console.log('图片加载完成'))
|
||||
.onError(() => console.error('图片加载失败'+this.content))
|
||||
.width(60)
|
||||
.height(40)
|
||||
.margin({ right: this.hasArrow?0:10 })
|
||||
} else {
|
||||
Text(this.content)
|
||||
.fontSize(14)
|
||||
.fontColor('#333333')
|
||||
.width('auto')
|
||||
.constraintSize({
|
||||
maxWidth:this.label='专长(可选一到十项)'?'50%':'70%'
|
||||
})
|
||||
.textOverflow({ overflow: TextOverflow.Ellipsis })
|
||||
.maxLines(1)
|
||||
.margin({right: this.hasArrow?0:10 })
|
||||
.textAlign(TextAlign.End)
|
||||
}
|
||||
if (this.hasArrow) {
|
||||
Image($r('sys.media.ohos_ic_public_arrow_right'))
|
||||
.width(15)
|
||||
.height(15)
|
||||
.margin({ right: 10 })
|
||||
}
|
||||
}
|
||||
.justifyContent(FlexAlign.End)
|
||||
}
|
||||
.height(50)
|
||||
.alignItems(VerticalAlign.Center)
|
||||
|
||||
if (this.isLine) {
|
||||
Divider()
|
||||
.color('#F4F4F4')
|
||||
.strokeWidth(1)
|
||||
.height(1)
|
||||
.margin({ left: 10, top: 0 })
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
import HashMap from '@ohos.util.HashMap';
|
||||
import { promptAction } from '@kit.ArkUI'
|
||||
import { BusinessError } from '@kit.BasicServicesKit';
|
||||
import { RequestDefaultModel } from '../models/RequestDefaultModel'
|
||||
import { hdHttp, HdResponse } from '../utils/request'
|
||||
import { BasicConstant } from '../constants/BasicConstant'
|
||||
|
||||
interface DefaultData {
|
||||
|
||||
}
|
||||
|
||||
@CustomDialog
|
||||
export struct HeroPopWindow {
|
||||
@Prop heroId:string = '';
|
||||
@State detailsData:object = new Object;
|
||||
private years: string[] = ['2019年英雄榜','2018年英雄榜','2017年英雄榜','2016年英雄榜','2015年英雄榜'];
|
||||
controller: CustomDialogController;
|
||||
|
||||
heroDetailsRequestUrl:string = BasicConstant.urlExpertAPI+'gethonorDetail'
|
||||
hashMap: HashMap<string, string> = new HashMap();
|
||||
|
||||
updateHeroDetailsAction(){
|
||||
this.hashMap.set('id',this.heroId);
|
||||
hdHttp.httpReq<string>(this.heroDetailsRequestUrl,this.hashMap).then(async (res: HdResponse<string>) => {
|
||||
let json:RequestDefaultModel = JSON.parse(res+'') as RequestDefaultModel;
|
||||
if(json.code=='1') {
|
||||
this.detailsData = json.data;
|
||||
} else {
|
||||
console.error('英雄榜失败:'+json.message)
|
||||
promptAction.showToast({ message: json.message, duration: 1000 })
|
||||
}
|
||||
}).catch((err: BusinessError) => {
|
||||
console.info(`Response fail: ${err}`);
|
||||
})
|
||||
}
|
||||
|
||||
build() {
|
||||
Stack() {
|
||||
//半透明黑色背景
|
||||
Column().width('100%').height('100%').backgroundColor('#50000000')
|
||||
|
||||
//弹窗主体
|
||||
Column() {
|
||||
//头部图标
|
||||
Image($r('app.media.heroPop_headericon'))
|
||||
.width(80)
|
||||
.height(80)
|
||||
.margin({top:-25})
|
||||
.zIndex(2)
|
||||
//标题和正文范围
|
||||
Column() {
|
||||
Text('肝胆英雄榜')
|
||||
.fontSize(20)
|
||||
.fontColor('#673986')
|
||||
.margin({top:20})
|
||||
Grid() {
|
||||
ForEach(this.years,(item:string)=>{
|
||||
GridItem({style:GridItemStyle.PLAIN}) {
|
||||
Text(item)
|
||||
.fontSize(10)
|
||||
.fontColor(Color.Black)
|
||||
.backgroundColor(Color.White) // 添加背景色确保可见
|
||||
.textAlign(TextAlign.Center)
|
||||
.width('100%') // 确保文本容器宽度
|
||||
}
|
||||
.height(20)
|
||||
.width('48%')
|
||||
.padding(5)
|
||||
.borderRadius(10)
|
||||
.borderWidth(1)
|
||||
.borderColor(Color.Red)
|
||||
})
|
||||
}
|
||||
.columnsGap(10)
|
||||
.rowsGap(10)
|
||||
.padding(10)
|
||||
.width('100%')
|
||||
.height('auto')
|
||||
Text('感谢有您,一路相伴。"肝胆英雄榜"是由国内最具影响力的肝胆病互联网线上服务平台-\n' +
|
||||
'肝胆相照依据肝胆病医生在各自领域年度所做工作,综合评选出来的最认可的"肝胆好医生",授予证书并赠送精美感恩好礼。\n' +
|
||||
'目前"肝胆英雄榜"荣誉包括:"护肝大使"护肝新量""公益之星""科普达入"、"视频之星"、"人气科室"及"宣传之星"等。')
|
||||
.fontSize(12)
|
||||
.fontColor('#666666')
|
||||
.textAlign(TextAlign.Start)
|
||||
.lineHeight(20)
|
||||
.width('90%')
|
||||
.margin({bottom:10})
|
||||
}
|
||||
.zIndex(1)
|
||||
.margin({top:-10,bottom:10})
|
||||
.justifyContent(FlexAlign.Center)
|
||||
.backgroundColor(Color.White)
|
||||
.borderRadius(16)
|
||||
.height('auto')
|
||||
.width('90%')
|
||||
|
||||
//删除按钮
|
||||
Button() {
|
||||
Image($r('app.media.heropop_delete'))
|
||||
.width(30)
|
||||
.height(30)
|
||||
}
|
||||
.zIndex(3)
|
||||
.position({ x: '88%', y: 10 })
|
||||
.onClick(() => this.controller.close())
|
||||
}
|
||||
.width('90%')
|
||||
.backgroundImage($r('app.media.heroPop_bg'))
|
||||
.backgroundImageSize(ImageSize.Cover)
|
||||
.borderRadius(16)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
import { BasicConstant } from '../constants/BasicConstant'
|
||||
import { RequestDefaultModel } from '../models/RequestDefaultModel'
|
||||
import { promptAction } from '@kit.ArkUI'
|
||||
import HashMap from '@ohos.util.HashMap';
|
||||
import { BusinessError } from '@kit.BasicServicesKit';
|
||||
import { authStore } from '../utils/auth'
|
||||
import { hdHttp, HdResponse } from '../utils/request'
|
||||
|
||||
interface DefaultData {
|
||||
'officeName':string;
|
||||
'officeUuid':string;
|
||||
}
|
||||
|
||||
@CustomDialog
|
||||
export struct OfficeSelectedSheet {
|
||||
controller: CustomDialogController;
|
||||
@State officeNameArr:Array<string> = [];
|
||||
private officeArr:Array<DefaultData> = [];
|
||||
@State selectedModel:DefaultData = { officeName: '', officeUuid: '' };
|
||||
|
||||
@State selectedIndex:number = 0;
|
||||
|
||||
// 添加回调函数属性
|
||||
private officeSelected: (name:string , uuid:string) => void = () => {};
|
||||
|
||||
// 修改构造函数
|
||||
constructor(controller: CustomDialogController, officeSelected: (name: string,uuid:string) => void) {
|
||||
super();
|
||||
this.controller = controller;
|
||||
this.officeSelected = officeSelected;
|
||||
}
|
||||
|
||||
officeRequestUrl:string = BasicConstant.urlExpert+'officeList'
|
||||
hashMap: HashMap<string, string> = new HashMap();
|
||||
|
||||
aboutToAppear(): void {
|
||||
this.uploadOffice();
|
||||
}
|
||||
|
||||
uploadOffice() {
|
||||
hdHttp.httpReq<string>(this.officeRequestUrl,this.hashMap).then(async (res: HdResponse<string>) => {
|
||||
let json:RequestDefaultModel = JSON.parse(res+'') as RequestDefaultModel;
|
||||
if(json.code=='1') {
|
||||
this.officeArr = json.data as DefaultData[];
|
||||
this.officeNameArr = json.data.map(item => item.officeName);
|
||||
console.log('科室名称数组:', this.officeNameArr);
|
||||
for (let index = 0; index < this.officeNameArr.length; index++) {
|
||||
const officeObject = this.officeArr[index] as DefaultData;
|
||||
const name = this.officeNameArr[index];
|
||||
if (name == authStore.getUser().officeName) {
|
||||
this.selectedIndex = index;
|
||||
this.selectedModel = {officeName:name,officeUuid:officeObject.officeUuid}
|
||||
} else {
|
||||
const defaultModel = this.officeArr[0] as DefaultData;
|
||||
this.selectedIndex = 0;
|
||||
this.selectedModel = {officeName:defaultModel.officeName,officeUuid:defaultModel.officeUuid};
|
||||
}
|
||||
}
|
||||
} else {
|
||||
console.error('科室数据失败:'+json.message)
|
||||
promptAction.showToast({ message: json.message, duration: 1000 })
|
||||
}
|
||||
}).catch((err: BusinessError) => {
|
||||
console.info(`Response fail: ${err}`);
|
||||
})
|
||||
}
|
||||
|
||||
build() {
|
||||
Column() {
|
||||
// 操作按钮区域
|
||||
Row({space:70}) {
|
||||
Button('取消')
|
||||
.layoutWeight(1)
|
||||
// .backgroundColor(Color.Transparent)
|
||||
.fontColor($r('app.color.main_color'))
|
||||
.backgroundColor(Color.White)
|
||||
.width(80)
|
||||
.onClick(() => {
|
||||
this.controller.close()
|
||||
})
|
||||
|
||||
Text('请选择科室')
|
||||
.fontSize(15)
|
||||
.fontColor('#666666')
|
||||
|
||||
Button('确定')
|
||||
.layoutWeight(1)
|
||||
.fontColor($r('app.color.main_color'))
|
||||
.backgroundColor(Color.White)
|
||||
.width(80)
|
||||
.onClick(() => {
|
||||
this.controller.close()
|
||||
this.officeSelected(this.selectedModel.officeName, this.selectedModel.officeUuid);
|
||||
})
|
||||
}
|
||||
.height(40)
|
||||
|
||||
TextPicker({
|
||||
range:this.officeNameArr,
|
||||
selected:this.selectedIndex
|
||||
})
|
||||
.canLoop(false)
|
||||
.selectedTextStyle({
|
||||
color: '#007AFF',
|
||||
font: { size: 20, weight: FontWeight.Medium }
|
||||
})
|
||||
.onChange((name: string | string[], index: number | number[]) => {
|
||||
// 处理单列选择场景
|
||||
if (typeof index === "number" && this.officeArr[index]) {
|
||||
this.selectedModel = this.officeArr[index];
|
||||
}
|
||||
})
|
||||
}
|
||||
.width('100%')
|
||||
.height(240)
|
||||
.backgroundColor(Color.White)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
import { promptAction } from '@kit.ArkUI'
|
||||
|
||||
@CustomDialog
|
||||
export struct PerfactInputSheet {
|
||||
controller:CustomDialogController;
|
||||
|
||||
@Prop inputTitle:string = '';
|
||||
@Prop inputPlaceholder:string = ''
|
||||
@State inputText:string = ''
|
||||
|
||||
// 添加回调函数属性
|
||||
private inputCallBack: (input: string,title:string) => void = () => {};
|
||||
|
||||
// 修改构造函数
|
||||
constructor(controller: CustomDialogController, inputCallBack: (input: string,title:string) => void) {
|
||||
super();
|
||||
this.controller = controller;
|
||||
this.inputCallBack = inputCallBack;
|
||||
}
|
||||
|
||||
build() {
|
||||
Column() {
|
||||
// 操作按钮区域
|
||||
Row() {
|
||||
Button('取消')
|
||||
.layoutWeight(1)
|
||||
.backgroundColor(Color.Transparent)
|
||||
.fontColor($r('app.color.main_color'))
|
||||
.backgroundColor('#EEEEEE')
|
||||
.width('15%')
|
||||
.fontSize(15)
|
||||
.onClick(() => {
|
||||
this.controller.close()
|
||||
})
|
||||
|
||||
Text(this.inputTitle)
|
||||
.width('65%')
|
||||
.fontSize(15)
|
||||
.fontColor('#333333')
|
||||
.textAlign(TextAlign.Center)
|
||||
|
||||
Button('确定')
|
||||
.layoutWeight(1)
|
||||
.fontSize(15)
|
||||
.backgroundColor(Color.Transparent)
|
||||
.fontColor($r('app.color.main_color'))
|
||||
.backgroundColor('#EEEEEE')
|
||||
.width('15%')
|
||||
.onClick(() => {
|
||||
if (this.inputText.length <= 0) {
|
||||
promptAction.showToast({ message: '输入不能为空', duration: 1000 })
|
||||
return;
|
||||
}
|
||||
this.controller.close()
|
||||
this.inputCallBack(this.inputText, this.inputTitle);
|
||||
})
|
||||
}
|
||||
.height(30)
|
||||
|
||||
Row(){
|
||||
TextInput({
|
||||
placeholder: this.inputPlaceholder
|
||||
})
|
||||
.height(50)
|
||||
.fontColor(Color.Black)
|
||||
.backgroundColor(Color.White)
|
||||
.onChange((value: string) => {
|
||||
this.inputText = value;
|
||||
})
|
||||
}
|
||||
.backgroundColor(Color.White)
|
||||
}
|
||||
.width('100%')
|
||||
.height(100)
|
||||
.backgroundColor('#EEEEEE')
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,145 @@
|
||||
import picker from '@ohos.file.picker';
|
||||
import { BusinessError } from '@ohos.base';
|
||||
import photoAccessHelper from '@ohos.file.photoAccessHelper';
|
||||
import common from '@ohos.app.ability.common';
|
||||
import { cameraPicker, camera } from '@kit.CameraKit'
|
||||
import { abilityAccessCtrl } from '@kit.AbilityKit';
|
||||
|
||||
@CustomDialog
|
||||
export struct PhotoActionSheet {
|
||||
controller: CustomDialogController;
|
||||
|
||||
// 添加回调函数属性
|
||||
private onPhotoSelected: (uri: string) => void = () => {};
|
||||
|
||||
// 修改构造函数
|
||||
constructor(controller: CustomDialogController, onPhotoSelected: (uri: string) => void) {
|
||||
super();
|
||||
this.controller = controller;
|
||||
this.onPhotoSelected = onPhotoSelected;
|
||||
}
|
||||
|
||||
async checkCameraPermission(): Promise<boolean> {
|
||||
const atManager = abilityAccessCtrl.createAtManager();
|
||||
const grantStatus = await atManager.checkAccessToken(
|
||||
globalThis.abilityContext.applicationInfo.accessTokenId,
|
||||
'ohos.permission.CAMERA'
|
||||
);
|
||||
return grantStatus === abilityAccessCtrl.GrantStatus.PERMISSION_GRANTED;
|
||||
}
|
||||
|
||||
build() {
|
||||
Column() {
|
||||
// 操作按钮区域
|
||||
Column() {
|
||||
Row() {
|
||||
// 拍摄照片按钮
|
||||
Column() {
|
||||
Image($r('app.media.icon_camera'))
|
||||
.width(40)
|
||||
.height(40)
|
||||
Text('拍摄照片')
|
||||
.fontSize(15)
|
||||
.margin({top:10})
|
||||
.fontColor($r('app.color.main_color'))
|
||||
}
|
||||
.width('50%')
|
||||
.height(80)
|
||||
.onClick(() => {
|
||||
const context = getContext() as common.UIAbilityContext;
|
||||
const cameras = camera.getCameraManager(context).getSupportedCameras();
|
||||
cameras.forEach(device => {
|
||||
console.log('Camera type:', device.cameraPosition);
|
||||
});
|
||||
this.openSystemCamera();
|
||||
this.animateHide();
|
||||
})
|
||||
.padding(20)
|
||||
|
||||
// 相册照片按钮
|
||||
Column() {
|
||||
Image($r('app.media.ixon_album'))
|
||||
.width(40)
|
||||
.height(40)
|
||||
Text('相册照片')
|
||||
.fontSize(15)
|
||||
.margin({top:10})
|
||||
.fontColor($r('app.color.main_color'))
|
||||
}
|
||||
.width('50%')
|
||||
.height(80)
|
||||
.onClick(() => {
|
||||
this.selectPhoto();
|
||||
this.animateHide()
|
||||
})
|
||||
.padding(20)
|
||||
}
|
||||
}
|
||||
.backgroundColor(Color.White)
|
||||
|
||||
Divider()
|
||||
.color('#999999')
|
||||
.strokeWidth(5)
|
||||
.height(5)
|
||||
.margin({top:20})
|
||||
|
||||
// 取消按钮
|
||||
Button('取消')
|
||||
.width('100%')
|
||||
.height(50)
|
||||
.fontColor('#999999')
|
||||
.backgroundColor(Color.White)
|
||||
.onClick(() => this.animateHide())
|
||||
}
|
||||
.width('100%')
|
||||
.height(150)
|
||||
.backgroundColor(Color.White)
|
||||
}
|
||||
|
||||
animateHide() {
|
||||
this.controller.close();
|
||||
}
|
||||
|
||||
// 打开相机
|
||||
private async openSystemCamera() {
|
||||
try {
|
||||
const pickerProfile: cameraPicker.PickerProfile = {
|
||||
cameraPosition: camera.CameraPosition.CAMERA_POSITION_BACK,
|
||||
videoDuration: 15 // 录像时设置最大时长(秒)
|
||||
};
|
||||
|
||||
const result = await cameraPicker.pick(
|
||||
getContext(),
|
||||
[cameraPicker.PickerMediaType.PHOTO], // 可替换为VIDEO
|
||||
pickerProfile
|
||||
);
|
||||
|
||||
if (result.resultCode === 0) {
|
||||
console.log('Photo URI:', result.resultUri);
|
||||
// 处理拍摄结果
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Camera error:', error.code);
|
||||
}
|
||||
}
|
||||
|
||||
// 资源被选中回调,返回资源的信息,以及选中方式
|
||||
private selectPhoto() {
|
||||
let photoSelectOptions = new picker.PhotoSelectOptions();
|
||||
photoSelectOptions.MIMEType = picker.PhotoViewMIMETypes.IMAGE_TYPE;
|
||||
photoSelectOptions.maxSelectNumber = 1;
|
||||
|
||||
let photoViewPicker = new picker.PhotoViewPicker();
|
||||
photoViewPicker.select(photoSelectOptions)
|
||||
.then((photoSelectResult) => {
|
||||
console.info('PhotoViewPicker.select successfully, photoSelectResult uri: ' +
|
||||
JSON.stringify(photoSelectResult));
|
||||
if (photoSelectResult.photoUris && photoSelectResult.photoUris.length > 0) {
|
||||
this.onPhotoSelected(photoSelectResult.photoUris[0]);
|
||||
}
|
||||
})
|
||||
.catch((err: BusinessError) => {
|
||||
console.error('PhotoViewPicker.select failed with err: ' + err);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
import { BasicConstant } from '../constants/BasicConstant'
|
||||
import { RequestDefaultModel } from '../models/RequestDefaultModel'
|
||||
import { promptAction } from '@kit.ArkUI'
|
||||
import HashMap from '@ohos.util.HashMap';
|
||||
import { BusinessError } from '@kit.BasicServicesKit';
|
||||
import { authStore } from '../utils/auth'
|
||||
import { hdHttp, HdResponse } from '../utils/request'
|
||||
|
||||
interface DefaultData {
|
||||
'name':string;
|
||||
'uuid':string;
|
||||
}
|
||||
|
||||
@CustomDialog
|
||||
export struct PositionSelectedSheet {
|
||||
controller: CustomDialogController;
|
||||
@State officeNameArr:Array<string> = [];
|
||||
private officeArr:Array<DefaultData> = [];
|
||||
@Prop selectedOffice:object = new Object;
|
||||
@State selectedModel:DefaultData = { name: '', uuid: '' };
|
||||
|
||||
@State selectedIndex:number = 0;
|
||||
|
||||
// 添加回调函数属性
|
||||
private officeSelected: (name:string , uuid:string) => void = () => {};
|
||||
|
||||
// 修改构造函数
|
||||
constructor(controller: CustomDialogController, officeSelected: (name: string,uuid:string) => void) {
|
||||
super();
|
||||
this.controller = controller;
|
||||
this.officeSelected = officeSelected;
|
||||
}
|
||||
|
||||
officeRequestUrl:string = BasicConstant.urlExpert+'positionList'
|
||||
hashMap: HashMap<string, string> = new HashMap();
|
||||
|
||||
aboutToAppear(): void {
|
||||
this.uploadOffice();
|
||||
}
|
||||
|
||||
uploadOffice() {
|
||||
hdHttp.httpReq<string>(this.officeRequestUrl,this.hashMap).then(async (res: HdResponse<string>) => {
|
||||
let json:RequestDefaultModel = JSON.parse(res+'') as RequestDefaultModel;
|
||||
if(json.code=='1') {
|
||||
this.officeArr = json.data as DefaultData[];
|
||||
this.officeNameArr = json.data.map(item => item.name);
|
||||
for (let index = 0; index < this.officeNameArr.length; index++) {
|
||||
const object = this.officeArr[index] as DefaultData;
|
||||
const nameIndex = this.officeNameArr[index];
|
||||
if (nameIndex == authStore.getUser().positionName) {
|
||||
this.selectedIndex = index;
|
||||
this.selectedModel = {name:nameIndex,uuid:object.uuid};
|
||||
break;
|
||||
} else {
|
||||
const defaultModel = this.officeArr[0] as DefaultData;
|
||||
this.selectedIndex = 0;
|
||||
this.selectedModel = {name:defaultModel.name,uuid:defaultModel.uuid};
|
||||
}
|
||||
}
|
||||
console.log('职称名称数组:', this.officeNameArr);
|
||||
} else {
|
||||
console.error('职称数据失败:'+json.message)
|
||||
promptAction.showToast({ message: json.message, duration: 1000 })
|
||||
}
|
||||
}).catch((err: BusinessError) => {
|
||||
console.info(`Response fail: ${err}`);
|
||||
})
|
||||
}
|
||||
|
||||
build() {
|
||||
Column() {
|
||||
// 操作按钮区域
|
||||
Row({space:70}) {
|
||||
Button('取消')
|
||||
.layoutWeight(1)
|
||||
.backgroundColor(Color.Transparent)
|
||||
.fontColor($r('app.color.main_color'))
|
||||
.backgroundColor(Color.White)
|
||||
.width(80)
|
||||
.onClick(() => {
|
||||
this.controller.close()
|
||||
})
|
||||
|
||||
Text('请选择职称')
|
||||
.fontSize(15)
|
||||
.fontColor('#666666')
|
||||
|
||||
Button('确定')
|
||||
.layoutWeight(1)
|
||||
.backgroundColor(Color.Transparent)
|
||||
.fontColor($r('app.color.main_color'))
|
||||
.backgroundColor(Color.White)
|
||||
.width(80)
|
||||
.onClick(() => {
|
||||
this.controller.close()
|
||||
this.officeSelected(this.selectedModel.name, this.selectedModel.uuid);
|
||||
})
|
||||
}
|
||||
.height(40)
|
||||
|
||||
TextPicker({
|
||||
range:this.officeNameArr,
|
||||
selected:this.selectedIndex
|
||||
})
|
||||
.canLoop(false)
|
||||
.selectedTextStyle({
|
||||
color: '#007AFF',
|
||||
font: { size: 20, weight: FontWeight.Medium }
|
||||
})
|
||||
.onChange((name: string | string[], index: number | number[]) => {
|
||||
// 处理单列选择场景
|
||||
if (typeof index === "number" && this.officeArr[index]) {
|
||||
this.selectedModel = this.officeArr[index];
|
||||
}
|
||||
})
|
||||
}
|
||||
.width('100%')
|
||||
.height(240)
|
||||
.backgroundColor(Color.White)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
@CustomDialog
|
||||
export struct SexSelectedSheet {
|
||||
controller:CustomDialogController;
|
||||
|
||||
@State sexNameArr:Array<string> = ['男','女'];
|
||||
@Prop selectedSex:number = 0;
|
||||
|
||||
// 添加回调函数属性
|
||||
private sexSelected: (index: number) => void = () => {};
|
||||
|
||||
// 修改构造函数
|
||||
constructor(controller: CustomDialogController, sexSelected: (index: number) => void) {
|
||||
super();
|
||||
this.controller = controller;
|
||||
this.sexSelected = sexSelected;
|
||||
}
|
||||
|
||||
build() {
|
||||
Column() {
|
||||
// 操作按钮区域
|
||||
Row({space:70}) {
|
||||
Button('取消')
|
||||
.layoutWeight(1)
|
||||
.backgroundColor(Color.Transparent)
|
||||
.fontColor($r('app.color.main_color'))
|
||||
.backgroundColor(Color.White)
|
||||
.width(80)
|
||||
.onClick(() => {
|
||||
this.controller.close()
|
||||
})
|
||||
|
||||
Text('请选择性别')
|
||||
.fontSize(15)
|
||||
.fontColor('#666666')
|
||||
|
||||
Button('确定')
|
||||
.layoutWeight(1)
|
||||
.backgroundColor(Color.Transparent)
|
||||
.fontColor($r('app.color.main_color'))
|
||||
.backgroundColor(Color.White)
|
||||
.width(80)
|
||||
.onClick(() => {
|
||||
this.controller.close()
|
||||
this.sexSelected(this.selectedSex);
|
||||
})
|
||||
}
|
||||
.height(40)
|
||||
|
||||
TextPicker({
|
||||
range:this.sexNameArr,
|
||||
})
|
||||
.canLoop(false)
|
||||
.selectedTextStyle({
|
||||
color: '#007AFF',
|
||||
font: { size: 20, weight: FontWeight.Medium }
|
||||
})
|
||||
.onChange((name: string | string[], index: number | number[]) => {
|
||||
// 处理单列选择场景
|
||||
if (typeof index === "number") {
|
||||
this.selectedSex = index;
|
||||
}
|
||||
})
|
||||
}
|
||||
.width('100%')
|
||||
.height(240)
|
||||
.backgroundColor(Color.White)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
import HashMap from '@ohos.util.HashMap';
|
||||
import { promptAction } from '@kit.ArkUI'
|
||||
import { BusinessError } from '@kit.BasicServicesKit';
|
||||
import { RequestDefaultModel } from '../models/RequestDefaultModel'
|
||||
import { hdHttp, HdResponse } from '../utils/request'
|
||||
import { BasicConstant } from '../constants/BasicConstant'
|
||||
|
||||
interface DefaultData {
|
||||
'name':string;
|
||||
'uuid':string;
|
||||
}
|
||||
|
||||
@CustomDialog
|
||||
export struct SpecialitySelectedSheet {
|
||||
controller: CustomDialogController;
|
||||
|
||||
@State specialityArr:Array<DefaultData> = [];
|
||||
@State selectedNames: Array<string> = [];
|
||||
@State selectedTags: Array<string> = [];
|
||||
|
||||
// 添加回调函数属性
|
||||
private specialitySelected: (seletedTags:string,selectedNames:string) => void = () => {};
|
||||
// 修改构造函数
|
||||
constructor(controller: CustomDialogController, specialitySelected: (seletedTags:string,selectedNames:string) => void) {
|
||||
super();
|
||||
this.controller = controller;
|
||||
this.specialitySelected = specialitySelected;
|
||||
}
|
||||
|
||||
aboutToAppear(): void {
|
||||
this.uploadSpeciality();
|
||||
}
|
||||
|
||||
uploadSpeciality() {
|
||||
const officeRequestUrl:string = BasicConstant.urlExpert+'disease'
|
||||
const hashMap: HashMap<string, string> = new HashMap();
|
||||
hdHttp.httpReq<string>(officeRequestUrl,hashMap).then(async (res: HdResponse<string>) => {
|
||||
let json:RequestDefaultModel = JSON.parse(res+'') as RequestDefaultModel;
|
||||
if(json.code=='1') {
|
||||
this.specialityArr = json.data as DefaultData[];
|
||||
console.log('请求专长接口成功,信息:', this.specialityArr);
|
||||
} else {
|
||||
console.error('请求专长接口失败:'+json.message)
|
||||
promptAction.showToast({ message: json.message, duration: 1000 })
|
||||
}
|
||||
}).catch((err: BusinessError) => {
|
||||
console.info(`Response fail: ${err}`);
|
||||
})
|
||||
}
|
||||
|
||||
build() {
|
||||
Column() {
|
||||
// 操作按钮区域
|
||||
Row({space:70}) {
|
||||
Button('取消')
|
||||
.layoutWeight(1)
|
||||
.backgroundColor(Color.Transparent)
|
||||
.fontColor($r('app.color.main_color'))
|
||||
.backgroundColor(Color.White)
|
||||
.width(80)
|
||||
.onClick(() => {
|
||||
this.controller.close()
|
||||
})
|
||||
|
||||
Text('请选择专长')
|
||||
.fontSize(15)
|
||||
.fontColor('#666666')
|
||||
|
||||
Button('确定')
|
||||
.layoutWeight(1)
|
||||
.backgroundColor(Color.Transparent)
|
||||
.fontColor($r('app.color.main_color'))
|
||||
.backgroundColor(Color.White)
|
||||
.width(80)
|
||||
.onClick(() => {
|
||||
this.controller.close()
|
||||
// 拼接为逗号分隔字符串
|
||||
const diseaseUuid = this.selectedTags.join(',');
|
||||
const diseaseName = this.selectedNames.join(',');
|
||||
console.log('当前选中标签的uuid字符串:', diseaseUuid);
|
||||
console.log('当前选中标签的name字符串:', diseaseName);
|
||||
this.specialitySelected(diseaseUuid,diseaseName);
|
||||
})
|
||||
}
|
||||
.height(40)
|
||||
|
||||
Grid() {
|
||||
ForEach(this.specialityArr, (data: DefaultData) => {
|
||||
GridItem() {
|
||||
// 单个标签组件
|
||||
Text(data.name)
|
||||
.fontSize(12)
|
||||
.width('100%')
|
||||
.height(30)
|
||||
.textAlign(TextAlign.Center)
|
||||
.backgroundColor(this.isSelected(data.uuid) ? '#b58078' : '#FFFFFF')
|
||||
.onClick(() => {
|
||||
this.handleTagClick(data.uuid,data.name)
|
||||
})
|
||||
}
|
||||
.height(30)
|
||||
.width('25%') // 四等分宽度
|
||||
.borderWidth(1)
|
||||
.borderColor(Color.Gray)
|
||||
})
|
||||
}
|
||||
}
|
||||
.width('100%')
|
||||
.height(240)
|
||||
.backgroundColor(Color.White)
|
||||
}
|
||||
|
||||
// 判断是否选中
|
||||
private isSelected(uuid: string): boolean {
|
||||
return this.selectedTags.includes(uuid)
|
||||
}
|
||||
|
||||
private handleTagClick(uuid: string,name:string) {
|
||||
const index = this.selectedTags.indexOf(uuid);
|
||||
if (index === -1) {
|
||||
// 添加选中(限制最多10个)
|
||||
if (this.selectedTags.length >= 10) {
|
||||
promptAction.showToast({ message: '最多可选择十项!', duration: 1000 });
|
||||
return;
|
||||
}
|
||||
this.selectedTags = [...this.selectedTags, uuid];
|
||||
this.selectedNames = [...this.selectedNames,name];
|
||||
} else {
|
||||
// 取消选中
|
||||
const newSelected = [...this.selectedTags];
|
||||
newSelected.splice(index, 1);
|
||||
this.selectedTags = newSelected;
|
||||
|
||||
const nameSelected = [...this.selectedNames];
|
||||
nameSelected.splice(index, 1);
|
||||
this.selectedNames = nameSelected;
|
||||
}
|
||||
console.log('当前选中标签:', this.selectedTags)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
import { BasicConstant } from '../constants/BasicConstant'
|
||||
import { HdListController } from '../components/HdList'
|
||||
|
||||
|
||||
@Component
|
||||
export struct HdGrid {
|
||||
@State
|
||||
refreshing: boolean = false
|
||||
@State
|
||||
finished: boolean = false
|
||||
@State
|
||||
loading: boolean = false
|
||||
// options
|
||||
lw: number = 0
|
||||
|
||||
@Builder
|
||||
defaultListContent() {
|
||||
}
|
||||
|
||||
@BuilderParam
|
||||
listContent: () => void = this.defaultListContent
|
||||
// function
|
||||
onLoad: () => void = () => {
|
||||
}
|
||||
onRefresh: () => void = () => {
|
||||
}
|
||||
// controller
|
||||
controller: HdListController = new HdListController()
|
||||
scroller: Scroller = new Scroller()
|
||||
|
||||
aboutToAppear() {
|
||||
if (this.controller) {
|
||||
this.controller.loaded = () => this.loading = false
|
||||
this.controller.finished = () => this.finished = true
|
||||
this.controller.refreshed = () => this.refreshing = false
|
||||
this.controller.reload = () => {
|
||||
this.finished = false
|
||||
this.refreshing = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Builder
|
||||
loadMoreBuilder() {
|
||||
GridItem() {
|
||||
if (this.finished) {
|
||||
Row() {
|
||||
Text($r('app.string.hd_list_finished'))
|
||||
.fontColor(Color.Gray)
|
||||
.fontSize($r('app.float.hd_list_load_font'))
|
||||
}
|
||||
.height($r('app.float.hd_list_load_height'))
|
||||
.width('100%')
|
||||
.justifyContent(FlexAlign.Center)
|
||||
} else if (this.loading && !this.finished) {
|
||||
Row() {
|
||||
LoadingProgress()
|
||||
.width($r('app.float.hd_list_load_icon'))
|
||||
Text($r('app.string.hd_list_loading'))
|
||||
.fontColor(Color.Gray)
|
||||
.fontSize($r('app.float.hd_list_load_font'))
|
||||
}
|
||||
.height($r('app.float.hd_list_load_height'))
|
||||
.width('100%')
|
||||
.justifyContent(FlexAlign.Center)
|
||||
}
|
||||
}
|
||||
.height($r('app.float.hd_list_load_height'))
|
||||
}
|
||||
|
||||
build() {
|
||||
Refresh({ refreshing: $$this.refreshing }) {
|
||||
Grid(this.scroller) {
|
||||
this.listContent()
|
||||
this.loadMoreBuilder()
|
||||
}
|
||||
.columnsTemplate('1fr 1fr')
|
||||
.columnsGap(10)
|
||||
.rowsGap(10)
|
||||
.width('100%')
|
||||
.height('100%')
|
||||
.padding({ left: BasicConstant.SPACE_LG, right: BasicConstant.SPACE_LG })
|
||||
// .divider({
|
||||
// strokeWidth: $r('app.float.common_border_width'),
|
||||
// color: $r('app.color.common_gray_border')
|
||||
// })
|
||||
.onReachEnd(() => {
|
||||
if (this.loading || this.refreshing || this.finished) {
|
||||
return;
|
||||
}
|
||||
this.loading = true
|
||||
this.onLoad()
|
||||
})
|
||||
.scrollBar(BarState.Off)
|
||||
.nestedScroll({
|
||||
scrollForward: NestedScrollMode.PARENT_FIRST,
|
||||
scrollBackward: NestedScrollMode.SELF_FIRST
|
||||
})
|
||||
.edgeEffect(EdgeEffect.None)
|
||||
}
|
||||
.width('100%')
|
||||
.height('100%')
|
||||
.layoutWeight(this.lw)
|
||||
.onRefreshing(() => {
|
||||
if (this.loading) {
|
||||
return;
|
||||
}
|
||||
this.finished = false
|
||||
this.onRefresh()
|
||||
// tip: must next tick
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
import { BasicConstant } from '../constants/BasicConstant'
|
||||
|
||||
export class HdListController {
|
||||
loaded: () => void = () => {
|
||||
}
|
||||
finished: () => void = () => {
|
||||
}
|
||||
refreshed: () => void = () => {
|
||||
}
|
||||
reload: () => void = () => {
|
||||
}
|
||||
}
|
||||
|
||||
@Component
|
||||
export struct HdList {
|
||||
@State
|
||||
refreshing: boolean = false
|
||||
@State
|
||||
finished: boolean = false
|
||||
@State
|
||||
loading: boolean = false
|
||||
// options
|
||||
lw: number = 0
|
||||
|
||||
@Builder
|
||||
defaultListContent() {
|
||||
}
|
||||
|
||||
@BuilderParam
|
||||
listContent: () => void = this.defaultListContent
|
||||
// function
|
||||
onLoad: () => void = () => {
|
||||
}
|
||||
onRefresh: () => void = () => {
|
||||
}
|
||||
// controller
|
||||
controller: HdListController = new HdListController()
|
||||
scroller: Scroller = new Scroller()
|
||||
|
||||
aboutToAppear() {
|
||||
if (this.controller) {
|
||||
this.controller.loaded = () => this.loading = false
|
||||
this.controller.finished = () => this.finished = true
|
||||
this.controller.refreshed = () => this.refreshing = false
|
||||
this.controller.reload = () => {
|
||||
this.finished = false
|
||||
this.refreshing = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Builder
|
||||
loadMoreBuilder() {
|
||||
ListItem() {
|
||||
if (this.finished) {
|
||||
Row() {
|
||||
Text($r('app.string.hd_list_finished'))
|
||||
.fontColor(Color.Gray)
|
||||
.fontSize($r('app.float.hd_list_load_font'))
|
||||
}
|
||||
.height($r('app.float.hd_list_load_height'))
|
||||
.width('100%')
|
||||
.justifyContent(FlexAlign.Center)
|
||||
} else if (this.loading && !this.finished) {
|
||||
Row() {
|
||||
LoadingProgress()
|
||||
.width($r('app.float.hd_list_load_icon'))
|
||||
Text($r('app.string.hd_list_loading'))
|
||||
.fontColor(Color.Gray)
|
||||
.fontSize($r('app.float.hd_list_load_font'))
|
||||
}
|
||||
.height($r('app.float.hd_list_load_height'))
|
||||
.width('100%')
|
||||
.justifyContent(FlexAlign.Center)
|
||||
}
|
||||
}
|
||||
.height($r('app.float.hd_list_load_height'))
|
||||
}
|
||||
|
||||
build() {
|
||||
Refresh({ refreshing: $$this.refreshing }) {
|
||||
List({ scroller: this.scroller }) {
|
||||
this.listContent()
|
||||
this.loadMoreBuilder()
|
||||
}
|
||||
.width('100%')
|
||||
.height('100%')
|
||||
.padding({ left: BasicConstant.SPACE_LG, right: BasicConstant.SPACE_LG })
|
||||
// .divider({
|
||||
// strokeWidth: $r('app.float.common_border_width'),
|
||||
// color: $r('app.color.common_gray_border')
|
||||
// })
|
||||
.onReachEnd(() => {
|
||||
if (this.loading || this.refreshing || this.finished) {
|
||||
return;
|
||||
}
|
||||
this.loading = true
|
||||
this.onLoad()
|
||||
})
|
||||
.scrollBar(BarState.Off)
|
||||
.nestedScroll({
|
||||
scrollForward: NestedScrollMode.PARENT_FIRST,
|
||||
scrollBackward: NestedScrollMode.SELF_FIRST
|
||||
})
|
||||
.edgeEffect(EdgeEffect.None)
|
||||
}
|
||||
.width('100%')
|
||||
.height('100%')
|
||||
.layoutWeight(this.lw)
|
||||
.onRefreshing(() => {
|
||||
if (this.loading) {
|
||||
return;
|
||||
}
|
||||
this.finished = false
|
||||
this.onRefresh()
|
||||
// tip: must next tick
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
import { router } from '@kit.ArkUI'
|
||||
import { emitter } from '@kit.BasicServicesKit'
|
||||
|
||||
@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
|
||||
|
||||
// 添加右侧点击处理
|
||||
private onRightItemClick() {
|
||||
emitter.emit({
|
||||
eventId: 250516,
|
||||
priority: emitter.EventPriority.HIGH
|
||||
})
|
||||
}
|
||||
|
||||
build() {
|
||||
Row() {
|
||||
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)
|
||||
.width(150)
|
||||
.layoutWeight(1)
|
||||
|
||||
if (this.showRightIcon) {
|
||||
Image(this.rightIcon)
|
||||
.size({ width: 24, height: 24 })
|
||||
.objectFit(ImageFit.Contain)
|
||||
.bindMenu(this.menuBuilder)
|
||||
.onClick(()=>this.onRightItemClick())
|
||||
} else if (this.showRightText) {
|
||||
Text(this.rightText)
|
||||
.fontSize(16)
|
||||
.fontColor(this.textColor)
|
||||
.onClick(()=>this.onRightItemClick())
|
||||
// .margin({right:10})
|
||||
} else {
|
||||
Blank()
|
||||
.width(24)
|
||||
}
|
||||
}
|
||||
.padding({ left: 16, right: 16, top: this.topHeight })
|
||||
.height(56 + this.topHeight)
|
||||
.width('100%')
|
||||
.backgroundColor(this.bgColor)
|
||||
}
|
||||
}
|
||||
@@ -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}`);
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
export class BasicConstant {
|
||||
static readonly SPACE_SM = 4
|
||||
static readonly SPACE_MD = 10
|
||||
static readonly SPACE_LG = 0
|
||||
static readonly getyyzc="https://doc.igandan.com/app/integral/permission_expert.html";//隐私政策
|
||||
static readonly getzcxy = "http://app.igandan.com/expert_zcxy.jsp";// 注册协议正式地址
|
||||
|
||||
//测试环境
|
||||
static readonly urlExpertAPI = "https://dev-app.igandan.com/app/expertAPI/";
|
||||
static readonly urlExpertApp = "https://dev-app.igandan.com//app/expertApp/"
|
||||
static readonly urlHtml = "http://dev-doc.igandan.com/app/"
|
||||
static readonly urlImage = "https://dev-doc.igandan.com/app/"
|
||||
static readonly urlExpert = "https://dev-app.igandan.com/app/expert/"
|
||||
static readonly wxUrl = "https://dev-wx.igandan.com/";
|
||||
|
||||
//正式环境
|
||||
// static readonly urlExpertAPI = "https://app.igandan.com/app/expertAPI/";
|
||||
// static readonly urlExpertApp = "http://app.igandan.com/app/expertApp/"
|
||||
// static readonly urlHtml = "http://doc.igandan.com/app/"
|
||||
// static readonly urlImage = "http://app.igandan.com/app/"
|
||||
// static readonly urlExpert = "http://app.igandan.com/app/expert/"
|
||||
// static readonly wxUrl = "https://wx.igandan.com/";// 微信服务器地址
|
||||
|
||||
|
||||
static readonly getStartpage=BasicConstant.urlExpertApp + "startpage";
|
||||
static readonly meetingListV2=BasicConstant.urlExpertAPI + "meetingListV2";
|
||||
static readonly meetingV2Video=BasicConstant.urlExpertAPI + "meetingV2Video";
|
||||
static readonly getTypeUuidByName=BasicConstant.urlExpertApp + "getTypeUuidByName";
|
||||
static readonly zhibourl = BasicConstant.wxUrl+"hcp/setInfo";
|
||||
static readonly videoByTypeNew = BasicConstant.urlExpertApp + 'videoByTypeNew'
|
||||
static readonly videoDetail = BasicConstant.urlExpertAPI + "videoDetail";
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
export class DataWebModel {
|
||||
url: string = '';
|
||||
title: string = '';
|
||||
|
||||
}
|
||||
|
||||
export class DataWebModels extends DataWebModel {
|
||||
type:string=''
|
||||
|
||||
}
|
||||
@@ -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>;
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
|
||||
export interface RequestDefaultModel{
|
||||
code:string;
|
||||
data:DefaulyData[];
|
||||
message:string;
|
||||
}
|
||||
|
||||
export interface DefaulyData {
|
||||
'officeName':string;
|
||||
'officeUuid':string;
|
||||
'name':string;
|
||||
'uuid':string;
|
||||
}
|
||||
|
||||
export interface ExpertData{
|
||||
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>;
|
||||
diseaseName:string;
|
||||
diseaseUuid:string;
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
import { cryptoFramework } from '@kit.CryptoArchitectureKit';
|
||||
import { buffer, util } from '@kit.ArkTS';
|
||||
|
||||
|
||||
export const base = new util.Base64Helper();
|
||||
|
||||
export class AESEncryptionDecryption {
|
||||
|
||||
// 字节流转成可理解的字符串
|
||||
static uint8ArrayToString(array: Uint8Array) {
|
||||
// 将UTF-8编码转换成Unicode编码
|
||||
let out: string = '';
|
||||
let index: number = 0;
|
||||
let len: number = array.length;
|
||||
while (index < len) {
|
||||
let character = array[index++];
|
||||
switch (character >> 4) {
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
case 5:
|
||||
case 6:
|
||||
case 7:
|
||||
out += String.fromCharCode(character);
|
||||
break;
|
||||
case 12:
|
||||
case 13:
|
||||
out += String.fromCharCode(((character & 0x1F) << 6) | (array[index++] & 0x3F));
|
||||
break;
|
||||
case 14:
|
||||
out += String.fromCharCode(((character & 0x0F) << 12) | ((array[index++] & 0x3F) << 6) |
|
||||
((array[index++] & 0x3F) << 0));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
// 字符串转成字节流
|
||||
static stringToUint8Array(str: string) {
|
||||
return new Uint8Array(buffer.from(str, 'utf-8').buffer);
|
||||
}
|
||||
|
||||
// 获取密钥
|
||||
static async getKey() {
|
||||
let symAlgName = 'AES128';
|
||||
let symKeyGenerator = cryptoFramework.createSymKeyGenerator(symAlgName);
|
||||
let dataUint8Array = AESEncryptionDecryption.stringToUint8Array('Whh82GtW/EVjBkD8');
|
||||
let keyBlob: cryptoFramework.DataBlob = { data: dataUint8Array };
|
||||
let promiseSymKey = await symKeyGenerator.convertKey(keyBlob);
|
||||
let key = base.encodeToStringSync(promiseSymKey.getEncoded().data); // 将密钥转换为base64存储
|
||||
return key;
|
||||
}
|
||||
|
||||
// 加密
|
||||
static async aesEncrypt(text: string, puKey: string): Promise<string> {
|
||||
let globalResult = '';
|
||||
try {
|
||||
let cipherAlgName = 'AES128|ECB|PKCS7';
|
||||
let globalCipher = cryptoFramework.createCipher(cipherAlgName);
|
||||
let symAlgName = 'AES128';
|
||||
let symKeyGenerator = cryptoFramework.createSymKeyGenerator(symAlgName);
|
||||
// let dataUint8Array = base.decodeSync(puKey);
|
||||
let dataUint8Array = AESEncryptionDecryption.stringToUint8Array(puKey);
|
||||
let keyBlob: cryptoFramework.DataBlob = { data: dataUint8Array };
|
||||
let promiseSymKey = await symKeyGenerator.convertKey(keyBlob);
|
||||
await globalCipher.init(cryptoFramework.CryptoMode.ENCRYPT_MODE, promiseSymKey, null);
|
||||
let result = await globalCipher.doFinal({ data: AESEncryptionDecryption.stringToUint8Array(text) });
|
||||
globalResult = base.encodeToStringSync(result.data);
|
||||
console.info('加密后的明文:' + globalResult);
|
||||
} catch (err) {
|
||||
console.info('加密错误:' +err.message);
|
||||
}
|
||||
return globalResult;
|
||||
}
|
||||
// 使用 AES 密钥加密数据
|
||||
|
||||
static encryptMessage(symKey: cryptoFramework.SymKey, plainText: cryptoFramework.DataBlob) {
|
||||
|
||||
let cipher = cryptoFramework.createCipher('AES128|ECB|PKCS7');
|
||||
|
||||
cipher.initSync(cryptoFramework.CryptoMode.ENCRYPT_MODE, symKey, null); // ECB模式params为null。
|
||||
|
||||
let cipherData = cipher.doFinalSync(plainText);
|
||||
|
||||
return cipherData;
|
||||
|
||||
}
|
||||
|
||||
// 解密
|
||||
static async aesDecrypt(text: string, key: string) {
|
||||
let globalResult = '';
|
||||
try {
|
||||
let cipherAlgName = 'AES128|ECB|PKCS7';
|
||||
let globalCipher = cryptoFramework.createCipher(cipherAlgName);
|
||||
let symAlgName = 'AES128';
|
||||
let symKeyGenerator = cryptoFramework.createSymKeyGenerator(symAlgName);
|
||||
let dataUint8Array = base.decodeSync(key);
|
||||
let keyBlob: cryptoFramework.DataBlob = { data: dataUint8Array };
|
||||
let promiseSymKey = await symKeyGenerator.convertKey(keyBlob);
|
||||
await globalCipher.init(cryptoFramework.CryptoMode.DECRYPT_MODE, promiseSymKey, null);
|
||||
let plainText: cryptoFramework.DataBlob = { data: base.decodeSync(text) };
|
||||
let result = await globalCipher.doFinal(plainText);
|
||||
globalResult = AESEncryptionDecryption.uint8ArrayToString(result.data);
|
||||
console.info('解密后的明文:' + globalResult);
|
||||
} catch (err) {
|
||||
console.info(err.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
import HashMap from '@ohos.util.HashMap';
|
||||
import { Base64Util } from './Base64Util';
|
||||
import { CryptoJS } from '@ohos/crypto-js';
|
||||
import { logger } from './logger';
|
||||
import image from '@ohos.multimedia.image';
|
||||
import fs from '@ohos.file.fs';
|
||||
import { fileIo } from '@kit.CoreFileKit';
|
||||
import util from '@ohos.util';
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
static async convertUriToBase64(uri: string): Promise<string> {
|
||||
// 打开文件并读取数据
|
||||
const file = fileIo.openSync(uri, fileIo.OpenMode.READ_ONLY);
|
||||
const stat = await fileIo.stat(file.fd);
|
||||
const buffer = new ArrayBuffer(stat.size);
|
||||
fileIo.readSync(file.fd, buffer);
|
||||
fileIo.closeSync(file);
|
||||
|
||||
// 编码为 Base64
|
||||
const base64Helper = new util.Base64Helper();
|
||||
return base64Helper.encodeToStringSync(new Uint8Array(buffer));
|
||||
}
|
||||
/**
|
||||
* 将图片转换为base64字符串
|
||||
* @param imageUri 图片URI
|
||||
* @returns Promise<string> base64字符串
|
||||
*/
|
||||
static async imageToBase64(imageUri: string): Promise<string> {
|
||||
// 1. 验证URI有效性
|
||||
if (!imageUri || !imageUri.startsWith('file://')) {
|
||||
throw new Error('无效的图片URI,必须以file://开头');
|
||||
}
|
||||
let imageSource: image.ImageSource | undefined;
|
||||
let pixelMap: image.PixelMap | undefined;
|
||||
let imagePacker: image.ImagePacker | undefined;
|
||||
try {
|
||||
const file = fs.openSync(imageUri, fs.OpenMode.READ_ONLY);
|
||||
const imageSource = image.createImageSource(file.fd);
|
||||
if (!imageSource) {
|
||||
throw new Error('创建ImageSource失败,请检查图片路径');
|
||||
}
|
||||
logger.info('正在获取图片信息...');
|
||||
const imageInfo = await imageSource.getImageInfo();
|
||||
logger.info(`图片尺寸: ${imageInfo.size.width}x${imageInfo.size.height}`);
|
||||
pixelMap = await imageSource.createPixelMap({
|
||||
desiredSize: {
|
||||
width: imageInfo.size.width,
|
||||
height: imageInfo.size.height
|
||||
}
|
||||
});
|
||||
if (!pixelMap) {
|
||||
throw new Error('创建PixelMap失败');
|
||||
}
|
||||
// 5. 压缩图片
|
||||
imagePacker = image.createImagePacker();
|
||||
const packOpts: image.PackingOption = {
|
||||
format: "image/jpeg",
|
||||
quality: 80 // 适当提高质量保证清晰度
|
||||
};
|
||||
logger.info('正在压缩图片...');
|
||||
const arrayBuffer = await imagePacker.packing(pixelMap, packOpts);
|
||||
const unit8Array = new Uint8Array(arrayBuffer);
|
||||
let binary = '';
|
||||
unit8Array.forEach(byte => {
|
||||
binary += String.fromCharCode(byte);
|
||||
});
|
||||
const base64String = Base64Util.encodeToStrSync(binary);
|
||||
logger.info(`图片转换成功,大小: ${Math.round(base64String.length / 1024)}KB`);
|
||||
return base64String;
|
||||
} catch (error) {
|
||||
logger.error('图片处理失败: ' + JSON.stringify(error));
|
||||
throw new Error(`图片处理失败: ${error.message}`);
|
||||
} finally {
|
||||
// 7. 确保释放资源
|
||||
try {
|
||||
pixelMap?.release();
|
||||
imageSource?.release();
|
||||
imagePacker?.release();
|
||||
} catch (e) {
|
||||
logger.error('资源释放异常: ' + JSON.stringify(e));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
type DateFormat = 'YYYY-MM-DD' | 'MM/DD/YYYY' | 'DD-MMM-YYYY' | 'YYYY年MM月DD日' | 'YYYYMMDD';
|
||||
|
||||
export function formatDate(date: Date,pattern:DateFormat = 'YYYY-MM-DD'): string {
|
||||
const padZero = (num: number): string => num.toString().padStart(2, '0');
|
||||
const year = date.getFullYear();
|
||||
const month = padZero(date.getMonth() + 1); // 月份修正[7,8](@ref)
|
||||
const day = padZero(date.getDate());
|
||||
|
||||
// 模式映射逻辑(核心补全部分)
|
||||
switch (pattern) {
|
||||
case 'YYYY-MM-DD':
|
||||
return `${year}-${month}-${day}`;
|
||||
case 'MM/DD/YYYY':
|
||||
return `${month}/${day}/${year}`;
|
||||
case 'DD-MMM-YYYY':
|
||||
const months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];
|
||||
return `${day}-${months[date.getMonth()]}-${year}`; // 月份缩写处理[4](@ref)
|
||||
case 'YYYY年MM月DD日':
|
||||
return `${year}年${month}月${day}日`; // 中文格式[5](@ref)
|
||||
case 'YYYYMMDD':
|
||||
return `${year}${month}${day}`; // 紧凑格式
|
||||
default:
|
||||
throw new Error(`Unsupported format pattern: ${pattern}`);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
import { preferences } from '@kit.ArkData'
|
||||
import { ExpertData } from '../models/RequestDefaultModel'
|
||||
|
||||
export const AUTH_STORE_KEY = 'perfactAuth'
|
||||
|
||||
class PerfactAuth {
|
||||
store: preferences.Preferences | null = null
|
||||
|
||||
getStore() {
|
||||
if (!this.store) {
|
||||
this.store = preferences.getPreferencesSync(getContext(), { name: AUTH_STORE_KEY })
|
||||
}
|
||||
return this.store
|
||||
}
|
||||
|
||||
async setUser(phone:string,user: ExpertData) {
|
||||
AppStorage.setOrCreate(phone, user)
|
||||
await this.getStore().put(phone, JSON.stringify(user))
|
||||
await this.getStore().flush()
|
||||
}
|
||||
|
||||
async updateUser(phone:string,user: ExpertData) {
|
||||
AppStorage.setOrCreate(phone, user)
|
||||
await this.getStore().put(phone, JSON.stringify(user))
|
||||
await this.getStore().flush()
|
||||
}
|
||||
|
||||
async delUser(phone:string) {
|
||||
AppStorage.setOrCreate(phone, {})
|
||||
await this.getStore().put(phone, '{}')
|
||||
await this.getStore().flush()
|
||||
}
|
||||
|
||||
initUser() {
|
||||
const json = this.getStore().getSync(AUTH_STORE_KEY, '{}') as string
|
||||
AppStorage.setOrCreate(AUTH_STORE_KEY, JSON.parse(json))
|
||||
}
|
||||
|
||||
getUser(phone:string) {
|
||||
return AppStorage.get<ExpertData>(phone) || {} as ExpertData
|
||||
}
|
||||
}
|
||||
|
||||
export const perfactAuth = new PerfactAuth()
|
||||
@@ -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()
|
||||
@@ -0,0 +1,97 @@
|
||||
import { preferences } from '@kit.ArkData'
|
||||
import { router } from '@kit.ArkUI'
|
||||
import { Data } from '../models/LoginInfoModel'
|
||||
import { ExpertData } from '../models/RequestDefaultModel'
|
||||
import { BusinessError } from '@kit.BasicServicesKit'
|
||||
|
||||
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 updateUser(user: ExpertData) {
|
||||
AppStorage.setOrCreate('user', user)
|
||||
await this.getStore().put(AUTH_STORE_KEY, JSON.stringify(user))
|
||||
await this.getStore().flush()
|
||||
}
|
||||
|
||||
async setPerfactUser(mobile:string,user:ExpertData) {
|
||||
AppStorage.setOrCreate('mobile', mobile)
|
||||
await this.getStore().put(mobile, JSON.stringify(user))
|
||||
await this.getStore().flush((err:BusinessError)=>{
|
||||
if (err) {
|
||||
console.error('保存失败',err.code,err.message)
|
||||
} else {
|
||||
console.info('保存成功',JSON.stringify(user))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
getPerfactUser(phone:string) {
|
||||
return AppStorage.get<ExpertData>(phone) || {} as ExpertData
|
||||
}
|
||||
|
||||
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()
|
||||
@@ -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) + '%'
|
||||
@@ -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()
|
||||
@@ -0,0 +1,229 @@
|
||||
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 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字段
|
||||
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) => {
|
||||
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()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
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:'5kO57cuAL8seXQpxgtc');
|
||||
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: '' })
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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()
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"module": {
|
||||
"name": "basic",
|
||||
"type": "har",
|
||||
"deviceTypes": [
|
||||
"default",
|
||||
"tablet",
|
||||
"2in1"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -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": "打卡"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 97 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
@@ -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 |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 276 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
@@ -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);
|
||||
})
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import abilityTest from './Ability.test';
|
||||
|
||||
export default function testsuite() {
|
||||
abilityTest();
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"module": {
|
||||
"name": "basic_test",
|
||||
"type": "feature",
|
||||
"deviceTypes": [
|
||||
"default",
|
||||
"tablet",
|
||||
"2in1"
|
||||
],
|
||||
"deliveryWithInstall": true,
|
||||
"installationFree": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import localUnitTest from './LocalUnit.test';
|
||||
|
||||
export default function testsuite() {
|
||||
localUnitTest();
|
||||
}
|
||||
@@ -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);
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
/node_modules
|
||||
/oh_modules
|
||||
/.preview
|
||||
/build
|
||||
/.cxx
|
||||
/.test
|
||||
@@ -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;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
export { HomePage } from './src/main/ets/pages/HomePage';
|
||||
|
||||
export { VideoPage } from './src/main/ets/pages/VideoPage';
|
||||
|
||||
export { PlayBack } from './src/main/ets/pages/PlayBack';
|
||||
|
||||
export { VideoMore } from './src/main/ets/pages/VideoMore'
|
||||
|
||||
export { VideoDetailModel } from './src/main/ets/model/VideoDetailModel'
|
||||
@@ -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,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. */
|
||||
}
|
||||
@@ -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
|
||||
@@ -0,0 +1,164 @@
|
||||
{
|
||||
"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",
|
||||
"@ohos/crypto-js@2.0.3": "@ohos/crypto-js@2.0.4",
|
||||
"@ohos/crypto-js@^2.0.2": "@ohos/crypto-js@2.0.4",
|
||||
"@ohos/httpclient@2.0.2": "@ohos/httpclient@2.0.2",
|
||||
"@polyvharmony/httpdns-api@1.0.2": "@polyvharmony/httpdns-api@1.0.2",
|
||||
"@polyvharmony/media-player-business@2.5.0": "@polyvharmony/media-player-business@2.5.0",
|
||||
"@polyvharmony/media-player-core-api@2.5.0": "@polyvharmony/media-player-core-api@2.5.0",
|
||||
"@polyvharmony/media-player-core-ijk@2.5.0": "@polyvharmony/media-player-core-ijk@2.5.0",
|
||||
"@polyvharmony/media-player-foundation@2.5.0": "@polyvharmony/media-player-foundation@2.5.0",
|
||||
"@polyvharmony/media-player-sdk-addon-cache-down@2.5.0": "@polyvharmony/media-player-sdk-addon-cache-down@2.5.0",
|
||||
"@polyvharmony/media-player-sdk@2.5.0": "@polyvharmony/media-player-sdk@2.5.0",
|
||||
"base64-js@^1.5.1": "base64-js@1.5.1",
|
||||
"media-player-common@../../polyv": "media-player-common@../../polyv",
|
||||
"pako@^2.1.0": "pako@2.1.0",
|
||||
"scene_single_video@../../scene_single_video": "scene_single_video@../../scene_single_video"
|
||||
},
|
||||
"packages": {
|
||||
"@itcast/basic@../../commons/basic": {
|
||||
"name": "@itcast/basic",
|
||||
"version": "1.0.0",
|
||||
"resolved": "../../commons/basic",
|
||||
"registryType": "local"
|
||||
},
|
||||
"@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"
|
||||
},
|
||||
"@ohos/httpclient@2.0.2": {
|
||||
"name": "@ohos/httpclient",
|
||||
"version": "2.0.2",
|
||||
"integrity": "sha512-acFEfQ9ZJti4KEYDBErCq0W85uc2khen41LIkBLVcfFXmgZAGeRKV+CPiSyG8v+5nUD7Wf2ncjBxxPxr6moqVg==",
|
||||
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/httpclient/-/httpclient-2.0.2.har",
|
||||
"registryType": "ohpm",
|
||||
"dependencies": {
|
||||
"pako": "^2.1.0",
|
||||
"@ohos/crypto-js": "^2.0.2",
|
||||
"base64-js": "^1.5.1"
|
||||
}
|
||||
},
|
||||
"@polyvharmony/httpdns-api@1.0.2": {
|
||||
"name": "@polyvharmony/httpdns-api",
|
||||
"version": "1.0.2",
|
||||
"integrity": "sha512-p3vd3i4oClAp/rf2RD3vIdKRSisabOB/+K+wYB9nHuf5ZDTw3Yv4o+dLQewm0atqf00JGF3Y0IiwURCpryJX5Q==",
|
||||
"resolved": "https://repo.harmonyos.com/ohpm/@polyvharmony/httpdns-api/-/httpdns-api-1.0.2.har",
|
||||
"registryType": "ohpm"
|
||||
},
|
||||
"@polyvharmony/media-player-business@2.5.0": {
|
||||
"name": "@polyvharmony/media-player-business",
|
||||
"version": "2.5.0",
|
||||
"integrity": "sha512-ta9YBq8cvwNPuRwQpAopodFB0WHbAfRUhgosGqT+UDEHZtlXsajLFmplPhoqYpFb649FVe6vDjVdHgsp6bKmtQ==",
|
||||
"resolved": "https://repo.harmonyos.com/ohpm/@polyvharmony/media-player-business/-/media-player-business-2.5.0.har",
|
||||
"registryType": "ohpm",
|
||||
"dependencies": {
|
||||
"@polyvharmony/media-player-core-api": "2.5.0",
|
||||
"@polyvharmony/media-player-foundation": "2.5.0",
|
||||
"@ohos/httpclient": "2.0.2",
|
||||
"@ohos/crypto-js": "2.0.3"
|
||||
}
|
||||
},
|
||||
"@polyvharmony/media-player-core-api@2.5.0": {
|
||||
"name": "@polyvharmony/media-player-core-api",
|
||||
"version": "2.5.0",
|
||||
"integrity": "sha512-23Z4p0nPWAGJuifAr5qfhB39b0RdU7LQnOKPJTtPX4fc3qyGDoyQ7Y4/e+WulTm/JaDgsQ7xTn+Hmq+ryNl5cA==",
|
||||
"resolved": "https://repo.harmonyos.com/ohpm/@polyvharmony/media-player-core-api/-/media-player-core-api-2.5.0.har",
|
||||
"registryType": "ohpm",
|
||||
"dependencies": {
|
||||
"@polyvharmony/media-player-foundation": "2.5.0"
|
||||
}
|
||||
},
|
||||
"@polyvharmony/media-player-core-ijk@2.5.0": {
|
||||
"name": "@polyvharmony/media-player-core-ijk",
|
||||
"version": "2.5.0",
|
||||
"integrity": "sha512-LieKq0vm8QpTNLzw+QSVRok9xoJV0fDVR4Aw1bRClnpd4Mmb99JvwuW6isCRYsrZJievsxbbNet/qSqjb+OJhw==",
|
||||
"resolved": "https://repo.harmonyos.com/ohpm/@polyvharmony/media-player-core-ijk/-/media-player-core-ijk-2.5.0.har",
|
||||
"registryType": "ohpm",
|
||||
"dependencies": {
|
||||
"@polyvharmony/media-player-core-api": "2.5.0",
|
||||
"@polyvharmony/media-player-foundation": "2.5.0"
|
||||
}
|
||||
},
|
||||
"@polyvharmony/media-player-foundation@2.5.0": {
|
||||
"name": "@polyvharmony/media-player-foundation",
|
||||
"version": "2.5.0",
|
||||
"integrity": "sha512-P1beEIZs2ySGrNGWo2RRi8/hQopZkLE6Cdi+53/UJI4iXFeciWZQMXold3KBqlMzNm369BEysaoprtCsWLMC8Q==",
|
||||
"resolved": "https://repo.harmonyos.com/ohpm/@polyvharmony/media-player-foundation/-/media-player-foundation-2.5.0.har",
|
||||
"registryType": "ohpm",
|
||||
"dependencies": {
|
||||
"@ohos/httpclient": "2.0.2",
|
||||
"@ohos/crypto-js": "2.0.3",
|
||||
"@polyvharmony/httpdns-api": "1.0.2"
|
||||
}
|
||||
},
|
||||
"@polyvharmony/media-player-sdk-addon-cache-down@2.5.0": {
|
||||
"name": "@polyvharmony/media-player-sdk-addon-cache-down",
|
||||
"version": "2.5.0",
|
||||
"integrity": "sha512-wN6OQaQm65GPL39nVWYx9vRyua6TflbIXddoataxHrlW2Nf7N3PJZjmFW0zaTPC5EyzsnmkRh/4zN2zHvyQDUA==",
|
||||
"resolved": "https://repo.harmonyos.com/ohpm/@polyvharmony/media-player-sdk-addon-cache-down/-/media-player-sdk-addon-cache-down-2.5.0.har",
|
||||
"registryType": "ohpm",
|
||||
"dependencies": {
|
||||
"@polyvharmony/media-player-business": "2.5.0",
|
||||
"@polyvharmony/media-player-foundation": "2.5.0",
|
||||
"@polyvharmony/media-player-core-ijk": "2.5.0"
|
||||
}
|
||||
},
|
||||
"@polyvharmony/media-player-sdk@2.5.0": {
|
||||
"name": "@polyvharmony/media-player-sdk",
|
||||
"version": "2.5.0",
|
||||
"integrity": "sha512-Of8xCFhAD0O8s7Q0jzwSf4potYJJcI/j+MrNvU23sgXnEAX6DG7azIehuCn+k6AMHvxgLF1LlEMp17v3pkc/XA==",
|
||||
"resolved": "https://repo.harmonyos.com/ohpm/@polyvharmony/media-player-sdk/-/media-player-sdk-2.5.0.har",
|
||||
"registryType": "ohpm",
|
||||
"dependencies": {
|
||||
"@polyvharmony/media-player-business": "2.5.0",
|
||||
"@polyvharmony/media-player-core-api": "2.5.0",
|
||||
"@polyvharmony/media-player-foundation": "2.5.0"
|
||||
}
|
||||
},
|
||||
"base64-js@1.5.1": {
|
||||
"name": "base64-js",
|
||||
"version": "1.5.1",
|
||||
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
|
||||
"resolved": "https://repo.harmonyos.com/ohpm/base64-js/-/base64-js-1.5.1.tgz",
|
||||
"shasum": "1b1b440160a5bf7ad40b650f095963481903930a",
|
||||
"registryType": "ohpm"
|
||||
},
|
||||
"media-player-common@../../polyv": {
|
||||
"name": "media-player-common",
|
||||
"version": "2.5.0",
|
||||
"resolved": "../../polyv",
|
||||
"registryType": "local",
|
||||
"dependencies": {
|
||||
"@polyvharmony/media-player-sdk": "2.5.0",
|
||||
"@polyvharmony/media-player-sdk-addon-cache-down": "2.5.0"
|
||||
}
|
||||
},
|
||||
"pako@2.1.0": {
|
||||
"name": "pako",
|
||||
"version": "2.1.0",
|
||||
"integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==",
|
||||
"resolved": "https://repo.harmonyos.com/ohpm/pako/-/pako-2.1.0.tgz",
|
||||
"shasum": "266cc37f98c7d883545d11335c00fbd4062c9a86",
|
||||
"registryType": "ohpm"
|
||||
},
|
||||
"scene_single_video@../../scene_single_video": {
|
||||
"name": "scene_single_video",
|
||||
"version": "2.5.0",
|
||||
"resolved": "../../scene_single_video",
|
||||
"registryType": "local",
|
||||
"dependencies": {
|
||||
"media-player-common": "file:../polyv",
|
||||
"@polyvharmony/media-player-sdk": "2.5.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"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",
|
||||
"@polyvharmony/media-player-sdk": "2.5.0",
|
||||
"@polyvharmony/media-player-sdk-addon-cache-down": "2.5.0",
|
||||
"scene_single_video": "file:../../scene_single_video",
|
||||
"media-player-common": "file:../../polyv"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,179 @@
|
||||
import { runCatching, seconds } from '@polyvharmony/media-player-sdk';
|
||||
import { MeetingItemModel,ItemModel } from '../model/ItemModel'
|
||||
import { BasicConstant,DataWebModels } from '@itcast/basic'
|
||||
import { promptAction, router } from '@kit.ArkUI';
|
||||
import { PLVMockMediaResourceData } from '../polyv/PLVMockMediaResourceData'
|
||||
import {
|
||||
PLVMediaPlayerSingleVideoPageParam
|
||||
} from 'media-player-common';
|
||||
@Preview
|
||||
@Component
|
||||
export struct ItemComp {
|
||||
item: MeetingItemModel = new MeetingItemModel({} as ItemModel)
|
||||
|
||||
|
||||
@State timeColor:ResourceStr=$r('app.color.ee432f')
|
||||
@State status:string=''
|
||||
@State heightss:Length=247
|
||||
aboutToAppear(): void {
|
||||
this.getMeetingStatus()
|
||||
}
|
||||
|
||||
build() {
|
||||
Column() {
|
||||
Text().height(1).width('100%')
|
||||
if(this.item.count==0)
|
||||
{
|
||||
Text(this.item.begin_date.substring(0, 4)
|
||||
+ "年"
|
||||
+ this.item.begin_date.substring(5, 7)
|
||||
+ "月").fontSize(14).fontColor($r('app.color.333333')).height(35)
|
||||
}
|
||||
RelativeContainer()
|
||||
{
|
||||
Text().width(23).backgroundColor(this.timeColor).borderRadius(5).height('100%')
|
||||
RelativeContainer(){
|
||||
Column()
|
||||
{
|
||||
Text(this.item.title) .maxLines(2).fontSize(15).fontColor(Color.Black).textAlign(TextAlign.Start)
|
||||
.textOverflow({ overflow: TextOverflow.Ellipsis }).id('title').width('100%')
|
||||
if(this.status!='')
|
||||
{
|
||||
RelativeContainer()
|
||||
{
|
||||
Stack()
|
||||
{
|
||||
Image(BasicConstant.urlHtml+this.item.liveimg).width('100%').height(162)
|
||||
.objectFit(ImageFit.Fill)
|
||||
if(this.status!=''&&(this.status!='已结束'&&this.status!='回访中'))
|
||||
{
|
||||
Image($r('app.media.bofang')).width(40).height(40)
|
||||
}
|
||||
|
||||
}
|
||||
if(this.status!='')
|
||||
{
|
||||
Text(this.status) .fontSize(13).margin({top:5,right:5})
|
||||
.fontColor(Color.White).padding({left:10,right:10,top:1,bottom:1})
|
||||
.alignRules({
|
||||
right: { anchor: "__container__", align: HorizontalAlign.End }
|
||||
})
|
||||
.border({ width:1, color:Color.White })
|
||||
.backgroundColor($r('app.color.22000000'))
|
||||
.borderRadius(30)
|
||||
}
|
||||
}
|
||||
.height(162).backgroundColor(Color.White)
|
||||
.margin({top:10,right:5}).clip(true).id('rr')
|
||||
.onClick(()=>{
|
||||
if(this.item.status=='3')
|
||||
{
|
||||
return
|
||||
}
|
||||
let paramsInfo: DataWebModels = {
|
||||
url:this.item.liveurl ,
|
||||
title:'肝胆直播',
|
||||
type:'live'
|
||||
|
||||
};
|
||||
router.pushUrl({
|
||||
url: 'pages/WebView/LivebroadcastPages', // 目标url
|
||||
params: paramsInfo // 添加params属性,传递自定义参数
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
Row(){
|
||||
Image($r('app.media.meetingtime')).width(13).height(13)
|
||||
Text(this.getTime(this.item.begin_date,this.item.end_date)).fontSize(14)
|
||||
.fontColor($r('app.color.999999')).margin({left:10})
|
||||
Blank()
|
||||
Image($r('app.media.meetinglocation')).width(15).height(15)
|
||||
Text(this.item.location).fontSize(14)
|
||||
.fontColor($r('app.color.999999')).margin({left:10})
|
||||
}
|
||||
.width('100%')
|
||||
.margin({top:6})
|
||||
}.height(this.heightss).justifyContent(FlexAlign.Center).margin({left:20,right:5})
|
||||
}
|
||||
.height('100%').clip(true)
|
||||
.margin({left:20,right:5}).backgroundColor(Color.White)
|
||||
Text(this.item.begin_date.substring(8,10)).width(20).height(20) .alignRules({
|
||||
center: { anchor: "__container__", align:VerticalAlign.Center}
|
||||
})
|
||||
.margin({left:10})
|
||||
.fontSize(14)
|
||||
.fontColor(this.timeColor)
|
||||
.textAlign(TextAlign.Center)
|
||||
.backgroundColor(Color.White)
|
||||
.borderRadius(20)
|
||||
|
||||
}.width('100%').height(this.heightss).clip(true).
|
||||
backgroundColor(Color.White).borderRadius(5)
|
||||
.onClick(()=>{
|
||||
router.pushUrl({
|
||||
url: 'pages/WebView/WebPage',
|
||||
params: { url: this.item.path ,title:'会议详情'}
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
}.backgroundColor($r('app.color.e4e4e4'))
|
||||
.width('100%').padding({left:10,right:10}).clip(true)
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
getTime(str1:string, str2:string) {
|
||||
|
||||
if (str1.substring(0, 10)==(str2.substring(0, 10))) {
|
||||
return str1.replaceAll("-", ".").substring(0, 10).toString();
|
||||
}
|
||||
return str1.replaceAll("-", ".").substring(0, 10)+"-"+str2.replaceAll("-", ".").substring(0, 10)
|
||||
|
||||
}
|
||||
getMeetingStatus()
|
||||
{
|
||||
if(this.item.count%4==0)
|
||||
{
|
||||
this.timeColor=$r('app.color.ee432f')
|
||||
}
|
||||
else if(this.item.count%4==1)
|
||||
{
|
||||
this.timeColor=$r('app.color.f9b928')
|
||||
}
|
||||
else if(this.item.count%4==2)
|
||||
{
|
||||
this.timeColor=$r('app.color.63ccc7')
|
||||
}
|
||||
else
|
||||
{
|
||||
this.timeColor=$r('app.color.99d750')
|
||||
}
|
||||
|
||||
if('1'==this.item.status)
|
||||
{
|
||||
this.status='预告'
|
||||
}
|
||||
else if('2'==this.item.status)
|
||||
{
|
||||
this.status='直播中'
|
||||
}
|
||||
else if('3'==this.item.status)
|
||||
{
|
||||
this.status='已结束'
|
||||
}
|
||||
else if('4'==this.item.status)
|
||||
{
|
||||
this.status='回放中'
|
||||
}
|
||||
else
|
||||
{
|
||||
this.heightss=75
|
||||
this.status=''
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,166 @@
|
||||
|
||||
import { MeetingItemModel,ItemModel } from '../model/ItemModel'
|
||||
import { hdHttp, HdResponse,BasicConstant } from '@itcast/basic'
|
||||
import { BusinessError } from '@kit.BasicServicesKit';
|
||||
import { router } from '@kit.ArkUI'
|
||||
import promptAction from '@ohos.promptAction';
|
||||
import { TypeuuidModel } from '../model/TypeuuidModel';
|
||||
|
||||
@Preview
|
||||
@Component
|
||||
export struct ItemCompBack {
|
||||
item: MeetingItemModel = new MeetingItemModel({} as ItemModel)
|
||||
@State timeColor:ResourceStr=$r('app.color.ee432f')
|
||||
@State status:string=''
|
||||
aboutToAppear(): void {
|
||||
this.getMeetingStatus()
|
||||
}
|
||||
|
||||
build() {
|
||||
Column() {
|
||||
Text().height(1).width('100%')
|
||||
if(this.item.count==0)
|
||||
{
|
||||
Text(this.item.begin_date.substring(0, 4)
|
||||
+ "年"
|
||||
+ this.item.begin_date.substring(5, 7)
|
||||
+ "月").fontSize(14).fontColor($r('app.color.333333')).height(35)
|
||||
}
|
||||
RelativeContainer()
|
||||
{
|
||||
Text().width(23).backgroundColor(this.timeColor).borderRadius(5).height('100%')
|
||||
RelativeContainer(){
|
||||
|
||||
|
||||
Column()
|
||||
{
|
||||
Text(this.item.title) .maxLines(2).fontSize(15).fontColor(Color.Black).textAlign(TextAlign.Start)
|
||||
.textOverflow({ overflow: TextOverflow.Ellipsis }).id('title').width('100%')
|
||||
|
||||
RelativeContainer()
|
||||
{
|
||||
Stack()
|
||||
{
|
||||
Image(BasicConstant.urlHtml+this.item.liveimg).width('100%').height(162)
|
||||
.objectFit(ImageFit.Fill)
|
||||
Image($r('app.media.bofang')).width(40).height(40)
|
||||
}
|
||||
|
||||
}
|
||||
.height(162).backgroundColor(Color.White)
|
||||
.margin({top:10,right:5}).clip(true).id('rr')
|
||||
Row(){
|
||||
Image($r('app.media.meetingtime')).width(13).height(13)
|
||||
Text(this.getTime(this.item.begin_date,this.item.end_date)).fontSize(14)
|
||||
.fontColor($r('app.color.999999')).margin({left:10})
|
||||
Blank()
|
||||
Image($r('app.media.meetinglocation')).width(15).height(15)
|
||||
Text(this.item.location).fontSize(14)
|
||||
.fontColor($r('app.color.999999')).margin({left:10})
|
||||
}
|
||||
.width('100%')
|
||||
.margin({top:6})
|
||||
}.height(247).justifyContent(FlexAlign.Center).margin({left:20,right:5})
|
||||
|
||||
|
||||
}
|
||||
.height('100%').clip(true)
|
||||
.margin({left:20,right:5}).backgroundColor(Color.White)
|
||||
Text(this.item.begin_date.substring(8,10)).width(20).height(20) .alignRules({
|
||||
|
||||
bottom: { anchor: "__container__", align:VerticalAlign.Center}
|
||||
})
|
||||
.margin({left:10})
|
||||
.fontSize(14)
|
||||
.fontColor(this.timeColor)
|
||||
.textAlign(TextAlign.Center)
|
||||
.backgroundColor(Color.White)
|
||||
.borderRadius(20)
|
||||
|
||||
}.width('100%').height(247).clip(true).
|
||||
backgroundColor(Color.White).borderRadius(5)
|
||||
|
||||
|
||||
|
||||
}.backgroundColor($r('app.color.e4e4e4'))
|
||||
.width('100%').padding({left:10,right:10}).clip(true)
|
||||
.onClick(() => {
|
||||
this.getTypeUuidByName(this.item.title)
|
||||
})
|
||||
}
|
||||
|
||||
getTypeUuidByName(name:string)
|
||||
{
|
||||
hdHttp.post<string>(BasicConstant.getTypeUuidByName, {
|
||||
name: name,
|
||||
} as extraData).then(async (res: HdResponse<string>) => {
|
||||
let json:TypeuuidModel = JSON.parse(res+'') as TypeuuidModel;
|
||||
if(json.code == '1') {
|
||||
if(json.type_uuid==null)
|
||||
{
|
||||
promptAction.showToast({ message: '该会议视频暂不支持回放' })
|
||||
}
|
||||
else
|
||||
{
|
||||
router.pushUrl({url:'pages/VideoPage/VideoMorePage',
|
||||
params: { uuid: json.type_uuid ,title:this.item.title}})
|
||||
}
|
||||
} else {
|
||||
promptAction.showToast({ message: json.message, duration: 1000 })
|
||||
}
|
||||
}).catch((err: BusinessError) => {
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
getTime(str1:string, str2:string) {
|
||||
if (str1.substring(0, 10)==(str2.substring(0, 10))) {
|
||||
return str1.replaceAll("-", ".").substring(0, 10).toString();
|
||||
}
|
||||
return str1.replaceAll("-", ".").substring(0, 10)+"-"+str2.replaceAll("-", ".").substring(0, 10)
|
||||
}
|
||||
getMeetingStatus()
|
||||
{
|
||||
if(this.item.count%4==0)
|
||||
{
|
||||
this.timeColor=$r('app.color.ee432f')
|
||||
}
|
||||
else if(this.item.count%4==1)
|
||||
{
|
||||
this.timeColor=$r('app.color.f9b928')
|
||||
}
|
||||
else if(this.item.count%4==2)
|
||||
{
|
||||
this.timeColor=$r('app.color.63ccc7')
|
||||
}
|
||||
else
|
||||
{
|
||||
this.timeColor=$r('app.color.99d750')
|
||||
}
|
||||
|
||||
if('1'==this.item.status)
|
||||
{
|
||||
this.status='预告'
|
||||
}
|
||||
else if('2'==this.item.status)
|
||||
{
|
||||
this.status='直播中'
|
||||
}
|
||||
else if('3'==this.item.status)
|
||||
{
|
||||
this.status='已结束'
|
||||
}
|
||||
else if('4'==this.item.status)
|
||||
{
|
||||
this.status='回放中'
|
||||
}
|
||||
else
|
||||
{
|
||||
this.status=''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface extraData {
|
||||
name: string
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
import { runCatching, seconds } from '@polyvharmony/media-player-sdk';
|
||||
import { VideoMore } from '../model/VideoMoreModel'
|
||||
import { BasicConstant } from '@itcast/basic'
|
||||
import { promptAction, router } from '@kit.ArkUI';
|
||||
import { PLVMockMediaResourceData } from '../polyv/PLVMockMediaResourceData'
|
||||
import {
|
||||
PLVMediaPlayerSingleVideoPageParam
|
||||
} from 'media-player-common';
|
||||
import HashMap from '@ohos.util.HashMap';
|
||||
import { hdHttp, HdResponse ,logger} from '@itcast/basic/Index'
|
||||
import { BusinessError } from '@kit.BasicServicesKit';
|
||||
import { VideoDetailModel } from '../model/VideoDetailModel'
|
||||
@Preview
|
||||
@Component
|
||||
export struct ItemCompVideo {
|
||||
@Prop item: VideoMore ;
|
||||
|
||||
hashMap: HashMap<string, string> = new HashMap();
|
||||
@State heightss:Length=247
|
||||
aboutToAppear(): void {
|
||||
|
||||
}
|
||||
|
||||
|
||||
build() {
|
||||
Column() {
|
||||
|
||||
Image(BasicConstant.urlHtml+this.item.imgpath).width('100%').height(102)
|
||||
.objectFit(ImageFit.Fill)
|
||||
|
||||
Text(this.item.name).maxLines(2).fontSize(15).fontColor('app.color.666666').textAlign(TextAlign.Start).height(36)
|
||||
.textOverflow({ overflow: TextOverflow.Ellipsis }).id('title').width('100%').margin({top:10}).padding({left:10,right:10})
|
||||
|
||||
Row(){
|
||||
Text(this.item.public_name).fontSize(14)
|
||||
.fontColor($r('app.color.999999'))
|
||||
Blank()
|
||||
Image($r('app.media.video_look')).width(18).height(11)
|
||||
Text(this.item.readnum+'').fontSize(14)
|
||||
.fontColor($r('app.color.999999'))
|
||||
}
|
||||
.padding({left:10,right:10,bottom:10})
|
||||
.width('100%')
|
||||
.margin({top:6})
|
||||
|
||||
|
||||
}.backgroundColor(Color.White)
|
||||
.borderRadius(5)
|
||||
.onClick(()=>{
|
||||
this.getVideoDetail(this.item.uuid)
|
||||
|
||||
})
|
||||
.width('100%').clip(true)
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
getVideoDetail(video_uuid:string)
|
||||
{
|
||||
this.hashMap.clear();
|
||||
this.hashMap.set('video_uuid', video_uuid)
|
||||
hdHttp.httpReq<string>(BasicConstant.videoDetail,this.hashMap).then(async (res: HdResponse<string>) => {
|
||||
logger.info('Response videoDetail'+res);
|
||||
let json:VideoDetailModel = JSON.parse(res+'') as VideoDetailModel;
|
||||
this.goPLVMediaPlayerSingleVideoPage(json.video.polyv_uuid,video_uuid)
|
||||
|
||||
}).catch((err: BusinessError) => {
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
async goPLVMediaPlayerSingleVideoPage(vid:string,video_uuid:string)
|
||||
{
|
||||
const mediaResourcesResult = await runCatching(PLVMockMediaResourceData.getInstance().setupMediaResourcesFromLocal(vid))
|
||||
if (mediaResourcesResult.success === false) {
|
||||
promptAction.showToast({
|
||||
message: `'视频数据初始化失败': ${mediaResourcesResult.error}`,
|
||||
duration: seconds(3).toMillis()
|
||||
})
|
||||
return
|
||||
}
|
||||
const mediaResource = mediaResourcesResult.data[0]
|
||||
router.pushUrl({
|
||||
url:'pages/VideoPage/PLVMediaPlayerSingleVideoPage',
|
||||
params: {
|
||||
video_uuid:video_uuid,
|
||||
param:new PLVMediaPlayerSingleVideoPageParam(mediaResource)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
import { ItemComp } from './ItemComp'
|
||||
import { MeetingItemModel,MeetingModel,MeetingModels,ItemModel } from '../model/ItemModel'
|
||||
import { HdList, HdListController,BasicConstant,hdHttp, HdResponse ,logger} from '@itcast/basic/Index'
|
||||
import { promptAction, router } from '@kit.ArkUI'
|
||||
import { BusinessError } from '@kit.BasicServicesKit';
|
||||
|
||||
import HashMap from '@ohos.util.HashMap';
|
||||
|
||||
|
||||
@Component
|
||||
export struct ListComp {
|
||||
@State
|
||||
list: ItemModel[] = []
|
||||
controller = new HdListController()
|
||||
@State
|
||||
page: number = 1
|
||||
@State
|
||||
keyword: string = ''
|
||||
@Prop
|
||||
@Watch('onUpdate')
|
||||
sort: number = 30
|
||||
timer: number = -1
|
||||
hashMap: HashMap<string, string> = new HashMap();
|
||||
|
||||
onUpdate() {
|
||||
if (this.timer) clearTimeout(this.timer)
|
||||
this.timer = setTimeout(() => {
|
||||
this.controller.reload()
|
||||
this.onRefresh()
|
||||
}, 500)
|
||||
}
|
||||
|
||||
onRefresh() {
|
||||
this.page = 1
|
||||
this.initData(0)
|
||||
|
||||
}
|
||||
|
||||
initData(type:number)
|
||||
{
|
||||
this.hashMap.clear();
|
||||
this.hashMap.set('page', this.page+"")
|
||||
hdHttp.httpReq<string>(BasicConstant.meetingListV2,this.hashMap).then(async (res: HdResponse<string>) => {
|
||||
logger.info('Response meetingListV2'+res);
|
||||
let json:MeetingModels = JSON.parse(res+'') as MeetingModels;
|
||||
|
||||
if(type==0)
|
||||
{
|
||||
this.controller.refreshed()
|
||||
}
|
||||
else
|
||||
{
|
||||
this.controller.loaded()
|
||||
}
|
||||
if(this.page==1&&json.data.list!=null&&json.data.list.length>0)
|
||||
{
|
||||
this.list = json.data.list
|
||||
}
|
||||
else if(this.page>1)
|
||||
{
|
||||
this.list.push(...json.data.list)
|
||||
}
|
||||
this.getPosition()
|
||||
if (this.page >= json.data.pages) {
|
||||
this.controller.finished()
|
||||
} else {
|
||||
this.page++
|
||||
}
|
||||
|
||||
}).catch((err: BusinessError) => {
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
getPosition() {
|
||||
let DatasList:string[] = [];
|
||||
let count = 0;
|
||||
for (let i = 0; i <this.list.length; i++) {
|
||||
if (!DatasList.includes(this.list[i].begin_date
|
||||
.substring(0, 7))) {
|
||||
DatasList.push(this.list[i].begin_date.substring(0, 7));
|
||||
count = 0;
|
||||
this.list[i].count=count;
|
||||
} else {
|
||||
count++;
|
||||
this.list[i].count=count;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
build() {
|
||||
HdList({
|
||||
lw: 1,
|
||||
controller: this.controller,
|
||||
onRefresh: () => {
|
||||
this.onRefresh()
|
||||
},
|
||||
onLoad: () => {
|
||||
this.initData(1)
|
||||
|
||||
}
|
||||
}) {
|
||||
ForEach(this.list, (item: MeetingItemModel) => {
|
||||
ListItem() {
|
||||
ItemComp({ item })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
import { ItemCompBack } from './ItemCompBack'
|
||||
import { MeetingItemModel,MeetingModel,MeetingModels,ItemModel } from '../model/ItemModel'
|
||||
import { HdList, HdListController,BasicConstant,hdHttp, HdResponse ,logger} from '@itcast/basic/Index'
|
||||
import { promptAction, router } from '@kit.ArkUI'
|
||||
import { BusinessError } from '@kit.BasicServicesKit';
|
||||
|
||||
import HashMap from '@ohos.util.HashMap';
|
||||
|
||||
|
||||
@Component
|
||||
export struct ListCompBack {
|
||||
@Prop
|
||||
@Watch('onUpdate')
|
||||
year:string=''
|
||||
@Prop
|
||||
@Watch('onUpdate')
|
||||
type:string=''
|
||||
@State
|
||||
list: ItemModel[] = []
|
||||
controller = new HdListController()
|
||||
@State
|
||||
page: number = 1
|
||||
@State
|
||||
keyword: string = ''
|
||||
// timer: number = -1
|
||||
hashMap: HashMap<string, string> = new HashMap();
|
||||
|
||||
onUpdate() {
|
||||
// console.info('Response onUpdate')
|
||||
// if (this.timer) clearTimeout(this.timer)
|
||||
// this.timer = setTimeout(() => {
|
||||
// this.controller.reload()
|
||||
this.onRefresh()
|
||||
// }, 500)
|
||||
|
||||
}
|
||||
|
||||
onRefresh() {
|
||||
this.page = 1
|
||||
this.initData(0)
|
||||
|
||||
}
|
||||
|
||||
initData(type:number)
|
||||
{
|
||||
console.info('Response type'+type)
|
||||
this.hashMap.clear();
|
||||
this.hashMap.set('page', this.page+"")
|
||||
if(this.year=='会议时间')
|
||||
{
|
||||
this.hashMap.set('year','')
|
||||
}
|
||||
else
|
||||
{
|
||||
this.hashMap.set('year',this.year)
|
||||
}
|
||||
|
||||
this.hashMap.set('type',this.type)
|
||||
hdHttp.httpReq<string>(BasicConstant.meetingV2Video,this.hashMap).then(async (res: HdResponse<string>) => {
|
||||
logger.info('Response meetingListV2'+res);
|
||||
let json:MeetingModels = JSON.parse(res+'') as MeetingModels;
|
||||
|
||||
if(type==0)
|
||||
{
|
||||
this.controller.refreshed()
|
||||
}
|
||||
else
|
||||
{
|
||||
this.controller.loaded()
|
||||
}
|
||||
// if(this.page==1&&json.data.list!=null&&json.data.list.length>0)
|
||||
if(this.page==1)
|
||||
{
|
||||
this.list=[]
|
||||
if(json.data!=null&&json.data.list!)
|
||||
{
|
||||
this.list = json.data.list
|
||||
}
|
||||
|
||||
}
|
||||
else if(this.page>1&&json.data!=null&&json.data.list!=null&&json.data.list.length>0)
|
||||
{
|
||||
this.list.push(...json.data.list)
|
||||
}
|
||||
this.getPosition()
|
||||
if (this.page >= json.data.pages) {
|
||||
this.controller.finished()
|
||||
} else {
|
||||
this.page++
|
||||
}
|
||||
|
||||
}).catch((err: BusinessError) => {
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
getPosition() {
|
||||
let DatasList:string[] = [];
|
||||
let count = 0;
|
||||
for (let i = 0; i <this.list.length; i++) {
|
||||
if (!DatasList.includes(this.list[i].begin_date
|
||||
.substring(0, 7))) {
|
||||
DatasList.push(this.list[i].begin_date.substring(0, 7));
|
||||
count = 0;
|
||||
this.list[i].count=count;
|
||||
} else {
|
||||
count++;
|
||||
this.list[i].count=count;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
build() {
|
||||
HdList({
|
||||
lw: 1,
|
||||
controller: this.controller,
|
||||
onRefresh: () => {
|
||||
this.onRefresh()
|
||||
},
|
||||
onLoad: () => {
|
||||
this.initData(1)
|
||||
|
||||
}
|
||||
}) {
|
||||
ForEach(this.list, (item: MeetingItemModel) => {
|
||||
ListItem() {
|
||||
ItemCompBack({ item })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
import { ItemCompVideo } from './ItemCompVideo'
|
||||
import { VideoMoreModel,VideoMore } from '../model/VideoMoreModel'
|
||||
import { HdGrid, HdListController,BasicConstant,hdHttp, HdResponse ,logger} from '@itcast/basic/Index'
|
||||
import { promptAction, router } from '@kit.ArkUI'
|
||||
import { BusinessError } from '@kit.BasicServicesKit';
|
||||
|
||||
import HashMap from '@ohos.util.HashMap';
|
||||
|
||||
|
||||
@Component
|
||||
export struct ListCompVideo {
|
||||
@Prop
|
||||
type_uuid:string=''
|
||||
@State
|
||||
list: VideoMore[] = []
|
||||
controller = new HdListController()
|
||||
@State
|
||||
page: number = 1
|
||||
@State
|
||||
keyword: string = ''
|
||||
hashMap: HashMap<string, string> = new HashMap();
|
||||
|
||||
|
||||
|
||||
onRefresh() {
|
||||
this.page = 1
|
||||
this.initData(0)
|
||||
|
||||
}
|
||||
|
||||
initData(type:number)
|
||||
{
|
||||
this.hashMap.clear();
|
||||
this.hashMap.set('page', this.page+"")
|
||||
this.hashMap.set('typeUuid', this.type_uuid)
|
||||
hdHttp.httpReq<string>(BasicConstant.videoByTypeNew,this.hashMap).then(async (res: HdResponse<string>) => {
|
||||
logger.info('Response videoByTypeNew'+res);
|
||||
let json:VideoMoreModel = JSON.parse(res+'') as VideoMoreModel;
|
||||
|
||||
if(type==0)
|
||||
{
|
||||
this.controller.refreshed()
|
||||
}
|
||||
else
|
||||
{
|
||||
this.controller.loaded()
|
||||
}
|
||||
if(this.page==1&&json.data.list!=null&&json.data.list.length>0)
|
||||
{
|
||||
this.list = json.data.list
|
||||
}
|
||||
else if(this.page>1)
|
||||
{
|
||||
this.list.push(...json.data.list)
|
||||
}
|
||||
|
||||
if (this.page >= json.data.totalPage) {
|
||||
this.controller.finished()
|
||||
} else {
|
||||
this.page++
|
||||
}
|
||||
|
||||
}).catch((err: BusinessError) => {
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
build() {
|
||||
HdGrid({
|
||||
lw: 1,
|
||||
controller: this.controller,
|
||||
onRefresh: () => {
|
||||
this.onRefresh()
|
||||
},
|
||||
onLoad: () => {
|
||||
this.initData(1)
|
||||
|
||||
}
|
||||
}) {
|
||||
ForEach(this.list, (items: VideoMore) => {
|
||||
GridItem() {
|
||||
ItemCompVideo({ item:items })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
import { List } from '@kit.ArkTS';
|
||||
export interface ItemModel {
|
||||
count:number;
|
||||
title:string;
|
||||
uuid:string;
|
||||
end_date:string;
|
||||
begin_date:string;
|
||||
sort:string;
|
||||
// status (0 无直播 1 待直播 2 直播中 3 已结束)
|
||||
status:string;
|
||||
location:string;
|
||||
type:string;
|
||||
path:string;
|
||||
content:string;
|
||||
// liveimg (直播图片)
|
||||
liveimg:string;
|
||||
// liveurl (直播地址)
|
||||
liveurl:string;
|
||||
// spareurl (备用地址)
|
||||
spareurl:string;
|
||||
tags:string;
|
||||
}
|
||||
export interface MeetingModel {
|
||||
code:string;
|
||||
message:string;
|
||||
totalPage:number;
|
||||
pageNumber:number;
|
||||
pageSize:number;
|
||||
totalRow:number;
|
||||
pages:number;
|
||||
list: ItemModel[] ;
|
||||
}
|
||||
export interface MeetingModels {
|
||||
code:string;
|
||||
message:string;
|
||||
data:MeetingModel
|
||||
|
||||
}
|
||||
export class MeetingItemModel implements ItemModel
|
||||
{
|
||||
count: number=0;
|
||||
title: string='';
|
||||
uuid: string='';
|
||||
end_date: string='';
|
||||
begin_date: string='';
|
||||
sort: string='';
|
||||
status: string='';
|
||||
location: string='';
|
||||
type: string='';
|
||||
path: string='';
|
||||
content: string='';
|
||||
liveimg: string='';
|
||||
liveurl: string='';
|
||||
spareurl: string='';
|
||||
tags: string='';
|
||||
|
||||
constructor(model:ItemModel) {
|
||||
this.count = model.count;
|
||||
this.title = model.title;
|
||||
this.uuid = model.uuid;
|
||||
this.end_date = model.end_date;
|
||||
this.begin_date = model.begin_date;
|
||||
this.sort = model.sort;
|
||||
this.status = model.status;
|
||||
this.location = model.location;
|
||||
this.type = model.type;
|
||||
this.path = model.path;
|
||||
this.content = model.content;
|
||||
this.liveimg = model.liveimg;
|
||||
this.liveurl = model.liveurl;
|
||||
this.spareurl = model.spareurl;
|
||||
this.tags = model.tags;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
export interface TypeuuidModel
|
||||
{
|
||||
code:string;
|
||||
type_uuid:string;
|
||||
message:string;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
export interface VideoDetailModel{
|
||||
code:string;
|
||||
video:VideoModel;
|
||||
message:string;
|
||||
}
|
||||
|
||||
export interface VideoModel{
|
||||
|
||||
note:string;
|
||||
path:string;
|
||||
readnum:string;
|
||||
imgpath:string;
|
||||
name:string;
|
||||
isCollection:number;
|
||||
polyv_uuid:string;
|
||||
uuid:string;
|
||||
public_name:string;
|
||||
content:string;
|
||||
point:number;
|
||||
tags:string;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
export interface VideoMoreModel {
|
||||
code:string;
|
||||
data:VideoMoreData;
|
||||
message:string;
|
||||
}
|
||||
|
||||
export interface VideoMoreData{
|
||||
totalPage:number;
|
||||
pageNumber:number;
|
||||
pageSize:number;
|
||||
totalRow:number;
|
||||
list: VideoMore[] ;
|
||||
}
|
||||
|
||||
export interface VideoMore{
|
||||
type_uuid:string;
|
||||
public_name:string;
|
||||
imgpath:string;
|
||||
sort:string;
|
||||
uuid:string;
|
||||
create_date:string;
|
||||
status:string;
|
||||
name:string;
|
||||
path:string;
|
||||
readnum:string;
|
||||
note:string;
|
||||
video_type_name:string;
|
||||
tags:string;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
@Component
|
||||
export struct HomePage {
|
||||
@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%')
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
|
||||
@Component
|
||||
export struct PLVMediaPlayerSingleVideo {
|
||||
build() {
|
||||
}
|
||||
}
|
||||