@polyvharmony/live-scenes-foundation 1.3.0 → 1.3.2-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/ResourceTable.txt +17 -17
- package/oh-package.json5 +1 -1
- package/package.json +1 -1
- package/src/main/ets/common/PLVBasicDataSource.d.ets +19 -19
- package/src/main/ets/common/PLVBasicDataSource.js +75 -75
- package/src/main/ets/common/PLVCallback.d.ets +20 -19
- package/src/main/ets/common/PLVCallback.js +78 -78
- package/src/main/ets/common/PLVCommonEnums.js +16 -16
- package/src/main/ets/common/PLVDeviceUtils.d.ets +4 -4
- package/src/main/ets/common/PLVDeviceUtils.js +9 -9
- package/src/main/ets/common/PLVHashMap.d.ets +2 -2
- package/src/main/ets/common/PLVHashMap.js +2 -2
- package/src/main/ets/common/PLVJSONUtils.d.ets +13 -13
- package/src/main/ets/common/PLVJSONUtils.js +46 -46
- package/src/main/ets/common/PLVNetUtils.d.ets +4 -4
- package/src/main/ets/common/PLVNetUtils.js +24 -24
- package/src/main/ets/common/PLVPreferencesUtils.d.ets +9 -9
- package/src/main/ets/common/PLVPreferencesUtils.js +16 -16
- package/src/main/ets/common/PLVScheduledTask.d.ets +1 -1
- package/src/main/ets/common/PLVScheduledTask.js +9 -9
- package/src/main/ets/common/PLVSimpleBuffer.d.ets +3 -3
- package/src/main/ets/common/PLVSimpleBuffer.js +8 -8
- package/src/main/ets/common/PLVSparseArray.d.ets +6 -6
- package/src/main/ets/common/PLVSparseArray.js +21 -21
- package/src/main/ets/common/PLVTextUtils.d.ets +8 -8
- package/src/main/ets/common/PLVTextUtils.js +44 -44
- package/src/main/ets/common/PLVTimeUtils.d.ets +1 -1
- package/src/main/ets/common/PLVTimeUtils.js +8 -8
- package/src/main/ets/common/PLVToastUtils.d.ets +4 -4
- package/src/main/ets/common/PLVToastUtils.js +7 -7
- package/src/main/ets/common/PLVUACreator.d.ets +1 -1
- package/src/main/ets/common/PLVUACreator.js +6 -6
- package/src/main/ets/common/PLVUtils.d.ets +25 -24
- package/src/main/ets/common/PLVUtils.js +141 -141
- package/src/main/ets/common/PLVWebUtils.d.ets +4 -4
- package/src/main/ets/common/PLVWebUtils.js +46 -47
- package/src/main/ets/common/ui/PLVNodeController.d.ets +11 -9
- package/src/main/ets/common/ui/PLVNodeController.js +48 -47
- package/src/main/ets/modules/log/PLVLogger.d.ets +11 -11
- package/src/main/ets/modules/log/PLVLogger.js +36 -36
- package/src/main/ets/modules/log/PLVXLogFilePrinter.d.ets +2 -2
- package/src/main/ets/modules/log/PLVXLogFilePrinter.js +14 -12
- package/src/main/ets/modules/net/PLVHttpData.d.ets +1 -1
- package/src/main/ets/modules/net/PLVHttpData.js +3 -3
- package/src/main/ets/modules/net/PLVHttpError.d.ets +2 -2
- package/src/main/ets/modules/net/PLVHttpError.js +5 -5
- package/src/main/ets/modules/net/PLVHttpRequest.d.ets +10 -9
- package/src/main/ets/modules/net/PLVHttpRequest.js +89 -88
- package/src/main/ets/modules/net/PLVRequestSetting.d.ets +3 -3
- package/src/main/ets/modules/net/PLVRequestSetting.js +14 -14
- package/src/main/ets/modules/socket/PLVSocketIO.d.ets +20 -20
- package/src/main/ets/modules/socket/PLVSocketIO.js +61 -61
- package/src/main/ets/modules/web/PLVFailureLayout.js +17 -18
- package/src/main/ets/modules/web/PLVLoadingLayout.js +12 -13
- package/src/main/ets/modules/web/PLVNewWindowLayout.js +17 -18
- package/src/main/ets/modules/web/PLVSimpleWeb.js +75 -79
- package/src/main/ets/modules/web/PLVWebController.d.ets +39 -39
- package/src/main/ets/modules/web/PLVWebController.js +106 -106
- package/src/main/module.json +1 -1
|
@@ -1,40 +1,41 @@
|
|
|
1
|
-
import { BuilderNode
|
|
1
|
+
import { BuilderNode as BuilderNode } from "@ohos.arkui.node";
|
|
2
|
+
import { NodeController as NodeController } from "@ohos.arkui.node";
|
|
2
3
|
import { PLVPromiseValue } from '../PLVCallback';
|
|
3
|
-
const
|
|
4
|
+
const viewNodes = new Map();
|
|
4
5
|
export class PLVNodeControllerManager {
|
|
5
6
|
constructor() {
|
|
6
7
|
this.controllers = new Map();
|
|
7
8
|
}
|
|
8
|
-
static get(
|
|
9
|
-
if (!PLVNodeControllerManager.controllerManagers.has(
|
|
10
|
-
PLVNodeControllerManager.controllerManagers.set(
|
|
9
|
+
static get(q12 = 0) {
|
|
10
|
+
if (!PLVNodeControllerManager.controllerManagers.has(q12)) {
|
|
11
|
+
PLVNodeControllerManager.controllerManagers.set(q12, new PLVNodeControllerManager());
|
|
11
12
|
}
|
|
12
|
-
return PLVNodeControllerManager.controllerManagers.get(
|
|
13
|
+
return PLVNodeControllerManager.controllerManagers.get(q12);
|
|
13
14
|
}
|
|
14
|
-
static delete(
|
|
15
|
-
PLVNodeControllerManager.get(
|
|
16
|
-
PLVNodeControllerManager.controllerManagers.delete(
|
|
15
|
+
static delete(p12) {
|
|
16
|
+
PLVNodeControllerManager.get(p12).destroy();
|
|
17
|
+
PLVNodeControllerManager.controllerManagers.delete(p12);
|
|
17
18
|
}
|
|
18
|
-
getOrCreate(
|
|
19
|
-
const
|
|
20
|
-
if (!this.controllers.has(
|
|
21
|
-
this.controllers.set(
|
|
19
|
+
getOrCreate(m12) {
|
|
20
|
+
const n12 = typeof m12 === 'string' ? m12 : m12.name;
|
|
21
|
+
if (!this.controllers.has(n12)) {
|
|
22
|
+
this.controllers.set(n12, new PLVNodeController(typeof m12 === 'string' ? { name: n12 } : m12));
|
|
22
23
|
}
|
|
23
|
-
const
|
|
24
|
-
if (typeof
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
const o12 = this.controllers.get(n12);
|
|
25
|
+
if (typeof m12 !== 'string' && m12.wrapBuilder) {
|
|
26
|
+
o12.fill(m12.wrapBuilder, m12.params);
|
|
27
|
+
o12.show(m12.isShow);
|
|
27
28
|
}
|
|
28
|
-
return
|
|
29
|
+
return o12;
|
|
29
30
|
}
|
|
30
|
-
destroy(
|
|
31
|
-
if (
|
|
32
|
-
this.controllers.get(
|
|
33
|
-
this.controllers.delete(
|
|
31
|
+
destroy(k12) {
|
|
32
|
+
if (k12) {
|
|
33
|
+
this.controllers.get(k12)?.destroy();
|
|
34
|
+
this.controllers.delete(k12);
|
|
34
35
|
}
|
|
35
36
|
else {
|
|
36
|
-
this.controllers.forEach((
|
|
37
|
-
|
|
37
|
+
this.controllers.forEach((l12) => {
|
|
38
|
+
l12.destroy();
|
|
38
39
|
});
|
|
39
40
|
this.controllers.clear();
|
|
40
41
|
}
|
|
@@ -42,7 +43,7 @@ export class PLVNodeControllerManager {
|
|
|
42
43
|
}
|
|
43
44
|
PLVNodeControllerManager.controllerManagers = new Map();
|
|
44
45
|
export class PLVNodeController extends NodeController {
|
|
45
|
-
constructor(
|
|
46
|
+
constructor(j12) {
|
|
46
47
|
super();
|
|
47
48
|
this.viewNode = undefined;
|
|
48
49
|
this.wrapBuilder = undefined;
|
|
@@ -51,52 +52,52 @@ export class PLVNodeController extends NodeController {
|
|
|
51
52
|
this.isShowPromise = new PLVPromiseValue();
|
|
52
53
|
this.uiContext = undefined;
|
|
53
54
|
this.environmentCallback = undefined;
|
|
54
|
-
this.uniqueId =
|
|
55
|
-
this.isShow =
|
|
56
|
-
this.wrapBuilder =
|
|
57
|
-
this.params =
|
|
55
|
+
this.uniqueId = j12.name;
|
|
56
|
+
this.isShow = j12.isShow;
|
|
57
|
+
this.wrapBuilder = j12.wrapBuilder;
|
|
58
|
+
this.params = j12.params;
|
|
58
59
|
this.show(this.isShow);
|
|
59
60
|
}
|
|
60
|
-
makeNode(
|
|
61
|
+
makeNode(i12) {
|
|
61
62
|
if (!this.isShow || !this.wrapBuilder) {
|
|
62
63
|
return null;
|
|
63
64
|
}
|
|
64
|
-
this.uiContext =
|
|
65
|
-
this.viewNode =
|
|
66
|
-
|
|
65
|
+
this.uiContext = i12;
|
|
66
|
+
this.viewNode = viewNodes.get(this.uniqueId) ?? new BuilderNode(i12);
|
|
67
|
+
viewNodes.set(this.uniqueId, this.viewNode);
|
|
67
68
|
if (!this.viewNode.getFrameNode()) {
|
|
68
69
|
this.viewNode.build(this.wrapBuilder, this.params);
|
|
69
|
-
this.onEnvironment(
|
|
70
|
+
this.onEnvironment(i12);
|
|
70
71
|
}
|
|
71
72
|
return this.viewNode.getFrameNode();
|
|
72
73
|
}
|
|
73
|
-
fill(
|
|
74
|
-
this.wrapBuilder =
|
|
75
|
-
this.params =
|
|
74
|
+
fill(g12, h12) {
|
|
75
|
+
this.wrapBuilder = g12;
|
|
76
|
+
this.params = h12;
|
|
76
77
|
return this;
|
|
77
78
|
}
|
|
78
|
-
show(
|
|
79
|
-
if (this.isShow ===
|
|
79
|
+
show(f12 = false) {
|
|
80
|
+
if (this.isShow === f12 || !this.wrapBuilder) {
|
|
80
81
|
return;
|
|
81
82
|
}
|
|
82
|
-
this.isShow =
|
|
83
|
+
this.isShow = f12;
|
|
83
84
|
this.rebuild();
|
|
84
|
-
this.isShowPromise.set(
|
|
85
|
+
this.isShowPromise.set(f12);
|
|
85
86
|
}
|
|
86
87
|
destroy() {
|
|
87
|
-
|
|
88
|
-
|
|
88
|
+
viewNodes.get(this.uniqueId)?.dispose();
|
|
89
|
+
viewNodes.delete(this.uniqueId);
|
|
89
90
|
if (this.environmentCallback !== undefined) {
|
|
90
91
|
this.uiContext?.getHostContext()?.getApplicationContext().off('environment', this.environmentCallback);
|
|
91
92
|
}
|
|
92
93
|
this.uiContext = undefined;
|
|
93
94
|
}
|
|
94
|
-
onEnvironment(
|
|
95
|
-
this.environmentCallback =
|
|
96
|
-
onConfigurationUpdated: (
|
|
95
|
+
onEnvironment(c12) {
|
|
96
|
+
this.environmentCallback = c12.getHostContext()?.getApplicationContext().on('environment', {
|
|
97
|
+
onConfigurationUpdated: (e12) => {
|
|
97
98
|
this.viewNode?.updateConfiguration();
|
|
98
99
|
},
|
|
99
|
-
onMemoryLevel: (
|
|
100
|
+
onMemoryLevel: (d12) => {
|
|
100
101
|
}
|
|
101
102
|
});
|
|
102
103
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { PLVPrintLogLevel } from '../../common/PLVCommonEnums';
|
|
2
|
-
import
|
|
2
|
+
import common from "@ohos.app.ability.common";
|
|
3
3
|
export declare class PLVLogger {
|
|
4
4
|
private printLogLevel;
|
|
5
5
|
private tag;
|
|
6
6
|
private format;
|
|
7
7
|
private filePrinter?;
|
|
8
|
-
init(
|
|
9
|
-
level(
|
|
10
|
-
debug(
|
|
11
|
-
info(
|
|
12
|
-
warn(
|
|
13
|
-
error(
|
|
14
|
-
printWarn(
|
|
15
|
-
printError(
|
|
8
|
+
init(w13: common.UIAbilityContext): void;
|
|
9
|
+
level(v13: PLVPrintLogLevel): void;
|
|
10
|
+
debug(r13: string, s13: string, t13?: boolean): void;
|
|
11
|
+
info(n13: string, o13: string, p13?: boolean): void;
|
|
12
|
+
warn(j13: string, k13: string, l13?: boolean): void;
|
|
13
|
+
error(f13: string, g13: string, h13?: boolean): void;
|
|
14
|
+
printWarn(b13: string, c13: string, d13: Error): string;
|
|
15
|
+
printError(x12: string, y12: string, z12: Error): string;
|
|
16
16
|
private generateErrorMsg;
|
|
17
17
|
private intercept;
|
|
18
18
|
}
|
|
19
|
-
declare const
|
|
20
|
-
export default
|
|
19
|
+
declare const _default: PLVLogger;
|
|
20
|
+
export default _default;
|
|
@@ -9,59 +9,59 @@ export class PLVLogger {
|
|
|
9
9
|
this.tag = PLVCommonConstants.TAG.substring(1, PLVCommonConstants.TAG.length - 1);
|
|
10
10
|
this.format = "%s";
|
|
11
11
|
}
|
|
12
|
-
init(
|
|
13
|
-
const
|
|
12
|
+
init(w13) {
|
|
13
|
+
const x13 = new LogConfiguration.Builder()
|
|
14
14
|
.setTag(this.tag)
|
|
15
15
|
.build();
|
|
16
|
-
const
|
|
17
|
-
this.filePrinter = new PLVXLogBuilder(`${
|
|
16
|
+
const y13 = w13.filesDir;
|
|
17
|
+
this.filePrinter = new PLVXLogBuilder(`${y13}/log`, true, '../../modules/log/PLVXLogWorker.ets')
|
|
18
18
|
.setCleanStrategy(new FileLastModifiedCleanStrategy(5 * 24 * 60 * 60 * 1000))
|
|
19
19
|
.setFileNameGenerator(new DateFileNameGenerator())
|
|
20
20
|
.setBackupStrategy(new FileSizeBackupStrategy(10 * 1024 * 1024))
|
|
21
21
|
.build();
|
|
22
|
-
XLog.init(
|
|
22
|
+
XLog.init(x13, [new OhPrinter()]);
|
|
23
23
|
}
|
|
24
|
-
level(
|
|
25
|
-
this.printLogLevel =
|
|
24
|
+
level(v13) {
|
|
25
|
+
this.printLogLevel = v13;
|
|
26
26
|
}
|
|
27
|
-
debug(
|
|
28
|
-
const
|
|
29
|
-
this.intercept(PLVPrintLogLevel.DEBUG,
|
|
27
|
+
debug(r13, s13, t13 = true) {
|
|
28
|
+
const u13 = util.format(this.format, r13, s13);
|
|
29
|
+
this.intercept(PLVPrintLogLevel.DEBUG, u13, t13) || XLog.d(u13);
|
|
30
30
|
}
|
|
31
|
-
info(
|
|
32
|
-
const
|
|
33
|
-
this.intercept(PLVPrintLogLevel.INFO,
|
|
31
|
+
info(n13, o13, p13 = true) {
|
|
32
|
+
const q13 = util.format(this.format, n13, o13);
|
|
33
|
+
this.intercept(PLVPrintLogLevel.INFO, q13, p13) || XLog.i(q13);
|
|
34
34
|
}
|
|
35
|
-
warn(
|
|
36
|
-
const
|
|
37
|
-
this.intercept(PLVPrintLogLevel.WARN,
|
|
35
|
+
warn(j13, k13, l13 = true) {
|
|
36
|
+
const m13 = util.format(this.format, j13, k13);
|
|
37
|
+
this.intercept(PLVPrintLogLevel.WARN, m13, l13) || XLog.w(m13);
|
|
38
38
|
}
|
|
39
|
-
error(
|
|
40
|
-
const
|
|
41
|
-
this.intercept(PLVPrintLogLevel.ERROR,
|
|
39
|
+
error(f13, g13, h13 = true) {
|
|
40
|
+
const i13 = util.format(this.format, f13, g13);
|
|
41
|
+
this.intercept(PLVPrintLogLevel.ERROR, i13, h13) || XLog.e(i13);
|
|
42
42
|
}
|
|
43
|
-
printWarn(
|
|
44
|
-
const
|
|
45
|
-
this.warn(
|
|
46
|
-
return
|
|
43
|
+
printWarn(b13, c13, d13) {
|
|
44
|
+
const e13 = this.generateErrorMsg(c13, d13);
|
|
45
|
+
this.warn(b13, e13);
|
|
46
|
+
return e13;
|
|
47
47
|
}
|
|
48
|
-
printError(
|
|
49
|
-
const
|
|
50
|
-
this.error(
|
|
51
|
-
return
|
|
48
|
+
printError(x12, y12, z12) {
|
|
49
|
+
const a13 = this.generateErrorMsg(y12, z12);
|
|
50
|
+
this.error(x12, a13);
|
|
51
|
+
return a13;
|
|
52
52
|
}
|
|
53
|
-
generateErrorMsg(
|
|
54
|
-
let
|
|
55
|
-
if (
|
|
56
|
-
|
|
53
|
+
generateErrorMsg(u12, v12) {
|
|
54
|
+
let w12 = '';
|
|
55
|
+
if (v12 && v12.code) {
|
|
56
|
+
w12 = `, code=${v12.code}`;
|
|
57
57
|
}
|
|
58
|
-
return `${
|
|
58
|
+
return `${u12}: name=${v12.name}, message=${v12.message}${w12}\n${v12.stack}`;
|
|
59
59
|
}
|
|
60
|
-
intercept(
|
|
61
|
-
if (
|
|
62
|
-
this.filePrinter?.println(
|
|
60
|
+
intercept(r12, s12, t12 = true) {
|
|
61
|
+
if (t12) {
|
|
62
|
+
this.filePrinter?.println(r12, this.tag, s12);
|
|
63
63
|
}
|
|
64
|
-
return this.printLogLevel >
|
|
64
|
+
return this.printLogLevel > r12;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
export default new PLVLogger();
|
|
@@ -4,8 +4,8 @@ import { Printer } from '@ohos-port/xlog/src/main/ets/printer/Printer';
|
|
|
4
4
|
export declare class PLVXLogFilePrinter extends Printer {
|
|
5
5
|
builder: FilePrinter.Builder;
|
|
6
6
|
workerInstance?: worker.ThreadWorker;
|
|
7
|
-
constructor(
|
|
8
|
-
println(
|
|
7
|
+
constructor(d14: FilePrinter.Builder);
|
|
8
|
+
println(z13: number, a14: string, b14: string): void;
|
|
9
9
|
}
|
|
10
10
|
export declare class PLVXLogBuilder extends FilePrinter.Builder {
|
|
11
11
|
build(): FilePrinter;
|
|
@@ -3,29 +3,31 @@ import { FilePrinter } from '@ohos-port/xlog';
|
|
|
3
3
|
import { LogAddMessage, LogInitMessage } from '@ohos-port/xlog/src/main/ets/printer/file/MessageType';
|
|
4
4
|
import { Printer } from '@ohos-port/xlog/src/main/ets/printer/Printer';
|
|
5
5
|
export class PLVXLogFilePrinter extends Printer {
|
|
6
|
-
constructor(
|
|
6
|
+
constructor(d14) {
|
|
7
7
|
super();
|
|
8
|
-
this.builder =
|
|
8
|
+
this.builder = d14;
|
|
9
9
|
if (this.builder.useWorker) {
|
|
10
10
|
try {
|
|
11
11
|
this.workerInstance = new worker.ThreadWorker(this.builder.workerPath);
|
|
12
|
-
this.workerInstance.onmessage = (
|
|
13
|
-
let
|
|
14
|
-
let
|
|
12
|
+
this.workerInstance.onmessage = (h14) => {
|
|
13
|
+
let i14 = h14.data;
|
|
14
|
+
let j14 = i14.type;
|
|
15
15
|
};
|
|
16
|
-
this.workerInstance.onexit = (
|
|
16
|
+
this.workerInstance.onexit = (g14) => {
|
|
17
|
+
console.info("XLog: workerInstance onexit");
|
|
17
18
|
};
|
|
18
|
-
let
|
|
19
|
-
this.workerInstance.postMessage(
|
|
19
|
+
let f14 = new LogInitMessage(this.builder);
|
|
20
|
+
this.workerInstance.postMessage(f14);
|
|
20
21
|
}
|
|
21
|
-
catch (
|
|
22
|
+
catch (e14) {
|
|
23
|
+
console.error("XLog start worker err: " + e14);
|
|
22
24
|
}
|
|
23
25
|
}
|
|
24
26
|
}
|
|
25
|
-
println(
|
|
27
|
+
println(z13, a14, b14) {
|
|
26
28
|
if (this.workerInstance != null) {
|
|
27
|
-
let
|
|
28
|
-
this.workerInstance.postMessage(
|
|
29
|
+
let c14 = new LogAddMessage(z13, a14, b14);
|
|
30
|
+
this.workerInstance.postMessage(c14);
|
|
29
31
|
}
|
|
30
32
|
}
|
|
31
33
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import PLVJSONUtils from '../../common/PLVJSONUtils';
|
|
2
2
|
export class PLVHttpData {
|
|
3
|
-
static fill(
|
|
4
|
-
if (
|
|
5
|
-
PLVJSONUtils.httpData2Bean(
|
|
3
|
+
static fill(k14, l14) {
|
|
4
|
+
if (l14) {
|
|
5
|
+
PLVJSONUtils.httpData2Bean(k14, l14.data);
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
8
|
}
|
|
@@ -2,12 +2,12 @@ import { AxiosError } from '@ohos/axios';
|
|
|
2
2
|
import PLVJSONUtils from '../../common/PLVJSONUtils';
|
|
3
3
|
import PLVLogger from '../log/PLVLogger';
|
|
4
4
|
export class PLVHttpError extends AxiosError {
|
|
5
|
-
constructor(
|
|
6
|
-
const
|
|
7
|
-
super(
|
|
5
|
+
constructor(o14) {
|
|
6
|
+
const p14 = (o14.response?.data && PLVJSONUtils.safeStringify(o14.response.data)) || o14.message;
|
|
7
|
+
super(p14, o14.code, o14.config, o14.request, o14.response);
|
|
8
8
|
}
|
|
9
|
-
log(
|
|
10
|
-
PLVLogger.printError(
|
|
9
|
+
log(m14, n14) {
|
|
10
|
+
PLVLogger.printError(m14, n14, this);
|
|
11
11
|
return this;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosRequestConfig, AxiosResponse } from '@ohos/axios';
|
|
2
|
-
import
|
|
2
|
+
import HashMap from "@ohos.util.HashMap";
|
|
3
3
|
export declare class PLVHttpRequest {
|
|
4
4
|
static readonly CACHE_TIMEOUT: number;
|
|
5
5
|
static readonly CACHE_DATA_MAP: HashMap<string, AxiosResponse>;
|
|
@@ -7,19 +7,20 @@ export declare class PLVHttpRequest {
|
|
|
7
7
|
baseURL?: string;
|
|
8
8
|
userAgent?: string;
|
|
9
9
|
private method?;
|
|
10
|
-
constructor(
|
|
11
|
-
ua(
|
|
12
|
-
create<
|
|
13
|
-
request<
|
|
14
|
-
get<
|
|
15
|
-
post<
|
|
16
|
-
checkCache<
|
|
17
|
-
generateCacheKey(
|
|
10
|
+
constructor(w15?: string);
|
|
11
|
+
ua(v15?: string): this;
|
|
12
|
+
create<m24 = Object>(i15?: PLVAxiosRequestConfig<m24>): import("@ohos/axios").AxiosInstance;
|
|
13
|
+
request<k24 = Object, l24 = AxiosResponse<k24>>(b15: Promise<AxiosResponse<k24>>): Promise<l24>;
|
|
14
|
+
get<h24 = Object, i24 = AxiosResponse<h24>, j24 = Object>(a15?: PLVAxiosRequestConfig<j24>): Promise<i24>;
|
|
15
|
+
post<e24 = Object, f24 = AxiosResponse<e24>, g24 = Object>(z14?: PLVAxiosRequestConfig<g24>): Promise<f24>;
|
|
16
|
+
checkCache<b24 = Object, c24 = AxiosResponse<b24>, d24 = Object>(x14?: PLVAxiosRequestConfig<d24>): Promise<c24> | undefined;
|
|
17
|
+
generateCacheKey(q14?: AxiosRequestConfig): string;
|
|
18
18
|
}
|
|
19
19
|
export interface PLVAxiosRequestConfig<D = Object> extends AxiosRequestConfig<D> {
|
|
20
20
|
formUrlEncoded?: boolean;
|
|
21
21
|
aesDecrypted?: boolean;
|
|
22
22
|
useCache?: boolean;
|
|
23
|
+
cacheTime?: number;
|
|
23
24
|
fillData?: Object;
|
|
24
25
|
signKey?: string;
|
|
25
26
|
}
|