@ray-js/api 1.7.69 → 1.7.71
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/@types/AIKit.d.ts +5509 -610
- package/@types/AIStreamKit.d.ts +2641 -0
- package/@types/AVideoKit.d.ts +1827 -0
- package/@types/BaseKit.d.ts +8682 -1893
- package/@types/BizKit.d.ts +6639 -1038
- package/@types/CategoryCommonBizKit.d.ts +1459 -0
- package/@types/CommunityKit.d.ts +154 -0
- package/@types/DeviceKit.d.ts +18475 -5662
- package/@types/GroupCITestKit.d.ts +651 -0
- package/@types/HealthKit.d.ts +2290 -357
- package/@types/HomeKit.d.ts +4068 -182
- package/@types/IPCKit.d.ts +4327 -1227
- package/@types/LightKit.d.ts +125 -0
- package/@types/MapKit.d.ts +1560 -204
- package/@types/MediaKit.d.ts +136 -16
- package/@types/MediaPlayerKit.d.ts +47 -0
- package/@types/MiniKit.d.ts +2976 -628
- package/@types/OutdoorKit.d.ts +1337 -24
- package/@types/P2PKit.d.ts +622 -103
- package/@types/PayKit.d.ts +115 -0
- package/@types/PlayNetKit.d.ts +3454 -1309
- package/@types/SweeperKit.d.ts +154 -0
- package/@types/ThirdAuthKit.d.ts +324 -0
- package/@types/ThirdPartyDeviceKit.d.ts +410 -0
- package/@types/WearKit.d.ts +10177 -375
- package/@types/gateway.d.ts +349 -61
- package/@types/health.d.ts +486 -304
- package/lib/AIKit-1.6.0.d.ts +265 -41
- package/lib/AIKit-1.6.0.js +374 -120
- package/lib/BaseKit-3.17.7.d.ts +704 -0
- package/lib/BaseKit-3.17.7.js +720 -1
- package/lib/BizKit-4.10.4.d.ts +336 -0
- package/lib/BizKit-4.10.4.js +342 -5
- package/lib/DeviceKit-4.13.1.d.ts +996 -0
- package/lib/DeviceKit-4.13.1.js +1247 -249
- package/lib/HealthKit-6.5.0.d.ts +210 -44
- package/lib/HealthKit-6.5.0.js +295 -128
- package/lib/HomeKit-3.1.4.d.ts +20 -6
- package/lib/HomeKit-3.1.4.js +29 -14
- package/lib/IPCKit-6.4.5.d.ts +375 -77
- package/lib/IPCKit-6.4.5.js +525 -228
- package/lib/MapKit-3.4.13.d.ts +70 -16
- package/lib/MapKit-3.4.13.js +98 -47
- package/lib/MediaKit-3.4.1.d.ts +5 -3
- package/lib/MediaKit-3.4.1.js +7 -6
- package/lib/MiniKit-3.14.1.d.ts +300 -0
- package/lib/MiniKit-3.14.1.js +302 -0
- package/lib/OutdoorKit-1.0.4.d.ts +55 -13
- package/lib/OutdoorKit-1.0.4.js +78 -35
- package/lib/P2PKit-2.0.3.d.ts +125 -27
- package/lib/P2PKit-2.0.3.js +175 -78
- package/lib/PlayNetKit-1.3.30.d.ts +290 -60
- package/lib/PlayNetKit-1.3.30.js +407 -176
- package/lib/WearKit-1.1.6.d.ts +125 -27
- package/lib/WearKit-1.1.6.js +176 -77
- package/lib/all-kits.d.ts +10 -10
- package/lib/all-kits.js +10 -10
- package/lib/cloud/core.d.ts +31 -1
- package/lib/cloud/core.js +31 -1
- package/lib/cloud/device.d.ts +155 -24
- package/lib/cloud/device.js +153 -22
- package/lib/cloud/gateway.d.ts +254 -0
- package/lib/cloud/gateway.js +269 -9
- package/lib/cloud/health.d.ts +1 -0
- package/lib/cloud/health.js +121 -0
- package/lib/cloud/interface.d.ts +222 -44
- package/lib/cloud/interface.js +15 -2
- package/lib/cloud/laser-clean/deleteCleaningRecord/index.d.ts +27 -0
- package/lib/cloud/laser-clean/deleteCleaningRecord/index.js +28 -0
- package/lib/cloud/laser-clean/deleteCleaningRecord/type.d.ts +7 -0
- package/lib/cloud/laser-clean/deleteCleaningRecord/type.js +1 -0
- package/lib/cloud/laser-clean/deleteGyroCleanRecord/index.d.ts +27 -0
- package/lib/cloud/laser-clean/deleteGyroCleanRecord/index.js +28 -0
- package/lib/cloud/laser-clean/deleteGyroCleanRecord/type.d.ts +7 -0
- package/lib/cloud/laser-clean/deleteGyroCleanRecord/type.js +1 -0
- package/lib/cloud/laser-clean/deleteMultipleMapFiles/index.d.ts +27 -0
- package/lib/cloud/laser-clean/deleteMultipleMapFiles/index.js +28 -0
- package/lib/cloud/laser-clean/deleteMultipleMapFiles/type.d.ts +7 -0
- package/lib/cloud/laser-clean/deleteMultipleMapFiles/type.js +1 -0
- package/lib/cloud/laser-clean/getCleaningRecords/index.d.ts +30 -0
- package/lib/cloud/laser-clean/getCleaningRecords/index.js +31 -0
- package/lib/cloud/laser-clean/getCleaningRecords/type.d.ts +39 -0
- package/lib/cloud/laser-clean/getCleaningRecords/type.js +1 -0
- package/lib/cloud/laser-clean/getGyroCleanRecordDetail/index.d.ts +29 -0
- package/lib/cloud/laser-clean/getGyroCleanRecordDetail/index.js +30 -0
- package/lib/cloud/laser-clean/getGyroCleanRecordDetail/type.d.ts +30 -0
- package/lib/cloud/laser-clean/getGyroCleanRecordDetail/type.js +1 -0
- package/lib/cloud/laser-clean/getGyroCleanRecords/index.d.ts +29 -0
- package/lib/cloud/laser-clean/getGyroCleanRecords/index.js +30 -0
- package/lib/cloud/laser-clean/getGyroCleanRecords/type.d.ts +35 -0
- package/lib/cloud/laser-clean/getGyroCleanRecords/type.js +1 -0
- package/lib/cloud/laser-clean/getGyroLatestCleanMap/index.d.ts +28 -0
- package/lib/cloud/laser-clean/getGyroLatestCleanMap/index.js +29 -0
- package/lib/cloud/laser-clean/getGyroLatestCleanMap/type.d.ts +28 -0
- package/lib/cloud/laser-clean/getGyroLatestCleanMap/type.js +1 -0
- package/lib/cloud/laser-clean/getMultipleMapFiles/index.d.ts +24 -0
- package/lib/cloud/laser-clean/getMultipleMapFiles/index.js +25 -0
- package/lib/cloud/laser-clean/getMultipleMapFiles/type.d.ts +29 -0
- package/lib/cloud/laser-clean/getMultipleMapFiles/type.js +1 -0
- package/lib/cloud/laser-clean/getSweeperStorageConfig/index.d.ts +24 -0
- package/lib/cloud/laser-clean/getSweeperStorageConfig/index.js +25 -0
- package/lib/cloud/laser-clean/getSweeperStorageConfig/type.d.ts +26 -0
- package/lib/cloud/laser-clean/getSweeperStorageConfig/type.js +1 -0
- package/lib/cloud/laser-clean/getVoiceList/index.d.ts +28 -0
- package/lib/cloud/laser-clean/getVoiceList/index.js +29 -0
- package/lib/cloud/laser-clean/getVoiceList/type.d.ts +48 -0
- package/lib/cloud/laser-clean/getVoiceList/type.js +1 -0
- package/lib/cloud/laser-clean/index.d.ts +1 -1
- package/lib/cloud/laser-clean/index.js +1 -1
- package/lib/cloud/laser-clean/map.d.ts +5 -7
- package/lib/cloud/laser-clean/map.js +5 -9
- package/lib/cloud/laser-clean/record.d.ts +5 -6
- package/lib/cloud/laser-clean/record.js +5 -7
- package/lib/cloud/laser-clean/renameHistoryMap/index.d.ts +28 -0
- package/lib/cloud/laser-clean/renameHistoryMap/index.js +29 -0
- package/lib/cloud/laser-clean/renameHistoryMap/type.d.ts +9 -0
- package/lib/cloud/laser-clean/renameHistoryMap/type.js +1 -0
- package/lib/cloud/laser-clean/voice.d.ts +1 -3
- package/lib/cloud/laser-clean/voice.js +1 -4
- package/lib/cloud/linkage.d.ts +271 -53
- package/lib/cloud/linkage.js +256 -51
- package/lib/cloud/remoteGroup.d.ts +37 -0
- package/lib/cloud/remoteGroup.js +37 -0
- package/lib/cloud/timer.d.ts +104 -26
- package/lib/cloud/timer.js +104 -26
- package/lib/getApp/index.thing.d.ts +47 -1
- package/lib/getApp/index.thing.js +40 -2
- package/lib/getBoundingClientRect/index.thing.d.ts +101 -1
- package/lib/getBoundingClientRect/index.thing.js +59 -0
- package/lib/getCurrentPages/index.thing.d.ts +40 -15
- package/lib/getCurrentPages/index.thing.js +36 -15
- package/lib/getCustomConfig/index.d.ts +5 -2
- package/lib/getCustomConfig/index.thing.d.ts +68 -2
- package/lib/getCustomConfig/index.thing.js +62 -0
- package/lib/getCustomConfig/index.wechat.d.ts +5 -2
- package/lib/getCustomConfig/type.d.ts +26 -15
- package/lib/getElementById/index.thing.d.ts +42 -1
- package/lib/getElementById/index.thing.js +40 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +4 -2
- package/lib/nativeRouters/common.d.ts +8 -0
- package/lib/nativeRouters/device.d.ts +137 -5
- package/lib/nativeRouters/device.js +138 -6
- package/lib/nativeRouters/gw.d.ts +58 -8
- package/lib/nativeRouters/gw.js +57 -8
- package/lib/nativeRouters/outdoors.d.ts +16 -3
- package/lib/nativeRouters/outdoors.js +16 -3
- package/lib/nativeRouters/remoteGroup.d.ts +23 -0
- package/lib/nativeRouters/remoteGroup.js +23 -0
- package/lib/nativeRouters/root.d.ts +19 -0
- package/lib/nativeRouters/root.js +17 -0
- package/lib/openGroupCreate/index.d.ts +45 -0
- package/lib/openGroupCreate/index.js +32 -0
- package/package.json +5 -5
package/@types/MiniKit.d.ts
CHANGED
|
@@ -1,1725 +1,4073 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* MiniKit
|
|
3
3
|
*
|
|
4
|
-
* @version 3.
|
|
4
|
+
* @version 3.33.3
|
|
5
5
|
*/
|
|
6
6
|
declare namespace ty {
|
|
7
7
|
/**
|
|
8
|
-
|
|
8
|
+
* 获取客户端预拉取的数据,此接口不会等待,有数据会立即返回,没有数据会返回空
|
|
9
|
+
* @public
|
|
10
|
+
* @since MiniKit 3.20.2
|
|
11
|
+
* @platform iOS Android
|
|
12
|
+
*/
|
|
13
|
+
export function getBackgroundFetchData(params?: {
|
|
14
|
+
/**
|
|
15
|
+
* 拉取数据的类型,默认pre:表示预拉取
|
|
16
|
+
* @since MiniKit 3.20.2
|
|
17
|
+
* @defaultValue "pre"
|
|
18
|
+
*/
|
|
19
|
+
fetchType?: string
|
|
20
|
+
/**
|
|
21
|
+
* 拉取数据的ApiKey列表,不传或传空数组表示不拉取数据
|
|
22
|
+
* @since MiniKit 3.20.2
|
|
23
|
+
*/
|
|
24
|
+
fetchApiKeys?: string[]
|
|
25
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
26
|
+
complete?: () => void
|
|
27
|
+
/** 接口调用成功的回调函数 */
|
|
28
|
+
success?: (params: {
|
|
29
|
+
/**
|
|
30
|
+
* 缓存数据
|
|
31
|
+
* @since MiniKit 3.20.2
|
|
32
|
+
*/
|
|
33
|
+
fetchedData: Record<string, FetchDataResp>
|
|
34
|
+
}) => void
|
|
35
|
+
/** 接口调用失败的回调函数 */
|
|
36
|
+
fail?: (params: {
|
|
37
|
+
/** 错误信息 */
|
|
38
|
+
errorMsg: string
|
|
39
|
+
/** 错误码 */
|
|
40
|
+
errorCode: string | number
|
|
41
|
+
/** 错误扩展 */
|
|
42
|
+
innerError: {
|
|
43
|
+
/** 错误扩展码 */
|
|
44
|
+
errorCode: string | number
|
|
45
|
+
/** 错误扩展信息 */
|
|
46
|
+
errorMsg: string
|
|
47
|
+
}
|
|
48
|
+
}) => void
|
|
49
|
+
}): void
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* 此接口提供给基础库使用,业务方需要使用onBackgroundFetchData事件来获取预拉取的数据,调用时有数据会立即返回,没有数据会等待
|
|
53
|
+
* @public
|
|
54
|
+
* @since MiniKit 3.20.2
|
|
55
|
+
* @platform iOS Android
|
|
56
|
+
*/
|
|
57
|
+
export function registerBackgroundFetchData(params: {
|
|
58
|
+
/**
|
|
59
|
+
* 拉取数据的类型,默认pre:表示预拉取
|
|
60
|
+
* @since MiniKit 3.20.2
|
|
61
|
+
* @defaultValue "pre"
|
|
62
|
+
*/
|
|
63
|
+
fetchType?: string
|
|
64
|
+
/**
|
|
65
|
+
* 拉取数据的ApiKey
|
|
66
|
+
* @since MiniKit 3.20.2
|
|
67
|
+
*/
|
|
68
|
+
apiKey: string
|
|
69
|
+
/**
|
|
70
|
+
* 注册数据获取ID
|
|
71
|
+
* @since MiniKit 3.20.2
|
|
72
|
+
*/
|
|
73
|
+
registerId: string
|
|
74
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
75
|
+
complete?: () => void
|
|
76
|
+
/** 接口调用成功的回调函数 */
|
|
77
|
+
success?: (params: {
|
|
78
|
+
/**
|
|
79
|
+
* 缓存数据
|
|
80
|
+
* @since MiniKit 3.20.2
|
|
81
|
+
*/
|
|
82
|
+
fetchedData: Record<string, any>
|
|
83
|
+
/**
|
|
84
|
+
* 客户端拿到缓存数据的时间戳
|
|
85
|
+
* @since MiniKit 3.20.2
|
|
86
|
+
*/
|
|
87
|
+
timeStamp: number
|
|
88
|
+
/**
|
|
89
|
+
* 注册数据获取ID
|
|
90
|
+
* @since MiniKit 3.20.2
|
|
91
|
+
*/
|
|
92
|
+
registerId: string
|
|
93
|
+
}) => void
|
|
94
|
+
/** 接口调用失败的回调函数 */
|
|
95
|
+
fail?: (params: {
|
|
96
|
+
/** 错误信息 */
|
|
97
|
+
errorMsg: string
|
|
98
|
+
/** 错误码 */
|
|
99
|
+
errorCode: string | number
|
|
100
|
+
/** 错误扩展 */
|
|
101
|
+
innerError: {
|
|
102
|
+
/** 错误扩展码 */
|
|
103
|
+
errorCode: string | number
|
|
104
|
+
/** 错误扩展信息 */
|
|
105
|
+
errorMsg: string
|
|
106
|
+
}
|
|
107
|
+
}) => void
|
|
108
|
+
}): void
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* 特殊方法:是否异层渲染响应
|
|
112
|
+
* @public
|
|
113
|
+
* @since MiniKit 2.3.0
|
|
114
|
+
* @platform iOS Android
|
|
115
|
+
*/
|
|
9
116
|
export function nativeDisabled(params: {
|
|
10
|
-
/**
|
|
117
|
+
/**
|
|
118
|
+
* 禁用异层渲染手势分发
|
|
119
|
+
* @since MiniKit 2.3.0
|
|
120
|
+
*/
|
|
11
121
|
nativeDisabled: boolean
|
|
12
|
-
/**
|
|
122
|
+
/**
|
|
123
|
+
* 需要禁止或启用手势分发的页面id
|
|
124
|
+
* @since MiniKit 2.4.2
|
|
125
|
+
*/
|
|
13
126
|
pageId: string
|
|
127
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
128
|
+
complete?: () => void
|
|
129
|
+
/** 接口调用成功的回调函数 */
|
|
14
130
|
success?: (params: string) => void
|
|
131
|
+
/** 接口调用失败的回调函数 */
|
|
15
132
|
fail?: (params: {
|
|
133
|
+
/** 错误信息 */
|
|
16
134
|
errorMsg: string
|
|
135
|
+
/** 错误码 */
|
|
17
136
|
errorCode: string | number
|
|
137
|
+
/** 错误扩展 */
|
|
18
138
|
innerError: {
|
|
139
|
+
/** 错误扩展码 */
|
|
19
140
|
errorCode: string | number
|
|
141
|
+
/** 错误扩展信息 */
|
|
20
142
|
errorMsg: string
|
|
21
143
|
}
|
|
22
144
|
}) => void
|
|
23
|
-
complete?: () => void
|
|
24
145
|
}): void
|
|
25
146
|
|
|
26
147
|
/**
|
|
27
|
-
|
|
148
|
+
* 通用方法:用于基础库给原生异层渲染组件发送消息
|
|
149
|
+
* @public
|
|
150
|
+
* @since MiniKit 2.3.0
|
|
151
|
+
* @platform iOS Android
|
|
152
|
+
*/
|
|
28
153
|
export function nativeInovke(params: {
|
|
29
|
-
/**
|
|
154
|
+
/**
|
|
155
|
+
* 原生组件类型
|
|
156
|
+
* @since MiniKit 2.3.0
|
|
157
|
+
* @defaultValue 0
|
|
158
|
+
*/
|
|
30
159
|
type?: number
|
|
31
|
-
/**
|
|
160
|
+
/**
|
|
161
|
+
* 原生组件的ApiName
|
|
162
|
+
* @since MiniKit 2.3.0
|
|
163
|
+
*/
|
|
32
164
|
apiName: string
|
|
33
|
-
/**
|
|
165
|
+
/**
|
|
166
|
+
* 异层渲染原生视图id
|
|
167
|
+
* @since MiniKit 2.3.0
|
|
168
|
+
*/
|
|
34
169
|
id: string
|
|
35
|
-
/**
|
|
170
|
+
/**
|
|
171
|
+
* 小程序页面id
|
|
172
|
+
* @since MiniKit 2.3.0
|
|
173
|
+
*/
|
|
36
174
|
pageId: string
|
|
37
|
-
/**
|
|
38
|
-
|
|
39
|
-
|
|
175
|
+
/**
|
|
176
|
+
* 参数等
|
|
177
|
+
* @since MiniKit 2.3.0
|
|
178
|
+
*/
|
|
179
|
+
params: Record<string, Record<string, any>>
|
|
180
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
181
|
+
complete?: () => void
|
|
182
|
+
/** 接口调用成功的回调函数 */
|
|
183
|
+
success?: (params: Record<string, any>) => void
|
|
184
|
+
/** 接口调用失败的回调函数 */
|
|
40
185
|
fail?: (params: {
|
|
186
|
+
/** 错误信息 */
|
|
41
187
|
errorMsg: string
|
|
188
|
+
/** 错误码 */
|
|
42
189
|
errorCode: string | number
|
|
190
|
+
/** 错误扩展 */
|
|
43
191
|
innerError: {
|
|
192
|
+
/** 错误扩展码 */
|
|
44
193
|
errorCode: string | number
|
|
194
|
+
/** 错误扩展信息 */
|
|
45
195
|
errorMsg: string
|
|
46
196
|
}
|
|
47
197
|
}) => void
|
|
48
|
-
complete?: () => void
|
|
49
198
|
}): void
|
|
50
199
|
|
|
51
200
|
/**
|
|
52
|
-
|
|
201
|
+
* 获取权限的配置信息
|
|
202
|
+
* @public
|
|
203
|
+
* @since MiniKit 2.6.0
|
|
204
|
+
* @platform iOS Android
|
|
205
|
+
*/
|
|
53
206
|
export function getPermissionConfig(params?: {
|
|
207
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
208
|
+
complete?: () => void
|
|
209
|
+
/** 接口调用成功的回调函数 */
|
|
54
210
|
success?: (params: {
|
|
55
|
-
/**
|
|
56
|
-
|
|
211
|
+
/**
|
|
212
|
+
* 权限相关配置信息
|
|
213
|
+
* @since MiniKit 3.2.0
|
|
214
|
+
*/
|
|
215
|
+
result: Record<string, any>
|
|
57
216
|
}) => void
|
|
217
|
+
/** 接口调用失败的回调函数 */
|
|
58
218
|
fail?: (params: {
|
|
219
|
+
/** 错误信息 */
|
|
59
220
|
errorMsg: string
|
|
221
|
+
/** 错误码 */
|
|
60
222
|
errorCode: string | number
|
|
223
|
+
/** 错误扩展 */
|
|
61
224
|
innerError: {
|
|
225
|
+
/** 错误扩展码 */
|
|
62
226
|
errorCode: string | number
|
|
227
|
+
/** 错误扩展信息 */
|
|
63
228
|
errorMsg: string
|
|
64
229
|
}
|
|
65
230
|
}) => void
|
|
66
|
-
complete?: () => void
|
|
67
231
|
}): void
|
|
68
232
|
|
|
69
233
|
/**
|
|
70
|
-
|
|
234
|
+
* 获取权限的配置信息
|
|
235
|
+
* @public
|
|
236
|
+
* @since MiniKit 2.6.0
|
|
237
|
+
* @platform iOS Android
|
|
238
|
+
*/
|
|
71
239
|
export function getPermissionConfigSync(): {
|
|
72
|
-
/**
|
|
73
|
-
|
|
240
|
+
/**
|
|
241
|
+
* 权限相关配置信息
|
|
242
|
+
* @since MiniKit 2.6.0
|
|
243
|
+
*/
|
|
244
|
+
result: Record<string, any>
|
|
74
245
|
}
|
|
75
246
|
|
|
76
247
|
/**
|
|
77
|
-
|
|
248
|
+
* 调起客户端小程序设置界面,返回用户设置的操作结果。
|
|
249
|
+
* @public
|
|
250
|
+
* @since MiniKit 2.6.0
|
|
251
|
+
* @platform iOS Android
|
|
252
|
+
*/
|
|
78
253
|
export function openSetting(params?: {
|
|
254
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
255
|
+
complete?: () => void
|
|
256
|
+
/** 接口调用成功的回调函数 */
|
|
79
257
|
success?: (params: {
|
|
80
|
-
/**
|
|
81
|
-
|
|
258
|
+
/**
|
|
259
|
+
* 用户授权设置信息
|
|
260
|
+
* @since MiniKit 3.2.0
|
|
261
|
+
*/
|
|
262
|
+
scope: Record<string, boolean>
|
|
82
263
|
}) => void
|
|
264
|
+
/** 接口调用失败的回调函数 */
|
|
83
265
|
fail?: (params: {
|
|
266
|
+
/** 错误信息 */
|
|
84
267
|
errorMsg: string
|
|
268
|
+
/** 错误码 */
|
|
85
269
|
errorCode: string | number
|
|
270
|
+
/** 错误扩展 */
|
|
86
271
|
innerError: {
|
|
272
|
+
/** 错误扩展码 */
|
|
87
273
|
errorCode: string | number
|
|
274
|
+
/** 错误扩展信息 */
|
|
88
275
|
errorMsg: string
|
|
89
276
|
}
|
|
90
277
|
}) => void
|
|
91
|
-
complete?: () => void
|
|
92
278
|
}): void
|
|
93
279
|
|
|
94
280
|
/**
|
|
95
|
-
|
|
96
|
-
*true: 开启vconsole
|
|
97
|
-
*false: 关闭vconsole
|
|
281
|
+
* 设置vconsole调试模式开关
|
|
282
|
+
* true: 开启vconsole
|
|
283
|
+
* false: 关闭vconsole
|
|
284
|
+
* @public
|
|
285
|
+
* @since MiniKit 2.6.0
|
|
286
|
+
* @platform iOS Android
|
|
287
|
+
*/
|
|
98
288
|
export function changeDebugMode(params: {
|
|
99
|
-
/**
|
|
289
|
+
/**
|
|
290
|
+
* 调试模式开关
|
|
291
|
+
* @since MiniKit 2.6.0
|
|
292
|
+
*/
|
|
100
293
|
isEnable: boolean
|
|
101
|
-
|
|
294
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
295
|
+
complete?: () => void
|
|
296
|
+
/** 接口调用成功的回调函数 */
|
|
297
|
+
success?: () => void
|
|
298
|
+
/** 接口调用失败的回调函数 */
|
|
102
299
|
fail?: (params: {
|
|
300
|
+
/** 错误信息 */
|
|
103
301
|
errorMsg: string
|
|
302
|
+
/** 错误码 */
|
|
104
303
|
errorCode: string | number
|
|
304
|
+
/** 错误扩展 */
|
|
105
305
|
innerError: {
|
|
306
|
+
/** 错误扩展码 */
|
|
106
307
|
errorCode: string | number
|
|
308
|
+
/** 错误扩展信息 */
|
|
107
309
|
errorMsg: string
|
|
108
310
|
}
|
|
109
311
|
}) => void
|
|
110
|
-
complete?: () => void
|
|
111
312
|
}): void
|
|
112
313
|
|
|
113
314
|
/**
|
|
114
|
-
|
|
115
|
-
|
|
315
|
+
* 打开帮助中心,默认:面板小程序会跳转到面板帮助中心,普通小程序会跳转到App帮助中心
|
|
316
|
+
* @public
|
|
317
|
+
* @since MiniKit 2.6.0
|
|
318
|
+
* @platform iOS Android
|
|
319
|
+
*/
|
|
116
320
|
export function openHelpCenter(params?: {
|
|
117
|
-
|
|
321
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
322
|
+
complete?: () => void
|
|
323
|
+
/** 接口调用成功的回调函数 */
|
|
324
|
+
success?: () => void
|
|
325
|
+
/** 接口调用失败的回调函数 */
|
|
118
326
|
fail?: (params: {
|
|
327
|
+
/** 错误信息 */
|
|
119
328
|
errorMsg: string
|
|
329
|
+
/** 错误码 */
|
|
120
330
|
errorCode: string | number
|
|
331
|
+
/** 错误扩展 */
|
|
121
332
|
innerError: {
|
|
333
|
+
/** 错误扩展码 */
|
|
122
334
|
errorCode: string | number
|
|
335
|
+
/** 错误扩展信息 */
|
|
123
336
|
errorMsg: string
|
|
124
337
|
}
|
|
125
338
|
}) => void
|
|
126
|
-
complete?: () => void
|
|
127
339
|
}): void
|
|
128
340
|
|
|
129
341
|
/**
|
|
130
|
-
|
|
131
|
-
|
|
342
|
+
* 显示 tabBar 某一项的右上角的红点
|
|
343
|
+
* @public
|
|
344
|
+
* @since MiniKit 1.0.0
|
|
345
|
+
* @platform iOS Android
|
|
346
|
+
*/
|
|
132
347
|
export function showTabBarRedDot(params: {
|
|
133
|
-
/**
|
|
348
|
+
/**
|
|
349
|
+
* tabBar 的哪一项,从左边算起
|
|
350
|
+
* @since MiniKit 1.0.0
|
|
351
|
+
*/
|
|
134
352
|
index: number
|
|
135
|
-
|
|
353
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
354
|
+
complete?: () => void
|
|
355
|
+
/** 接口调用成功的回调函数 */
|
|
356
|
+
success?: () => void
|
|
357
|
+
/** 接口调用失败的回调函数 */
|
|
136
358
|
fail?: (params: {
|
|
359
|
+
/** 错误信息 */
|
|
137
360
|
errorMsg: string
|
|
361
|
+
/** 错误码 */
|
|
138
362
|
errorCode: string | number
|
|
363
|
+
/** 错误扩展 */
|
|
139
364
|
innerError: {
|
|
365
|
+
/** 错误扩展码 */
|
|
140
366
|
errorCode: string | number
|
|
367
|
+
/** 错误扩展信息 */
|
|
141
368
|
errorMsg: string
|
|
142
369
|
}
|
|
143
370
|
}) => void
|
|
144
|
-
complete?: () => void
|
|
145
371
|
}): void
|
|
146
372
|
|
|
147
373
|
/**
|
|
148
|
-
|
|
149
|
-
|
|
374
|
+
* 显示 tabBar
|
|
375
|
+
* @public
|
|
376
|
+
* @since MiniKit 1.0.0
|
|
377
|
+
* @platform iOS Android
|
|
378
|
+
*/
|
|
150
379
|
export function showTabBar(params: {
|
|
151
|
-
/**
|
|
380
|
+
/**
|
|
381
|
+
* 是否需要动画效果
|
|
382
|
+
* @since MiniKit 1.0.0
|
|
383
|
+
*/
|
|
152
384
|
animation: boolean
|
|
153
|
-
|
|
385
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
386
|
+
complete?: () => void
|
|
387
|
+
/** 接口调用成功的回调函数 */
|
|
388
|
+
success?: () => void
|
|
389
|
+
/** 接口调用失败的回调函数 */
|
|
154
390
|
fail?: (params: {
|
|
391
|
+
/** 错误信息 */
|
|
155
392
|
errorMsg: string
|
|
393
|
+
/** 错误码 */
|
|
156
394
|
errorCode: string | number
|
|
395
|
+
/** 错误扩展 */
|
|
157
396
|
innerError: {
|
|
397
|
+
/** 错误扩展码 */
|
|
158
398
|
errorCode: string | number
|
|
399
|
+
/** 错误扩展信息 */
|
|
159
400
|
errorMsg: string
|
|
160
401
|
}
|
|
161
402
|
}) => void
|
|
162
|
-
complete?: () => void
|
|
163
403
|
}): void
|
|
164
404
|
|
|
165
405
|
/**
|
|
166
|
-
|
|
167
|
-
|
|
406
|
+
* 动态设置 tabBar 的整体样式
|
|
407
|
+
* @public
|
|
408
|
+
* @since MiniKit 1.0.0
|
|
409
|
+
* @platform iOS Android
|
|
410
|
+
*/
|
|
168
411
|
export function setTabBarStyle(params: {
|
|
169
|
-
/**
|
|
412
|
+
/**
|
|
413
|
+
* tab 上的文字默认颜色
|
|
414
|
+
* @since MiniKit 1.0.0
|
|
415
|
+
*/
|
|
170
416
|
color: string
|
|
171
|
-
/**
|
|
417
|
+
/**
|
|
418
|
+
* tab 上的文字选中时的颜色
|
|
419
|
+
* @since MiniKit 1.0.0
|
|
420
|
+
*/
|
|
172
421
|
selectedColor: string
|
|
173
|
-
/**
|
|
422
|
+
/**
|
|
423
|
+
* tab 的背景色
|
|
424
|
+
* @since MiniKit 1.0.0
|
|
425
|
+
*/
|
|
174
426
|
backgroundColor: string
|
|
175
|
-
/**
|
|
427
|
+
/**
|
|
428
|
+
* tabBar上边框的颜色, 仅支持 black/white
|
|
429
|
+
* @since MiniKit 1.0.0
|
|
430
|
+
*/
|
|
176
431
|
borderStyle: string
|
|
177
|
-
|
|
432
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
433
|
+
complete?: () => void
|
|
434
|
+
/** 接口调用成功的回调函数 */
|
|
435
|
+
success?: () => void
|
|
436
|
+
/** 接口调用失败的回调函数 */
|
|
178
437
|
fail?: (params: {
|
|
438
|
+
/** 错误信息 */
|
|
179
439
|
errorMsg: string
|
|
440
|
+
/** 错误码 */
|
|
180
441
|
errorCode: string | number
|
|
442
|
+
/** 错误扩展 */
|
|
181
443
|
innerError: {
|
|
444
|
+
/** 错误扩展码 */
|
|
182
445
|
errorCode: string | number
|
|
446
|
+
/** 错误扩展信息 */
|
|
183
447
|
errorMsg: string
|
|
184
448
|
}
|
|
185
449
|
}) => void
|
|
186
|
-
complete?: () => void
|
|
187
450
|
}): void
|
|
188
451
|
|
|
189
452
|
/**
|
|
190
|
-
|
|
191
|
-
|
|
453
|
+
* 动态设置 tabBar 某一项的内容
|
|
454
|
+
* @public
|
|
455
|
+
* @since MiniKit 1.0.0
|
|
456
|
+
* @platform iOS Android
|
|
457
|
+
*/
|
|
192
458
|
export function setTabBarItem(params: {
|
|
193
|
-
/**
|
|
459
|
+
/**
|
|
460
|
+
* tabBar 的哪一项,从左边算起
|
|
461
|
+
* @since MiniKit 1.0.0
|
|
462
|
+
*/
|
|
194
463
|
index: number
|
|
195
|
-
/**
|
|
464
|
+
/**
|
|
465
|
+
* tab 上的按钮文字
|
|
466
|
+
* @since MiniKit 1.0.0
|
|
467
|
+
*/
|
|
196
468
|
text: string
|
|
197
|
-
/**
|
|
469
|
+
/**
|
|
470
|
+
* 图片路径
|
|
471
|
+
* @since MiniKit 1.0.0
|
|
472
|
+
*/
|
|
198
473
|
iconPath: string
|
|
199
|
-
/**
|
|
474
|
+
/**
|
|
475
|
+
* 选中时的图片路径
|
|
476
|
+
* @since MiniKit 1.0.0
|
|
477
|
+
*/
|
|
200
478
|
selectedIconPath: string
|
|
201
|
-
|
|
479
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
480
|
+
complete?: () => void
|
|
481
|
+
/** 接口调用成功的回调函数 */
|
|
482
|
+
success?: () => void
|
|
483
|
+
/** 接口调用失败的回调函数 */
|
|
202
484
|
fail?: (params: {
|
|
485
|
+
/** 错误信息 */
|
|
203
486
|
errorMsg: string
|
|
487
|
+
/** 错误码 */
|
|
204
488
|
errorCode: string | number
|
|
489
|
+
/** 错误扩展 */
|
|
205
490
|
innerError: {
|
|
491
|
+
/** 错误扩展码 */
|
|
206
492
|
errorCode: string | number
|
|
493
|
+
/** 错误扩展信息 */
|
|
207
494
|
errorMsg: string
|
|
208
495
|
}
|
|
209
496
|
}) => void
|
|
210
|
-
complete?: () => void
|
|
211
497
|
}): void
|
|
212
498
|
|
|
213
499
|
/**
|
|
214
|
-
|
|
215
|
-
|
|
500
|
+
* 为 tabBar 某一项的右上角添加文本
|
|
501
|
+
* @public
|
|
502
|
+
* @since MiniKit 1.0.0
|
|
503
|
+
* @platform iOS Android
|
|
504
|
+
*/
|
|
216
505
|
export function setTabBarBadge(params: {
|
|
217
|
-
/**
|
|
506
|
+
/**
|
|
507
|
+
* tabBar 的哪一项,从左边算起
|
|
508
|
+
* @since MiniKit 1.0.0
|
|
509
|
+
*/
|
|
218
510
|
index: number
|
|
219
|
-
/**
|
|
511
|
+
/**
|
|
512
|
+
* 显示的文本,超过 4 个字符则显示成 ...
|
|
513
|
+
* @since MiniKit 1.0.0
|
|
514
|
+
*/
|
|
220
515
|
text: string
|
|
221
|
-
|
|
516
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
517
|
+
complete?: () => void
|
|
518
|
+
/** 接口调用成功的回调函数 */
|
|
519
|
+
success?: () => void
|
|
520
|
+
/** 接口调用失败的回调函数 */
|
|
222
521
|
fail?: (params: {
|
|
522
|
+
/** 错误信息 */
|
|
223
523
|
errorMsg: string
|
|
524
|
+
/** 错误码 */
|
|
224
525
|
errorCode: string | number
|
|
526
|
+
/** 错误扩展 */
|
|
225
527
|
innerError: {
|
|
528
|
+
/** 错误扩展码 */
|
|
226
529
|
errorCode: string | number
|
|
530
|
+
/** 错误扩展信息 */
|
|
227
531
|
errorMsg: string
|
|
228
532
|
}
|
|
229
533
|
}) => void
|
|
230
|
-
complete?: () => void
|
|
231
534
|
}): void
|
|
232
535
|
|
|
233
536
|
/**
|
|
234
|
-
|
|
235
|
-
|
|
537
|
+
* 移除 tabBar 某一项右上角的文本
|
|
538
|
+
* @public
|
|
539
|
+
* @since MiniKit 1.0.0
|
|
540
|
+
* @platform iOS Android
|
|
541
|
+
*/
|
|
236
542
|
export function removeTabBarBadge(params: {
|
|
237
|
-
/**
|
|
543
|
+
/**
|
|
544
|
+
* tabBar 的哪一项,从左边算起
|
|
545
|
+
* @since MiniKit 1.0.0
|
|
546
|
+
*/
|
|
238
547
|
index: number
|
|
239
|
-
|
|
548
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
549
|
+
complete?: () => void
|
|
550
|
+
/** 接口调用成功的回调函数 */
|
|
551
|
+
success?: () => void
|
|
552
|
+
/** 接口调用失败的回调函数 */
|
|
240
553
|
fail?: (params: {
|
|
554
|
+
/** 错误信息 */
|
|
241
555
|
errorMsg: string
|
|
556
|
+
/** 错误码 */
|
|
242
557
|
errorCode: string | number
|
|
558
|
+
/** 错误扩展 */
|
|
243
559
|
innerError: {
|
|
560
|
+
/** 错误扩展码 */
|
|
244
561
|
errorCode: string | number
|
|
562
|
+
/** 错误扩展信息 */
|
|
245
563
|
errorMsg: string
|
|
246
564
|
}
|
|
247
565
|
}) => void
|
|
248
|
-
complete?: () => void
|
|
249
566
|
}): void
|
|
250
567
|
|
|
251
568
|
/**
|
|
252
|
-
|
|
253
|
-
|
|
569
|
+
* 隐藏 tabBar 某一项的右上角的红点
|
|
570
|
+
* @public
|
|
571
|
+
* @since MiniKit 1.0.0
|
|
572
|
+
* @platform iOS Android
|
|
573
|
+
*/
|
|
254
574
|
export function hideTabBarRedDot(params: {
|
|
255
|
-
/**
|
|
575
|
+
/**
|
|
576
|
+
* tabBar 的哪一项,从左边算起
|
|
577
|
+
* @since MiniKit 1.0.0
|
|
578
|
+
*/
|
|
256
579
|
index: number
|
|
257
|
-
|
|
580
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
581
|
+
complete?: () => void
|
|
582
|
+
/** 接口调用成功的回调函数 */
|
|
583
|
+
success?: () => void
|
|
584
|
+
/** 接口调用失败的回调函数 */
|
|
258
585
|
fail?: (params: {
|
|
586
|
+
/** 错误信息 */
|
|
259
587
|
errorMsg: string
|
|
588
|
+
/** 错误码 */
|
|
260
589
|
errorCode: string | number
|
|
590
|
+
/** 错误扩展 */
|
|
261
591
|
innerError: {
|
|
592
|
+
/** 错误扩展码 */
|
|
262
593
|
errorCode: string | number
|
|
594
|
+
/** 错误扩展信息 */
|
|
263
595
|
errorMsg: string
|
|
264
596
|
}
|
|
265
597
|
}) => void
|
|
266
|
-
complete?: () => void
|
|
267
598
|
}): void
|
|
268
599
|
|
|
269
600
|
/**
|
|
270
|
-
|
|
271
|
-
|
|
601
|
+
* 隐藏 tabBar
|
|
602
|
+
* @public
|
|
603
|
+
* @since MiniKit 1.0.0
|
|
604
|
+
* @platform iOS Android
|
|
605
|
+
*/
|
|
272
606
|
export function hideTabBar(params: {
|
|
273
|
-
/**
|
|
607
|
+
/**
|
|
608
|
+
* 是否需要动画效果
|
|
609
|
+
* @since MiniKit 1.0.0
|
|
610
|
+
*/
|
|
274
611
|
animation: boolean
|
|
275
|
-
|
|
612
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
613
|
+
complete?: () => void
|
|
614
|
+
/** 接口调用成功的回调函数 */
|
|
615
|
+
success?: () => void
|
|
616
|
+
/** 接口调用失败的回调函数 */
|
|
276
617
|
fail?: (params: {
|
|
618
|
+
/** 错误信息 */
|
|
277
619
|
errorMsg: string
|
|
620
|
+
/** 错误码 */
|
|
278
621
|
errorCode: string | number
|
|
622
|
+
/** 错误扩展 */
|
|
279
623
|
innerError: {
|
|
624
|
+
/** 错误扩展码 */
|
|
280
625
|
errorCode: string | number
|
|
626
|
+
/** 错误扩展信息 */
|
|
281
627
|
errorMsg: string
|
|
282
628
|
}
|
|
283
629
|
}) => void
|
|
284
|
-
complete?: () => void
|
|
285
630
|
}): void
|
|
286
631
|
|
|
287
632
|
/**
|
|
288
|
-
|
|
289
|
-
|
|
633
|
+
* 发起highway请求
|
|
634
|
+
* @public
|
|
635
|
+
* @since MiniKit 2.3.6
|
|
636
|
+
* @platform iOS Android
|
|
637
|
+
*/
|
|
290
638
|
export function apiRequestByHighway(params: {
|
|
291
|
-
/**
|
|
639
|
+
/**
|
|
640
|
+
* api 名称
|
|
641
|
+
* @since MiniKit 2.3.6
|
|
642
|
+
*/
|
|
292
643
|
api: string
|
|
293
|
-
/**
|
|
294
|
-
|
|
295
|
-
|
|
644
|
+
/**
|
|
645
|
+
* Highway API 请求业务参数,字段结构由 api 对应的 Highway 接口定义
|
|
646
|
+
* @since MiniKit 2.3.6
|
|
647
|
+
*/
|
|
648
|
+
data?: Record<string, any>
|
|
649
|
+
/**
|
|
650
|
+
* method 请求方法
|
|
651
|
+
* @since MiniKit 2.3.6
|
|
652
|
+
* @defaultValue HighwayMethod.GET
|
|
653
|
+
*/
|
|
296
654
|
method?: HighwayMethod
|
|
655
|
+
/**
|
|
656
|
+
* requestId 请求ID,业务方不感知
|
|
657
|
+
* @since MiniKit 3.27.0
|
|
658
|
+
*/
|
|
659
|
+
requestId?: string
|
|
660
|
+
/**
|
|
661
|
+
* cache 缓存配置
|
|
662
|
+
* @since MiniKit 3.27.0
|
|
663
|
+
*/
|
|
664
|
+
cache?: ApiRequestCacheBean
|
|
665
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
666
|
+
complete?: () => void
|
|
667
|
+
/** 接口调用成功的回调函数 */
|
|
297
668
|
success?: (params: {
|
|
298
|
-
/**
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
669
|
+
/**
|
|
670
|
+
* 接口返回的原始数据
|
|
671
|
+
* @since MiniKit 3.2.0
|
|
672
|
+
*/
|
|
673
|
+
data: Record<string, any>
|
|
302
674
|
}) => void
|
|
675
|
+
/** 接口调用失败的回调函数 */
|
|
303
676
|
fail?: (params: {
|
|
677
|
+
/** 错误信息 */
|
|
304
678
|
errorMsg: string
|
|
679
|
+
/** 错误码 */
|
|
305
680
|
errorCode: string | number
|
|
681
|
+
/** 错误扩展 */
|
|
306
682
|
innerError: {
|
|
683
|
+
/** 错误扩展码 */
|
|
307
684
|
errorCode: string | number
|
|
685
|
+
/** 错误扩展信息 */
|
|
308
686
|
errorMsg: string
|
|
309
687
|
}
|
|
310
688
|
}) => void
|
|
311
|
-
complete?: () => void
|
|
312
689
|
}): void
|
|
313
690
|
|
|
314
691
|
/**
|
|
315
|
-
|
|
316
|
-
|
|
692
|
+
* 返回到上一个小程序。只有在当前小程序是被其他小程序打开时可以调用成功
|
|
693
|
+
* @public
|
|
694
|
+
* @since MiniKit 1.0.0
|
|
695
|
+
* @platform iOS Android
|
|
696
|
+
*/
|
|
317
697
|
export function navigateBackMiniProgram(params?: {
|
|
318
|
-
/**
|
|
319
|
-
|
|
320
|
-
|
|
698
|
+
/**
|
|
699
|
+
* 需要返回给上一个小程序的数据,上一个小程序可在 App.onShow 中获取到这份数据
|
|
700
|
+
* @since MiniKit 1.0.0
|
|
701
|
+
*/
|
|
702
|
+
extraData?: Record<string, any>
|
|
703
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
704
|
+
complete?: () => void
|
|
705
|
+
/** 接口调用成功的回调函数 */
|
|
706
|
+
success?: () => void
|
|
707
|
+
/** 接口调用失败的回调函数 */
|
|
321
708
|
fail?: (params: {
|
|
709
|
+
/** 错误信息 */
|
|
322
710
|
errorMsg: string
|
|
711
|
+
/** 错误码 */
|
|
323
712
|
errorCode: string | number
|
|
713
|
+
/** 错误扩展 */
|
|
324
714
|
innerError: {
|
|
715
|
+
/** 错误扩展码 */
|
|
325
716
|
errorCode: string | number
|
|
717
|
+
/** 错误扩展信息 */
|
|
326
718
|
errorMsg: string
|
|
327
719
|
}
|
|
328
720
|
}) => void
|
|
329
|
-
complete?: () => void
|
|
330
721
|
}): void
|
|
331
722
|
|
|
332
723
|
/**
|
|
333
|
-
|
|
334
|
-
|
|
724
|
+
* 退出当前小程序
|
|
725
|
+
* @public
|
|
726
|
+
* @since MiniKit 1.0.0
|
|
727
|
+
* @platform iOS Android
|
|
728
|
+
*/
|
|
335
729
|
export function exitMiniProgram(params?: {
|
|
336
|
-
|
|
730
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
731
|
+
complete?: () => void
|
|
732
|
+
/** 接口调用成功的回调函数 */
|
|
733
|
+
success?: () => void
|
|
734
|
+
/** 接口调用失败的回调函数 */
|
|
337
735
|
fail?: (params: {
|
|
736
|
+
/** 错误信息 */
|
|
338
737
|
errorMsg: string
|
|
738
|
+
/** 错误码 */
|
|
339
739
|
errorCode: string | number
|
|
740
|
+
/** 错误扩展 */
|
|
340
741
|
innerError: {
|
|
742
|
+
/** 错误扩展码 */
|
|
341
743
|
errorCode: string | number
|
|
744
|
+
/** 错误扩展信息 */
|
|
342
745
|
errorMsg: string
|
|
343
746
|
}
|
|
344
747
|
}) => void
|
|
345
|
-
complete?: () => void
|
|
346
748
|
}): void
|
|
347
749
|
|
|
348
750
|
/**
|
|
349
|
-
|
|
350
|
-
|
|
751
|
+
* 获取小程序启动时的参数。与App.onLaunch的回调参数一致。
|
|
752
|
+
* @public
|
|
753
|
+
* @since MiniKit 1.0.0
|
|
754
|
+
* @platform iOS Android
|
|
755
|
+
*/
|
|
351
756
|
export function getLaunchOptions(params?: {
|
|
757
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
758
|
+
complete?: () => void
|
|
759
|
+
/** 接口调用成功的回调函数 */
|
|
352
760
|
success?: (params: {
|
|
353
|
-
/**
|
|
761
|
+
/**
|
|
762
|
+
* 启动小程序的路径 (代码包路径)
|
|
763
|
+
* @since MiniKit 3.2.0
|
|
764
|
+
*/
|
|
354
765
|
path: string
|
|
355
|
-
/**
|
|
766
|
+
/**
|
|
767
|
+
* 启动小程序的场景值
|
|
768
|
+
* @since MiniKit 3.15.0
|
|
769
|
+
* @defaultValue MiniAppScene.DEFAULT
|
|
770
|
+
*/
|
|
356
771
|
scene?: MiniAppScene
|
|
357
|
-
/**
|
|
358
|
-
|
|
359
|
-
|
|
772
|
+
/**
|
|
773
|
+
* 启动小程序的 query 参数
|
|
774
|
+
* @since MiniKit 3.2.0
|
|
775
|
+
*/
|
|
776
|
+
query: Record<string, any>
|
|
777
|
+
/**
|
|
778
|
+
* 分享转发
|
|
779
|
+
* @since MiniKit 3.2.0
|
|
780
|
+
*/
|
|
360
781
|
referrerInfo: ReferrerInfo
|
|
361
|
-
/**
|
|
782
|
+
/**
|
|
783
|
+
* API 类别: default 默认类别; embedded 内嵌,通过打开半屏小程序能力打开的小程序
|
|
784
|
+
* @since MiniKit 3.2.0
|
|
785
|
+
* @defaultValue "default"
|
|
786
|
+
*/
|
|
362
787
|
apiCategory?: string
|
|
788
|
+
/**
|
|
789
|
+
* 启动小程序的额外参数,一般指容器附加的参数,非业务参数
|
|
790
|
+
* @since MiniKit 3.21.0
|
|
791
|
+
*/
|
|
792
|
+
extraQuery?: Record<string, any>
|
|
363
793
|
}) => void
|
|
794
|
+
/** 接口调用失败的回调函数 */
|
|
364
795
|
fail?: (params: {
|
|
796
|
+
/** 错误信息 */
|
|
365
797
|
errorMsg: string
|
|
798
|
+
/** 错误码 */
|
|
366
799
|
errorCode: string | number
|
|
800
|
+
/** 错误扩展 */
|
|
367
801
|
innerError: {
|
|
802
|
+
/** 错误扩展码 */
|
|
368
803
|
errorCode: string | number
|
|
804
|
+
/** 错误扩展信息 */
|
|
369
805
|
errorMsg: string
|
|
370
806
|
}
|
|
371
807
|
}) => void
|
|
372
|
-
complete?: () => void
|
|
373
808
|
}): void
|
|
374
809
|
|
|
375
810
|
/**
|
|
376
|
-
|
|
377
|
-
|
|
811
|
+
* 获取小程序启动时的参数。与App.onLaunch的回调参数一致。
|
|
812
|
+
* @public
|
|
813
|
+
* @since MiniKit 1.0.0
|
|
814
|
+
* @platform iOS Android
|
|
815
|
+
*/
|
|
378
816
|
export function getLaunchOptionsSync(): {
|
|
379
|
-
/**
|
|
817
|
+
/**
|
|
818
|
+
* 启动小程序的路径 (代码包路径)
|
|
819
|
+
* @since MiniKit 1.0.0
|
|
820
|
+
*/
|
|
380
821
|
path: string
|
|
381
|
-
/**
|
|
822
|
+
/**
|
|
823
|
+
* 启动小程序的场景值
|
|
824
|
+
* @since MiniKit 3.15.0
|
|
825
|
+
* @defaultValue MiniAppScene.DEFAULT
|
|
826
|
+
*/
|
|
382
827
|
scene?: MiniAppScene
|
|
383
|
-
/**
|
|
384
|
-
|
|
385
|
-
|
|
828
|
+
/**
|
|
829
|
+
* 启动小程序的 query 参数
|
|
830
|
+
* @since MiniKit 1.0.0
|
|
831
|
+
*/
|
|
832
|
+
query: Record<string, any>
|
|
833
|
+
/**
|
|
834
|
+
* 分享转发
|
|
835
|
+
* @since MiniKit 1.0.0
|
|
836
|
+
*/
|
|
386
837
|
referrerInfo: ReferrerInfo
|
|
387
|
-
/**
|
|
838
|
+
/**
|
|
839
|
+
* API 类别: default 默认类别; embedded 内嵌,通过打开半屏小程序能力打开的小程序
|
|
840
|
+
* @since MiniKit 1.0.0
|
|
841
|
+
* @defaultValue "default"
|
|
842
|
+
*/
|
|
388
843
|
apiCategory?: string
|
|
844
|
+
/**
|
|
845
|
+
* 启动小程序的额外参数,一般指容器附加的参数,非业务参数
|
|
846
|
+
* @since MiniKit 3.21.0
|
|
847
|
+
*/
|
|
848
|
+
extraQuery?: Record<string, any>
|
|
389
849
|
}
|
|
390
850
|
|
|
391
851
|
/**
|
|
392
|
-
|
|
393
|
-
|
|
852
|
+
* 获取本次小程序启动时的参数。如果当前是冷启动,则返回值与App.onLaunch的回调参数一致;如果当前是热启动,则返回值与App.onShow 一致。
|
|
853
|
+
* @public
|
|
854
|
+
* @since MiniKit 1.0.0
|
|
855
|
+
* @platform iOS Android
|
|
856
|
+
*/
|
|
394
857
|
export function getEnterOptions(params?: {
|
|
858
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
859
|
+
complete?: () => void
|
|
860
|
+
/** 接口调用成功的回调函数 */
|
|
395
861
|
success?: (params: {
|
|
396
|
-
/**
|
|
862
|
+
/**
|
|
863
|
+
* 启动小程序的路径 (代码包路径)
|
|
864
|
+
* @since MiniKit 3.2.0
|
|
865
|
+
*/
|
|
397
866
|
path: string
|
|
398
|
-
/**
|
|
867
|
+
/**
|
|
868
|
+
* 启动小程序的场景值
|
|
869
|
+
* @since MiniKit 3.15.0
|
|
870
|
+
* @defaultValue MiniAppScene.DEFAULT
|
|
871
|
+
*/
|
|
399
872
|
scene?: MiniAppScene
|
|
400
|
-
/**
|
|
401
|
-
|
|
402
|
-
|
|
873
|
+
/**
|
|
874
|
+
* 启动小程序的 query 参数
|
|
875
|
+
* @since MiniKit 3.2.0
|
|
876
|
+
*/
|
|
877
|
+
query: Record<string, any>
|
|
878
|
+
/**
|
|
879
|
+
* 分享转发
|
|
880
|
+
* @since MiniKit 3.2.0
|
|
881
|
+
*/
|
|
403
882
|
referrerInfo: ReferrerInfo
|
|
404
|
-
/**
|
|
883
|
+
/**
|
|
884
|
+
* API 类别: default 默认类别; embedded 内嵌,通过打开半屏小程序能力打开的小程序
|
|
885
|
+
* @since MiniKit 3.2.0
|
|
886
|
+
* @defaultValue "default"
|
|
887
|
+
*/
|
|
405
888
|
apiCategory?: string
|
|
889
|
+
/**
|
|
890
|
+
* 启动小程序的额外参数,一般指容器附加的参数,非业务参数
|
|
891
|
+
* @since MiniKit 3.21.0
|
|
892
|
+
*/
|
|
893
|
+
extraQuery?: Record<string, any>
|
|
406
894
|
}) => void
|
|
895
|
+
/** 接口调用失败的回调函数 */
|
|
407
896
|
fail?: (params: {
|
|
897
|
+
/** 错误信息 */
|
|
408
898
|
errorMsg: string
|
|
899
|
+
/** 错误码 */
|
|
409
900
|
errorCode: string | number
|
|
901
|
+
/** 错误扩展 */
|
|
410
902
|
innerError: {
|
|
903
|
+
/** 错误扩展码 */
|
|
411
904
|
errorCode: string | number
|
|
905
|
+
/** 错误扩展信息 */
|
|
412
906
|
errorMsg: string
|
|
413
907
|
}
|
|
414
908
|
}) => void
|
|
415
|
-
complete?: () => void
|
|
416
909
|
}): void
|
|
417
910
|
|
|
418
911
|
/**
|
|
419
|
-
|
|
420
|
-
|
|
912
|
+
* 获取本次小程序启动时的参数。如果当前是冷启动,则返回值与App.onLaunch的回调参数一致;如果当前是热启动,则返回值与App.onShow 一致。
|
|
913
|
+
* @public
|
|
914
|
+
* @since MiniKit 1.0.0
|
|
915
|
+
* @platform iOS Android
|
|
916
|
+
*/
|
|
421
917
|
export function getEnterOptionsSync(): {
|
|
422
|
-
/**
|
|
918
|
+
/**
|
|
919
|
+
* 启动小程序的路径 (代码包路径)
|
|
920
|
+
* @since MiniKit 1.0.0
|
|
921
|
+
*/
|
|
423
922
|
path: string
|
|
424
|
-
/**
|
|
923
|
+
/**
|
|
924
|
+
* 启动小程序的场景值
|
|
925
|
+
* @since MiniKit 3.15.0
|
|
926
|
+
* @defaultValue MiniAppScene.DEFAULT
|
|
927
|
+
*/
|
|
425
928
|
scene?: MiniAppScene
|
|
426
|
-
/**
|
|
427
|
-
|
|
428
|
-
|
|
929
|
+
/**
|
|
930
|
+
* 启动小程序的 query 参数
|
|
931
|
+
* @since MiniKit 1.0.0
|
|
932
|
+
*/
|
|
933
|
+
query: Record<string, any>
|
|
934
|
+
/**
|
|
935
|
+
* 分享转发
|
|
936
|
+
* @since MiniKit 1.0.0
|
|
937
|
+
*/
|
|
429
938
|
referrerInfo: ReferrerInfo
|
|
430
|
-
/**
|
|
939
|
+
/**
|
|
940
|
+
* API 类别: default 默认类别; embedded 内嵌,通过打开半屏小程序能力打开的小程序
|
|
941
|
+
* @since MiniKit 1.0.0
|
|
942
|
+
* @defaultValue "default"
|
|
943
|
+
*/
|
|
431
944
|
apiCategory?: string
|
|
945
|
+
/**
|
|
946
|
+
* 启动小程序的额外参数,一般指容器附加的参数,非业务参数
|
|
947
|
+
* @since MiniKit 3.21.0
|
|
948
|
+
*/
|
|
949
|
+
extraQuery?: Record<string, any>
|
|
432
950
|
}
|
|
433
951
|
|
|
434
952
|
/**
|
|
435
|
-
|
|
436
|
-
|
|
953
|
+
* 设置小程序看板页标题,小程序名称,面板名称等
|
|
954
|
+
* @public
|
|
955
|
+
* @since MiniKit 2.0.6
|
|
956
|
+
* @platform iOS Android
|
|
957
|
+
*/
|
|
437
958
|
export function setBoardTitle(params: {
|
|
438
|
-
/**
|
|
959
|
+
/**
|
|
960
|
+
* 看板页标题
|
|
961
|
+
* @since MiniKit 2.0.6
|
|
962
|
+
*/
|
|
439
963
|
title: string
|
|
440
|
-
|
|
964
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
965
|
+
complete?: () => void
|
|
966
|
+
/** 接口调用成功的回调函数 */
|
|
967
|
+
success?: () => void
|
|
968
|
+
/** 接口调用失败的回调函数 */
|
|
441
969
|
fail?: (params: {
|
|
970
|
+
/** 错误信息 */
|
|
442
971
|
errorMsg: string
|
|
972
|
+
/** 错误码 */
|
|
443
973
|
errorCode: string | number
|
|
974
|
+
/** 错误扩展 */
|
|
444
975
|
innerError: {
|
|
976
|
+
/** 错误扩展码 */
|
|
445
977
|
errorCode: string | number
|
|
978
|
+
/** 错误扩展信息 */
|
|
446
979
|
errorMsg: string
|
|
447
980
|
}
|
|
448
981
|
}) => void
|
|
449
|
-
complete?: () => void
|
|
450
982
|
}): void
|
|
451
983
|
|
|
452
984
|
/**
|
|
453
|
-
|
|
454
|
-
|
|
985
|
+
* 设置小程序看板页标题,小程序名称,面板名称等
|
|
986
|
+
* @public
|
|
987
|
+
* @since MiniKit 2.0.6
|
|
988
|
+
* @platform iOS Android
|
|
989
|
+
*/
|
|
455
990
|
export function setBoardTitleSync(boardBean?: BoardBean): null
|
|
456
991
|
|
|
457
992
|
/**
|
|
458
|
-
|
|
459
|
-
|
|
993
|
+
* 设置小程序看板页icon,小程序icon,面板icon等
|
|
994
|
+
* @public
|
|
995
|
+
* @since MiniKit 2.3.17
|
|
996
|
+
* @platform iOS Android
|
|
997
|
+
*/
|
|
460
998
|
export function setBoardIcon(params: {
|
|
461
|
-
/**
|
|
999
|
+
/**
|
|
1000
|
+
* 看板页icon
|
|
1001
|
+
* @since MiniKit 2.3.17
|
|
1002
|
+
*/
|
|
462
1003
|
icon: string
|
|
463
|
-
|
|
1004
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1005
|
+
complete?: () => void
|
|
1006
|
+
/** 接口调用成功的回调函数 */
|
|
1007
|
+
success?: () => void
|
|
1008
|
+
/** 接口调用失败的回调函数 */
|
|
464
1009
|
fail?: (params: {
|
|
1010
|
+
/** 错误信息 */
|
|
465
1011
|
errorMsg: string
|
|
1012
|
+
/** 错误码 */
|
|
466
1013
|
errorCode: string | number
|
|
1014
|
+
/** 错误扩展 */
|
|
467
1015
|
innerError: {
|
|
1016
|
+
/** 错误扩展码 */
|
|
468
1017
|
errorCode: string | number
|
|
1018
|
+
/** 错误扩展信息 */
|
|
469
1019
|
errorMsg: string
|
|
470
1020
|
}
|
|
471
1021
|
}) => void
|
|
472
|
-
complete?: () => void
|
|
473
1022
|
}): void
|
|
474
1023
|
|
|
475
1024
|
/**
|
|
476
|
-
|
|
477
|
-
|
|
1025
|
+
* 设置小程序看板页icon,小程序icon,面板icon等
|
|
1026
|
+
* @public
|
|
1027
|
+
* @since MiniKit 2.3.17
|
|
1028
|
+
* @platform iOS Android
|
|
1029
|
+
*/
|
|
478
1030
|
export function setBoardIconSync(boardIconBean?: BoardIconBean): null
|
|
479
1031
|
|
|
480
1032
|
/**
|
|
481
|
-
|
|
482
|
-
|
|
1033
|
+
* 显示小程序看板页的标题和icon
|
|
1034
|
+
* @public
|
|
1035
|
+
* @since MiniKit 2.3.17
|
|
1036
|
+
* @platform iOS Android
|
|
1037
|
+
*/
|
|
483
1038
|
export function showBoardTitleIcon(params?: {
|
|
484
|
-
|
|
1039
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1040
|
+
complete?: () => void
|
|
1041
|
+
/** 接口调用成功的回调函数 */
|
|
1042
|
+
success?: () => void
|
|
1043
|
+
/** 接口调用失败的回调函数 */
|
|
485
1044
|
fail?: (params: {
|
|
1045
|
+
/** 错误信息 */
|
|
486
1046
|
errorMsg: string
|
|
1047
|
+
/** 错误码 */
|
|
487
1048
|
errorCode: string | number
|
|
1049
|
+
/** 错误扩展 */
|
|
488
1050
|
innerError: {
|
|
1051
|
+
/** 错误扩展码 */
|
|
489
1052
|
errorCode: string | number
|
|
1053
|
+
/** 错误扩展信息 */
|
|
490
1054
|
errorMsg: string
|
|
491
1055
|
}
|
|
492
1056
|
}) => void
|
|
493
|
-
complete?: () => void
|
|
494
1057
|
}): void
|
|
495
1058
|
|
|
496
1059
|
/**
|
|
497
|
-
|
|
498
|
-
|
|
1060
|
+
* 显示小程序看板页的标题和icon
|
|
1061
|
+
* @public
|
|
1062
|
+
* @since MiniKit 2.3.17
|
|
1063
|
+
* @platform iOS Android
|
|
1064
|
+
*/
|
|
499
1065
|
export function showBoardTitleIconSync(): null
|
|
500
1066
|
|
|
501
1067
|
/**
|
|
502
|
-
|
|
503
|
-
|
|
1068
|
+
* 隐藏小程序看板页的标题和icon
|
|
1069
|
+
* @public
|
|
1070
|
+
* @since MiniKit 2.3.17
|
|
1071
|
+
* @platform iOS Android
|
|
1072
|
+
*/
|
|
504
1073
|
export function hideBoardTitleIcon(params?: {
|
|
505
|
-
|
|
1074
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1075
|
+
complete?: () => void
|
|
1076
|
+
/** 接口调用成功的回调函数 */
|
|
1077
|
+
success?: () => void
|
|
1078
|
+
/** 接口调用失败的回调函数 */
|
|
506
1079
|
fail?: (params: {
|
|
1080
|
+
/** 错误信息 */
|
|
507
1081
|
errorMsg: string
|
|
1082
|
+
/** 错误码 */
|
|
508
1083
|
errorCode: string | number
|
|
1084
|
+
/** 错误扩展 */
|
|
509
1085
|
innerError: {
|
|
1086
|
+
/** 错误扩展码 */
|
|
510
1087
|
errorCode: string | number
|
|
1088
|
+
/** 错误扩展信息 */
|
|
511
1089
|
errorMsg: string
|
|
512
1090
|
}
|
|
513
1091
|
}) => void
|
|
514
|
-
complete?: () => void
|
|
515
1092
|
}): void
|
|
516
1093
|
|
|
517
1094
|
/**
|
|
518
|
-
|
|
519
|
-
|
|
1095
|
+
* 隐藏小程序看板页的标题和icon
|
|
1096
|
+
* @public
|
|
1097
|
+
* @since MiniKit 2.3.17
|
|
1098
|
+
* @platform iOS Android
|
|
1099
|
+
*/
|
|
520
1100
|
export function hideBoardTitleIconSync(): null
|
|
521
1101
|
|
|
522
1102
|
/**
|
|
523
|
-
|
|
524
|
-
|
|
1103
|
+
* 获取菜单按钮(右上角胶囊按钮)的布局位置信息。坐标信息以屏幕左上角为原点。
|
|
1104
|
+
* @public
|
|
1105
|
+
* @since MiniKit 2.3.0
|
|
1106
|
+
* @platform iOS Android
|
|
1107
|
+
*/
|
|
525
1108
|
export function getMenuButtonBoundingClientRect(params?: {
|
|
1109
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1110
|
+
complete?: () => void
|
|
1111
|
+
/** 接口调用成功的回调函数 */
|
|
526
1112
|
success?: (params: {
|
|
527
|
-
/**
|
|
1113
|
+
/**
|
|
1114
|
+
* 宽度,单位:px
|
|
1115
|
+
* @since MiniKit 3.2.0
|
|
1116
|
+
*/
|
|
528
1117
|
width: number
|
|
529
|
-
/**
|
|
1118
|
+
/**
|
|
1119
|
+
* 高度,单位:px
|
|
1120
|
+
* @since MiniKit 3.2.0
|
|
1121
|
+
*/
|
|
530
1122
|
height: number
|
|
531
|
-
/**
|
|
1123
|
+
/**
|
|
1124
|
+
* 上边界坐标,单位:px
|
|
1125
|
+
* @since MiniKit 3.2.0
|
|
1126
|
+
*/
|
|
532
1127
|
top: number
|
|
533
|
-
/**
|
|
1128
|
+
/**
|
|
1129
|
+
* 右边界坐标,单位:px
|
|
1130
|
+
* @since MiniKit 3.2.0
|
|
1131
|
+
*/
|
|
534
1132
|
right: number
|
|
535
|
-
/**
|
|
1133
|
+
/**
|
|
1134
|
+
* 下边界坐标,单位:px
|
|
1135
|
+
* @since MiniKit 3.2.0
|
|
1136
|
+
*/
|
|
536
1137
|
bottom: number
|
|
537
|
-
/**
|
|
1138
|
+
/**
|
|
1139
|
+
* 左边界坐标,单位:px
|
|
1140
|
+
* @since MiniKit 3.2.0
|
|
1141
|
+
*/
|
|
538
1142
|
left: number
|
|
539
1143
|
}) => void
|
|
1144
|
+
/** 接口调用失败的回调函数 */
|
|
540
1145
|
fail?: (params: {
|
|
1146
|
+
/** 错误信息 */
|
|
541
1147
|
errorMsg: string
|
|
1148
|
+
/** 错误码 */
|
|
542
1149
|
errorCode: string | number
|
|
1150
|
+
/** 错误扩展 */
|
|
543
1151
|
innerError: {
|
|
1152
|
+
/** 错误扩展码 */
|
|
544
1153
|
errorCode: string | number
|
|
1154
|
+
/** 错误扩展信息 */
|
|
545
1155
|
errorMsg: string
|
|
546
1156
|
}
|
|
547
1157
|
}) => void
|
|
548
|
-
complete?: () => void
|
|
549
1158
|
}): void
|
|
550
1159
|
|
|
551
1160
|
/**
|
|
552
|
-
|
|
553
|
-
|
|
1161
|
+
* 获取菜单按钮(右上角胶囊按钮)的布局位置信息。坐标信息以屏幕左上角为原点。
|
|
1162
|
+
* @public
|
|
1163
|
+
* @since MiniKit 2.3.0
|
|
1164
|
+
* @platform iOS Android
|
|
1165
|
+
*/
|
|
554
1166
|
export function getMenuButtonBoundingClientRectSync(): {
|
|
555
|
-
/**
|
|
1167
|
+
/**
|
|
1168
|
+
* 宽度,单位:px
|
|
1169
|
+
* @since MiniKit 2.3.0
|
|
1170
|
+
*/
|
|
556
1171
|
width: number
|
|
557
|
-
/**
|
|
1172
|
+
/**
|
|
1173
|
+
* 高度,单位:px
|
|
1174
|
+
* @since MiniKit 2.3.0
|
|
1175
|
+
*/
|
|
558
1176
|
height: number
|
|
559
|
-
/**
|
|
1177
|
+
/**
|
|
1178
|
+
* 上边界坐标,单位:px
|
|
1179
|
+
* @since MiniKit 2.3.0
|
|
1180
|
+
*/
|
|
560
1181
|
top: number
|
|
561
|
-
/**
|
|
1182
|
+
/**
|
|
1183
|
+
* 右边界坐标,单位:px
|
|
1184
|
+
* @since MiniKit 2.3.0
|
|
1185
|
+
*/
|
|
562
1186
|
right: number
|
|
563
|
-
/**
|
|
1187
|
+
/**
|
|
1188
|
+
* 下边界坐标,单位:px
|
|
1189
|
+
* @since MiniKit 2.3.0
|
|
1190
|
+
*/
|
|
564
1191
|
bottom: number
|
|
565
|
-
/**
|
|
1192
|
+
/**
|
|
1193
|
+
* 左边界坐标,单位:px
|
|
1194
|
+
* @since MiniKit 2.3.0
|
|
1195
|
+
*/
|
|
566
1196
|
left: number
|
|
567
1197
|
}
|
|
568
1198
|
|
|
569
1199
|
/**
|
|
570
|
-
|
|
571
|
-
|
|
1200
|
+
* 预下载智能小程序,此接口仅供提供预下载普通智能小程序调用,面板小程序的预下载需要使用另外的接口。
|
|
1201
|
+
* @public
|
|
1202
|
+
* @since MiniKit 2.3.0
|
|
1203
|
+
* @platform iOS Android
|
|
1204
|
+
*/
|
|
572
1205
|
export function preDownloadMiniApp(params: {
|
|
573
|
-
/**
|
|
1206
|
+
/**
|
|
1207
|
+
* 小程序id
|
|
1208
|
+
* @since MiniKit 2.3.0
|
|
1209
|
+
*/
|
|
574
1210
|
miniAppId: string
|
|
575
|
-
/**
|
|
1211
|
+
/**
|
|
1212
|
+
* 指定小程序版本(可选参数)
|
|
1213
|
+
* @since MiniKit 2.3.0
|
|
1214
|
+
*/
|
|
576
1215
|
miniAppVersion?: string
|
|
577
|
-
|
|
1216
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1217
|
+
complete?: () => void
|
|
1218
|
+
/** 接口调用成功的回调函数 */
|
|
1219
|
+
success?: () => void
|
|
1220
|
+
/** 接口调用失败的回调函数 */
|
|
578
1221
|
fail?: (params: {
|
|
1222
|
+
/** 错误信息 */
|
|
579
1223
|
errorMsg: string
|
|
1224
|
+
/** 错误码 */
|
|
580
1225
|
errorCode: string | number
|
|
1226
|
+
/** 错误扩展 */
|
|
581
1227
|
innerError: {
|
|
1228
|
+
/** 错误扩展码 */
|
|
582
1229
|
errorCode: string | number
|
|
1230
|
+
/** 错误扩展信息 */
|
|
583
1231
|
errorMsg: string
|
|
584
1232
|
}
|
|
585
1233
|
}) => void
|
|
586
|
-
complete?: () => void
|
|
587
1234
|
}): void
|
|
588
1235
|
|
|
589
1236
|
/**
|
|
590
|
-
|
|
591
|
-
|
|
1237
|
+
* 调用接口获取登录凭证(code)。通过凭证进而换取用户登录态信息,包括用户在当前小程序的唯一标识(openid)、iot账号下的唯一标识(unionid)
|
|
1238
|
+
* @public
|
|
1239
|
+
* @since MiniKit 2.3.2
|
|
1240
|
+
* @platform iOS Android
|
|
1241
|
+
*/
|
|
592
1242
|
export function login(params?: {
|
|
593
|
-
/**
|
|
1243
|
+
/**
|
|
1244
|
+
* 超时时间,单位ms
|
|
1245
|
+
* @since MiniKit 2.3.2
|
|
1246
|
+
*/
|
|
594
1247
|
timeout?: number
|
|
1248
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1249
|
+
complete?: () => void
|
|
1250
|
+
/** 接口调用成功的回调函数 */
|
|
595
1251
|
success?: (params: {
|
|
596
|
-
/**
|
|
1252
|
+
/**
|
|
1253
|
+
* 用户登录凭证(有效期五分钟)
|
|
1254
|
+
* @since MiniKit 3.2.0
|
|
1255
|
+
*/
|
|
597
1256
|
code: string
|
|
598
1257
|
}) => void
|
|
1258
|
+
/** 接口调用失败的回调函数 */
|
|
599
1259
|
fail?: (params: {
|
|
1260
|
+
/** 错误信息 */
|
|
600
1261
|
errorMsg: string
|
|
1262
|
+
/** 错误码 */
|
|
601
1263
|
errorCode: string | number
|
|
1264
|
+
/** 错误扩展 */
|
|
602
1265
|
innerError: {
|
|
1266
|
+
/** 错误扩展码 */
|
|
603
1267
|
errorCode: string | number
|
|
1268
|
+
/** 错误扩展信息 */
|
|
604
1269
|
errorMsg: string
|
|
605
1270
|
}
|
|
606
1271
|
}) => void
|
|
607
|
-
complete?: () => void
|
|
608
1272
|
}): void
|
|
609
1273
|
|
|
610
1274
|
/**
|
|
611
|
-
|
|
612
|
-
|
|
1275
|
+
* 屏幕旋转设置,auto / portrait / landscape。pad模式下不支持屏幕旋转
|
|
1276
|
+
* @public
|
|
1277
|
+
* @since MiniKit 2.4.1
|
|
1278
|
+
* @platform iOS Android
|
|
1279
|
+
*/
|
|
613
1280
|
export function setPageOrientation(params: {
|
|
614
|
-
/**
|
|
1281
|
+
/**
|
|
1282
|
+
* 屏幕旋转设置, auto / portrait / landscape (默认landscape-right)
|
|
1283
|
+
* @since MiniKit 2.4.1
|
|
1284
|
+
*/
|
|
615
1285
|
pageOrientation: string
|
|
616
|
-
|
|
1286
|
+
/**
|
|
1287
|
+
* 是否反向旋转,仅在pageOrientation为landscape时有效,默认false
|
|
1288
|
+
* @since MiniKit 3.24.0
|
|
1289
|
+
*/
|
|
1290
|
+
reverse?: boolean
|
|
1291
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1292
|
+
complete?: () => void
|
|
1293
|
+
/** 接口调用成功的回调函数 */
|
|
1294
|
+
success?: () => void
|
|
1295
|
+
/** 接口调用失败的回调函数 */
|
|
617
1296
|
fail?: (params: {
|
|
1297
|
+
/** 错误信息 */
|
|
618
1298
|
errorMsg: string
|
|
1299
|
+
/** 错误码 */
|
|
619
1300
|
errorCode: string | number
|
|
1301
|
+
/** 错误扩展 */
|
|
620
1302
|
innerError: {
|
|
1303
|
+
/** 错误扩展码 */
|
|
621
1304
|
errorCode: string | number
|
|
1305
|
+
/** 错误扩展信息 */
|
|
622
1306
|
errorMsg: string
|
|
623
1307
|
}
|
|
624
1308
|
}) => void
|
|
625
|
-
complete?: () => void
|
|
626
1309
|
}): void
|
|
627
1310
|
|
|
628
1311
|
/**
|
|
629
|
-
|
|
630
|
-
|
|
1312
|
+
* 隐藏右上角胶囊按钮
|
|
1313
|
+
* @public
|
|
1314
|
+
* @since MiniKit 2.5.0
|
|
1315
|
+
* @platform iOS Android
|
|
1316
|
+
*/
|
|
631
1317
|
export function hideMenuButton(params?: {
|
|
632
|
-
|
|
1318
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1319
|
+
complete?: () => void
|
|
1320
|
+
/** 接口调用成功的回调函数 */
|
|
1321
|
+
success?: () => void
|
|
1322
|
+
/** 接口调用失败的回调函数 */
|
|
633
1323
|
fail?: (params: {
|
|
1324
|
+
/** 错误信息 */
|
|
634
1325
|
errorMsg: string
|
|
1326
|
+
/** 错误码 */
|
|
635
1327
|
errorCode: string | number
|
|
1328
|
+
/** 错误扩展 */
|
|
636
1329
|
innerError: {
|
|
1330
|
+
/** 错误扩展码 */
|
|
637
1331
|
errorCode: string | number
|
|
1332
|
+
/** 错误扩展信息 */
|
|
638
1333
|
errorMsg: string
|
|
639
1334
|
}
|
|
640
1335
|
}) => void
|
|
641
|
-
complete?: () => void
|
|
642
1336
|
}): void
|
|
643
1337
|
|
|
644
1338
|
/**
|
|
645
|
-
|
|
646
|
-
|
|
1339
|
+
* 显示右上角胶囊按钮
|
|
1340
|
+
* @public
|
|
1341
|
+
* @since MiniKit 2.5.0
|
|
1342
|
+
* @platform iOS Android
|
|
1343
|
+
*/
|
|
647
1344
|
export function showMenuButton(params?: {
|
|
648
|
-
|
|
1345
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1346
|
+
complete?: () => void
|
|
1347
|
+
/** 接口调用成功的回调函数 */
|
|
1348
|
+
success?: () => void
|
|
1349
|
+
/** 接口调用失败的回调函数 */
|
|
649
1350
|
fail?: (params: {
|
|
1351
|
+
/** 错误信息 */
|
|
650
1352
|
errorMsg: string
|
|
1353
|
+
/** 错误码 */
|
|
651
1354
|
errorCode: string | number
|
|
1355
|
+
/** 错误扩展 */
|
|
652
1356
|
innerError: {
|
|
1357
|
+
/** 错误扩展码 */
|
|
653
1358
|
errorCode: string | number
|
|
1359
|
+
/** 错误扩展信息 */
|
|
654
1360
|
errorMsg: string
|
|
655
1361
|
}
|
|
656
1362
|
}) => void
|
|
657
|
-
complete?: () => void
|
|
658
1363
|
}): void
|
|
659
1364
|
|
|
660
1365
|
/**
|
|
661
|
-
|
|
662
|
-
|
|
1366
|
+
* 显示手机状态栏
|
|
1367
|
+
* @public
|
|
1368
|
+
* @since MiniKit 2.6.0
|
|
1369
|
+
* @platform iOS Android
|
|
1370
|
+
*/
|
|
663
1371
|
export function showStatusBar(params?: {
|
|
664
|
-
|
|
1372
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1373
|
+
complete?: () => void
|
|
1374
|
+
/** 接口调用成功的回调函数 */
|
|
1375
|
+
success?: () => void
|
|
1376
|
+
/** 接口调用失败的回调函数 */
|
|
665
1377
|
fail?: (params: {
|
|
1378
|
+
/** 错误信息 */
|
|
666
1379
|
errorMsg: string
|
|
1380
|
+
/** 错误码 */
|
|
667
1381
|
errorCode: string | number
|
|
1382
|
+
/** 错误扩展 */
|
|
668
1383
|
innerError: {
|
|
1384
|
+
/** 错误扩展码 */
|
|
669
1385
|
errorCode: string | number
|
|
1386
|
+
/** 错误扩展信息 */
|
|
670
1387
|
errorMsg: string
|
|
671
1388
|
}
|
|
672
1389
|
}) => void
|
|
673
|
-
complete?: () => void
|
|
674
1390
|
}): void
|
|
675
1391
|
|
|
676
1392
|
/**
|
|
677
|
-
|
|
678
|
-
|
|
1393
|
+
* 隐藏手机状态栏
|
|
1394
|
+
* @public
|
|
1395
|
+
* @since MiniKit 2.6.0
|
|
1396
|
+
* @platform iOS Android
|
|
1397
|
+
*/
|
|
679
1398
|
export function hideStatusBar(params?: {
|
|
680
|
-
|
|
1399
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1400
|
+
complete?: () => void
|
|
1401
|
+
/** 接口调用成功的回调函数 */
|
|
1402
|
+
success?: () => void
|
|
1403
|
+
/** 接口调用失败的回调函数 */
|
|
681
1404
|
fail?: (params: {
|
|
1405
|
+
/** 错误信息 */
|
|
682
1406
|
errorMsg: string
|
|
1407
|
+
/** 错误码 */
|
|
683
1408
|
errorCode: string | number
|
|
1409
|
+
/** 错误扩展 */
|
|
684
1410
|
innerError: {
|
|
1411
|
+
/** 错误扩展码 */
|
|
685
1412
|
errorCode: string | number
|
|
1413
|
+
/** 错误扩展信息 */
|
|
686
1414
|
errorMsg: string
|
|
687
1415
|
}
|
|
688
1416
|
}) => void
|
|
689
|
-
complete?: () => void
|
|
690
1417
|
}): void
|
|
691
1418
|
|
|
692
1419
|
/**
|
|
693
|
-
|
|
694
|
-
|
|
1420
|
+
* 关闭小部件
|
|
1421
|
+
* @public
|
|
1422
|
+
* @since MiniKit 2.6.1
|
|
1423
|
+
* @platform iOS Android
|
|
1424
|
+
*/
|
|
695
1425
|
export function exitMiniWidget(params?: {
|
|
696
|
-
|
|
1426
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1427
|
+
complete?: () => void
|
|
1428
|
+
/** 接口调用成功的回调函数 */
|
|
1429
|
+
success?: () => void
|
|
1430
|
+
/** 接口调用失败的回调函数 */
|
|
697
1431
|
fail?: (params: {
|
|
1432
|
+
/** 错误信息 */
|
|
698
1433
|
errorMsg: string
|
|
1434
|
+
/** 错误码 */
|
|
699
1435
|
errorCode: string | number
|
|
1436
|
+
/** 错误扩展 */
|
|
700
1437
|
innerError: {
|
|
1438
|
+
/** 错误扩展码 */
|
|
701
1439
|
errorCode: string | number
|
|
1440
|
+
/** 错误扩展信息 */
|
|
702
1441
|
errorMsg: string
|
|
703
1442
|
}
|
|
704
1443
|
}) => void
|
|
705
|
-
complete?: () => void
|
|
706
1444
|
}): void
|
|
707
1445
|
|
|
708
1446
|
/**
|
|
709
|
-
|
|
710
|
-
|
|
1447
|
+
* 判断设备上是否有已经安装相应应用或可以处理URL的程序,返回结果是一个对象,只有一个参数,格式为Boolean值。
|
|
1448
|
+
* @public
|
|
1449
|
+
* @since MiniKit 3.0.0
|
|
1450
|
+
* @platform iOS Android
|
|
1451
|
+
*/
|
|
711
1452
|
export function canOpenURL(params: {
|
|
712
|
-
/**
|
|
1453
|
+
/**
|
|
1454
|
+
* 要打开的url
|
|
1455
|
+
* @since MiniKit 3.0.0
|
|
1456
|
+
*/
|
|
713
1457
|
url: string
|
|
1458
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1459
|
+
complete?: () => void
|
|
1460
|
+
/** 接口调用成功的回调函数 */
|
|
714
1461
|
success?: (params: {
|
|
715
|
-
/**
|
|
1462
|
+
/**
|
|
1463
|
+
* 是否支持打开对应的url
|
|
1464
|
+
* @since MiniKit 3.2.0
|
|
1465
|
+
* @defaultValue false
|
|
1466
|
+
*/
|
|
716
1467
|
isCanOpen?: boolean
|
|
717
1468
|
}) => void
|
|
1469
|
+
/** 接口调用失败的回调函数 */
|
|
718
1470
|
fail?: (params: {
|
|
1471
|
+
/** 错误信息 */
|
|
719
1472
|
errorMsg: string
|
|
1473
|
+
/** 错误码 */
|
|
720
1474
|
errorCode: string | number
|
|
1475
|
+
/** 错误扩展 */
|
|
721
1476
|
innerError: {
|
|
1477
|
+
/** 错误扩展码 */
|
|
722
1478
|
errorCode: string | number
|
|
1479
|
+
/** 错误扩展信息 */
|
|
723
1480
|
errorMsg: string
|
|
724
1481
|
}
|
|
725
1482
|
}) => void
|
|
726
|
-
complete?: () => void
|
|
727
1483
|
}): void
|
|
728
1484
|
|
|
729
1485
|
/**
|
|
730
|
-
|
|
731
|
-
|
|
1486
|
+
* 判断设备上是否有已经安装相应应用或可以处理URL的程序,返回结果是一个对象,只有一个参数,格式为Boolean值。
|
|
1487
|
+
* @public
|
|
1488
|
+
* @since MiniKit 3.0.0
|
|
1489
|
+
* @platform iOS Android
|
|
1490
|
+
*/
|
|
732
1491
|
export function canOpenURLSync(openURLBean?: OpenURLBean): {
|
|
733
|
-
/**
|
|
1492
|
+
/**
|
|
1493
|
+
* 是否支持打开对应的url
|
|
1494
|
+
* @since MiniKit 3.0.0
|
|
1495
|
+
* @defaultValue false
|
|
1496
|
+
*/
|
|
734
1497
|
isCanOpen?: boolean
|
|
735
1498
|
}
|
|
736
1499
|
|
|
737
1500
|
/**
|
|
738
|
-
|
|
739
|
-
|
|
1501
|
+
* 打开设备上的某个应用或可以处理URL的程序。
|
|
1502
|
+
* @public
|
|
1503
|
+
* @since MiniKit 3.0.0
|
|
1504
|
+
* @platform iOS Android
|
|
1505
|
+
*/
|
|
740
1506
|
export function openURL(params: {
|
|
741
|
-
/**
|
|
1507
|
+
/**
|
|
1508
|
+
* 要打开的url
|
|
1509
|
+
* @since MiniKit 3.0.0
|
|
1510
|
+
*/
|
|
742
1511
|
url: string
|
|
743
|
-
|
|
1512
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1513
|
+
complete?: () => void
|
|
1514
|
+
/** 接口调用成功的回调函数 */
|
|
1515
|
+
success?: () => void
|
|
1516
|
+
/** 接口调用失败的回调函数 */
|
|
744
1517
|
fail?: (params: {
|
|
1518
|
+
/** 错误信息 */
|
|
745
1519
|
errorMsg: string
|
|
1520
|
+
/** 错误码 */
|
|
746
1521
|
errorCode: string | number
|
|
1522
|
+
/** 错误扩展 */
|
|
747
1523
|
innerError: {
|
|
1524
|
+
/** 错误扩展码 */
|
|
748
1525
|
errorCode: string | number
|
|
1526
|
+
/** 错误扩展信息 */
|
|
749
1527
|
errorMsg: string
|
|
750
1528
|
}
|
|
751
1529
|
}) => void
|
|
752
|
-
complete?: () => void
|
|
753
1530
|
}): void
|
|
754
1531
|
|
|
755
1532
|
/**
|
|
756
|
-
|
|
757
|
-
|
|
1533
|
+
* 获取小程序账号信息
|
|
1534
|
+
* @public
|
|
1535
|
+
* @since MiniKit 3.1.0
|
|
1536
|
+
* @platform iOS Android
|
|
1537
|
+
*/
|
|
758
1538
|
export function getAccountInfo(params?: {
|
|
1539
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1540
|
+
complete?: () => void
|
|
1541
|
+
/** 接口调用成功的回调函数 */
|
|
759
1542
|
success?: (params: {
|
|
760
|
-
/**
|
|
1543
|
+
/**
|
|
1544
|
+
* 小程序账号信息
|
|
1545
|
+
* @since MiniKit 3.2.0
|
|
1546
|
+
*/
|
|
761
1547
|
miniProgram: MiniProgramAccountInfo
|
|
762
1548
|
}) => void
|
|
1549
|
+
/** 接口调用失败的回调函数 */
|
|
763
1550
|
fail?: (params: {
|
|
1551
|
+
/** 错误信息 */
|
|
764
1552
|
errorMsg: string
|
|
1553
|
+
/** 错误码 */
|
|
765
1554
|
errorCode: string | number
|
|
1555
|
+
/** 错误扩展 */
|
|
766
1556
|
innerError: {
|
|
1557
|
+
/** 错误扩展码 */
|
|
767
1558
|
errorCode: string | number
|
|
1559
|
+
/** 错误扩展信息 */
|
|
768
1560
|
errorMsg: string
|
|
769
1561
|
}
|
|
770
1562
|
}) => void
|
|
771
|
-
complete?: () => void
|
|
772
1563
|
}): void
|
|
773
1564
|
|
|
774
1565
|
/**
|
|
775
|
-
|
|
776
|
-
|
|
1566
|
+
* 获取小程序账号信息
|
|
1567
|
+
* @public
|
|
1568
|
+
* @since MiniKit 3.1.0
|
|
1569
|
+
* @platform iOS Android
|
|
1570
|
+
*/
|
|
777
1571
|
export function getAccountInfoSync(): {
|
|
778
|
-
/**
|
|
1572
|
+
/**
|
|
1573
|
+
* 小程序账号信息
|
|
1574
|
+
* @since MiniKit 3.1.0
|
|
1575
|
+
*/
|
|
779
1576
|
miniProgram: MiniProgramAccountInfo
|
|
780
1577
|
}
|
|
781
1578
|
|
|
782
1579
|
/**
|
|
783
|
-
|
|
784
|
-
|
|
1580
|
+
* 获取小程序自定义配置
|
|
1581
|
+
* @public
|
|
1582
|
+
* @since MiniKit 3.11.5
|
|
1583
|
+
* @platform iOS Android
|
|
1584
|
+
*/
|
|
785
1585
|
export function getMiniAppConfig(params?: {
|
|
1586
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1587
|
+
complete?: () => void
|
|
1588
|
+
/** 接口调用成功的回调函数 */
|
|
786
1589
|
success?: (params: {
|
|
787
|
-
/**
|
|
788
|
-
|
|
1590
|
+
/**
|
|
1591
|
+
* 小程序自定义配置
|
|
1592
|
+
* @since MiniKit 3.11.5
|
|
1593
|
+
*/
|
|
1594
|
+
config: Record<string, any>
|
|
789
1595
|
}) => void
|
|
1596
|
+
/** 接口调用失败的回调函数 */
|
|
790
1597
|
fail?: (params: {
|
|
1598
|
+
/** 错误信息 */
|
|
791
1599
|
errorMsg: string
|
|
1600
|
+
/** 错误码 */
|
|
792
1601
|
errorCode: string | number
|
|
1602
|
+
/** 错误扩展 */
|
|
793
1603
|
innerError: {
|
|
1604
|
+
/** 错误扩展码 */
|
|
794
1605
|
errorCode: string | number
|
|
1606
|
+
/** 错误扩展信息 */
|
|
795
1607
|
errorMsg: string
|
|
796
1608
|
}
|
|
797
1609
|
}) => void
|
|
798
|
-
complete?: () => void
|
|
799
1610
|
}): void
|
|
800
1611
|
|
|
801
1612
|
/**
|
|
802
|
-
|
|
803
|
-
|
|
1613
|
+
* 获取小程序自定义配置
|
|
1614
|
+
* @public
|
|
1615
|
+
* @since MiniKit 3.11.5
|
|
1616
|
+
* @platform iOS Android
|
|
1617
|
+
*/
|
|
804
1618
|
export function getMiniAppConfigSync(): {
|
|
805
|
-
/**
|
|
806
|
-
|
|
1619
|
+
/**
|
|
1620
|
+
* 小程序自定义配置
|
|
1621
|
+
* @since MiniKit 3.11.5
|
|
1622
|
+
*/
|
|
1623
|
+
config: Record<string, any>
|
|
807
1624
|
}
|
|
808
1625
|
|
|
809
1626
|
/**
|
|
810
|
-
|
|
811
|
-
|
|
1627
|
+
* 唤起小程序看板页
|
|
1628
|
+
* @public
|
|
1629
|
+
* @since MiniKit 3.3.0
|
|
1630
|
+
* @platform iOS Android
|
|
1631
|
+
*/
|
|
812
1632
|
export function showBoard(params?: {
|
|
813
|
-
|
|
1633
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1634
|
+
complete?: () => void
|
|
1635
|
+
/** 接口调用成功的回调函数 */
|
|
1636
|
+
success?: () => void
|
|
1637
|
+
/** 接口调用失败的回调函数 */
|
|
814
1638
|
fail?: (params: {
|
|
1639
|
+
/** 错误信息 */
|
|
815
1640
|
errorMsg: string
|
|
1641
|
+
/** 错误码 */
|
|
816
1642
|
errorCode: string | number
|
|
1643
|
+
/** 错误扩展 */
|
|
817
1644
|
innerError: {
|
|
1645
|
+
/** 错误扩展码 */
|
|
818
1646
|
errorCode: string | number
|
|
1647
|
+
/** 错误扩展信息 */
|
|
819
1648
|
errorMsg: string
|
|
820
1649
|
}
|
|
821
1650
|
}) => void
|
|
822
|
-
complete?: () => void
|
|
823
1651
|
}): void
|
|
824
1652
|
|
|
825
1653
|
/**
|
|
826
|
-
|
|
827
|
-
|
|
1654
|
+
* 重置小程序看板页自定义栏item
|
|
1655
|
+
* @public
|
|
1656
|
+
* @since MiniKit 3.4.0
|
|
1657
|
+
* @platform iOS Android
|
|
1658
|
+
*/
|
|
828
1659
|
export function resetBoardMenus(params: {
|
|
829
|
-
/**
|
|
1660
|
+
/**
|
|
1661
|
+
* 生效页面, 默认当前页面
|
|
1662
|
+
* @since MiniKit 3.4.0
|
|
1663
|
+
* @defaultValue EffectPage.current
|
|
1664
|
+
*/
|
|
830
1665
|
effectPage?: EffectPage
|
|
831
|
-
/**
|
|
1666
|
+
/**
|
|
1667
|
+
* item列表
|
|
1668
|
+
* @since MiniKit 3.4.0
|
|
1669
|
+
*/
|
|
832
1670
|
menus: BoardItemBean[]
|
|
833
|
-
|
|
1671
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1672
|
+
complete?: () => void
|
|
1673
|
+
/** 接口调用成功的回调函数 */
|
|
1674
|
+
success?: () => void
|
|
1675
|
+
/** 接口调用失败的回调函数 */
|
|
834
1676
|
fail?: (params: {
|
|
1677
|
+
/** 错误信息 */
|
|
835
1678
|
errorMsg: string
|
|
1679
|
+
/** 错误码 */
|
|
836
1680
|
errorCode: string | number
|
|
1681
|
+
/** 错误扩展 */
|
|
837
1682
|
innerError: {
|
|
1683
|
+
/** 错误扩展码 */
|
|
838
1684
|
errorCode: string | number
|
|
1685
|
+
/** 错误扩展信息 */
|
|
839
1686
|
errorMsg: string
|
|
840
1687
|
}
|
|
841
1688
|
}) => void
|
|
842
|
-
complete?: () => void
|
|
843
1689
|
}): void
|
|
844
1690
|
|
|
845
1691
|
/**
|
|
846
|
-
|
|
847
|
-
|
|
1692
|
+
* 重置小程序看板页默认栏item
|
|
1693
|
+
* @public
|
|
1694
|
+
* @since MiniKit 3.4.0
|
|
1695
|
+
* @platform iOS Android
|
|
1696
|
+
*/
|
|
848
1697
|
export function resetSystemMenus(params: {
|
|
849
|
-
/**
|
|
1698
|
+
/**
|
|
1699
|
+
* 生效页面, 默认当前页面
|
|
1700
|
+
* @since MiniKit 3.4.0
|
|
1701
|
+
* @defaultValue EffectPage.current
|
|
1702
|
+
*/
|
|
850
1703
|
effectPage?: EffectPage
|
|
851
|
-
/**
|
|
1704
|
+
/**
|
|
1705
|
+
* item列表
|
|
1706
|
+
* @since MiniKit 3.4.0
|
|
1707
|
+
*/
|
|
852
1708
|
menus: BoardItemBean[]
|
|
853
|
-
|
|
1709
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1710
|
+
complete?: () => void
|
|
1711
|
+
/** 接口调用成功的回调函数 */
|
|
1712
|
+
success?: () => void
|
|
1713
|
+
/** 接口调用失败的回调函数 */
|
|
854
1714
|
fail?: (params: {
|
|
1715
|
+
/** 错误信息 */
|
|
855
1716
|
errorMsg: string
|
|
1717
|
+
/** 错误码 */
|
|
856
1718
|
errorCode: string | number
|
|
1719
|
+
/** 错误扩展 */
|
|
857
1720
|
innerError: {
|
|
1721
|
+
/** 错误扩展码 */
|
|
858
1722
|
errorCode: string | number
|
|
1723
|
+
/** 错误扩展信息 */
|
|
859
1724
|
errorMsg: string
|
|
860
1725
|
}
|
|
861
1726
|
}) => void
|
|
862
|
-
complete?: () => void
|
|
863
1727
|
}): void
|
|
864
1728
|
|
|
865
1729
|
/**
|
|
866
|
-
|
|
867
|
-
|
|
1730
|
+
* 针对具体的看板itemKey显示红点
|
|
1731
|
+
* @public
|
|
1732
|
+
* @since MiniKit 3.6.1
|
|
1733
|
+
* @platform iOS Android
|
|
1734
|
+
*/
|
|
868
1735
|
export function showRedBot(params: {
|
|
869
|
-
/**
|
|
1736
|
+
/**
|
|
1737
|
+
* 生效页面, 默认当前页面
|
|
1738
|
+
* @since MiniKit 3.6.1
|
|
1739
|
+
* @defaultValue EffectPage.current
|
|
1740
|
+
*/
|
|
870
1741
|
effectPage?: EffectPage
|
|
871
|
-
/**
|
|
1742
|
+
/**
|
|
1743
|
+
* 看板item名称
|
|
1744
|
+
* @since MiniKit 3.6.1
|
|
1745
|
+
*/
|
|
872
1746
|
key: string
|
|
873
|
-
|
|
1747
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1748
|
+
complete?: () => void
|
|
1749
|
+
/** 接口调用成功的回调函数 */
|
|
1750
|
+
success?: () => void
|
|
1751
|
+
/** 接口调用失败的回调函数 */
|
|
874
1752
|
fail?: (params: {
|
|
1753
|
+
/** 错误信息 */
|
|
875
1754
|
errorMsg: string
|
|
1755
|
+
/** 错误码 */
|
|
876
1756
|
errorCode: string | number
|
|
1757
|
+
/** 错误扩展 */
|
|
877
1758
|
innerError: {
|
|
1759
|
+
/** 错误扩展码 */
|
|
878
1760
|
errorCode: string | number
|
|
1761
|
+
/** 错误扩展信息 */
|
|
879
1762
|
errorMsg: string
|
|
880
1763
|
}
|
|
881
1764
|
}) => void
|
|
882
|
-
complete?: () => void
|
|
883
1765
|
}): void
|
|
884
1766
|
|
|
885
1767
|
/**
|
|
886
|
-
|
|
887
|
-
|
|
1768
|
+
* 针对具体的看板itemKey隐藏红点
|
|
1769
|
+
* @public
|
|
1770
|
+
* @since MiniKit 3.6.1
|
|
1771
|
+
* @platform iOS Android
|
|
1772
|
+
*/
|
|
888
1773
|
export function hiddenRedBot(params: {
|
|
889
|
-
/**
|
|
1774
|
+
/**
|
|
1775
|
+
* 生效页面, 默认当前页面
|
|
1776
|
+
* @since MiniKit 3.6.1
|
|
1777
|
+
* @defaultValue EffectPage.current
|
|
1778
|
+
*/
|
|
890
1779
|
effectPage?: EffectPage
|
|
891
|
-
/**
|
|
1780
|
+
/**
|
|
1781
|
+
* 看板item名称
|
|
1782
|
+
* @since MiniKit 3.6.1
|
|
1783
|
+
*/
|
|
892
1784
|
key: string
|
|
893
|
-
|
|
1785
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1786
|
+
complete?: () => void
|
|
1787
|
+
/** 接口调用成功的回调函数 */
|
|
1788
|
+
success?: () => void
|
|
1789
|
+
/** 接口调用失败的回调函数 */
|
|
894
1790
|
fail?: (params: {
|
|
1791
|
+
/** 错误信息 */
|
|
895
1792
|
errorMsg: string
|
|
1793
|
+
/** 错误码 */
|
|
896
1794
|
errorCode: string | number
|
|
1795
|
+
/** 错误扩展 */
|
|
897
1796
|
innerError: {
|
|
1797
|
+
/** 错误扩展码 */
|
|
898
1798
|
errorCode: string | number
|
|
1799
|
+
/** 错误扩展信息 */
|
|
899
1800
|
errorMsg: string
|
|
900
1801
|
}
|
|
901
1802
|
}) => void
|
|
902
|
-
complete?: () => void
|
|
903
1803
|
}): void
|
|
904
1804
|
|
|
905
1805
|
/**
|
|
906
|
-
|
|
907
|
-
|
|
1806
|
+
* 关闭小程序页面加载框, 如果页面配置中配置了manualHideLoading:true,需要手动调用此接口关闭加载框
|
|
1807
|
+
* @public
|
|
1808
|
+
* @since MiniKit 3.12.1
|
|
1809
|
+
* @platform iOS Android
|
|
1810
|
+
*/
|
|
908
1811
|
export function hideRenderLoading(params?: {
|
|
909
|
-
|
|
1812
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1813
|
+
complete?: () => void
|
|
1814
|
+
/** 接口调用成功的回调函数 */
|
|
1815
|
+
success?: () => void
|
|
1816
|
+
/** 接口调用失败的回调函数 */
|
|
910
1817
|
fail?: (params: {
|
|
1818
|
+
/** 错误信息 */
|
|
911
1819
|
errorMsg: string
|
|
1820
|
+
/** 错误码 */
|
|
912
1821
|
errorCode: string | number
|
|
1822
|
+
/** 错误扩展 */
|
|
913
1823
|
innerError: {
|
|
1824
|
+
/** 错误扩展码 */
|
|
914
1825
|
errorCode: string | number
|
|
1826
|
+
/** 错误扩展信息 */
|
|
915
1827
|
errorMsg: string
|
|
916
1828
|
}
|
|
917
1829
|
}) => void
|
|
918
|
-
complete?: () => void
|
|
919
1830
|
}): void
|
|
920
1831
|
|
|
921
1832
|
/**
|
|
922
|
-
|
|
923
|
-
|
|
1833
|
+
* 设置小程序页面背景图片,调用后小程序导航栏背景色将变为透明
|
|
1834
|
+
* @public
|
|
1835
|
+
* @since MiniKit 3.12.1
|
|
1836
|
+
* @platform iOS Android
|
|
1837
|
+
*/
|
|
924
1838
|
export function setBackgroundImage(params: {
|
|
925
|
-
/**
|
|
1839
|
+
/**
|
|
1840
|
+
* 图片地址,支持网络图片和本地图片
|
|
1841
|
+
* @since MiniKit 3.12.1
|
|
1842
|
+
*/
|
|
926
1843
|
imageUrl: string
|
|
927
|
-
|
|
1844
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1845
|
+
complete?: () => void
|
|
1846
|
+
/** 接口调用成功的回调函数 */
|
|
1847
|
+
success?: () => void
|
|
1848
|
+
/** 接口调用失败的回调函数 */
|
|
928
1849
|
fail?: (params: {
|
|
1850
|
+
/** 错误信息 */
|
|
929
1851
|
errorMsg: string
|
|
1852
|
+
/** 错误码 */
|
|
930
1853
|
errorCode: string | number
|
|
1854
|
+
/** 错误扩展 */
|
|
931
1855
|
innerError: {
|
|
1856
|
+
/** 错误扩展码 */
|
|
932
1857
|
errorCode: string | number
|
|
1858
|
+
/** 错误扩展信息 */
|
|
933
1859
|
errorMsg: string
|
|
934
1860
|
}
|
|
935
1861
|
}) => void
|
|
936
|
-
complete?: () => void
|
|
937
1862
|
}): void
|
|
938
1863
|
|
|
939
1864
|
/**
|
|
940
|
-
|
|
941
|
-
|
|
1865
|
+
* 设置小程序页面背景颜色
|
|
1866
|
+
* @public
|
|
1867
|
+
* @since MiniKit 3.14.0
|
|
1868
|
+
* @platform iOS Android
|
|
1869
|
+
*/
|
|
942
1870
|
export function setBackgroundColor(params: {
|
|
943
|
-
/**
|
|
1871
|
+
/**
|
|
1872
|
+
* 当前页面背景颜色
|
|
1873
|
+
* @since MiniKit 3.14.0
|
|
1874
|
+
*/
|
|
944
1875
|
color: string
|
|
945
|
-
|
|
1876
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1877
|
+
complete?: () => void
|
|
1878
|
+
/** 接口调用成功的回调函数 */
|
|
1879
|
+
success?: () => void
|
|
1880
|
+
/** 接口调用失败的回调函数 */
|
|
946
1881
|
fail?: (params: {
|
|
1882
|
+
/** 错误信息 */
|
|
947
1883
|
errorMsg: string
|
|
1884
|
+
/** 错误码 */
|
|
948
1885
|
errorCode: string | number
|
|
1886
|
+
/** 错误扩展 */
|
|
949
1887
|
innerError: {
|
|
1888
|
+
/** 错误扩展码 */
|
|
950
1889
|
errorCode: string | number
|
|
1890
|
+
/** 错误扩展信息 */
|
|
951
1891
|
errorMsg: string
|
|
952
1892
|
}
|
|
953
1893
|
}) => void
|
|
1894
|
+
}): void
|
|
1895
|
+
|
|
1896
|
+
/**
|
|
1897
|
+
* 重新载入小程序
|
|
1898
|
+
* @public
|
|
1899
|
+
* @since MiniKit 3.22.1
|
|
1900
|
+
* @platform iOS Android
|
|
1901
|
+
*/
|
|
1902
|
+
export function reloadMiniProgram(params?: {
|
|
1903
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
954
1904
|
complete?: () => void
|
|
1905
|
+
/** 接口调用成功的回调函数 */
|
|
1906
|
+
success?: () => void
|
|
1907
|
+
/** 接口调用失败的回调函数 */
|
|
1908
|
+
fail?: (params: {
|
|
1909
|
+
/** 错误信息 */
|
|
1910
|
+
errorMsg: string
|
|
1911
|
+
/** 错误码 */
|
|
1912
|
+
errorCode: string | number
|
|
1913
|
+
/** 错误扩展 */
|
|
1914
|
+
innerError: {
|
|
1915
|
+
/** 错误扩展码 */
|
|
1916
|
+
errorCode: string | number
|
|
1917
|
+
/** 错误扩展信息 */
|
|
1918
|
+
errorMsg: string
|
|
1919
|
+
}
|
|
1920
|
+
}) => void
|
|
955
1921
|
}): void
|
|
956
1922
|
|
|
957
1923
|
/**
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
1924
|
+
* 给native发送通知
|
|
1925
|
+
* @public
|
|
1926
|
+
* @since MiniKit 3.20.0
|
|
1927
|
+
* @platform iOS Android
|
|
1928
|
+
*/
|
|
1929
|
+
export function sendNotificationToNative(params: {
|
|
1930
|
+
/**
|
|
1931
|
+
* eventId: 事件id
|
|
1932
|
+
* @since MiniKit 3.20.0
|
|
1933
|
+
*/
|
|
1934
|
+
eventId: string
|
|
1935
|
+
/**
|
|
1936
|
+
* name: 通知名称
|
|
1937
|
+
* @since MiniKit 3.20.0
|
|
1938
|
+
*/
|
|
1939
|
+
name: string
|
|
1940
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1941
|
+
complete?: () => void
|
|
1942
|
+
/** 接口调用成功的回调函数 */
|
|
1943
|
+
success?: () => void
|
|
1944
|
+
/** 接口调用失败的回调函数 */
|
|
961
1945
|
fail?: (params: {
|
|
1946
|
+
/** 错误信息 */
|
|
962
1947
|
errorMsg: string
|
|
1948
|
+
/** 错误码 */
|
|
963
1949
|
errorCode: string | number
|
|
1950
|
+
/** 错误扩展 */
|
|
964
1951
|
innerError: {
|
|
1952
|
+
/** 错误扩展码 */
|
|
965
1953
|
errorCode: string | number
|
|
1954
|
+
/** 错误扩展信息 */
|
|
966
1955
|
errorMsg: string
|
|
967
1956
|
}
|
|
968
1957
|
}) => void
|
|
1958
|
+
}): void
|
|
1959
|
+
|
|
1960
|
+
/**
|
|
1961
|
+
* 在当前页面显示导航条加载动画
|
|
1962
|
+
* @public
|
|
1963
|
+
* @since MiniKit 1.0.0
|
|
1964
|
+
* @platform iOS Android
|
|
1965
|
+
*/
|
|
1966
|
+
export function showNavigationBarLoading(params?: {
|
|
1967
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
969
1968
|
complete?: () => void
|
|
1969
|
+
/** 接口调用成功的回调函数 */
|
|
1970
|
+
success?: () => void
|
|
1971
|
+
/** 接口调用失败的回调函数 */
|
|
1972
|
+
fail?: (params: {
|
|
1973
|
+
/** 错误信息 */
|
|
1974
|
+
errorMsg: string
|
|
1975
|
+
/** 错误码 */
|
|
1976
|
+
errorCode: string | number
|
|
1977
|
+
/** 错误扩展 */
|
|
1978
|
+
innerError: {
|
|
1979
|
+
/** 错误扩展码 */
|
|
1980
|
+
errorCode: string | number
|
|
1981
|
+
/** 错误扩展信息 */
|
|
1982
|
+
errorMsg: string
|
|
1983
|
+
}
|
|
1984
|
+
}) => void
|
|
970
1985
|
}): void
|
|
971
1986
|
|
|
972
1987
|
/**
|
|
973
|
-
|
|
1988
|
+
* 动态设置当前页面的标题
|
|
1989
|
+
* @public
|
|
1990
|
+
* @since MiniKit 1.0.0
|
|
1991
|
+
* @platform iOS Android
|
|
1992
|
+
*/
|
|
974
1993
|
export function setNavigationBarTitle(params: {
|
|
975
|
-
/**
|
|
1994
|
+
/**
|
|
1995
|
+
* 页面标题
|
|
1996
|
+
* @since MiniKit 1.0.0
|
|
1997
|
+
*/
|
|
976
1998
|
title: string
|
|
977
|
-
|
|
1999
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
2000
|
+
complete?: () => void
|
|
2001
|
+
/** 接口调用成功的回调函数 */
|
|
2002
|
+
success?: () => void
|
|
2003
|
+
/** 接口调用失败的回调函数 */
|
|
978
2004
|
fail?: (params: {
|
|
2005
|
+
/** 错误信息 */
|
|
979
2006
|
errorMsg: string
|
|
2007
|
+
/** 错误码 */
|
|
980
2008
|
errorCode: string | number
|
|
2009
|
+
/** 错误扩展 */
|
|
981
2010
|
innerError: {
|
|
2011
|
+
/** 错误扩展码 */
|
|
982
2012
|
errorCode: string | number
|
|
2013
|
+
/** 错误扩展信息 */
|
|
983
2014
|
errorMsg: string
|
|
984
2015
|
}
|
|
985
2016
|
}) => void
|
|
986
|
-
complete?: () => void
|
|
987
2017
|
}): void
|
|
988
2018
|
|
|
989
2019
|
/**
|
|
990
|
-
|
|
2020
|
+
* 设置页面导航条颜色
|
|
2021
|
+
* @public
|
|
2022
|
+
* @since MiniKit 1.0.0
|
|
2023
|
+
* @platform iOS Android
|
|
2024
|
+
*/
|
|
991
2025
|
export function setNavigationBarColor(params: {
|
|
992
|
-
/**
|
|
2026
|
+
/**
|
|
2027
|
+
* 前景颜色值,包括按钮、标题、状态栏的颜色,仅支持 #ffffff 和 #000000
|
|
2028
|
+
* @since MiniKit 1.0.0
|
|
2029
|
+
*/
|
|
993
2030
|
frontColor: string
|
|
994
|
-
/**
|
|
2031
|
+
/**
|
|
2032
|
+
* 背景颜色值,有效值为十六进制颜色
|
|
2033
|
+
* @since MiniKit 1.0.0
|
|
2034
|
+
*/
|
|
995
2035
|
backgroundColor: string
|
|
996
|
-
/**
|
|
2036
|
+
/**
|
|
2037
|
+
* 动画效果
|
|
2038
|
+
* @since MiniKit 1.0.0
|
|
2039
|
+
*/
|
|
997
2040
|
animation: NavigationBarColorAnimationInfo
|
|
998
|
-
|
|
2041
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
2042
|
+
complete?: () => void
|
|
2043
|
+
/** 接口调用成功的回调函数 */
|
|
2044
|
+
success?: () => void
|
|
2045
|
+
/** 接口调用失败的回调函数 */
|
|
999
2046
|
fail?: (params: {
|
|
2047
|
+
/** 错误信息 */
|
|
1000
2048
|
errorMsg: string
|
|
2049
|
+
/** 错误码 */
|
|
1001
2050
|
errorCode: string | number
|
|
2051
|
+
/** 错误扩展 */
|
|
1002
2052
|
innerError: {
|
|
2053
|
+
/** 错误扩展码 */
|
|
1003
2054
|
errorCode: string | number
|
|
2055
|
+
/** 错误扩展信息 */
|
|
1004
2056
|
errorMsg: string
|
|
1005
2057
|
}
|
|
1006
2058
|
}) => void
|
|
1007
|
-
complete?: () => void
|
|
1008
2059
|
}): void
|
|
1009
2060
|
|
|
1010
2061
|
/**
|
|
1011
|
-
|
|
2062
|
+
* 在当前页面隐藏导航条加载动画
|
|
2063
|
+
* @public
|
|
2064
|
+
* @since MiniKit 1.0.0
|
|
2065
|
+
* @platform iOS Android
|
|
2066
|
+
*/
|
|
1012
2067
|
export function hideNavigationBarLoading(params?: {
|
|
1013
|
-
|
|
2068
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
2069
|
+
complete?: () => void
|
|
2070
|
+
/** 接口调用成功的回调函数 */
|
|
2071
|
+
success?: () => void
|
|
2072
|
+
/** 接口调用失败的回调函数 */
|
|
1014
2073
|
fail?: (params: {
|
|
2074
|
+
/** 错误信息 */
|
|
1015
2075
|
errorMsg: string
|
|
2076
|
+
/** 错误码 */
|
|
1016
2077
|
errorCode: string | number
|
|
2078
|
+
/** 错误扩展 */
|
|
1017
2079
|
innerError: {
|
|
2080
|
+
/** 错误扩展码 */
|
|
1018
2081
|
errorCode: string | number
|
|
2082
|
+
/** 错误扩展信息 */
|
|
1019
2083
|
errorMsg: string
|
|
1020
2084
|
}
|
|
1021
2085
|
}) => void
|
|
1022
|
-
complete?: () => void
|
|
1023
2086
|
}): void
|
|
1024
2087
|
|
|
1025
2088
|
/**
|
|
1026
|
-
|
|
2089
|
+
* 隐藏返回首页按钮
|
|
2090
|
+
* @public
|
|
2091
|
+
* @since MiniKit 1.0.0
|
|
2092
|
+
* @platform iOS Android
|
|
2093
|
+
*/
|
|
1027
2094
|
export function hideHomeButton(params?: {
|
|
1028
|
-
|
|
2095
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
2096
|
+
complete?: () => void
|
|
2097
|
+
/** 接口调用成功的回调函数 */
|
|
2098
|
+
success?: () => void
|
|
2099
|
+
/** 接口调用失败的回调函数 */
|
|
1029
2100
|
fail?: (params: {
|
|
2101
|
+
/** 错误信息 */
|
|
1030
2102
|
errorMsg: string
|
|
2103
|
+
/** 错误码 */
|
|
1031
2104
|
errorCode: string | number
|
|
2105
|
+
/** 错误扩展 */
|
|
1032
2106
|
innerError: {
|
|
2107
|
+
/** 错误扩展码 */
|
|
1033
2108
|
errorCode: string | number
|
|
2109
|
+
/** 错误扩展信息 */
|
|
1034
2110
|
errorMsg: string
|
|
1035
2111
|
}
|
|
1036
2112
|
}) => void
|
|
1037
|
-
complete?: () => void
|
|
1038
2113
|
}): void
|
|
1039
2114
|
|
|
1040
2115
|
/**
|
|
1041
|
-
|
|
1042
|
-
|
|
2116
|
+
* 路由到新页面
|
|
2117
|
+
* @public
|
|
2118
|
+
* @since MiniKit 1.0.0
|
|
2119
|
+
* @platform iOS Android
|
|
2120
|
+
*/
|
|
1043
2121
|
export function navigateTo(params: {
|
|
1044
|
-
/**
|
|
2122
|
+
/**
|
|
2123
|
+
* 页面路径, 参数需要做 url encode 处理
|
|
2124
|
+
* @since MiniKit 1.0.0
|
|
2125
|
+
*/
|
|
1045
2126
|
url: string
|
|
1046
|
-
/**
|
|
2127
|
+
/**
|
|
2128
|
+
* 打开方式,支持全屏full,半屏half;默认全屏full
|
|
2129
|
+
* @since MiniKit 2.6.0
|
|
2130
|
+
* @defaultValue "full"
|
|
2131
|
+
*/
|
|
1047
2132
|
type?: string
|
|
1048
2133
|
/**
|
|
1049
2134
|
* 非全屏页面距离屏幕顶部的距离,type 为 half 时有效
|
|
1050
2135
|
* 取值范围:【1-屏幕的高度】单位:px
|
|
1051
2136
|
* 注意:Android 显示区域不包括状态栏,iOS显示区域包括状态栏。
|
|
1052
2137
|
* 因此 Android 的 topMargin 的最大值是屏幕高度减去状态栏的高度。
|
|
2138
|
+
* @since MiniKit 3.11.3
|
|
2139
|
+
* @defaultValue 100
|
|
1053
2140
|
*/
|
|
1054
2141
|
topMargin?: number
|
|
1055
2142
|
/**
|
|
1056
2143
|
* 非全屏页面距离屏幕顶部的百分比,type 为 half 时有效,优先级高于 topMargin
|
|
1057
2144
|
* 取值范围【1-99】单位:百分比
|
|
1058
2145
|
* 注意:Android 显示区域不包括状态栏,iOS显示区域包括状态栏。
|
|
2146
|
+
* @since MiniKit 3.11.3
|
|
1059
2147
|
*/
|
|
1060
2148
|
topMarginPercent?: number
|
|
1061
|
-
|
|
2149
|
+
/**
|
|
2150
|
+
* 指定页面进入动画效果,目前支持 "slide-in-bottom"
|
|
2151
|
+
* 如果未指定,则使用默认式样
|
|
2152
|
+
* @since MiniKit 3.26.0
|
|
2153
|
+
*/
|
|
2154
|
+
animationType?: string
|
|
2155
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
2156
|
+
complete?: () => void
|
|
2157
|
+
/** 接口调用成功的回调函数 */
|
|
2158
|
+
success?: () => void
|
|
2159
|
+
/** 接口调用失败的回调函数 */
|
|
1062
2160
|
fail?: (params: {
|
|
2161
|
+
/** 错误信息 */
|
|
1063
2162
|
errorMsg: string
|
|
2163
|
+
/** 错误码 */
|
|
1064
2164
|
errorCode: string | number
|
|
2165
|
+
/** 错误扩展 */
|
|
1065
2166
|
innerError: {
|
|
2167
|
+
/** 错误扩展码 */
|
|
1066
2168
|
errorCode: string | number
|
|
2169
|
+
/** 错误扩展信息 */
|
|
1067
2170
|
errorMsg: string
|
|
1068
2171
|
}
|
|
1069
2172
|
}) => void
|
|
1070
|
-
complete?: () => void
|
|
1071
2173
|
}): void
|
|
1072
2174
|
|
|
1073
2175
|
/**
|
|
1074
|
-
|
|
1075
|
-
|
|
2176
|
+
* 关闭当前页面,返回上一页面或多级页面
|
|
2177
|
+
* @public
|
|
2178
|
+
* @since MiniKit 1.0.0
|
|
2179
|
+
* @platform iOS Android
|
|
2180
|
+
*/
|
|
1076
2181
|
export function navigateBack(params?: {
|
|
1077
|
-
/**
|
|
2182
|
+
/**
|
|
2183
|
+
* 返回的页面数,如果 delta 大于现有页面数,则返回到首页
|
|
2184
|
+
* @since MiniKit 1.0.0
|
|
2185
|
+
* @defaultValue 1
|
|
2186
|
+
*/
|
|
1078
2187
|
delta?: number
|
|
1079
|
-
|
|
2188
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
2189
|
+
complete?: () => void
|
|
2190
|
+
/** 接口调用成功的回调函数 */
|
|
2191
|
+
success?: () => void
|
|
2192
|
+
/** 接口调用失败的回调函数 */
|
|
1080
2193
|
fail?: (params: {
|
|
2194
|
+
/** 错误信息 */
|
|
1081
2195
|
errorMsg: string
|
|
2196
|
+
/** 错误码 */
|
|
1082
2197
|
errorCode: string | number
|
|
2198
|
+
/** 错误扩展 */
|
|
1083
2199
|
innerError: {
|
|
2200
|
+
/** 错误扩展码 */
|
|
1084
2201
|
errorCode: string | number
|
|
2202
|
+
/** 错误扩展信息 */
|
|
1085
2203
|
errorMsg: string
|
|
1086
2204
|
}
|
|
1087
2205
|
}) => void
|
|
1088
|
-
complete?: () => void
|
|
1089
2206
|
}): void
|
|
1090
2207
|
|
|
1091
2208
|
/**
|
|
1092
|
-
|
|
1093
|
-
|
|
2209
|
+
* 关闭当前页面,跳转到应用内的某个页面
|
|
2210
|
+
* @public
|
|
2211
|
+
* @since MiniKit 1.0.0
|
|
2212
|
+
* @platform iOS Android
|
|
2213
|
+
*/
|
|
1094
2214
|
export function redirectTo(params: {
|
|
1095
|
-
/**
|
|
2215
|
+
/**
|
|
2216
|
+
* 页面路径, 参数需要做 url encode 处理
|
|
2217
|
+
* @since MiniKit 1.0.0
|
|
2218
|
+
*/
|
|
1096
2219
|
url: string
|
|
1097
|
-
|
|
2220
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
2221
|
+
complete?: () => void
|
|
2222
|
+
/** 接口调用成功的回调函数 */
|
|
2223
|
+
success?: () => void
|
|
2224
|
+
/** 接口调用失败的回调函数 */
|
|
1098
2225
|
fail?: (params: {
|
|
2226
|
+
/** 错误信息 */
|
|
1099
2227
|
errorMsg: string
|
|
2228
|
+
/** 错误码 */
|
|
1100
2229
|
errorCode: string | number
|
|
2230
|
+
/** 错误扩展 */
|
|
1101
2231
|
innerError: {
|
|
2232
|
+
/** 错误扩展码 */
|
|
1102
2233
|
errorCode: string | number
|
|
2234
|
+
/** 错误扩展信息 */
|
|
1103
2235
|
errorMsg: string
|
|
1104
2236
|
}
|
|
1105
2237
|
}) => void
|
|
1106
|
-
complete?: () => void
|
|
1107
2238
|
}): void
|
|
1108
2239
|
|
|
1109
2240
|
/**
|
|
1110
|
-
|
|
1111
|
-
|
|
2241
|
+
* 关闭所有页面,打开到应用内的某个页面
|
|
2242
|
+
* @public
|
|
2243
|
+
* @since MiniKit 1.0.0
|
|
2244
|
+
* @platform iOS Android
|
|
2245
|
+
*/
|
|
1112
2246
|
export function reLaunch(params: {
|
|
1113
|
-
/**
|
|
2247
|
+
/**
|
|
2248
|
+
* 页面路径, 参数需要做 url encode 处理
|
|
2249
|
+
* @since MiniKit 1.0.0
|
|
2250
|
+
*/
|
|
1114
2251
|
url: string
|
|
1115
|
-
|
|
2252
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
2253
|
+
complete?: () => void
|
|
2254
|
+
/** 接口调用成功的回调函数 */
|
|
2255
|
+
success?: () => void
|
|
2256
|
+
/** 接口调用失败的回调函数 */
|
|
1116
2257
|
fail?: (params: {
|
|
2258
|
+
/** 错误信息 */
|
|
1117
2259
|
errorMsg: string
|
|
2260
|
+
/** 错误码 */
|
|
1118
2261
|
errorCode: string | number
|
|
2262
|
+
/** 错误扩展 */
|
|
1119
2263
|
innerError: {
|
|
2264
|
+
/** 错误扩展码 */
|
|
1120
2265
|
errorCode: string | number
|
|
2266
|
+
/** 错误扩展信息 */
|
|
1121
2267
|
errorMsg: string
|
|
1122
2268
|
}
|
|
1123
2269
|
}) => void
|
|
1124
|
-
complete?: () => void
|
|
1125
2270
|
}): void
|
|
1126
2271
|
|
|
1127
2272
|
/**
|
|
1128
|
-
|
|
1129
|
-
|
|
2273
|
+
* 跳转到 tabBar 页面,并关闭其他所有非 tabBar 页面
|
|
2274
|
+
* @public
|
|
2275
|
+
* @since MiniKit 1.0.0
|
|
2276
|
+
* @platform iOS Android
|
|
2277
|
+
*/
|
|
1130
2278
|
export function switchTab(params: {
|
|
1131
|
-
/**
|
|
2279
|
+
/**
|
|
2280
|
+
* 页面路径, 不支持参数
|
|
2281
|
+
* @since MiniKit 1.0.0
|
|
2282
|
+
*/
|
|
1132
2283
|
url: string
|
|
1133
|
-
|
|
2284
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
2285
|
+
complete?: () => void
|
|
2286
|
+
/** 接口调用成功的回调函数 */
|
|
2287
|
+
success?: () => void
|
|
2288
|
+
/** 接口调用失败的回调函数 */
|
|
1134
2289
|
fail?: (params: {
|
|
2290
|
+
/** 错误信息 */
|
|
1135
2291
|
errorMsg: string
|
|
2292
|
+
/** 错误码 */
|
|
1136
2293
|
errorCode: string | number
|
|
2294
|
+
/** 错误扩展 */
|
|
1137
2295
|
innerError: {
|
|
2296
|
+
/** 错误扩展码 */
|
|
1138
2297
|
errorCode: string | number
|
|
2298
|
+
/** 错误扩展信息 */
|
|
1139
2299
|
errorMsg: string
|
|
1140
2300
|
}
|
|
1141
2301
|
}) => void
|
|
1142
|
-
complete?: () => void
|
|
1143
2302
|
}): void
|
|
1144
2303
|
|
|
1145
2304
|
/**
|
|
1146
|
-
|
|
1147
|
-
|
|
2305
|
+
* 判断自定义API是否可用
|
|
2306
|
+
* @public
|
|
2307
|
+
* @since MiniKit 2.4.2
|
|
2308
|
+
* @platform iOS Android
|
|
2309
|
+
*/
|
|
1148
2310
|
export function extApiCanIUse(params: {
|
|
1149
|
-
/**
|
|
2311
|
+
/**
|
|
2312
|
+
* api名称
|
|
2313
|
+
* @since MiniKit 2.4.2
|
|
2314
|
+
*/
|
|
1150
2315
|
api: string
|
|
2316
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
2317
|
+
complete?: () => void
|
|
2318
|
+
/** 接口调用成功的回调函数 */
|
|
1151
2319
|
success?: (params: {
|
|
1152
|
-
/**
|
|
2320
|
+
/**
|
|
2321
|
+
* 当前版本是否可用
|
|
2322
|
+
* @since MiniKit 3.2.0
|
|
2323
|
+
*/
|
|
1153
2324
|
result: boolean
|
|
1154
2325
|
}) => void
|
|
2326
|
+
/** 接口调用失败的回调函数 */
|
|
1155
2327
|
fail?: (params: {
|
|
2328
|
+
/** 错误信息 */
|
|
1156
2329
|
errorMsg: string
|
|
2330
|
+
/** 错误码 */
|
|
1157
2331
|
errorCode: string | number
|
|
2332
|
+
/** 错误扩展 */
|
|
1158
2333
|
innerError: {
|
|
2334
|
+
/** 错误扩展码 */
|
|
1159
2335
|
errorCode: string | number
|
|
2336
|
+
/** 错误扩展信息 */
|
|
1160
2337
|
errorMsg: string
|
|
1161
2338
|
}
|
|
1162
2339
|
}) => void
|
|
1163
|
-
complete?: () => void
|
|
1164
2340
|
}): void
|
|
1165
2341
|
|
|
1166
2342
|
/**
|
|
1167
|
-
|
|
1168
|
-
|
|
2343
|
+
* 判断自定义API是否可用
|
|
2344
|
+
* @public
|
|
2345
|
+
* @since MiniKit 2.4.2
|
|
2346
|
+
* @platform iOS Android
|
|
2347
|
+
*/
|
|
1169
2348
|
export function extApiCanIUseSync(caniuseBean?: CanIUseBean): {
|
|
1170
|
-
/**
|
|
2349
|
+
/**
|
|
2350
|
+
* 当前版本是否可用
|
|
2351
|
+
* @since MiniKit 2.4.2
|
|
2352
|
+
*/
|
|
1171
2353
|
result: boolean
|
|
1172
2354
|
}
|
|
1173
2355
|
|
|
1174
2356
|
/**
|
|
1175
|
-
|
|
1176
|
-
|
|
2357
|
+
* 调用自定义API
|
|
2358
|
+
* @public
|
|
2359
|
+
* @since MiniKit 2.4.2
|
|
2360
|
+
* @platform iOS Android
|
|
2361
|
+
*/
|
|
1177
2362
|
export function extApiInvoke(params: {
|
|
1178
|
-
/**
|
|
2363
|
+
/**
|
|
2364
|
+
* api名称
|
|
2365
|
+
* @since MiniKit 2.4.2
|
|
2366
|
+
*/
|
|
1179
2367
|
api: string
|
|
1180
|
-
/**
|
|
1181
|
-
|
|
2368
|
+
/**
|
|
2369
|
+
* api参数
|
|
2370
|
+
* @since MiniKit 2.4.2
|
|
2371
|
+
*/
|
|
2372
|
+
params?: Record<string, any>
|
|
2373
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
2374
|
+
complete?: () => void
|
|
2375
|
+
/** 接口调用成功的回调函数 */
|
|
1182
2376
|
success?: (params: {
|
|
1183
|
-
/**
|
|
1184
|
-
|
|
2377
|
+
/**
|
|
2378
|
+
* extApi返回数据
|
|
2379
|
+
* @since MiniKit 3.2.0
|
|
2380
|
+
*/
|
|
2381
|
+
data?: Record<string, any>
|
|
1185
2382
|
}) => void
|
|
2383
|
+
/** 接口调用失败的回调函数 */
|
|
1186
2384
|
fail?: (params: {
|
|
2385
|
+
/** 错误信息 */
|
|
1187
2386
|
errorMsg: string
|
|
2387
|
+
/** 错误码 */
|
|
1188
2388
|
errorCode: string | number
|
|
2389
|
+
/** 错误扩展 */
|
|
1189
2390
|
innerError: {
|
|
2391
|
+
/** 错误扩展码 */
|
|
1190
2392
|
errorCode: string | number
|
|
2393
|
+
/** 错误扩展信息 */
|
|
1191
2394
|
errorMsg: string
|
|
1192
2395
|
}
|
|
1193
2396
|
}) => void
|
|
1194
|
-
complete?: () => void
|
|
1195
2397
|
}): void
|
|
1196
2398
|
|
|
1197
2399
|
/**
|
|
1198
|
-
|
|
1199
|
-
|
|
2400
|
+
* 调用自定义API
|
|
2401
|
+
* @public
|
|
2402
|
+
* @since MiniKit 2.4.2
|
|
2403
|
+
* @platform iOS Android
|
|
2404
|
+
*/
|
|
1200
2405
|
export function extApiInvokeSync(extApiBean?: ExtApiBean): {
|
|
1201
|
-
/**
|
|
1202
|
-
|
|
2406
|
+
/**
|
|
2407
|
+
* extApi返回数据
|
|
2408
|
+
* @since MiniKit 2.4.2
|
|
2409
|
+
*/
|
|
2410
|
+
data?: Record<string, any>
|
|
1203
2411
|
}
|
|
1204
2412
|
|
|
1205
2413
|
/**
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
2414
|
+
* 接收缓存结果,提供给基础库调用
|
|
2415
|
+
* @public
|
|
2416
|
+
* @since MiniKit 3.27.0
|
|
2417
|
+
* @platform iOS Android
|
|
2418
|
+
*/
|
|
2419
|
+
export function receiveApiRequestCache(params: {
|
|
2420
|
+
/**
|
|
2421
|
+
* requestId 请求ID
|
|
2422
|
+
* @since MiniKit 3.27.0
|
|
2423
|
+
*/
|
|
2424
|
+
requestId: string
|
|
2425
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
2426
|
+
complete?: () => void
|
|
2427
|
+
/** 接口调用成功的回调函数 */
|
|
2428
|
+
success?: (params: {
|
|
2429
|
+
/**
|
|
2430
|
+
* 请求结果
|
|
2431
|
+
* thing_data_ 出参结构体, JSON序列化
|
|
2432
|
+
* @since MiniKit 3.27.0
|
|
2433
|
+
*/
|
|
2434
|
+
thing_json_?: Record<string, any>
|
|
2435
|
+
/**
|
|
2436
|
+
* 元数据
|
|
2437
|
+
* @since MiniKit 3.27.0
|
|
2438
|
+
*/
|
|
2439
|
+
data: string
|
|
2440
|
+
/**
|
|
2441
|
+
* 序列化返回结果
|
|
2442
|
+
* @since MiniKit 3.27.0
|
|
2443
|
+
*/
|
|
2444
|
+
result: Record<string, any>
|
|
2445
|
+
/**
|
|
2446
|
+
* apiName
|
|
2447
|
+
* @since MiniKit 3.27.0
|
|
2448
|
+
*/
|
|
2449
|
+
api: string
|
|
2450
|
+
}) => void
|
|
2451
|
+
/** 接口调用失败的回调函数 */
|
|
2452
|
+
fail?: (params: {
|
|
2453
|
+
/** 错误信息 */
|
|
2454
|
+
errorMsg: string
|
|
2455
|
+
/** 错误码 */
|
|
2456
|
+
errorCode: string | number
|
|
2457
|
+
/** 错误扩展 */
|
|
2458
|
+
innerError: {
|
|
2459
|
+
/** 错误扩展码 */
|
|
2460
|
+
errorCode: string | number
|
|
2461
|
+
/** 错误扩展信息 */
|
|
2462
|
+
errorMsg: string
|
|
2463
|
+
}
|
|
2464
|
+
}) => void
|
|
2465
|
+
}): void
|
|
2466
|
+
|
|
2467
|
+
/**
|
|
2468
|
+
* 移除对应API的请求缓存
|
|
2469
|
+
* @public
|
|
2470
|
+
* @since MiniKit 3.27.0
|
|
2471
|
+
* @platform iOS Android
|
|
2472
|
+
*/
|
|
2473
|
+
export function removeApiRequestCache(params: {
|
|
2474
|
+
/**
|
|
2475
|
+
* apiList 需要删除缓存的API列表
|
|
2476
|
+
* @since MiniKit 3.27.0
|
|
2477
|
+
*/
|
|
2478
|
+
apiList: RemoveApiRequestCacheBean[]
|
|
2479
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
2480
|
+
complete?: () => void
|
|
2481
|
+
/** 接口调用成功的回调函数 */
|
|
2482
|
+
success?: () => void
|
|
2483
|
+
/** 接口调用失败的回调函数 */
|
|
1210
2484
|
fail?: (params: {
|
|
2485
|
+
/** 错误信息 */
|
|
1211
2486
|
errorMsg: string
|
|
2487
|
+
/** 错误码 */
|
|
1212
2488
|
errorCode: string | number
|
|
2489
|
+
/** 错误扩展 */
|
|
1213
2490
|
innerError: {
|
|
2491
|
+
/** 错误扩展码 */
|
|
1214
2492
|
errorCode: string | number
|
|
2493
|
+
/** 错误扩展信息 */
|
|
1215
2494
|
errorMsg: string
|
|
1216
2495
|
}
|
|
1217
2496
|
}) => void
|
|
2497
|
+
}): void
|
|
2498
|
+
|
|
2499
|
+
/**
|
|
2500
|
+
* 开始下拉刷新。调用后触发当前页面下拉刷新动画,效果与用户手动下拉刷新一致。
|
|
2501
|
+
* @public
|
|
2502
|
+
* @since MiniKit 1.0.0
|
|
2503
|
+
* @platform iOS Android
|
|
2504
|
+
*/
|
|
2505
|
+
export function startPullDownRefresh(params?: {
|
|
2506
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1218
2507
|
complete?: () => void
|
|
2508
|
+
/** 接口调用成功的回调函数 */
|
|
2509
|
+
success?: () => void
|
|
2510
|
+
/** 接口调用失败的回调函数 */
|
|
2511
|
+
fail?: (params: {
|
|
2512
|
+
/** 错误信息 */
|
|
2513
|
+
errorMsg: string
|
|
2514
|
+
/** 错误码 */
|
|
2515
|
+
errorCode: string | number
|
|
2516
|
+
/** 错误扩展 */
|
|
2517
|
+
innerError: {
|
|
2518
|
+
/** 错误扩展码 */
|
|
2519
|
+
errorCode: string | number
|
|
2520
|
+
/** 错误扩展信息 */
|
|
2521
|
+
errorMsg: string
|
|
2522
|
+
}
|
|
2523
|
+
}) => void
|
|
1219
2524
|
}): void
|
|
1220
2525
|
|
|
1221
2526
|
/**
|
|
1222
|
-
|
|
1223
|
-
|
|
2527
|
+
* 停止当前页面下拉刷新。
|
|
2528
|
+
* @public
|
|
2529
|
+
* @since MiniKit 1.0.0
|
|
2530
|
+
* @platform iOS Android
|
|
2531
|
+
*/
|
|
1224
2532
|
export function stopPullDownRefresh(params?: {
|
|
1225
|
-
|
|
2533
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
2534
|
+
complete?: () => void
|
|
2535
|
+
/** 接口调用成功的回调函数 */
|
|
2536
|
+
success?: () => void
|
|
2537
|
+
/** 接口调用失败的回调函数 */
|
|
1226
2538
|
fail?: (params: {
|
|
2539
|
+
/** 错误信息 */
|
|
1227
2540
|
errorMsg: string
|
|
2541
|
+
/** 错误码 */
|
|
1228
2542
|
errorCode: string | number
|
|
2543
|
+
/** 错误扩展 */
|
|
1229
2544
|
innerError: {
|
|
2545
|
+
/** 错误扩展码 */
|
|
1230
2546
|
errorCode: string | number
|
|
2547
|
+
/** 错误扩展信息 */
|
|
1231
2548
|
errorMsg: string
|
|
1232
2549
|
}
|
|
1233
2550
|
}) => void
|
|
2551
|
+
}): void
|
|
2552
|
+
|
|
2553
|
+
/**
|
|
2554
|
+
* 是否允许页面滚动
|
|
2555
|
+
* @public
|
|
2556
|
+
* @since MiniKit 3.30.0
|
|
2557
|
+
* @platform iOS Android
|
|
2558
|
+
*/
|
|
2559
|
+
export function enablePageScroll(params?: {
|
|
2560
|
+
/**
|
|
2561
|
+
* 是否允许页面滚动
|
|
2562
|
+
* @since MiniKit 3.30.0
|
|
2563
|
+
* @defaultValue true
|
|
2564
|
+
*/
|
|
2565
|
+
scrollEnable?: boolean
|
|
2566
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1234
2567
|
complete?: () => void
|
|
2568
|
+
/** 接口调用成功的回调函数 */
|
|
2569
|
+
success?: () => void
|
|
2570
|
+
/** 接口调用失败的回调函数 */
|
|
2571
|
+
fail?: (params: {
|
|
2572
|
+
/** 错误信息 */
|
|
2573
|
+
errorMsg: string
|
|
2574
|
+
/** 错误码 */
|
|
2575
|
+
errorCode: string | number
|
|
2576
|
+
/** 错误扩展 */
|
|
2577
|
+
innerError: {
|
|
2578
|
+
/** 错误扩展码 */
|
|
2579
|
+
errorCode: string | number
|
|
2580
|
+
/** 错误扩展信息 */
|
|
2581
|
+
errorMsg: string
|
|
2582
|
+
}
|
|
2583
|
+
}) => void
|
|
1235
2584
|
}): void
|
|
1236
2585
|
|
|
1237
2586
|
/**
|
|
1238
|
-
|
|
2587
|
+
* 移除当前widget视图, 仅在widget内部调用且不支持Dialog形式
|
|
2588
|
+
* @public
|
|
2589
|
+
* @since MiniKit 3.5.4
|
|
2590
|
+
* @platform iOS Android
|
|
2591
|
+
*/
|
|
1239
2592
|
export function widgetRemove(params?: {
|
|
1240
|
-
/**
|
|
2593
|
+
/**
|
|
2594
|
+
* 移除模式
|
|
2595
|
+
* @since MiniKit 3.5.4
|
|
2596
|
+
* @defaultValue WidgetMode.ONCE
|
|
2597
|
+
*/
|
|
1241
2598
|
mode?: WidgetMode
|
|
1242
|
-
|
|
2599
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
2600
|
+
complete?: () => void
|
|
2601
|
+
/** 接口调用成功的回调函数 */
|
|
2602
|
+
success?: () => void
|
|
2603
|
+
/** 接口调用失败的回调函数 */
|
|
1243
2604
|
fail?: (params: {
|
|
2605
|
+
/** 错误信息 */
|
|
1244
2606
|
errorMsg: string
|
|
2607
|
+
/** 错误码 */
|
|
1245
2608
|
errorCode: string | number
|
|
2609
|
+
/** 错误扩展 */
|
|
1246
2610
|
innerError: {
|
|
2611
|
+
/** 错误扩展码 */
|
|
1247
2612
|
errorCode: string | number
|
|
2613
|
+
/** 错误扩展信息 */
|
|
1248
2614
|
errorMsg: string
|
|
1249
2615
|
}
|
|
1250
2616
|
}) => void
|
|
1251
|
-
complete?: () => void
|
|
1252
2617
|
}): void
|
|
1253
2618
|
|
|
1254
2619
|
/**
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
export function
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
2620
|
+
* 原生上报的事件
|
|
2621
|
+
* @public
|
|
2622
|
+
* @since MiniKit 2.3.0
|
|
2623
|
+
* @platform iOS Android
|
|
2624
|
+
*/
|
|
2625
|
+
export function onNativeEvent(
|
|
2626
|
+
listener: (params: NativeUploadData) => void
|
|
2627
|
+
): void
|
|
2628
|
+
|
|
2629
|
+
/**
|
|
2630
|
+
* 原生上报的事件
|
|
2631
|
+
* @public
|
|
2632
|
+
* @since MiniKit 2.3.0
|
|
2633
|
+
* @platform iOS Android
|
|
2634
|
+
*/
|
|
2635
|
+
export function offNativeEvent(
|
|
2636
|
+
listener: (params: NativeUploadData) => void
|
|
2637
|
+
): void
|
|
2638
|
+
|
|
2639
|
+
/**
|
|
2640
|
+
* 添加监听体验评分结束事件方法
|
|
2641
|
+
* @public
|
|
2642
|
+
* @since MiniKit 3.18.2
|
|
2643
|
+
* @platform iOS Android
|
|
2644
|
+
*/
|
|
2645
|
+
export function onExperienceRateEnd(
|
|
2646
|
+
listener: (params: {
|
|
2647
|
+
/**
|
|
2648
|
+
* 体验评分结果
|
|
2649
|
+
* id: 评分表示
|
|
2650
|
+
* detail: 评分详情
|
|
2651
|
+
* @since MiniKit 3.18.2
|
|
2652
|
+
*/
|
|
2653
|
+
source: string
|
|
2654
|
+
}) => void
|
|
2655
|
+
): void
|
|
2656
|
+
|
|
2657
|
+
/**
|
|
2658
|
+
* 移除监听体验评分结束事件方法
|
|
2659
|
+
* @public
|
|
2660
|
+
* @since MiniKit 3.18.2
|
|
2661
|
+
* @platform iOS Android
|
|
2662
|
+
*/
|
|
2663
|
+
export function offExperienceRateEnd(
|
|
2664
|
+
listener: (params: {
|
|
2665
|
+
/**
|
|
2666
|
+
* 体验评分结果
|
|
2667
|
+
* id: 评分表示
|
|
2668
|
+
* detail: 评分详情
|
|
2669
|
+
* @since MiniKit 3.18.2
|
|
2670
|
+
*/
|
|
2671
|
+
source: string
|
|
2672
|
+
}) => void
|
|
2673
|
+
): void
|
|
2674
|
+
|
|
2675
|
+
/** @since MiniKit 3.20.2 */
|
|
2676
|
+
export interface FetchBean {
|
|
2677
|
+
/**
|
|
2678
|
+
* 拉取数据的类型,默认pre:表示预拉取
|
|
2679
|
+
* @since MiniKit 3.20.2
|
|
2680
|
+
* @defaultValue "pre"
|
|
2681
|
+
*/
|
|
2682
|
+
fetchType?: string
|
|
2683
|
+
/**
|
|
2684
|
+
* 拉取数据的ApiKey列表,不传或传空数组表示不拉取数据
|
|
2685
|
+
* @since MiniKit 3.20.2
|
|
2686
|
+
*/
|
|
2687
|
+
fetchApiKeys?: string[]
|
|
1286
2688
|
}
|
|
1287
2689
|
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
/**
|
|
1296
|
-
|
|
2690
|
+
/** @since MiniKit 3.20.2 */
|
|
2691
|
+
export interface FetchDataResp {
|
|
2692
|
+
/**
|
|
2693
|
+
* 缓存数据
|
|
2694
|
+
* @since MiniKit 3.20.2
|
|
2695
|
+
*/
|
|
2696
|
+
fetchedData: Record<string, any>
|
|
2697
|
+
/**
|
|
2698
|
+
* 客户端拿到缓存数据的时间戳
|
|
2699
|
+
* @since MiniKit 3.20.2
|
|
2700
|
+
*/
|
|
2701
|
+
timeStamp: number
|
|
1297
2702
|
}
|
|
1298
2703
|
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
2704
|
+
/** @since MiniKit 3.20.2 */
|
|
2705
|
+
export interface FetchResponse {
|
|
2706
|
+
/**
|
|
2707
|
+
* 缓存数据
|
|
2708
|
+
* @since MiniKit 3.20.2
|
|
2709
|
+
*/
|
|
2710
|
+
fetchedData: Record<string, FetchDataResp>
|
|
1304
2711
|
}
|
|
1305
2712
|
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
2713
|
+
/** @since MiniKit 3.20.2 */
|
|
2714
|
+
export interface RegisterBean {
|
|
2715
|
+
/**
|
|
2716
|
+
* 拉取数据的类型,默认pre:表示预拉取
|
|
2717
|
+
* @since MiniKit 3.20.2
|
|
2718
|
+
* @defaultValue "pre"
|
|
2719
|
+
*/
|
|
2720
|
+
fetchType?: string
|
|
2721
|
+
/**
|
|
2722
|
+
* 拉取数据的ApiKey
|
|
2723
|
+
* @since MiniKit 3.20.2
|
|
2724
|
+
*/
|
|
2725
|
+
apiKey: string
|
|
2726
|
+
/**
|
|
2727
|
+
* 注册数据获取ID
|
|
2728
|
+
* @since MiniKit 3.20.2
|
|
2729
|
+
*/
|
|
2730
|
+
registerId: string
|
|
1309
2731
|
}
|
|
1310
2732
|
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
2733
|
+
/** @since MiniKit 3.20.2 */
|
|
2734
|
+
export interface RegisterResponse {
|
|
2735
|
+
/**
|
|
2736
|
+
* 缓存数据
|
|
2737
|
+
* @since MiniKit 3.20.2
|
|
2738
|
+
*/
|
|
2739
|
+
fetchedData: Record<string, any>
|
|
2740
|
+
/**
|
|
2741
|
+
* 客户端拿到缓存数据的时间戳
|
|
2742
|
+
* @since MiniKit 3.20.2
|
|
2743
|
+
*/
|
|
2744
|
+
timeStamp: number
|
|
2745
|
+
/**
|
|
2746
|
+
* 注册数据获取ID
|
|
2747
|
+
* @since MiniKit 3.20.2
|
|
2748
|
+
*/
|
|
2749
|
+
registerId: string
|
|
1314
2750
|
}
|
|
1315
2751
|
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
2752
|
+
/** @since MiniKit 2.3.0 */
|
|
2753
|
+
export interface NativeDisabledParam {
|
|
2754
|
+
/**
|
|
2755
|
+
* 禁用异层渲染手势分发
|
|
2756
|
+
* @since MiniKit 2.3.0
|
|
2757
|
+
*/
|
|
2758
|
+
nativeDisabled: boolean
|
|
2759
|
+
/**
|
|
2760
|
+
* 需要禁止或启用手势分发的页面id
|
|
2761
|
+
* @since MiniKit 2.4.2
|
|
2762
|
+
*/
|
|
2763
|
+
pageId: string
|
|
1319
2764
|
}
|
|
1320
2765
|
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
appId: string
|
|
2766
|
+
/** @since MiniKit 2.3.0 */
|
|
2767
|
+
export interface NativeParams {
|
|
1324
2768
|
/**
|
|
1325
|
-
*
|
|
1326
|
-
*
|
|
1327
|
-
*
|
|
1328
|
-
* release: 正式版
|
|
2769
|
+
* 原生组件类型
|
|
2770
|
+
* @since MiniKit 2.3.0
|
|
2771
|
+
* @defaultValue 0
|
|
1329
2772
|
*/
|
|
1330
|
-
|
|
1331
|
-
/**
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
2773
|
+
type?: number
|
|
2774
|
+
/**
|
|
2775
|
+
* 原生组件的ApiName
|
|
2776
|
+
* @since MiniKit 2.3.0
|
|
2777
|
+
*/
|
|
2778
|
+
apiName: string
|
|
2779
|
+
/**
|
|
2780
|
+
* 异层渲染原生视图id
|
|
2781
|
+
* @since MiniKit 2.3.0
|
|
2782
|
+
*/
|
|
2783
|
+
id: string
|
|
2784
|
+
/**
|
|
2785
|
+
* 小程序页面id
|
|
2786
|
+
* @since MiniKit 2.3.0
|
|
2787
|
+
*/
|
|
2788
|
+
pageId: string
|
|
2789
|
+
/**
|
|
2790
|
+
* 参数等
|
|
2791
|
+
* @since MiniKit 2.3.0
|
|
2792
|
+
*/
|
|
2793
|
+
params: Record<string, Record<string, any>>
|
|
1337
2794
|
}
|
|
1338
2795
|
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
2796
|
+
/** @since MiniKit 2.3.0 */
|
|
2797
|
+
export interface NativeUploadData {
|
|
2798
|
+
/**
|
|
2799
|
+
* 原生组件的EventName
|
|
2800
|
+
* @since MiniKit 2.3.0
|
|
2801
|
+
*/
|
|
2802
|
+
eventName: string
|
|
2803
|
+
/**
|
|
2804
|
+
* 异层渲染原生视图id
|
|
2805
|
+
* @since MiniKit 2.3.0
|
|
2806
|
+
*/
|
|
2807
|
+
id: string
|
|
2808
|
+
/**
|
|
2809
|
+
* 小程序页面id
|
|
2810
|
+
* @since MiniKit 2.3.0
|
|
2811
|
+
*/
|
|
2812
|
+
pageId: string
|
|
2813
|
+
/**
|
|
2814
|
+
* 数据等
|
|
2815
|
+
* @since MiniKit 2.3.0
|
|
2816
|
+
*/
|
|
2817
|
+
data: Record<string, Record<string, any>>
|
|
1345
2818
|
}
|
|
1346
2819
|
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
/** item是否显示 */
|
|
1355
|
-
isShow?: boolean
|
|
2820
|
+
/** @since MiniKit 2.3.0 */
|
|
2821
|
+
export interface ViewId {
|
|
2822
|
+
/**
|
|
2823
|
+
* 异层渲染原生视图id
|
|
2824
|
+
* @since MiniKit 2.3.0
|
|
2825
|
+
*/
|
|
2826
|
+
viewId: string
|
|
1356
2827
|
}
|
|
1357
2828
|
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
duration?: number
|
|
2829
|
+
/** @since MiniKit 2.3.0 */
|
|
2830
|
+
export interface RegisterNativeEventBody {
|
|
1361
2831
|
/**
|
|
1362
|
-
*
|
|
1363
|
-
*
|
|
1364
|
-
* 'easeIn' 动画以低速开始
|
|
1365
|
-
* 'easeOut' 动画以低速结束
|
|
1366
|
-
* 'easeInOut' 动画以低速开始和结束
|
|
2832
|
+
* key对应的内容
|
|
2833
|
+
* @since MiniKit 2.3.0
|
|
1367
2834
|
*/
|
|
1368
|
-
|
|
2835
|
+
data: string
|
|
1369
2836
|
}
|
|
1370
2837
|
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
2838
|
+
/** @since MiniKit 2.3.0 */
|
|
2839
|
+
export interface SuccessMessage {
|
|
2840
|
+
/**
|
|
2841
|
+
* key对应的内容
|
|
2842
|
+
* @since MiniKit 2.3.0
|
|
2843
|
+
*/
|
|
2844
|
+
data: string
|
|
1374
2845
|
}
|
|
1375
2846
|
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
2847
|
+
/** @since MiniKit 3.18.2 */
|
|
2848
|
+
export interface RateEventEndBody {
|
|
2849
|
+
/**
|
|
2850
|
+
* 体验评分结果
|
|
2851
|
+
* id: 评分表示
|
|
2852
|
+
* detail: 评分详情
|
|
2853
|
+
* @since MiniKit 3.18.2
|
|
2854
|
+
*/
|
|
2855
|
+
source: string
|
|
1381
2856
|
}
|
|
1382
2857
|
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
2858
|
+
/** @since MiniKit 2.6.0 */
|
|
2859
|
+
export interface PermissionConfig {
|
|
2860
|
+
/**
|
|
2861
|
+
* 权限相关配置信息
|
|
2862
|
+
* @since MiniKit 2.6.0
|
|
2863
|
+
*/
|
|
2864
|
+
result: Record<string, any>
|
|
1389
2865
|
}
|
|
1390
2866
|
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
/** 数据等 */
|
|
1399
|
-
data: any
|
|
2867
|
+
/** @since MiniKit 2.6.0 */
|
|
2868
|
+
export interface AuthSetting {
|
|
2869
|
+
/**
|
|
2870
|
+
* 用户授权设置信息
|
|
2871
|
+
* @since MiniKit 2.6.0
|
|
2872
|
+
*/
|
|
2873
|
+
scope: Record<string, boolean>
|
|
1400
2874
|
}
|
|
1401
2875
|
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
export type NativeParams = {
|
|
1410
|
-
/** 原生组件类型 */
|
|
1411
|
-
type?: number
|
|
1412
|
-
/** 原生组件的ApiName */
|
|
1413
|
-
apiName: string
|
|
1414
|
-
/** 异层渲染原生视图id */
|
|
1415
|
-
id: string
|
|
1416
|
-
/** 小程序页面id */
|
|
1417
|
-
pageId: string
|
|
1418
|
-
/** 参数等 */
|
|
1419
|
-
params: any
|
|
1420
|
-
}
|
|
1421
|
-
|
|
1422
|
-
export type Object = {}
|
|
1423
|
-
|
|
1424
|
-
export type PermissionConfig = {
|
|
1425
|
-
/** 权限相关配置信息 */
|
|
1426
|
-
result: any
|
|
1427
|
-
}
|
|
1428
|
-
|
|
1429
|
-
export type AuthSetting = {
|
|
1430
|
-
/** 用户授权设置信息 */
|
|
1431
|
-
scope: any
|
|
1432
|
-
}
|
|
1433
|
-
|
|
1434
|
-
export type DebugModeSetting = {
|
|
1435
|
-
/** 调试模式开关 */
|
|
2876
|
+
/** @since MiniKit 2.6.0 */
|
|
2877
|
+
export interface DebugModeSetting {
|
|
2878
|
+
/**
|
|
2879
|
+
* 调试模式开关
|
|
2880
|
+
* @since MiniKit 2.6.0
|
|
2881
|
+
*/
|
|
1436
2882
|
isEnable: boolean
|
|
1437
2883
|
}
|
|
1438
2884
|
|
|
1439
|
-
|
|
1440
|
-
|
|
2885
|
+
/** @since MiniKit 3.15.2 */
|
|
2886
|
+
export interface TabBarIndexBean {
|
|
2887
|
+
/**
|
|
2888
|
+
* tabBar 的哪一项,从左边算起
|
|
2889
|
+
* @since MiniKit 3.15.2
|
|
2890
|
+
*/
|
|
1441
2891
|
index: number
|
|
1442
2892
|
}
|
|
1443
2893
|
|
|
1444
|
-
|
|
1445
|
-
|
|
2894
|
+
/** @since MiniKit 1.0.0 */
|
|
2895
|
+
export interface OperateTabBarParams {
|
|
2896
|
+
/**
|
|
2897
|
+
* 是否需要动画效果
|
|
2898
|
+
* @since MiniKit 1.0.0
|
|
2899
|
+
*/
|
|
1446
2900
|
animation: boolean
|
|
1447
2901
|
}
|
|
1448
2902
|
|
|
1449
|
-
|
|
1450
|
-
|
|
2903
|
+
/** @since MiniKit 1.0.0 */
|
|
2904
|
+
export interface TabBarStyleParams {
|
|
2905
|
+
/**
|
|
2906
|
+
* tab 上的文字默认颜色
|
|
2907
|
+
* @since MiniKit 1.0.0
|
|
2908
|
+
*/
|
|
1451
2909
|
color: string
|
|
1452
|
-
/**
|
|
2910
|
+
/**
|
|
2911
|
+
* tab 上的文字选中时的颜色
|
|
2912
|
+
* @since MiniKit 1.0.0
|
|
2913
|
+
*/
|
|
1453
2914
|
selectedColor: string
|
|
1454
|
-
/**
|
|
2915
|
+
/**
|
|
2916
|
+
* tab 的背景色
|
|
2917
|
+
* @since MiniKit 1.0.0
|
|
2918
|
+
*/
|
|
1455
2919
|
backgroundColor: string
|
|
1456
|
-
/**
|
|
2920
|
+
/**
|
|
2921
|
+
* tabBar上边框的颜色, 仅支持 black/white
|
|
2922
|
+
* @since MiniKit 1.0.0
|
|
2923
|
+
*/
|
|
1457
2924
|
borderStyle: string
|
|
1458
2925
|
}
|
|
1459
2926
|
|
|
1460
|
-
|
|
1461
|
-
|
|
2927
|
+
/** @since MiniKit 1.0.0 */
|
|
2928
|
+
export interface TabBarItemParams {
|
|
2929
|
+
/**
|
|
2930
|
+
* tabBar 的哪一项,从左边算起
|
|
2931
|
+
* @since MiniKit 1.0.0
|
|
2932
|
+
*/
|
|
1462
2933
|
index: number
|
|
1463
|
-
/**
|
|
2934
|
+
/**
|
|
2935
|
+
* tab 上的按钮文字
|
|
2936
|
+
* @since MiniKit 1.0.0
|
|
2937
|
+
*/
|
|
1464
2938
|
text: string
|
|
1465
|
-
/**
|
|
2939
|
+
/**
|
|
2940
|
+
* 图片路径
|
|
2941
|
+
* @since MiniKit 1.0.0
|
|
2942
|
+
*/
|
|
1466
2943
|
iconPath: string
|
|
1467
|
-
/**
|
|
2944
|
+
/**
|
|
2945
|
+
* 选中时的图片路径
|
|
2946
|
+
* @since MiniKit 1.0.0
|
|
2947
|
+
*/
|
|
1468
2948
|
selectedIconPath: string
|
|
1469
2949
|
}
|
|
1470
2950
|
|
|
1471
|
-
|
|
1472
|
-
|
|
2951
|
+
/** @since MiniKit 1.0.0 */
|
|
2952
|
+
export interface TabBarBadgeParams {
|
|
2953
|
+
/**
|
|
2954
|
+
* tabBar 的哪一项,从左边算起
|
|
2955
|
+
* @since MiniKit 1.0.0
|
|
2956
|
+
*/
|
|
1473
2957
|
index: number
|
|
1474
|
-
/**
|
|
2958
|
+
/**
|
|
2959
|
+
* 显示的文本,超过 4 个字符则显示成 ...
|
|
2960
|
+
* @since MiniKit 1.0.0
|
|
2961
|
+
*/
|
|
1475
2962
|
text: string
|
|
1476
2963
|
}
|
|
1477
2964
|
|
|
1478
|
-
|
|
1479
|
-
|
|
2965
|
+
/** @since MiniKit 2.3.6 */
|
|
2966
|
+
export enum HighwayMethod {
|
|
2967
|
+
/**
|
|
2968
|
+
* HTTP 请求 OPTIONS
|
|
2969
|
+
* @since MiniKit 2.3.6
|
|
2970
|
+
*/
|
|
2971
|
+
OPTIONS = "OPTIONS",
|
|
2972
|
+
|
|
2973
|
+
/**
|
|
2974
|
+
* HTTP 请求 GET
|
|
2975
|
+
* @since MiniKit 2.3.6
|
|
2976
|
+
*/
|
|
2977
|
+
GET = "GET",
|
|
2978
|
+
|
|
2979
|
+
/**
|
|
2980
|
+
* HTTP 请求 HEAD
|
|
2981
|
+
* @since MiniKit 2.3.6
|
|
2982
|
+
*/
|
|
2983
|
+
HEAD = "HEAD",
|
|
2984
|
+
|
|
2985
|
+
/**
|
|
2986
|
+
* HTTP 请求 POST
|
|
2987
|
+
* @since MiniKit 2.3.6
|
|
2988
|
+
*/
|
|
2989
|
+
POST = "POST",
|
|
2990
|
+
|
|
2991
|
+
/**
|
|
2992
|
+
* HTTP 请求 PUT
|
|
2993
|
+
* @since MiniKit 2.3.6
|
|
2994
|
+
*/
|
|
2995
|
+
PUT = "PUT",
|
|
2996
|
+
|
|
2997
|
+
/**
|
|
2998
|
+
* HTTP 请求 DELETE
|
|
2999
|
+
* @since MiniKit 2.3.6
|
|
3000
|
+
*/
|
|
3001
|
+
DELETE = "DELETE",
|
|
3002
|
+
|
|
3003
|
+
/**
|
|
3004
|
+
* HTTP 请求 TRACE
|
|
3005
|
+
* @since MiniKit 2.3.6
|
|
3006
|
+
*/
|
|
3007
|
+
TRACE = "TRACE",
|
|
3008
|
+
|
|
3009
|
+
/**
|
|
3010
|
+
* HTTP 请求 CONNECT
|
|
3011
|
+
* @since MiniKit 2.3.6
|
|
3012
|
+
*/
|
|
3013
|
+
CONNECT = "CONNECT",
|
|
3014
|
+
}
|
|
3015
|
+
|
|
3016
|
+
/** @since MiniKit 3.27.0 */
|
|
3017
|
+
export enum CachePolicy {
|
|
3018
|
+
/**
|
|
3019
|
+
* 仅发起网络请求,不使用缓存
|
|
3020
|
+
* @since MiniKit 3.27.0
|
|
3021
|
+
*/
|
|
3022
|
+
NETWORK_ONLY = "NETWORK_ONLY",
|
|
3023
|
+
|
|
3024
|
+
/**
|
|
3025
|
+
* 先使用缓存,缓存不存在时发起网络请求
|
|
3026
|
+
* @since MiniKit 3.27.0
|
|
3027
|
+
*/
|
|
3028
|
+
CACHE_ELSE_NETWORK = "CACHE_ELSE_NETWORK",
|
|
3029
|
+
|
|
3030
|
+
/**
|
|
3031
|
+
* 优先使用缓存,同时发起网络请求,网络请求结果会通过事件下发
|
|
3032
|
+
* @since MiniKit 3.27.0
|
|
3033
|
+
*/
|
|
3034
|
+
CACHE_THEN_NETWORK = "CACHE_THEN_NETWORK",
|
|
3035
|
+
}
|
|
3036
|
+
|
|
3037
|
+
/** @since MiniKit 3.27.0 */
|
|
3038
|
+
export interface ApiRequestCacheBean {
|
|
3039
|
+
/**
|
|
3040
|
+
* 缓存超时时间,单位秒
|
|
3041
|
+
* @since MiniKit 3.27.0
|
|
3042
|
+
*/
|
|
3043
|
+
timeout: number
|
|
3044
|
+
/**
|
|
3045
|
+
* 缓存策略,默认 CachePolicy.CACHE_THEN_NETWORK
|
|
3046
|
+
* @since MiniKit 3.27.0
|
|
3047
|
+
* @defaultValue CachePolicy.CACHE_THEN_NETWORK
|
|
3048
|
+
*/
|
|
3049
|
+
policy?: CachePolicy
|
|
3050
|
+
}
|
|
3051
|
+
|
|
3052
|
+
/** @since MiniKit 2.3.6 */
|
|
3053
|
+
export interface HighwayRequestBean {
|
|
3054
|
+
/**
|
|
3055
|
+
* api 名称
|
|
3056
|
+
* @since MiniKit 2.3.6
|
|
3057
|
+
*/
|
|
1480
3058
|
api: string
|
|
1481
|
-
/**
|
|
1482
|
-
|
|
1483
|
-
|
|
3059
|
+
/**
|
|
3060
|
+
* Highway API 请求业务参数,字段结构由 api 对应的 Highway 接口定义
|
|
3061
|
+
* @since MiniKit 2.3.6
|
|
3062
|
+
*/
|
|
3063
|
+
data?: Record<string, any>
|
|
3064
|
+
/**
|
|
3065
|
+
* method 请求方法
|
|
3066
|
+
* @since MiniKit 2.3.6
|
|
3067
|
+
* @defaultValue HighwayMethod.GET
|
|
3068
|
+
*/
|
|
1484
3069
|
method?: HighwayMethod
|
|
3070
|
+
/**
|
|
3071
|
+
* requestId 请求ID,业务方不感知
|
|
3072
|
+
* @since MiniKit 3.27.0
|
|
3073
|
+
*/
|
|
3074
|
+
requestId?: string
|
|
3075
|
+
/**
|
|
3076
|
+
* cache 缓存配置
|
|
3077
|
+
* @since MiniKit 3.27.0
|
|
3078
|
+
*/
|
|
3079
|
+
cache?: ApiRequestCacheBean
|
|
1485
3080
|
}
|
|
1486
3081
|
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
3082
|
+
/** @since MiniKit 2.3.6 */
|
|
3083
|
+
export interface HighwayRequestResponse {
|
|
3084
|
+
/**
|
|
3085
|
+
* 接口返回的原始数据
|
|
3086
|
+
* @since MiniKit 2.3.6
|
|
3087
|
+
*/
|
|
3088
|
+
data: Record<string, any>
|
|
1492
3089
|
}
|
|
1493
3090
|
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
3091
|
+
/** @since MiniKit 3.29.2 */
|
|
3092
|
+
export interface MiniappLogContext {
|
|
3093
|
+
/**
|
|
3094
|
+
* managerId
|
|
3095
|
+
* @since MiniKit 3.29.2
|
|
3096
|
+
*/
|
|
3097
|
+
logManagerId: number
|
|
3098
|
+
/**
|
|
3099
|
+
* 业务类型,比如:Framework、 DeviceDetail等,必传
|
|
3100
|
+
* @since MiniKit 3.29.4
|
|
3101
|
+
*/
|
|
3102
|
+
os: string
|
|
3103
|
+
/**
|
|
3104
|
+
* 公共参数
|
|
3105
|
+
* @since MiniKit 3.29.2
|
|
3106
|
+
*/
|
|
3107
|
+
publicParam?: Record<string, string>
|
|
1497
3108
|
}
|
|
1498
3109
|
|
|
1499
|
-
|
|
1500
|
-
|
|
3110
|
+
/** @since MiniKit 3.29.2 */
|
|
3111
|
+
export interface LogManagerCode {
|
|
3112
|
+
/**
|
|
3113
|
+
* 错误码
|
|
3114
|
+
* @since MiniKit 3.29.2
|
|
3115
|
+
*/
|
|
3116
|
+
code: string
|
|
3117
|
+
/**
|
|
3118
|
+
* 模块名
|
|
3119
|
+
* @since MiniKit 3.29.2
|
|
3120
|
+
*/
|
|
3121
|
+
module: string
|
|
3122
|
+
/**
|
|
3123
|
+
* code一一对应的描述
|
|
3124
|
+
* @since MiniKit 3.29.2
|
|
3125
|
+
*/
|
|
3126
|
+
msg?: string
|
|
3127
|
+
/**
|
|
3128
|
+
* 是否上报埋点,true为上报,false为不上报,默认为false不上报
|
|
3129
|
+
* @since MiniKit 3.29.2
|
|
3130
|
+
* @defaultValue false
|
|
3131
|
+
*/
|
|
3132
|
+
isEvent?: boolean
|
|
3133
|
+
}
|
|
3134
|
+
|
|
3135
|
+
/** @since MiniKit 3.29.2 */
|
|
3136
|
+
export interface LogManagerReqContext {
|
|
3137
|
+
/**
|
|
3138
|
+
* managerId
|
|
3139
|
+
* @since MiniKit 3.29.2
|
|
3140
|
+
*/
|
|
3141
|
+
logManagerId: number
|
|
3142
|
+
/**
|
|
3143
|
+
* errorCode
|
|
3144
|
+
* @since MiniKit 3.29.2
|
|
3145
|
+
*/
|
|
3146
|
+
code: LogManagerCode
|
|
3147
|
+
/**
|
|
3148
|
+
* 自定义消息
|
|
3149
|
+
* @since MiniKit 3.29.2
|
|
3150
|
+
*/
|
|
3151
|
+
desc?: string
|
|
3152
|
+
/**
|
|
3153
|
+
* 自定义参数,(限制1000个字符)
|
|
3154
|
+
* @since MiniKit 3.29.2
|
|
3155
|
+
*/
|
|
3156
|
+
params?: Record<string, any>
|
|
3157
|
+
}
|
|
3158
|
+
|
|
3159
|
+
/** @since MiniKit 1.0.0 */
|
|
3160
|
+
export interface BackMiniProgramBean {
|
|
3161
|
+
/**
|
|
3162
|
+
* 需要返回给上一个小程序的数据,上一个小程序可在 App.onShow 中获取到这份数据
|
|
3163
|
+
* @since MiniKit 1.0.0
|
|
3164
|
+
*/
|
|
3165
|
+
extraData?: Record<string, any>
|
|
3166
|
+
}
|
|
3167
|
+
|
|
3168
|
+
/** @since MiniKit 3.15.0 */
|
|
3169
|
+
export enum MiniAppScene {
|
|
3170
|
+
/**
|
|
3171
|
+
* 默认值
|
|
3172
|
+
* @since MiniKit 3.15.0
|
|
3173
|
+
*/
|
|
3174
|
+
DEFAULT = 1000,
|
|
3175
|
+
|
|
3176
|
+
/**
|
|
3177
|
+
* 通过最近使用小程序列表进入
|
|
3178
|
+
* @since MiniKit 3.15.0
|
|
3179
|
+
*/
|
|
3180
|
+
RECENTLY_USED = 1001,
|
|
3181
|
+
|
|
3182
|
+
/**
|
|
3183
|
+
* 通过URL映射进入
|
|
3184
|
+
* @since MiniKit 3.15.0
|
|
3185
|
+
*/
|
|
3186
|
+
URL_MAPPING = 1002,
|
|
3187
|
+
}
|
|
3188
|
+
|
|
3189
|
+
/** @since MiniKit 1.0.0 */
|
|
3190
|
+
export interface ReferrerInfo {
|
|
3191
|
+
/**
|
|
3192
|
+
* 来源小程序的 appId
|
|
3193
|
+
* @since MiniKit 3.2.0
|
|
3194
|
+
*/
|
|
3195
|
+
appId: string
|
|
3196
|
+
/**
|
|
3197
|
+
* 来源小程序传过来的数据,特定scene支持
|
|
3198
|
+
* @since MiniKit 3.2.0
|
|
3199
|
+
*/
|
|
3200
|
+
extraData: Record<string, any>
|
|
3201
|
+
}
|
|
3202
|
+
|
|
3203
|
+
/** @since MiniKit 1.0.0 */
|
|
3204
|
+
export interface MiniAppOptions {
|
|
3205
|
+
/**
|
|
3206
|
+
* 启动小程序的路径 (代码包路径)
|
|
3207
|
+
* @since MiniKit 1.0.0
|
|
3208
|
+
*/
|
|
1501
3209
|
path: string
|
|
1502
|
-
/**
|
|
3210
|
+
/**
|
|
3211
|
+
* 启动小程序的场景值
|
|
3212
|
+
* @since MiniKit 3.15.0
|
|
3213
|
+
* @defaultValue MiniAppScene.DEFAULT
|
|
3214
|
+
*/
|
|
1503
3215
|
scene?: MiniAppScene
|
|
1504
|
-
/**
|
|
1505
|
-
|
|
1506
|
-
|
|
3216
|
+
/**
|
|
3217
|
+
* 启动小程序的 query 参数
|
|
3218
|
+
* @since MiniKit 1.0.0
|
|
3219
|
+
*/
|
|
3220
|
+
query: Record<string, any>
|
|
3221
|
+
/**
|
|
3222
|
+
* 分享转发
|
|
3223
|
+
* @since MiniKit 1.0.0
|
|
3224
|
+
*/
|
|
1507
3225
|
referrerInfo: ReferrerInfo
|
|
1508
|
-
/**
|
|
3226
|
+
/**
|
|
3227
|
+
* API 类别: default 默认类别; embedded 内嵌,通过打开半屏小程序能力打开的小程序
|
|
3228
|
+
* @since MiniKit 1.0.0
|
|
3229
|
+
* @defaultValue "default"
|
|
3230
|
+
*/
|
|
1509
3231
|
apiCategory?: string
|
|
3232
|
+
/**
|
|
3233
|
+
* 启动小程序的额外参数,一般指容器附加的参数,非业务参数
|
|
3234
|
+
* @since MiniKit 3.21.0
|
|
3235
|
+
*/
|
|
3236
|
+
extraQuery?: Record<string, any>
|
|
3237
|
+
}
|
|
3238
|
+
|
|
3239
|
+
/** @since MiniKit 2.0.6 */
|
|
3240
|
+
export interface BoardBean {
|
|
3241
|
+
/**
|
|
3242
|
+
* 看板页标题
|
|
3243
|
+
* @since MiniKit 2.0.6
|
|
3244
|
+
*/
|
|
3245
|
+
title: string
|
|
1510
3246
|
}
|
|
1511
3247
|
|
|
1512
|
-
|
|
1513
|
-
|
|
3248
|
+
/** @since MiniKit 2.3.17 */
|
|
3249
|
+
export interface BoardIconBean {
|
|
3250
|
+
/**
|
|
3251
|
+
* 看板页icon
|
|
3252
|
+
* @since MiniKit 2.3.17
|
|
3253
|
+
*/
|
|
3254
|
+
icon: string
|
|
3255
|
+
}
|
|
3256
|
+
|
|
3257
|
+
/** @since MiniKit 2.3.0 */
|
|
3258
|
+
export interface CapsuleButtonRectBean {
|
|
3259
|
+
/**
|
|
3260
|
+
* 宽度,单位:px
|
|
3261
|
+
* @since MiniKit 2.3.0
|
|
3262
|
+
*/
|
|
1514
3263
|
width: number
|
|
1515
|
-
/**
|
|
3264
|
+
/**
|
|
3265
|
+
* 高度,单位:px
|
|
3266
|
+
* @since MiniKit 2.3.0
|
|
3267
|
+
*/
|
|
1516
3268
|
height: number
|
|
1517
|
-
/**
|
|
3269
|
+
/**
|
|
3270
|
+
* 上边界坐标,单位:px
|
|
3271
|
+
* @since MiniKit 2.3.0
|
|
3272
|
+
*/
|
|
1518
3273
|
top: number
|
|
1519
|
-
/**
|
|
3274
|
+
/**
|
|
3275
|
+
* 右边界坐标,单位:px
|
|
3276
|
+
* @since MiniKit 2.3.0
|
|
3277
|
+
*/
|
|
1520
3278
|
right: number
|
|
1521
|
-
/**
|
|
3279
|
+
/**
|
|
3280
|
+
* 下边界坐标,单位:px
|
|
3281
|
+
* @since MiniKit 2.3.0
|
|
3282
|
+
*/
|
|
1522
3283
|
bottom: number
|
|
1523
|
-
/**
|
|
3284
|
+
/**
|
|
3285
|
+
* 左边界坐标,单位:px
|
|
3286
|
+
* @since MiniKit 2.3.0
|
|
3287
|
+
*/
|
|
1524
3288
|
left: number
|
|
1525
3289
|
}
|
|
1526
3290
|
|
|
1527
|
-
|
|
1528
|
-
|
|
3291
|
+
/** @since MiniKit 2.3.0 */
|
|
3292
|
+
export interface PreDownloadMiniAppParams {
|
|
3293
|
+
/**
|
|
3294
|
+
* 小程序id
|
|
3295
|
+
* @since MiniKit 2.3.0
|
|
3296
|
+
*/
|
|
1529
3297
|
miniAppId: string
|
|
1530
|
-
/**
|
|
3298
|
+
/**
|
|
3299
|
+
* 指定小程序版本(可选参数)
|
|
3300
|
+
* @since MiniKit 2.3.0
|
|
3301
|
+
*/
|
|
1531
3302
|
miniAppVersion?: string
|
|
1532
3303
|
}
|
|
1533
3304
|
|
|
1534
|
-
|
|
1535
|
-
|
|
3305
|
+
/** @since MiniKit 2.3.2 */
|
|
3306
|
+
export interface LoginBean {
|
|
3307
|
+
/**
|
|
3308
|
+
* 超时时间,单位ms
|
|
3309
|
+
* @since MiniKit 2.3.2
|
|
3310
|
+
*/
|
|
1536
3311
|
timeout?: number
|
|
1537
3312
|
}
|
|
1538
3313
|
|
|
1539
|
-
|
|
1540
|
-
|
|
3314
|
+
/** @since MiniKit 2.3.2 */
|
|
3315
|
+
export interface LoginResult {
|
|
3316
|
+
/**
|
|
3317
|
+
* 用户登录凭证(有效期五分钟)
|
|
3318
|
+
* @since MiniKit 2.3.2
|
|
3319
|
+
*/
|
|
1541
3320
|
code: string
|
|
1542
3321
|
}
|
|
1543
3322
|
|
|
1544
|
-
|
|
1545
|
-
|
|
3323
|
+
/** @since MiniKit 2.4.1 */
|
|
3324
|
+
export interface OrientationBean {
|
|
3325
|
+
/**
|
|
3326
|
+
* 屏幕旋转设置, auto / portrait / landscape (默认landscape-right)
|
|
3327
|
+
* @since MiniKit 2.4.1
|
|
3328
|
+
*/
|
|
1546
3329
|
pageOrientation: string
|
|
3330
|
+
/**
|
|
3331
|
+
* 是否反向旋转,仅在pageOrientation为landscape时有效,默认false
|
|
3332
|
+
* @since MiniKit 3.24.0
|
|
3333
|
+
*/
|
|
3334
|
+
reverse?: boolean
|
|
3335
|
+
}
|
|
3336
|
+
|
|
3337
|
+
/** @since MiniKit 3.0.0 */
|
|
3338
|
+
export interface OpenURLBean {
|
|
3339
|
+
/**
|
|
3340
|
+
* 要打开的url
|
|
3341
|
+
* @since MiniKit 3.0.0
|
|
3342
|
+
*/
|
|
3343
|
+
url: string
|
|
1547
3344
|
}
|
|
1548
3345
|
|
|
1549
|
-
|
|
1550
|
-
|
|
3346
|
+
/** @since MiniKit 3.0.0 */
|
|
3347
|
+
export interface CanOpenURLResultBean {
|
|
3348
|
+
/**
|
|
3349
|
+
* 是否支持打开对应的url
|
|
3350
|
+
* @since MiniKit 3.0.0
|
|
3351
|
+
* @defaultValue false
|
|
3352
|
+
*/
|
|
1551
3353
|
isCanOpen?: boolean
|
|
1552
3354
|
}
|
|
1553
3355
|
|
|
1554
|
-
|
|
1555
|
-
|
|
3356
|
+
/** @since MiniKit 3.1.0 */
|
|
3357
|
+
export interface MiniProgramAccountInfo {
|
|
3358
|
+
/**
|
|
3359
|
+
* 小程序 appId
|
|
3360
|
+
* @since MiniKit 3.2.0
|
|
3361
|
+
*/
|
|
3362
|
+
appId: string
|
|
3363
|
+
/**
|
|
3364
|
+
* 小程序版本
|
|
3365
|
+
* develop: 开发版
|
|
3366
|
+
* trail: 体验版
|
|
3367
|
+
* release: 正式版
|
|
3368
|
+
* @since MiniKit 3.2.0
|
|
3369
|
+
*/
|
|
3370
|
+
envVersion: string
|
|
3371
|
+
/**
|
|
3372
|
+
* 小程序版本号
|
|
3373
|
+
* @since MiniKit 3.2.0
|
|
3374
|
+
*/
|
|
3375
|
+
version: string
|
|
3376
|
+
/**
|
|
3377
|
+
* 小程序名称
|
|
3378
|
+
* @since MiniKit 3.12.1
|
|
3379
|
+
*/
|
|
3380
|
+
appName: string
|
|
3381
|
+
/**
|
|
3382
|
+
* 小程序图标
|
|
3383
|
+
* @since MiniKit 3.12.1
|
|
3384
|
+
*/
|
|
3385
|
+
appIcon: string
|
|
3386
|
+
/**
|
|
3387
|
+
* 小程序提供者类型
|
|
3388
|
+
* third: 三方
|
|
3389
|
+
* official: 官方
|
|
3390
|
+
* @since MiniKit 3.23.0
|
|
3391
|
+
*/
|
|
3392
|
+
providerType: string
|
|
3393
|
+
}
|
|
3394
|
+
|
|
3395
|
+
/** @since MiniKit 3.1.0 */
|
|
3396
|
+
export interface AccountInfoResp {
|
|
3397
|
+
/**
|
|
3398
|
+
* 小程序账号信息
|
|
3399
|
+
* @since MiniKit 3.1.0
|
|
3400
|
+
*/
|
|
1556
3401
|
miniProgram: MiniProgramAccountInfo
|
|
1557
3402
|
}
|
|
1558
3403
|
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
3404
|
+
/** @since MiniKit 3.11.5 */
|
|
3405
|
+
export interface MiniAppConfigResp {
|
|
3406
|
+
/**
|
|
3407
|
+
* 小程序自定义配置
|
|
3408
|
+
* @since MiniKit 3.11.5
|
|
3409
|
+
*/
|
|
3410
|
+
config: Record<string, any>
|
|
3411
|
+
}
|
|
3412
|
+
|
|
3413
|
+
/** @since MiniKit 3.4.0 */
|
|
3414
|
+
export enum EffectPage {
|
|
3415
|
+
/**
|
|
3416
|
+
* 当前页面
|
|
3417
|
+
* @since MiniKit 3.4.0
|
|
3418
|
+
*/
|
|
3419
|
+
current = "current",
|
|
3420
|
+
|
|
3421
|
+
/**
|
|
3422
|
+
* 所有页面
|
|
3423
|
+
* @since MiniKit 3.4.0
|
|
3424
|
+
*/
|
|
3425
|
+
all = "all",
|
|
1562
3426
|
}
|
|
1563
3427
|
|
|
1564
|
-
|
|
1565
|
-
|
|
3428
|
+
/** @since MiniKit 3.4.0 */
|
|
3429
|
+
export interface BoardItemBean {
|
|
3430
|
+
/**
|
|
3431
|
+
* item名称
|
|
3432
|
+
* @since MiniKit 3.4.0
|
|
3433
|
+
*/
|
|
3434
|
+
key: string
|
|
3435
|
+
/**
|
|
3436
|
+
* item图标
|
|
3437
|
+
* @since MiniKit 3.4.0
|
|
3438
|
+
*/
|
|
3439
|
+
iconPath: string
|
|
3440
|
+
/**
|
|
3441
|
+
* item文案
|
|
3442
|
+
* @since MiniKit 3.4.0
|
|
3443
|
+
*/
|
|
3444
|
+
text: string
|
|
3445
|
+
/**
|
|
3446
|
+
* item是否显示
|
|
3447
|
+
* @since MiniKit 3.4.0
|
|
3448
|
+
* @defaultValue true
|
|
3449
|
+
*/
|
|
3450
|
+
isShow?: boolean
|
|
3451
|
+
}
|
|
3452
|
+
|
|
3453
|
+
/** @since MiniKit 3.4.0 */
|
|
3454
|
+
export interface BoardMenusBean {
|
|
3455
|
+
/**
|
|
3456
|
+
* 生效页面, 默认当前页面
|
|
3457
|
+
* @since MiniKit 3.4.0
|
|
3458
|
+
* @defaultValue EffectPage.current
|
|
3459
|
+
*/
|
|
1566
3460
|
effectPage?: EffectPage
|
|
1567
|
-
/**
|
|
3461
|
+
/**
|
|
3462
|
+
* item列表
|
|
3463
|
+
* @since MiniKit 3.4.0
|
|
3464
|
+
*/
|
|
1568
3465
|
menus: BoardItemBean[]
|
|
1569
3466
|
}
|
|
1570
3467
|
|
|
1571
|
-
|
|
1572
|
-
|
|
3468
|
+
/** @since MiniKit 3.6.1 */
|
|
3469
|
+
export interface RedBodReq {
|
|
3470
|
+
/**
|
|
3471
|
+
* 生效页面, 默认当前页面
|
|
3472
|
+
* @since MiniKit 3.6.1
|
|
3473
|
+
* @defaultValue EffectPage.current
|
|
3474
|
+
*/
|
|
1573
3475
|
effectPage?: EffectPage
|
|
1574
|
-
/**
|
|
3476
|
+
/**
|
|
3477
|
+
* 看板item名称
|
|
3478
|
+
* @since MiniKit 3.6.1
|
|
3479
|
+
*/
|
|
1575
3480
|
key: string
|
|
1576
3481
|
}
|
|
1577
3482
|
|
|
1578
|
-
|
|
1579
|
-
|
|
3483
|
+
/** @since MiniKit 3.12.1 */
|
|
3484
|
+
export interface BackgroundImageBean {
|
|
3485
|
+
/**
|
|
3486
|
+
* 图片地址,支持网络图片和本地图片
|
|
3487
|
+
* @since MiniKit 3.12.1
|
|
3488
|
+
*/
|
|
1580
3489
|
imageUrl: string
|
|
1581
3490
|
}
|
|
1582
3491
|
|
|
1583
|
-
|
|
1584
|
-
|
|
3492
|
+
/** @since MiniKit 3.14.0 */
|
|
3493
|
+
export interface BackgroundColorBean {
|
|
3494
|
+
/**
|
|
3495
|
+
* 当前页面背景颜色
|
|
3496
|
+
* @since MiniKit 3.14.0
|
|
3497
|
+
*/
|
|
1585
3498
|
color: string
|
|
1586
3499
|
}
|
|
1587
3500
|
|
|
1588
|
-
|
|
1589
|
-
|
|
3501
|
+
/** @since MiniKit 3.6.0 */
|
|
3502
|
+
export interface CreateReq {
|
|
3503
|
+
/**
|
|
3504
|
+
* managerId: 通知管理器id
|
|
3505
|
+
* @since MiniKit 3.6.0
|
|
3506
|
+
*/
|
|
1590
3507
|
managerId: string
|
|
1591
|
-
/**
|
|
3508
|
+
/**
|
|
3509
|
+
* name: 通知名称
|
|
3510
|
+
* @since MiniKit 3.6.0
|
|
3511
|
+
*/
|
|
1592
3512
|
name: string
|
|
1593
3513
|
}
|
|
1594
3514
|
|
|
1595
|
-
|
|
1596
|
-
|
|
3515
|
+
/** @since MiniKit 3.6.0 */
|
|
3516
|
+
export interface ObserverReq {
|
|
3517
|
+
/**
|
|
3518
|
+
* managerId: 通知管理器id
|
|
3519
|
+
* @since MiniKit 3.6.0
|
|
3520
|
+
*/
|
|
1597
3521
|
managerId: string
|
|
1598
3522
|
}
|
|
1599
3523
|
|
|
1600
|
-
|
|
1601
|
-
|
|
3524
|
+
/** @since MiniKit 3.20.0 */
|
|
3525
|
+
export interface SendNotificationToNativeParams {
|
|
3526
|
+
/**
|
|
3527
|
+
* eventId: 事件id
|
|
3528
|
+
* @since MiniKit 3.20.0
|
|
3529
|
+
*/
|
|
3530
|
+
eventId: string
|
|
3531
|
+
/**
|
|
3532
|
+
* name: 通知名称
|
|
3533
|
+
* @since MiniKit 3.20.0
|
|
3534
|
+
*/
|
|
3535
|
+
name: string
|
|
3536
|
+
}
|
|
3537
|
+
|
|
3538
|
+
/** @since MiniKit 3.6.0 */
|
|
3539
|
+
export interface Received {
|
|
3540
|
+
/**
|
|
3541
|
+
* managerId
|
|
3542
|
+
* @since MiniKit 3.6.0
|
|
3543
|
+
*/
|
|
3544
|
+
managerId: string
|
|
3545
|
+
/**
|
|
3546
|
+
* data: 通知内容
|
|
3547
|
+
* @since MiniKit 3.6.0
|
|
3548
|
+
*/
|
|
3549
|
+
data: Record<string, any>
|
|
3550
|
+
}
|
|
3551
|
+
|
|
3552
|
+
/** @since MiniKit 1.0.0 */
|
|
3553
|
+
export interface NavigationBarLoadingParams {
|
|
3554
|
+
/**
|
|
3555
|
+
* 页面标题
|
|
3556
|
+
* @since MiniKit 1.0.0
|
|
3557
|
+
*/
|
|
1602
3558
|
title: string
|
|
1603
3559
|
}
|
|
1604
3560
|
|
|
1605
|
-
|
|
1606
|
-
|
|
3561
|
+
/** @since MiniKit 1.0.0 */
|
|
3562
|
+
export interface NavigationBarColorAnimationInfo {
|
|
3563
|
+
/**
|
|
3564
|
+
* 动画变化时间,单位 ms
|
|
3565
|
+
* @since MiniKit 1.0.0
|
|
3566
|
+
* @defaultValue 0
|
|
3567
|
+
*/
|
|
3568
|
+
duration?: number
|
|
3569
|
+
/**
|
|
3570
|
+
* 动画变化方式
|
|
3571
|
+
* 'linear' 动画从头到尾的速度是相同的
|
|
3572
|
+
* 'easeIn' 动画以低速开始
|
|
3573
|
+
* 'easeOut' 动画以低速结束
|
|
3574
|
+
* 'easeInOut' 动画以低速开始和结束
|
|
3575
|
+
* @since MiniKit 1.0.0
|
|
3576
|
+
* @defaultValue "linear"
|
|
3577
|
+
*/
|
|
3578
|
+
timingFunc?: string
|
|
3579
|
+
}
|
|
3580
|
+
|
|
3581
|
+
/** @since MiniKit 1.0.0 */
|
|
3582
|
+
export interface NavigationBarColorParams {
|
|
3583
|
+
/**
|
|
3584
|
+
* 前景颜色值,包括按钮、标题、状态栏的颜色,仅支持 #ffffff 和 #000000
|
|
3585
|
+
* @since MiniKit 1.0.0
|
|
3586
|
+
*/
|
|
1607
3587
|
frontColor: string
|
|
1608
|
-
/**
|
|
3588
|
+
/**
|
|
3589
|
+
* 背景颜色值,有效值为十六进制颜色
|
|
3590
|
+
* @since MiniKit 1.0.0
|
|
3591
|
+
*/
|
|
1609
3592
|
backgroundColor: string
|
|
1610
|
-
/**
|
|
3593
|
+
/**
|
|
3594
|
+
* 动画效果
|
|
3595
|
+
* @since MiniKit 1.0.0
|
|
3596
|
+
*/
|
|
1611
3597
|
animation: NavigationBarColorAnimationInfo
|
|
1612
3598
|
}
|
|
1613
3599
|
|
|
1614
|
-
|
|
1615
|
-
|
|
3600
|
+
/** @since MiniKit 1.0.0 */
|
|
3601
|
+
export interface RouteBean {
|
|
3602
|
+
/**
|
|
3603
|
+
* 页面路径, 参数需要做 url encode 处理
|
|
3604
|
+
* @since MiniKit 1.0.0
|
|
3605
|
+
*/
|
|
1616
3606
|
url: string
|
|
1617
|
-
/**
|
|
3607
|
+
/**
|
|
3608
|
+
* 打开方式,支持全屏full,半屏half;默认全屏full
|
|
3609
|
+
* @since MiniKit 2.6.0
|
|
3610
|
+
* @defaultValue "full"
|
|
3611
|
+
*/
|
|
1618
3612
|
type?: string
|
|
1619
3613
|
/**
|
|
1620
3614
|
* 非全屏页面距离屏幕顶部的距离,type 为 half 时有效
|
|
1621
3615
|
* 取值范围:【1-屏幕的高度】单位:px
|
|
1622
3616
|
* 注意:Android 显示区域不包括状态栏,iOS显示区域包括状态栏。
|
|
1623
3617
|
* 因此 Android 的 topMargin 的最大值是屏幕高度减去状态栏的高度。
|
|
3618
|
+
* @since MiniKit 3.11.3
|
|
3619
|
+
* @defaultValue 100
|
|
1624
3620
|
*/
|
|
1625
3621
|
topMargin?: number
|
|
1626
3622
|
/**
|
|
1627
3623
|
* 非全屏页面距离屏幕顶部的百分比,type 为 half 时有效,优先级高于 topMargin
|
|
1628
3624
|
* 取值范围【1-99】单位:百分比
|
|
1629
3625
|
* 注意:Android 显示区域不包括状态栏,iOS显示区域包括状态栏。
|
|
3626
|
+
* @since MiniKit 3.11.3
|
|
1630
3627
|
*/
|
|
1631
3628
|
topMarginPercent?: number
|
|
3629
|
+
/**
|
|
3630
|
+
* 指定页面进入动画效果,目前支持 "slide-in-bottom"
|
|
3631
|
+
* 如果未指定,则使用默认式样
|
|
3632
|
+
* @since MiniKit 3.26.0
|
|
3633
|
+
*/
|
|
3634
|
+
animationType?: string
|
|
1632
3635
|
}
|
|
1633
3636
|
|
|
1634
|
-
|
|
1635
|
-
|
|
3637
|
+
/** @since MiniKit 2.4.8 */
|
|
3638
|
+
export interface BackRouteBean {
|
|
3639
|
+
/**
|
|
3640
|
+
* 返回的页面数,如果 delta 大于现有页面数,则返回到首页
|
|
3641
|
+
* @since MiniKit 2.4.8
|
|
3642
|
+
* @defaultValue 1
|
|
3643
|
+
*/
|
|
1636
3644
|
delta?: number
|
|
1637
3645
|
}
|
|
1638
3646
|
|
|
1639
|
-
|
|
1640
|
-
|
|
3647
|
+
/** @since MiniKit 3.15.2 */
|
|
3648
|
+
export interface RedirectBean {
|
|
3649
|
+
/**
|
|
3650
|
+
* 页面路径, 参数需要做 url encode 处理
|
|
3651
|
+
* @since MiniKit 3.15.2
|
|
3652
|
+
*/
|
|
1641
3653
|
url: string
|
|
1642
3654
|
}
|
|
1643
3655
|
|
|
1644
|
-
|
|
1645
|
-
|
|
3656
|
+
/** @since MiniKit 3.15.2 */
|
|
3657
|
+
export interface ReLaunchBean {
|
|
3658
|
+
/**
|
|
3659
|
+
* 页面路径, 参数需要做 url encode 处理
|
|
3660
|
+
* @since MiniKit 3.15.2
|
|
3661
|
+
*/
|
|
1646
3662
|
url: string
|
|
1647
3663
|
}
|
|
1648
3664
|
|
|
1649
|
-
|
|
1650
|
-
|
|
3665
|
+
/** @since MiniKit 3.15.2 */
|
|
3666
|
+
export interface SwitchTabBean {
|
|
3667
|
+
/**
|
|
3668
|
+
* 页面路径, 不支持参数
|
|
3669
|
+
* @since MiniKit 3.15.2
|
|
3670
|
+
*/
|
|
1651
3671
|
url: string
|
|
1652
3672
|
}
|
|
1653
3673
|
|
|
1654
|
-
|
|
1655
|
-
|
|
3674
|
+
/** @since MiniKit 3.15.2 */
|
|
3675
|
+
export interface CanIUseBean {
|
|
3676
|
+
/**
|
|
3677
|
+
* api名称
|
|
3678
|
+
* @since MiniKit 3.15.2
|
|
3679
|
+
*/
|
|
3680
|
+
api: string
|
|
3681
|
+
}
|
|
3682
|
+
|
|
3683
|
+
/** @since MiniKit 2.4.2 */
|
|
3684
|
+
export interface SuccessResult {
|
|
3685
|
+
/**
|
|
3686
|
+
* 当前版本是否可用
|
|
3687
|
+
* @since MiniKit 2.4.2
|
|
3688
|
+
*/
|
|
1656
3689
|
result: boolean
|
|
1657
3690
|
}
|
|
1658
3691
|
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
3692
|
+
/** @since MiniKit 2.4.2 */
|
|
3693
|
+
export interface ExtApiBean {
|
|
3694
|
+
/**
|
|
3695
|
+
* api名称
|
|
3696
|
+
* @since MiniKit 2.4.2
|
|
3697
|
+
*/
|
|
3698
|
+
api: string
|
|
3699
|
+
/**
|
|
3700
|
+
* api参数
|
|
3701
|
+
* @since MiniKit 2.4.2
|
|
3702
|
+
*/
|
|
3703
|
+
params?: Record<string, any>
|
|
3704
|
+
}
|
|
3705
|
+
|
|
3706
|
+
/** @since MiniKit 2.4.2 */
|
|
3707
|
+
export interface InvokeResult {
|
|
3708
|
+
/**
|
|
3709
|
+
* extApi返回数据
|
|
3710
|
+
* @since MiniKit 2.4.2
|
|
3711
|
+
*/
|
|
3712
|
+
data?: Record<string, any>
|
|
3713
|
+
}
|
|
3714
|
+
|
|
3715
|
+
/** @since MiniKit 3.27.0 */
|
|
3716
|
+
export interface ReceiveApiRequestCacheReq {
|
|
3717
|
+
/**
|
|
3718
|
+
* requestId 请求ID
|
|
3719
|
+
* @since MiniKit 3.27.0
|
|
3720
|
+
*/
|
|
3721
|
+
requestId: string
|
|
3722
|
+
}
|
|
3723
|
+
|
|
3724
|
+
/** @since MiniKit 3.27.0 */
|
|
3725
|
+
export interface ReceiveApiRequestCacheRes {
|
|
3726
|
+
/**
|
|
3727
|
+
* 请求结果
|
|
3728
|
+
* thing_data_ 出参结构体, JSON序列化
|
|
3729
|
+
* @since MiniKit 3.27.0
|
|
3730
|
+
*/
|
|
3731
|
+
thing_json_?: Record<string, any>
|
|
3732
|
+
/**
|
|
3733
|
+
* 元数据
|
|
3734
|
+
* @since MiniKit 3.27.0
|
|
3735
|
+
*/
|
|
3736
|
+
data: string
|
|
3737
|
+
/**
|
|
3738
|
+
* 序列化返回结果
|
|
3739
|
+
* @since MiniKit 3.27.0
|
|
3740
|
+
*/
|
|
3741
|
+
result: Record<string, any>
|
|
3742
|
+
/**
|
|
3743
|
+
* apiName
|
|
3744
|
+
* @since MiniKit 3.27.0
|
|
3745
|
+
*/
|
|
3746
|
+
api: string
|
|
1662
3747
|
}
|
|
1663
3748
|
|
|
1664
|
-
|
|
1665
|
-
|
|
3749
|
+
/** @since MiniKit 3.27.0 */
|
|
3750
|
+
export interface RemoveApiRequestCacheBean {
|
|
3751
|
+
/**
|
|
3752
|
+
* apiName API名称
|
|
3753
|
+
* @since MiniKit 3.27.0
|
|
3754
|
+
*/
|
|
3755
|
+
apiName: string
|
|
3756
|
+
/**
|
|
3757
|
+
* version 版本号
|
|
3758
|
+
* @since MiniKit 3.27.0
|
|
3759
|
+
*/
|
|
3760
|
+
version: string
|
|
3761
|
+
}
|
|
3762
|
+
|
|
3763
|
+
/** @since MiniKit 3.27.0 */
|
|
3764
|
+
export interface RemoveApiRequestCacheReq {
|
|
3765
|
+
/**
|
|
3766
|
+
* apiList 需要删除缓存的API列表
|
|
3767
|
+
* @since MiniKit 3.27.0
|
|
3768
|
+
*/
|
|
3769
|
+
apiList: RemoveApiRequestCacheBean[]
|
|
3770
|
+
}
|
|
3771
|
+
|
|
3772
|
+
/** @since MiniKit 3.30.0 */
|
|
3773
|
+
export interface EnablePageScrollBean {
|
|
3774
|
+
/**
|
|
3775
|
+
* 是否允许页面滚动
|
|
3776
|
+
* @since MiniKit 3.30.0
|
|
3777
|
+
* @defaultValue true
|
|
3778
|
+
*/
|
|
3779
|
+
scrollEnable?: boolean
|
|
3780
|
+
}
|
|
3781
|
+
|
|
3782
|
+
/** @since MiniKit 3.5.4 */
|
|
3783
|
+
export enum WidgetMode {
|
|
3784
|
+
/**
|
|
3785
|
+
* 单次移除
|
|
3786
|
+
* @since MiniKit 3.5.4
|
|
3787
|
+
*/
|
|
3788
|
+
ONCE = "ONCE",
|
|
3789
|
+
|
|
3790
|
+
/**
|
|
3791
|
+
* 永久移除
|
|
3792
|
+
* @since MiniKit 3.5.4
|
|
3793
|
+
*/
|
|
3794
|
+
FOREVER = "FOREVER",
|
|
3795
|
+
}
|
|
3796
|
+
|
|
3797
|
+
/** @since MiniKit 3.5.4 */
|
|
3798
|
+
export interface MiniWidgetRemoveBean {
|
|
3799
|
+
/**
|
|
3800
|
+
* 移除模式
|
|
3801
|
+
* @since MiniKit 3.5.4
|
|
3802
|
+
* @defaultValue WidgetMode.ONCE
|
|
3803
|
+
*/
|
|
1666
3804
|
mode?: WidgetMode
|
|
1667
3805
|
}
|
|
1668
3806
|
|
|
3807
|
+
interface MiniLogManager {
|
|
3808
|
+
/**
|
|
3809
|
+
* 打印info日志
|
|
3810
|
+
* @public
|
|
3811
|
+
* @since MiniKit 3.29.2
|
|
3812
|
+
* @platform iOS Android
|
|
3813
|
+
*/
|
|
3814
|
+
logInfo(params: {
|
|
3815
|
+
/**
|
|
3816
|
+
* errorCode
|
|
3817
|
+
* @since MiniKit 3.29.2
|
|
3818
|
+
*/
|
|
3819
|
+
code: LogManagerCode
|
|
3820
|
+
/**
|
|
3821
|
+
* 自定义消息
|
|
3822
|
+
* @since MiniKit 3.29.2
|
|
3823
|
+
*/
|
|
3824
|
+
desc?: string
|
|
3825
|
+
/**
|
|
3826
|
+
* 自定义参数,(限制1000个字符)
|
|
3827
|
+
* @since MiniKit 3.29.2
|
|
3828
|
+
*/
|
|
3829
|
+
params?: Record<string, any>
|
|
3830
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
3831
|
+
complete?: () => void
|
|
3832
|
+
/** 接口调用成功的回调函数 */
|
|
3833
|
+
success?: () => void
|
|
3834
|
+
/** 接口调用失败的回调函数 */
|
|
3835
|
+
fail?: (params: {
|
|
3836
|
+
/** 错误信息 */
|
|
3837
|
+
errorMsg: string
|
|
3838
|
+
/** 错误码 */
|
|
3839
|
+
errorCode: string | number
|
|
3840
|
+
/** 错误扩展 */
|
|
3841
|
+
innerError: {
|
|
3842
|
+
/** 错误扩展码 */
|
|
3843
|
+
errorCode: string | number
|
|
3844
|
+
/** 错误扩展信息 */
|
|
3845
|
+
errorMsg: string
|
|
3846
|
+
}
|
|
3847
|
+
}) => void
|
|
3848
|
+
}): void
|
|
3849
|
+
|
|
3850
|
+
/**
|
|
3851
|
+
* 打印error日志
|
|
3852
|
+
* @public
|
|
3853
|
+
* @since MiniKit 3.29.2
|
|
3854
|
+
* @platform iOS Android
|
|
3855
|
+
*/
|
|
3856
|
+
logError(params: {
|
|
3857
|
+
/**
|
|
3858
|
+
* errorCode
|
|
3859
|
+
* @since MiniKit 3.29.2
|
|
3860
|
+
*/
|
|
3861
|
+
code: LogManagerCode
|
|
3862
|
+
/**
|
|
3863
|
+
* 自定义消息
|
|
3864
|
+
* @since MiniKit 3.29.2
|
|
3865
|
+
*/
|
|
3866
|
+
desc?: string
|
|
3867
|
+
/**
|
|
3868
|
+
* 自定义参数,(限制1000个字符)
|
|
3869
|
+
* @since MiniKit 3.29.2
|
|
3870
|
+
*/
|
|
3871
|
+
params?: Record<string, any>
|
|
3872
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
3873
|
+
complete?: () => void
|
|
3874
|
+
/** 接口调用成功的回调函数 */
|
|
3875
|
+
success?: () => void
|
|
3876
|
+
/** 接口调用失败的回调函数 */
|
|
3877
|
+
fail?: (params: {
|
|
3878
|
+
/** 错误信息 */
|
|
3879
|
+
errorMsg: string
|
|
3880
|
+
/** 错误码 */
|
|
3881
|
+
errorCode: string | number
|
|
3882
|
+
/** 错误扩展 */
|
|
3883
|
+
innerError: {
|
|
3884
|
+
/** 错误扩展码 */
|
|
3885
|
+
errorCode: string | number
|
|
3886
|
+
/** 错误扩展信息 */
|
|
3887
|
+
errorMsg: string
|
|
3888
|
+
}
|
|
3889
|
+
}) => void
|
|
3890
|
+
}): void
|
|
3891
|
+
|
|
3892
|
+
/**
|
|
3893
|
+
* 打印warn日志
|
|
3894
|
+
* @public
|
|
3895
|
+
* @since MiniKit 3.29.2
|
|
3896
|
+
* @platform iOS Android
|
|
3897
|
+
*/
|
|
3898
|
+
logWarn(params: {
|
|
3899
|
+
/**
|
|
3900
|
+
* errorCode
|
|
3901
|
+
* @since MiniKit 3.29.2
|
|
3902
|
+
*/
|
|
3903
|
+
code: LogManagerCode
|
|
3904
|
+
/**
|
|
3905
|
+
* 自定义消息
|
|
3906
|
+
* @since MiniKit 3.29.2
|
|
3907
|
+
*/
|
|
3908
|
+
desc?: string
|
|
3909
|
+
/**
|
|
3910
|
+
* 自定义参数,(限制1000个字符)
|
|
3911
|
+
* @since MiniKit 3.29.2
|
|
3912
|
+
*/
|
|
3913
|
+
params?: Record<string, any>
|
|
3914
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
3915
|
+
complete?: () => void
|
|
3916
|
+
/** 接口调用成功的回调函数 */
|
|
3917
|
+
success?: () => void
|
|
3918
|
+
/** 接口调用失败的回调函数 */
|
|
3919
|
+
fail?: (params: {
|
|
3920
|
+
/** 错误信息 */
|
|
3921
|
+
errorMsg: string
|
|
3922
|
+
/** 错误码 */
|
|
3923
|
+
errorCode: string | number
|
|
3924
|
+
/** 错误扩展 */
|
|
3925
|
+
innerError: {
|
|
3926
|
+
/** 错误扩展码 */
|
|
3927
|
+
errorCode: string | number
|
|
3928
|
+
/** 错误扩展信息 */
|
|
3929
|
+
errorMsg: string
|
|
3930
|
+
}
|
|
3931
|
+
}) => void
|
|
3932
|
+
}): void
|
|
3933
|
+
}
|
|
1669
3934
|
/**
|
|
1670
|
-
|
|
3935
|
+
* 创建日志实例对象
|
|
3936
|
+
* @public
|
|
3937
|
+
* @since MiniKit 3.29.2
|
|
3938
|
+
* @platform iOS Android
|
|
3939
|
+
*/
|
|
3940
|
+
export function getMiniLogManager(params: {
|
|
3941
|
+
/**
|
|
3942
|
+
* 业务类型,比如:Framework、 DeviceDetail等,必传
|
|
3943
|
+
* @since MiniKit 3.29.4
|
|
3944
|
+
*/
|
|
3945
|
+
os: string
|
|
3946
|
+
/**
|
|
3947
|
+
* 公共参数
|
|
3948
|
+
* @since MiniKit 3.29.2
|
|
3949
|
+
*/
|
|
3950
|
+
publicParam?: Record<string, string>
|
|
3951
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
3952
|
+
complete?: () => void
|
|
3953
|
+
/** 接口调用成功的回调函数 */
|
|
3954
|
+
success?: () => void
|
|
3955
|
+
/** 接口调用失败的回调函数 */
|
|
3956
|
+
fail?: (params: {
|
|
3957
|
+
/** 错误信息 */
|
|
3958
|
+
errorMsg: string
|
|
3959
|
+
/** 错误码 */
|
|
3960
|
+
errorCode: string | number
|
|
3961
|
+
/** 错误扩展 */
|
|
3962
|
+
innerError: {
|
|
3963
|
+
/** 错误扩展码 */
|
|
3964
|
+
errorCode: string | number
|
|
3965
|
+
/** 错误扩展信息 */
|
|
3966
|
+
errorMsg: string
|
|
3967
|
+
}
|
|
3968
|
+
}) => void
|
|
3969
|
+
}): MiniLogManager
|
|
3970
|
+
|
|
1671
3971
|
interface NativeEventManager {
|
|
1672
3972
|
/**
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
3973
|
+
* 停止监听通知
|
|
3974
|
+
* @public
|
|
3975
|
+
* @since MiniKit 3.6.0
|
|
3976
|
+
* @platform iOS Android
|
|
3977
|
+
* @deprecated offListener
|
|
3978
|
+
*/
|
|
1676
3979
|
offerListener(params: {
|
|
1677
|
-
|
|
3980
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
3981
|
+
complete?: () => void
|
|
3982
|
+
/** 接口调用成功的回调函数 */
|
|
3983
|
+
success?: () => void
|
|
3984
|
+
/** 接口调用失败的回调函数 */
|
|
1678
3985
|
fail?: (params: {
|
|
3986
|
+
/** 错误信息 */
|
|
1679
3987
|
errorMsg: string
|
|
3988
|
+
/** 错误码 */
|
|
1680
3989
|
errorCode: string | number
|
|
3990
|
+
/** 错误扩展 */
|
|
1681
3991
|
innerError: {
|
|
3992
|
+
/** 错误扩展码 */
|
|
1682
3993
|
errorCode: string | number
|
|
3994
|
+
/** 错误扩展信息 */
|
|
1683
3995
|
errorMsg: string
|
|
1684
3996
|
}
|
|
1685
3997
|
}) => void
|
|
1686
|
-
complete?: () => void
|
|
1687
3998
|
}): void
|
|
1688
3999
|
|
|
1689
4000
|
/**
|
|
1690
|
-
|
|
1691
|
-
|
|
4001
|
+
* 开始监听通知
|
|
4002
|
+
* @public
|
|
4003
|
+
* @since MiniKit 3.6.0
|
|
4004
|
+
* @platform iOS Android
|
|
4005
|
+
*/
|
|
1692
4006
|
onListener(
|
|
1693
4007
|
listener: (params: {
|
|
1694
|
-
/**
|
|
1695
|
-
|
|
4008
|
+
/**
|
|
4009
|
+
* managerId
|
|
4010
|
+
* @since MiniKit 3.6.0
|
|
4011
|
+
*/
|
|
4012
|
+
managerId: string
|
|
4013
|
+
/**
|
|
4014
|
+
* data: 通知内容
|
|
4015
|
+
* @since MiniKit 3.6.0
|
|
4016
|
+
*/
|
|
4017
|
+
data: Record<string, any>
|
|
1696
4018
|
}) => void
|
|
1697
4019
|
): void
|
|
1698
4020
|
|
|
1699
4021
|
/**
|
|
1700
|
-
|
|
1701
|
-
|
|
4022
|
+
* 停止监听通知
|
|
4023
|
+
* @public
|
|
4024
|
+
* @since MiniKit 3.15.2
|
|
4025
|
+
* @platform iOS Android
|
|
4026
|
+
*/
|
|
1702
4027
|
offListener(
|
|
1703
4028
|
listener: (params: {
|
|
1704
|
-
/**
|
|
1705
|
-
|
|
4029
|
+
/**
|
|
4030
|
+
* managerId
|
|
4031
|
+
* @since MiniKit 3.6.0
|
|
4032
|
+
*/
|
|
4033
|
+
managerId: string
|
|
4034
|
+
/**
|
|
4035
|
+
* data: 通知内容
|
|
4036
|
+
* @since MiniKit 3.6.0
|
|
4037
|
+
*/
|
|
4038
|
+
data: Record<string, any>
|
|
1706
4039
|
}) => void
|
|
1707
4040
|
): void
|
|
1708
4041
|
}
|
|
1709
4042
|
/**
|
|
1710
|
-
|
|
4043
|
+
* 创建原生通知管理器
|
|
4044
|
+
* @public
|
|
4045
|
+
* @since MiniKit 3.6.0
|
|
4046
|
+
* @platform iOS Android
|
|
4047
|
+
*/
|
|
1711
4048
|
export function createNativeEventManager(params: {
|
|
1712
|
-
/**
|
|
4049
|
+
/**
|
|
4050
|
+
* name: 通知名称
|
|
4051
|
+
* @since MiniKit 3.6.0
|
|
4052
|
+
*/
|
|
1713
4053
|
name: string
|
|
1714
|
-
|
|
4054
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
4055
|
+
complete?: () => void
|
|
4056
|
+
/** 接口调用成功的回调函数 */
|
|
4057
|
+
success?: () => void
|
|
4058
|
+
/** 接口调用失败的回调函数 */
|
|
1715
4059
|
fail?: (params: {
|
|
4060
|
+
/** 错误信息 */
|
|
1716
4061
|
errorMsg: string
|
|
4062
|
+
/** 错误码 */
|
|
1717
4063
|
errorCode: string | number
|
|
4064
|
+
/** 错误扩展 */
|
|
1718
4065
|
innerError: {
|
|
4066
|
+
/** 错误扩展码 */
|
|
1719
4067
|
errorCode: string | number
|
|
4068
|
+
/** 错误扩展信息 */
|
|
1720
4069
|
errorMsg: string
|
|
1721
4070
|
}
|
|
1722
4071
|
}) => void
|
|
1723
|
-
complete?: () => void
|
|
1724
4072
|
}): NativeEventManager
|
|
1725
4073
|
}
|