@dcloudio/uni-app-x 0.5.9 → 0.5.11
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/package.json +3 -2
- package/types/native/Element.d.ts +7 -2
- package/types/uni/core/index.d.ts +1 -0
- package/types/uni/core/lib/base/interceptor/index.d.ts +6 -0
- package/types/uni/core/lib/base/interceptor/interface.d.ts +139 -4
- package/types/uni/core/lib/interface.d.ts +15 -0
- package/types/uni/core/lib/route/interface.d.ts +11 -9
- package/types/uni/core/lib/ui/load-font-face/index.d.ts +2 -2
- package/types/uni/core/lib/ui/load-font-face/interface.d.ts +28 -6
- package/types/uni/core/lib/ui/page-scroll-to/interface.d.ts +3 -1
- package/types/uni/core/lib/ui/pull-down-refresh/interface.d.ts +3 -1
- package/types/uni/core/lib/ui/set-navigation-bar-color/interface.d.ts +14 -12
- package/types/uni/core/lib/ui/set-navigation-bar-title/index.d.ts +23 -0
- package/types/uni/core/lib/ui/set-navigation-bar-title/interface.d.ts +359 -0
- package/types/uni/core/lib/ui/tab-bar/interface.d.ts +24 -8
- package/types/uni/index.d.ts +1 -0
- package/types/uni/uts-plugin-api/index.d.ts +1 -1
- package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/index.d.ts +6 -0
- package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/interface.d.ts +16 -1
- package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +60 -0
- package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/index.d.ts +6 -0
- package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/interface.d.ts +19 -1
- package/types/uni/uts-plugin-api/lib/uni-network/utssdk/interface.d.ts +1 -3
- package/types/uni/uts-plugin-api/lib/uni-push/utssdk/interface.d.ts +80 -22
- package/types/uni/uts-plugin-component/lib/uni-video/utssdk/index.d.ts +12 -0
- package/types/uni/uts-plugin-component/lib/uni-video/utssdk/interface.d.ts +298 -158
- package/types/uni/uts-plugin-modules/index.d.ts +1 -0
- package/types/uni/uts-plugin-modules/lib/uni-facialRecognitionVerify/utssdk/index.d.ts +15 -0
- package/types/uni/uts-plugin-modules/lib/uni-facialRecognitionVerify/utssdk/interface.d.ts +66 -0
- package/types/vue/UniCloudDBElement.d.ts +39 -37
- package/types/vue/UniFormElement.d.ts +37 -0
- package/types/vue/index.d.ts +1 -0
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
import { AsyncApiSuccessResult } from '../../interface'
|
|
2
|
+
|
|
3
|
+
export type SetNavigationBarTitleOptions = {
|
|
4
|
+
/**
|
|
5
|
+
* 页面标题
|
|
6
|
+
* @uniPlatform {
|
|
7
|
+
* "app": {
|
|
8
|
+
* "android": {
|
|
9
|
+
* "osVer": "5.0",
|
|
10
|
+
* "uniVer": "√",
|
|
11
|
+
* "unixVer": "3.97"
|
|
12
|
+
* },
|
|
13
|
+
* "ios": {
|
|
14
|
+
* "osVer": "10.0",
|
|
15
|
+
* "uniVer": "√",
|
|
16
|
+
* "unixVer": "x"
|
|
17
|
+
* }
|
|
18
|
+
* },
|
|
19
|
+
* "mp": {
|
|
20
|
+
* "weixin": {
|
|
21
|
+
* "hostVer": "√",
|
|
22
|
+
* "uniVer": "√",
|
|
23
|
+
* "unixVer": "x"
|
|
24
|
+
* },
|
|
25
|
+
* "alipay": {
|
|
26
|
+
* "hostVer": "√",
|
|
27
|
+
* "uniVer": "√",
|
|
28
|
+
* "unixVer": "x"
|
|
29
|
+
* },
|
|
30
|
+
* "baidu": {
|
|
31
|
+
* "hostVer": "√",
|
|
32
|
+
* "uniVer": "√",
|
|
33
|
+
* "unixVer": "x"
|
|
34
|
+
* },
|
|
35
|
+
* "toutiao": {
|
|
36
|
+
* "hostVer": "√",
|
|
37
|
+
* "uniVer": "√",
|
|
38
|
+
* "unixVer": "x"
|
|
39
|
+
* },
|
|
40
|
+
* "lark": {
|
|
41
|
+
* "hostVer": "x",
|
|
42
|
+
* "uniVer": "x",
|
|
43
|
+
* "unixVer": "x"
|
|
44
|
+
* },
|
|
45
|
+
* "qq": {
|
|
46
|
+
* "hostVer": "√",
|
|
47
|
+
* "uniVer": "√",
|
|
48
|
+
* "unixVer": "x"
|
|
49
|
+
* },
|
|
50
|
+
* "kuaishou": {
|
|
51
|
+
* "hostVer": "√",
|
|
52
|
+
* "uniVer": "√",
|
|
53
|
+
* "unixVer": "x"
|
|
54
|
+
* },
|
|
55
|
+
* "jd": {
|
|
56
|
+
* "hostVer": "√",
|
|
57
|
+
* "uniVer": "√",
|
|
58
|
+
* "unixVer": "x"
|
|
59
|
+
* },
|
|
60
|
+
* "360": {
|
|
61
|
+
* "hostVer": "x",
|
|
62
|
+
* "uniVer": "x",
|
|
63
|
+
* "unixVer": "x"
|
|
64
|
+
* }
|
|
65
|
+
* },
|
|
66
|
+
* "quickapp": {
|
|
67
|
+
* "uniVer": "x",
|
|
68
|
+
* "unixVer": "x"
|
|
69
|
+
* },
|
|
70
|
+
* "web": {
|
|
71
|
+
* "uniVer": "√",
|
|
72
|
+
* "unixVer": "x"
|
|
73
|
+
* }
|
|
74
|
+
* }
|
|
75
|
+
*/
|
|
76
|
+
title: string
|
|
77
|
+
/**
|
|
78
|
+
* 接口调用成功的回调函数
|
|
79
|
+
* @uniPlatform {
|
|
80
|
+
* "app": {
|
|
81
|
+
* "android": {
|
|
82
|
+
* "osVer": "5.0",
|
|
83
|
+
* "uniVer": "√",
|
|
84
|
+
* "unixVer": "3.97"
|
|
85
|
+
* },
|
|
86
|
+
* "ios": {
|
|
87
|
+
* "osVer": "10.0",
|
|
88
|
+
* "uniVer": "√",
|
|
89
|
+
* "unixVer": "x"
|
|
90
|
+
* }
|
|
91
|
+
* },
|
|
92
|
+
* "mp": {
|
|
93
|
+
* "weixin": {
|
|
94
|
+
* "hostVer": "√",
|
|
95
|
+
* "uniVer": "√",
|
|
96
|
+
* "unixVer": "x"
|
|
97
|
+
* },
|
|
98
|
+
* "alipay": {
|
|
99
|
+
* "hostVer": "√",
|
|
100
|
+
* "uniVer": "√",
|
|
101
|
+
* "unixVer": "x"
|
|
102
|
+
* },
|
|
103
|
+
* "baidu": {
|
|
104
|
+
* "hostVer": "√",
|
|
105
|
+
* "uniVer": "√",
|
|
106
|
+
* "unixVer": "x"
|
|
107
|
+
* },
|
|
108
|
+
* "toutiao": {
|
|
109
|
+
* "hostVer": "√",
|
|
110
|
+
* "uniVer": "√",
|
|
111
|
+
* "unixVer": "x"
|
|
112
|
+
* },
|
|
113
|
+
* "lark": {
|
|
114
|
+
* "hostVer": "√",
|
|
115
|
+
* "uniVer": "√",
|
|
116
|
+
* "unixVer": "x"
|
|
117
|
+
* },
|
|
118
|
+
* "qq": {
|
|
119
|
+
* "hostVer": "√",
|
|
120
|
+
* "uniVer": "√",
|
|
121
|
+
* "unixVer": "x"
|
|
122
|
+
* },
|
|
123
|
+
* "kuaishou": {
|
|
124
|
+
* "hostVer": "√",
|
|
125
|
+
* "uniVer": "√",
|
|
126
|
+
* "unixVer": "x"
|
|
127
|
+
* },
|
|
128
|
+
* "jd": {
|
|
129
|
+
* "hostVer": "√",
|
|
130
|
+
* "uniVer": "√",
|
|
131
|
+
* "unixVer": "x"
|
|
132
|
+
* }
|
|
133
|
+
* },
|
|
134
|
+
* "web": {
|
|
135
|
+
* "uniVer": "√",
|
|
136
|
+
* "unixVer": "x"
|
|
137
|
+
* }
|
|
138
|
+
* }
|
|
139
|
+
*/
|
|
140
|
+
success?: SetNavigationBarTitleSuccessCallback
|
|
141
|
+
/**
|
|
142
|
+
* 接口调用失败的回调函数
|
|
143
|
+
* @uniPlatform {
|
|
144
|
+
* "app": {
|
|
145
|
+
* "android": {
|
|
146
|
+
* "osVer": "5.0",
|
|
147
|
+
* "uniVer": "√",
|
|
148
|
+
* "unixVer": "3.97"
|
|
149
|
+
* },
|
|
150
|
+
* "ios": {
|
|
151
|
+
* "osVer": "10.0",
|
|
152
|
+
* "uniVer": "√",
|
|
153
|
+
* "unixVer": "x"
|
|
154
|
+
* }
|
|
155
|
+
* },
|
|
156
|
+
* "mp": {
|
|
157
|
+
* "weixin": {
|
|
158
|
+
* "hostVer": "√",
|
|
159
|
+
* "uniVer": "√",
|
|
160
|
+
* "unixVer": "x"
|
|
161
|
+
* },
|
|
162
|
+
* "alipay": {
|
|
163
|
+
* "hostVer": "√",
|
|
164
|
+
* "uniVer": "√",
|
|
165
|
+
* "unixVer": "x"
|
|
166
|
+
* },
|
|
167
|
+
* "baidu": {
|
|
168
|
+
* "hostVer": "√",
|
|
169
|
+
* "uniVer": "√",
|
|
170
|
+
* "unixVer": "x"
|
|
171
|
+
* },
|
|
172
|
+
* "toutiao": {
|
|
173
|
+
* "hostVer": "√",
|
|
174
|
+
* "uniVer": "√",
|
|
175
|
+
* "unixVer": "x"
|
|
176
|
+
* },
|
|
177
|
+
* "lark": {
|
|
178
|
+
* "hostVer": "√",
|
|
179
|
+
* "uniVer": "√",
|
|
180
|
+
* "unixVer": "x"
|
|
181
|
+
* },
|
|
182
|
+
* "qq": {
|
|
183
|
+
* "hostVer": "√",
|
|
184
|
+
* "uniVer": "√",
|
|
185
|
+
* "unixVer": "x"
|
|
186
|
+
* },
|
|
187
|
+
* "kuaishou": {
|
|
188
|
+
* "hostVer": "√",
|
|
189
|
+
* "uniVer": "√",
|
|
190
|
+
* "unixVer": "x"
|
|
191
|
+
* },
|
|
192
|
+
* "jd": {
|
|
193
|
+
* "hostVer": "√",
|
|
194
|
+
* "uniVer": "√",
|
|
195
|
+
* "unixVer": "x"
|
|
196
|
+
* }
|
|
197
|
+
* },
|
|
198
|
+
* "web": {
|
|
199
|
+
* "uniVer": "√",
|
|
200
|
+
* "unixVer": "x"
|
|
201
|
+
* }
|
|
202
|
+
* }
|
|
203
|
+
*/
|
|
204
|
+
fail?: SetNavigationBarTitleFailCallback
|
|
205
|
+
/**
|
|
206
|
+
* 接口调用结束的回调函数(调用成功、失败都会执行)
|
|
207
|
+
* @uniPlatform {
|
|
208
|
+
* "app": {
|
|
209
|
+
* "android": {
|
|
210
|
+
* "osVer": "5.0",
|
|
211
|
+
* "uniVer": "√",
|
|
212
|
+
* "unixVer": "3.97"
|
|
213
|
+
* },
|
|
214
|
+
* "ios": {
|
|
215
|
+
* "osVer": "10.0",
|
|
216
|
+
* "uniVer": "√",
|
|
217
|
+
* "unixVer": "x"
|
|
218
|
+
* }
|
|
219
|
+
* },
|
|
220
|
+
* "mp": {
|
|
221
|
+
* "weixin": {
|
|
222
|
+
* "hostVer": "√",
|
|
223
|
+
* "uniVer": "√",
|
|
224
|
+
* "unixVer": "x"
|
|
225
|
+
* },
|
|
226
|
+
* "alipay": {
|
|
227
|
+
* "hostVer": "√",
|
|
228
|
+
* "uniVer": "√",
|
|
229
|
+
* "unixVer": "x"
|
|
230
|
+
* },
|
|
231
|
+
* "baidu": {
|
|
232
|
+
* "hostVer": "√",
|
|
233
|
+
* "uniVer": "√",
|
|
234
|
+
* "unixVer": "x"
|
|
235
|
+
* },
|
|
236
|
+
* "toutiao": {
|
|
237
|
+
* "hostVer": "√",
|
|
238
|
+
* "uniVer": "√",
|
|
239
|
+
* "unixVer": "x"
|
|
240
|
+
* },
|
|
241
|
+
* "lark": {
|
|
242
|
+
* "hostVer": "√",
|
|
243
|
+
* "uniVer": "√",
|
|
244
|
+
* "unixVer": "x"
|
|
245
|
+
* },
|
|
246
|
+
* "qq": {
|
|
247
|
+
* "hostVer": "√",
|
|
248
|
+
* "uniVer": "√",
|
|
249
|
+
* "unixVer": "x"
|
|
250
|
+
* },
|
|
251
|
+
* "kuaishou": {
|
|
252
|
+
* "hostVer": "√",
|
|
253
|
+
* "uniVer": "√",
|
|
254
|
+
* "unixVer": "x"
|
|
255
|
+
* },
|
|
256
|
+
* "jd": {
|
|
257
|
+
* "hostVer": "√",
|
|
258
|
+
* "uniVer": "√",
|
|
259
|
+
* "unixVer": "x"
|
|
260
|
+
* }
|
|
261
|
+
* },
|
|
262
|
+
* "web": {
|
|
263
|
+
* "uniVer": "√",
|
|
264
|
+
* "unixVer": "x"
|
|
265
|
+
* }
|
|
266
|
+
* }
|
|
267
|
+
*/
|
|
268
|
+
complete?: SetNavigationBarTitleCompleteCallback
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
export type SetNavigationBarTitleSuccess = AsyncApiSuccessResult
|
|
272
|
+
export type SetNavigationBarTitleSuccessCallback = (
|
|
273
|
+
result: SetNavigationBarTitleSuccess
|
|
274
|
+
) => void
|
|
275
|
+
|
|
276
|
+
export type SetNavigationBarTitleFail = UniError
|
|
277
|
+
export type SetNavigationBarTitleFailCallback = (
|
|
278
|
+
error: SetNavigationBarTitleFail
|
|
279
|
+
) => void
|
|
280
|
+
|
|
281
|
+
export type SetNavigationBarTitleComplete = AsyncApiResult
|
|
282
|
+
export type SetNavigationBarTitleCompleteCallback = (
|
|
283
|
+
res: SetNavigationBarTitleComplete
|
|
284
|
+
) => void
|
|
285
|
+
|
|
286
|
+
export type SetNavigationBarTitle = (
|
|
287
|
+
options: SetNavigationBarTitleOptions
|
|
288
|
+
) => void
|
|
289
|
+
|
|
290
|
+
export interface Uni {
|
|
291
|
+
/**
|
|
292
|
+
* 动态设置当前页面的标题
|
|
293
|
+
*
|
|
294
|
+
* @tutorial https://uniapp.dcloud.net.cn/uni-app-x/api/set-navigation-bar-title.html
|
|
295
|
+
* @uniPlatform {
|
|
296
|
+
* "app": {
|
|
297
|
+
* "android": {
|
|
298
|
+
* "osVer": "5.0",
|
|
299
|
+
* "uniVer": "√",
|
|
300
|
+
* "unixVer": "3.97"
|
|
301
|
+
* },
|
|
302
|
+
* "ios": {
|
|
303
|
+
* "osVer": "10.0",
|
|
304
|
+
* "uniVer": "√",
|
|
305
|
+
* "unixVer": "x"
|
|
306
|
+
* }
|
|
307
|
+
* },
|
|
308
|
+
* "mp": {
|
|
309
|
+
* "weixin": {
|
|
310
|
+
* "hostVer": "√",
|
|
311
|
+
* "uniVer": "√",
|
|
312
|
+
* "unixVer": "x"
|
|
313
|
+
* },
|
|
314
|
+
* "alipay": {
|
|
315
|
+
* "hostVer": "√",
|
|
316
|
+
* "uniVer": "√",
|
|
317
|
+
* "unixVer": "x"
|
|
318
|
+
* },
|
|
319
|
+
* "baidu": {
|
|
320
|
+
* "hostVer": "√",
|
|
321
|
+
* "uniVer": "√",
|
|
322
|
+
* "unixVer": "x"
|
|
323
|
+
* },
|
|
324
|
+
* "toutiao": {
|
|
325
|
+
* "hostVer": "√",
|
|
326
|
+
* "uniVer": "√",
|
|
327
|
+
* "unixVer": "x"
|
|
328
|
+
* },
|
|
329
|
+
* "lark": {
|
|
330
|
+
* "hostVer": "√",
|
|
331
|
+
* "uniVer": "√",
|
|
332
|
+
* "unixVer": "x"
|
|
333
|
+
* },
|
|
334
|
+
* "qq": {
|
|
335
|
+
* "hostVer": "√",
|
|
336
|
+
* "uniVer": "√",
|
|
337
|
+
* "unixVer": "x"
|
|
338
|
+
* },
|
|
339
|
+
* "kuaishou": {
|
|
340
|
+
* "hostVer": "√",
|
|
341
|
+
* "uniVer": "√",
|
|
342
|
+
* "unixVer": "x"
|
|
343
|
+
* },
|
|
344
|
+
* "jd": {
|
|
345
|
+
* "hostVer": "√",
|
|
346
|
+
* "uniVer": "√",
|
|
347
|
+
* "unixVer": "x"
|
|
348
|
+
* }
|
|
349
|
+
* },
|
|
350
|
+
* "web": {
|
|
351
|
+
* "uniVer": "√",
|
|
352
|
+
* "unixVer": "x"
|
|
353
|
+
* }
|
|
354
|
+
* }
|
|
355
|
+
*/
|
|
356
|
+
setNavigationBarTitle(
|
|
357
|
+
options: SetNavigationBarTitleOptions
|
|
358
|
+
): Promise<SetNavigationBarTitleSuccess> | null
|
|
359
|
+
}
|
|
@@ -379,49 +379,65 @@ export interface Uni {
|
|
|
379
379
|
*
|
|
380
380
|
* @tutorial http://uniapp.dcloud.io/api/ui/tabbar?id=settabbarbadge
|
|
381
381
|
*/
|
|
382
|
-
setTabBarBadge(
|
|
382
|
+
setTabBarBadge(
|
|
383
|
+
options: SetTabBarBadgeOptions
|
|
384
|
+
): Promise<SetTabBarBadgeSuccess> | null
|
|
383
385
|
/**
|
|
384
386
|
* 移除 tabBar 某一项右上角的文本
|
|
385
387
|
*
|
|
386
388
|
* @tutorial http://uniapp.dcloud.io/api/ui/tabbar?id=removetabbarbadge
|
|
387
389
|
*/
|
|
388
|
-
removeTabBarBadge(
|
|
390
|
+
removeTabBarBadge(
|
|
391
|
+
options: RemoveTabBarBadgeOptions
|
|
392
|
+
): Promise<RemoveTabBarBadgeSuccess> | null
|
|
389
393
|
/**
|
|
390
394
|
* 动态设置 tabBar 某一项的内容
|
|
391
395
|
*
|
|
392
396
|
* @tutorial http://uniapp.dcloud.io/api/ui/tabbar?id=settabbaritem
|
|
393
397
|
*/
|
|
394
|
-
setTabBarItem(
|
|
398
|
+
setTabBarItem(
|
|
399
|
+
options: SetTabBarItemOptions
|
|
400
|
+
): Promise<SetTabBarItemSuccess> | null
|
|
395
401
|
/**
|
|
396
402
|
* 动态设置 tabBar 的整体样式
|
|
397
403
|
*
|
|
398
404
|
* @tutorial http://uniapp.dcloud.io/api/ui/tabbar?id=settabbarstyle
|
|
399
405
|
*/
|
|
400
|
-
setTabBarStyle(
|
|
406
|
+
setTabBarStyle(
|
|
407
|
+
options: SetTabBarStyleOptions
|
|
408
|
+
): Promise<SetTabBarStyleSuccess> | null
|
|
401
409
|
/**
|
|
402
410
|
* 隐藏 tabBar
|
|
403
411
|
*
|
|
404
412
|
* @tutorial http://uniapp.dcloud.io/api/ui/tabbar?id=hidetabbar
|
|
405
413
|
*/
|
|
406
|
-
hideTabBar(
|
|
414
|
+
hideTabBar(
|
|
415
|
+
options?: HideTabBarOptions | null
|
|
416
|
+
): Promise<HideTabBarSuccess> | null
|
|
407
417
|
/**
|
|
408
418
|
* 显示 tabBar
|
|
409
419
|
*
|
|
410
420
|
* @tutorial http://uniapp.dcloud.io/api/ui/tabbar?id=showtabbar
|
|
411
421
|
*/
|
|
412
|
-
showTabBar(
|
|
422
|
+
showTabBar(
|
|
423
|
+
options?: ShowTabBarOptions | null
|
|
424
|
+
): Promise<ShowTabBarSuccess> | null
|
|
413
425
|
/**
|
|
414
426
|
* 显示 tabBar 某一项的右上角的红点
|
|
415
427
|
*
|
|
416
428
|
* @tutorial http://uniapp.dcloud.io/api/ui/tabbar?id=showtabbarreddot
|
|
417
429
|
*/
|
|
418
|
-
showTabBarRedDot(
|
|
430
|
+
showTabBarRedDot(
|
|
431
|
+
options: ShowTabBarRedDotOptions
|
|
432
|
+
): Promise<ShowTabBarRedDotSuccess> | null
|
|
419
433
|
/**
|
|
420
434
|
* 隐藏 tabBar 某一项的右上角的红点
|
|
421
435
|
*
|
|
422
436
|
* @tutorial http://uniapp.dcloud.io/api/ui/tabbar?id=hidetabbarreddot
|
|
423
437
|
*/
|
|
424
|
-
hideTabBarRedDot(
|
|
438
|
+
hideTabBarRedDot(
|
|
439
|
+
options: HideTabBarRedDotOptions
|
|
440
|
+
): Promise<HideTabBarRedDotSuccess> | null
|
|
425
441
|
// /**
|
|
426
442
|
// * 监听中间按钮的点击事件
|
|
427
443
|
// *
|
package/types/uni/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference path='./lib/uni-websocket/utssdk/index.d.ts' />
|
|
2
2
|
/// <reference path='./lib/uni-storage/utssdk/index.d.ts' />
|
|
3
|
-
/// <reference path='./lib/uni-prompt/utssdk/index.d.ts' />
|
|
4
3
|
/// <reference path='./lib/uni-push/utssdk/index.d.ts' />
|
|
4
|
+
/// <reference path='./lib/uni-prompt/utssdk/index.d.ts' />
|
|
5
5
|
/// <reference path='./lib/uni-openAppAuthorizeSetting/utssdk/index.d.ts' />
|
|
6
6
|
/// <reference path='./lib/uni-network/utssdk/index.d.ts' />
|
|
7
7
|
/// <reference path='./lib/uni-media/utssdk/index.d.ts' />
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ExitSuccess as ExitSuccessOrigin,
|
|
3
|
+
ExitErrorCode as ExitErrorCodeOrigin,
|
|
4
|
+
IExitError as IExitErrorOrigin,
|
|
5
|
+
ExitFail as ExitFailOrigin,
|
|
3
6
|
ExitSuccessCallback as ExitSuccessCallbackOrigin,
|
|
4
7
|
ExitFailCallback as ExitFailCallbackOrigin,
|
|
5
8
|
ExitCompleteCallback as ExitCompleteCallbackOrigin,
|
|
@@ -10,6 +13,9 @@ import {
|
|
|
10
13
|
|
|
11
14
|
declare global {
|
|
12
15
|
type ExitSuccess = ExitSuccessOrigin
|
|
16
|
+
type ExitErrorCode = ExitErrorCodeOrigin
|
|
17
|
+
type IExitError = IExitErrorOrigin
|
|
18
|
+
type ExitFail = ExitFailOrigin
|
|
13
19
|
type ExitSuccessCallback = ExitSuccessCallbackOrigin
|
|
14
20
|
type ExitFailCallback = ExitFailCallbackOrigin
|
|
15
21
|
type ExitCompleteCallback = ExitCompleteCallbackOrigin
|
|
@@ -5,6 +5,21 @@ export type ExitSuccess = {
|
|
|
5
5
|
errMsg: string
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* 错误码
|
|
10
|
+
* - 12001: 系统不支持
|
|
11
|
+
* - 12002: 未知错误
|
|
12
|
+
*/
|
|
13
|
+
export type ExitErrorCode = 12001 | 12002
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* uni.exit失败回调参数
|
|
17
|
+
*/
|
|
18
|
+
export interface IExitError extends IUniError {
|
|
19
|
+
errCode: ExitErrorCode
|
|
20
|
+
}
|
|
21
|
+
export type ExitFail = IExitError
|
|
22
|
+
|
|
8
23
|
/**
|
|
9
24
|
* uni.exit成功回调函数定义
|
|
10
25
|
*/
|
|
@@ -12,7 +27,7 @@ export type ExitSuccessCallback = (res: ExitSuccess) => void
|
|
|
12
27
|
/**
|
|
13
28
|
* uni.exit失败回调函数定义
|
|
14
29
|
*/
|
|
15
|
-
export type ExitFailCallback = (res:
|
|
30
|
+
export type ExitFailCallback = (res: ExitFail) => void
|
|
16
31
|
/**
|
|
17
32
|
* uni.exit完成回调函数定义
|
|
18
33
|
*/
|
|
@@ -192,6 +192,66 @@ export type GetAppBaseInfoResult = {
|
|
|
192
192
|
* uni 运行时版本号
|
|
193
193
|
*/
|
|
194
194
|
uniRuntimeVersionCode?: number,
|
|
195
|
+
/**
|
|
196
|
+
* Android的包名
|
|
197
|
+
*
|
|
198
|
+
* @uniPlatform {
|
|
199
|
+
* "app": {
|
|
200
|
+
* "android": {
|
|
201
|
+
* "osVer": "4.4",
|
|
202
|
+
* "uniVer": "x",
|
|
203
|
+
* "unixVer": "3.97"
|
|
204
|
+
* },
|
|
205
|
+
* "ios": {
|
|
206
|
+
* "osVer": "x",
|
|
207
|
+
* "uniVer": "x",
|
|
208
|
+
* "unixVer": "x"
|
|
209
|
+
* }
|
|
210
|
+
* }
|
|
211
|
+
* }
|
|
212
|
+
*/
|
|
213
|
+
packageName?: string,
|
|
214
|
+
/**
|
|
215
|
+
* iOS的bundleId
|
|
216
|
+
*
|
|
217
|
+
* @uniPlatform {
|
|
218
|
+
* "app": {
|
|
219
|
+
* "android": {
|
|
220
|
+
* "osVer": "x",
|
|
221
|
+
* "uniVer": "x",
|
|
222
|
+
* "unixVer": "x"
|
|
223
|
+
* },
|
|
224
|
+
* "ios": {
|
|
225
|
+
* "osVer": "9.0",
|
|
226
|
+
* "uniVer": "x",
|
|
227
|
+
* "unixVer": "3.97"
|
|
228
|
+
* }
|
|
229
|
+
* }
|
|
230
|
+
* }
|
|
231
|
+
*
|
|
232
|
+
* @autodoc false
|
|
233
|
+
*/
|
|
234
|
+
bundleId?: string,
|
|
235
|
+
/**
|
|
236
|
+
* Android: 应用签名证书的SHA1值(全部为小写,中间不包含“:”)。 为了保证应用的安全性,请使用自己生成的证书(不要使用公共测试证书)。
|
|
237
|
+
* iOS: 应用签名证书中绑定的Bundle ID(AppleID)的md5值(全部为小写)。
|
|
238
|
+
*
|
|
239
|
+
* @uniPlatform {
|
|
240
|
+
* "app": {
|
|
241
|
+
* "android": {
|
|
242
|
+
* "osVer": "4.4",
|
|
243
|
+
* "uniVer": "x",
|
|
244
|
+
* "unixVer": "3.97"
|
|
245
|
+
* },
|
|
246
|
+
* "ios": {
|
|
247
|
+
* "osVer": "9.0",
|
|
248
|
+
* "uniVer": "x",
|
|
249
|
+
* "unixVer": "3.97"
|
|
250
|
+
* }
|
|
251
|
+
* }
|
|
252
|
+
* }
|
|
253
|
+
*/
|
|
254
|
+
signature?: string,
|
|
195
255
|
}
|
|
196
256
|
|
|
197
257
|
/**
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
+
LocationErrorCode as LocationErrorCodeOrigin,
|
|
3
|
+
IGetLocationFail as IGetLocationFailOrigin,
|
|
4
|
+
GetLocationFail as GetLocationFailOrigin,
|
|
2
5
|
GetLocation as GetLocationOrigin,
|
|
3
6
|
GetLocationSuccess as GetLocationSuccessOrigin,
|
|
4
7
|
GetLocationOptions as GetLocationOptionsOrigin,
|
|
@@ -6,6 +9,9 @@ import {
|
|
|
6
9
|
} from './interface'
|
|
7
10
|
|
|
8
11
|
declare global {
|
|
12
|
+
type LocationErrorCode = LocationErrorCodeOrigin
|
|
13
|
+
type IGetLocationFail = IGetLocationFailOrigin
|
|
14
|
+
type GetLocationFail = GetLocationFailOrigin
|
|
9
15
|
type GetLocation = GetLocationOrigin
|
|
10
16
|
type GetLocationSuccess = GetLocationSuccessOrigin
|
|
11
17
|
type GetLocationOptions = GetLocationOptionsOrigin
|
|
@@ -34,6 +34,24 @@ export interface Uni {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
|
|
37
|
+
/**
|
|
38
|
+
* 错误码
|
|
39
|
+
* - 1505004 缺失权限
|
|
40
|
+
* - 1505021 超时
|
|
41
|
+
* - 1505022 不支持的定位类型
|
|
42
|
+
* - 1505023 不支持逆地理编码
|
|
43
|
+
* - 1505024 没有找到具体的定位引擎,请定位开关是否已打开
|
|
44
|
+
*/
|
|
45
|
+
export type LocationErrorCode = 1505004 | 1505021 | 1505022 | 1505023 | 1505024;
|
|
46
|
+
/**
|
|
47
|
+
* 网络请求失败的错误回调参数
|
|
48
|
+
*/
|
|
49
|
+
export interface IGetLocationFail extends IUniError{
|
|
50
|
+
errCode: LocationErrorCode
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export type GetLocationFail = IGetLocationFail
|
|
54
|
+
|
|
37
55
|
|
|
38
56
|
export type GetLocation = (options: GetLocationOptions) => void;
|
|
39
57
|
export type GetLocationSuccess = {
|
|
@@ -78,7 +96,7 @@ export type GetLocationSuccess = {
|
|
|
78
96
|
address: any | null
|
|
79
97
|
};
|
|
80
98
|
type GetLocationSuccessCallback = (result: GetLocationSuccess) => void;
|
|
81
|
-
type GetLocationFailCallback = (result:
|
|
99
|
+
type GetLocationFailCallback = (result: GetLocationFail) => void;
|
|
82
100
|
type GetLocationComplete = any;
|
|
83
101
|
type GetLocationCompleteCallback = (result: GetLocationComplete) => void;
|
|
84
102
|
export type GetLocationOptions = {
|
|
@@ -132,13 +132,11 @@ export type RequestMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD"
|
|
|
132
132
|
* - 1000 服务端系统错误
|
|
133
133
|
* - 100001 json数据解析错误
|
|
134
134
|
* - 100002 错误信息json解析失败
|
|
135
|
-
* - 600000 未知的网络错误
|
|
136
135
|
* - 600003 网络中断
|
|
137
136
|
* - 600009 URL格式不合法
|
|
138
|
-
* - 600010 请求的 data 序列化失败
|
|
139
137
|
* - 602001 request系统错误
|
|
140
138
|
*/
|
|
141
|
-
export type RequestErrorCode = 5 | 1000 | 100001 | 100002 |
|
|
139
|
+
export type RequestErrorCode = 5 | 1000 | 100001 | 100002 | 600003 | 600009 | 602001;
|
|
142
140
|
/**
|
|
143
141
|
* 网络请求失败的错误回调参数
|
|
144
142
|
*/
|