@dcloudio/uni-app-x 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/types/native/Element.d.ts +4 -4
- package/types/native/IComment.d.ts +5 -0
- package/types/native/IDocument.d.ts +2 -1
- package/types/native/ITextNode.d.ts +6 -0
- package/types/native/NestedPreScrollEvent.d.ts +20 -1
- package/types/native/StartNestedScrollEvent.d.ts +19 -0
- package/types/native/StopNestedScrollEvent.d.ts +26 -0
- package/types/native/SwiperAnimationFinishEvent.d.ts +6 -0
- package/types/native/SwiperChangeEvent.d.ts +6 -0
- package/types/native/SwiperTransitionEvent.d.ts +6 -0
- package/types/native/global.d.ts +8 -0
- package/types/native/index.d.ts +4 -0
- package/types/uni/core/lib/base/event/index.d.ts +1 -0
- package/types/uni/core/lib/base/interceptor/index.d.ts +1 -0
- package/types/uni/core/lib/lifecycle/index.d.ts +1 -0
- package/types/uni/core/lib/performance/index.d.ts +1 -0
- package/types/uni/core/lib/route/index.d.ts +1 -0
- package/types/uni/core/lib/ui/create-selector-query/index.d.ts +1 -0
- package/types/uni/core/lib/ui/get-element-by-id/index.d.ts +1 -0
- package/types/uni/core/lib/ui/load-font-face/index.d.ts +1 -0
- package/types/uni/core/lib/ui/page-scroll-to/index.d.ts +1 -0
- package/types/uni/core/lib/ui/pull-down-refresh/index.d.ts +1 -0
- package/types/uni/core/lib/ui/set-navigation-bar-color/index.d.ts +1 -0
- package/types/uni/core/lib/ui/set-navigation-bar-title/index.d.ts +1 -0
- package/types/uni/core/lib/ui/tab-bar/index.d.ts +1 -0
- package/types/uni/uts-plugin-api/index.d.ts +1 -0
- package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/index.d.ts +1 -0
- package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/index.d.ts +1 -0
- package/types/uni/uts-plugin-api/lib/uni-getAccessibilityInfo/utssdk/index.d.ts +1 -0
- package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/index.d.ts +1 -0
- package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/index.d.ts +1 -0
- package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/index.d.ts +1 -0
- package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/index.d.ts +1 -0
- package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/index.d.ts +1 -0
- package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/index.d.ts +1 -0
- package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/index.d.ts +1 -0
- package/types/uni/uts-plugin-api/lib/uni-media/utssdk/index.d.ts +1 -0
- package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/index.d.ts +1 -0
- package/types/uni/uts-plugin-api/lib/uni-network/utssdk/index.d.ts +1 -0
- package/types/uni/uts-plugin-api/lib/uni-openAppAuthorizeSetting/utssdk/index.d.ts +1 -0
- package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/index.d.ts +1 -0
- package/types/uni/uts-plugin-api/lib/uni-push/utssdk/index.d.ts +1 -0
- package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/index.d.ts +1 -0
- package/types/uni/uts-plugin-api/lib/uni-verify/utssdk/index.d.ts +46 -0
- package/types/uni/uts-plugin-api/lib/uni-verify/utssdk/interface.d.ts +201 -0
- package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/index.d.ts +1 -0
- package/types/uni/uts-plugin-component/lib/uni-video/utssdk/index.d.ts +1 -0
- package/types/uni/uts-plugin-modules/lib/uni-facialRecognitionVerify/utssdk/index.d.ts +3 -0
- package/types/uni/uts-plugin-modules/lib/uni-facialRecognitionVerify/utssdk/interface.d.ts +26 -2
- package/uts-plugin.d.ts +17 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcloudio/uni-app-x",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "uni-app x types",
|
|
5
5
|
"typings": "index.d.ts",
|
|
6
6
|
"author": "DCloud",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"build:types:plugin": "npm run build:types:plugin:api && npm run build:types:plugin:component && npm run build:types:plugin:modules",
|
|
15
15
|
"build:types:meta": "node ./scripts/build-meta.js",
|
|
16
16
|
"build:types:native": "node ./scripts/build-native.js",
|
|
17
|
-
"build:types": "build:types:native && npm run build:types:core && npm run build:types:plugin"
|
|
17
|
+
"build:types": "npm run build:types:native && npm run build:types:core && npm run build:types:plugin"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"delete": "^1.1.0",
|
|
@@ -114,17 +114,17 @@ export interface Element {
|
|
|
114
114
|
offsetLeft: number
|
|
115
115
|
|
|
116
116
|
/**
|
|
117
|
-
* 只读属性
|
|
117
|
+
* 只读属性 元素的顶部边界偏移值 单位px
|
|
118
118
|
*/
|
|
119
119
|
offsetTop: number
|
|
120
120
|
|
|
121
121
|
/**
|
|
122
|
-
* 只读属性
|
|
122
|
+
* 只读属性 元素的布局宽度,宽度包含border、padding的数据值 单位px
|
|
123
123
|
*/
|
|
124
124
|
offsetWidth: number
|
|
125
|
-
|
|
125
|
+
|
|
126
126
|
/**
|
|
127
|
-
* 只读属性
|
|
127
|
+
* 只读属性 元素的布局高度,高度包含border、padding的数据值 单位px
|
|
128
128
|
*/
|
|
129
129
|
offsetHeight: number
|
|
130
130
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { NodeData } from "./NodeData";
|
|
2
2
|
import { Element } from "./Element";
|
|
3
|
+
import { IComment } from "./IComment";
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* @package io.dcloud.uniapp.runtime
|
|
@@ -16,7 +17,7 @@ export interface IDocument extends Element {
|
|
|
16
17
|
|
|
17
18
|
createElement(data: NodeData): Element
|
|
18
19
|
|
|
19
|
-
createComment(data: string):
|
|
20
|
+
createComment(data: string): IComment
|
|
20
21
|
|
|
21
22
|
notifyLayout(): void
|
|
22
23
|
|
|
@@ -12,7 +12,26 @@ export class NestedPreScrollEvent extends Event {
|
|
|
12
12
|
/**
|
|
13
13
|
* y轴滚动距离
|
|
14
14
|
*/
|
|
15
|
-
deltaY: number
|
|
15
|
+
deltaY: number
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* 是否由触摸行为发生的Event
|
|
19
|
+
* @uniPlatform {
|
|
20
|
+
* "app": {
|
|
21
|
+
* "android": {
|
|
22
|
+
* "osVer": "5.0",
|
|
23
|
+
* "uniVer": "x",
|
|
24
|
+
* "unixVer": "3.99"
|
|
25
|
+
* },
|
|
26
|
+
* "ios": {
|
|
27
|
+
* "osVer": "x",
|
|
28
|
+
* "uniVer": "x",
|
|
29
|
+
* "unixVer": "x"
|
|
30
|
+
* }
|
|
31
|
+
* }
|
|
32
|
+
* }
|
|
33
|
+
*/
|
|
34
|
+
isTouch: boolean
|
|
16
35
|
|
|
17
36
|
/**
|
|
18
37
|
* 通知到子节点x,y轴滚动距离的消耗
|
|
@@ -9,4 +9,23 @@ export class StartNestedScrollEvent extends Event {
|
|
|
9
9
|
* 开始滚动子节点对象
|
|
10
10
|
*/
|
|
11
11
|
node: Element
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* 是否由触摸行为发生的Event
|
|
15
|
+
* @uniPlatform {
|
|
16
|
+
* "app": {
|
|
17
|
+
* "android": {
|
|
18
|
+
* "osVer": "5.0",
|
|
19
|
+
* "uniVer": "x",
|
|
20
|
+
* "unixVer": "3.99"
|
|
21
|
+
* },
|
|
22
|
+
* "ios": {
|
|
23
|
+
* "osVer": "x",
|
|
24
|
+
* "uniVer": "x",
|
|
25
|
+
* "unixVer": "x"
|
|
26
|
+
* }
|
|
27
|
+
* }
|
|
28
|
+
* }
|
|
29
|
+
*/
|
|
30
|
+
isTouch: boolean
|
|
12
31
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Event } from "./Event";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @package io.dcloud.uniapp.runtime
|
|
5
|
+
* @uniPlatform {
|
|
6
|
+
* "app": {
|
|
7
|
+
* "android": {
|
|
8
|
+
* "osVer": "5.0",
|
|
9
|
+
* "uniVer": "x",
|
|
10
|
+
* "unixVer": "3.99"
|
|
11
|
+
* },
|
|
12
|
+
* "ios": {
|
|
13
|
+
* "osVer": "x",
|
|
14
|
+
* "uniVer": "x",
|
|
15
|
+
* "unixVer": "x"
|
|
16
|
+
* }
|
|
17
|
+
* }
|
|
18
|
+
* }
|
|
19
|
+
*/
|
|
20
|
+
export class StopNestedScrollEvent extends Event {
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* 是否由触摸行为发生的Event
|
|
24
|
+
*/
|
|
25
|
+
isTouch: boolean
|
|
26
|
+
}
|
package/types/native/global.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// 本文件为自动构建生成
|
|
1
2
|
import {
|
|
2
3
|
WebViewStyles as WebViewStylesOrigin,
|
|
3
4
|
WebViewProgressStyles as WebViewProgressStylesOrigin,
|
|
@@ -47,6 +48,7 @@ import {
|
|
|
47
48
|
SwiperTransitionEvent as SwiperTransitionEventOrigin,
|
|
48
49
|
SwiperChangeEvent as SwiperChangeEventOrigin,
|
|
49
50
|
SwiperAnimationFinishEvent as SwiperAnimationFinishEventOrigin,
|
|
51
|
+
StopNestedScrollEvent as StopNestedScrollEventOrigin,
|
|
50
52
|
StartNestedScrollEvent as StartNestedScrollEventOrigin,
|
|
51
53
|
SourceError as SourceErrorOrigin,
|
|
52
54
|
TakeSnapshotOptions as TakeSnapshotOptionsOrigin,
|
|
@@ -75,6 +77,7 @@ import {
|
|
|
75
77
|
ImageLoadEvent as ImageLoadEventOrigin,
|
|
76
78
|
ImageErrorEvent as ImageErrorEventOrigin,
|
|
77
79
|
IUniError as IUniErrorOrigin,
|
|
80
|
+
ITextNode as ITextNodeOrigin,
|
|
78
81
|
IPageManager as IPageManagerOrigin,
|
|
79
82
|
UniCallbackWrapper as UniCallbackWrapperOrigin,
|
|
80
83
|
NavigationBarButtonTapEvent as NavigationBarButtonTapEventOrigin,
|
|
@@ -84,6 +87,7 @@ import {
|
|
|
84
87
|
IPage as IPageOrigin,
|
|
85
88
|
INavigationBar as INavigationBarOrigin,
|
|
86
89
|
IDocument as IDocumentOrigin,
|
|
90
|
+
IComment as ICommentOrigin,
|
|
87
91
|
IApp as IAppOrigin,
|
|
88
92
|
Event as EventOrigin,
|
|
89
93
|
Element as ElementOrigin,
|
|
@@ -170,6 +174,8 @@ declare global {
|
|
|
170
174
|
type SwiperChangeEvent = SwiperChangeEventOrigin
|
|
171
175
|
const SwiperAnimationFinishEvent: typeof SwiperAnimationFinishEventOrigin
|
|
172
176
|
type SwiperAnimationFinishEvent = SwiperAnimationFinishEventOrigin
|
|
177
|
+
const StopNestedScrollEvent: typeof StopNestedScrollEventOrigin
|
|
178
|
+
type StopNestedScrollEvent = StopNestedScrollEventOrigin
|
|
173
179
|
const StartNestedScrollEvent: typeof StartNestedScrollEventOrigin
|
|
174
180
|
type StartNestedScrollEvent = StartNestedScrollEventOrigin
|
|
175
181
|
const SourceError: typeof SourceErrorOrigin
|
|
@@ -219,6 +225,7 @@ declare global {
|
|
|
219
225
|
const ImageErrorEvent: typeof ImageErrorEventOrigin
|
|
220
226
|
type ImageErrorEvent = ImageErrorEventOrigin
|
|
221
227
|
type IUniError = IUniErrorOrigin
|
|
228
|
+
type ITextNode = ITextNodeOrigin
|
|
222
229
|
const IPageManager: typeof IPageManagerOrigin
|
|
223
230
|
type IPageManager = IPageManagerOrigin
|
|
224
231
|
const UniCallbackWrapper: typeof UniCallbackWrapperOrigin
|
|
@@ -234,6 +241,7 @@ declare global {
|
|
|
234
241
|
type IPage = IPageOrigin
|
|
235
242
|
type INavigationBar = INavigationBarOrigin
|
|
236
243
|
type IDocument = IDocumentOrigin
|
|
244
|
+
type IComment = ICommentOrigin
|
|
237
245
|
const IApp: typeof IAppOrigin
|
|
238
246
|
type IApp = IAppOrigin
|
|
239
247
|
const Event: typeof EventOrigin
|
package/types/native/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// 本文件为自动构建生成
|
|
1
2
|
export * from './WebViewStyles'
|
|
2
3
|
export * from './WebViewMessageEvent'
|
|
3
4
|
export * from './WebViewLoadingEvent'
|
|
@@ -21,6 +22,7 @@ export * from './TabTapEvent'
|
|
|
21
22
|
export * from './SwiperTransitionEvent'
|
|
22
23
|
export * from './SwiperChangeEvent'
|
|
23
24
|
export * from './SwiperAnimationFinishEvent'
|
|
25
|
+
export * from './StopNestedScrollEvent'
|
|
24
26
|
export * from './StartNestedScrollEvent'
|
|
25
27
|
export * from './SourceError'
|
|
26
28
|
export * from './SnapshotOptions'
|
|
@@ -43,10 +45,12 @@ export * from './InputBlurEvent'
|
|
|
43
45
|
export * from './ImageLoadEvent'
|
|
44
46
|
export * from './ImageErrorEvent'
|
|
45
47
|
export * from './IUniError'
|
|
48
|
+
export * from './ITextNode'
|
|
46
49
|
export * from './IPageManager'
|
|
47
50
|
export * from './IPage'
|
|
48
51
|
export * from './INavigationBar'
|
|
49
52
|
export * from './IDocument'
|
|
53
|
+
export * from './IComment'
|
|
50
54
|
export * from './IApp'
|
|
51
55
|
export * from './Event'
|
|
52
56
|
export * from './Element'
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference path='./lib/uni-websocket/utssdk/index.d.ts' />
|
|
2
|
+
/// <reference path='./lib/uni-verify/utssdk/index.d.ts' />
|
|
2
3
|
/// <reference path='./lib/uni-storage/utssdk/index.d.ts' />
|
|
3
4
|
/// <reference path='./lib/uni-push/utssdk/index.d.ts' />
|
|
4
5
|
/// <reference path='./lib/uni-prompt/utssdk/index.d.ts' />
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// 本文件为自动构建生成
|
|
2
|
+
import {
|
|
3
|
+
GetUniverifyManager as GetUniverifyManagerOrigin,
|
|
4
|
+
UniverifyManager as UniverifyManagerOrigin,
|
|
5
|
+
PreLoginOptions as PreLoginOptionsOrigin,
|
|
6
|
+
LoginOptions as LoginOptionsOrigin,
|
|
7
|
+
UniverifyStyle as UniverifyStyleOrigin,
|
|
8
|
+
PreLoginSuccessCallback as PreLoginSuccessCallbackOrigin,
|
|
9
|
+
PreLoginFail as PreLoginFailOrigin,
|
|
10
|
+
PreLoginFailCallback as PreLoginFailCallbackOrigin,
|
|
11
|
+
PreLoginComplete as PreLoginCompleteOrigin,
|
|
12
|
+
PreLoginCompleteCallback as PreLoginCompleteCallbackOrigin,
|
|
13
|
+
LoginSuccess as LoginSuccessOrigin,
|
|
14
|
+
LoginSuccessCallback as LoginSuccessCallbackOrigin,
|
|
15
|
+
LoginFail as LoginFailOrigin,
|
|
16
|
+
LoginFailCallback as LoginFailCallbackOrigin,
|
|
17
|
+
LoginComplete as LoginCompleteOrigin,
|
|
18
|
+
LoginCompleteCallback as LoginCompleteCallbackOrigin,
|
|
19
|
+
UniverifyErrorCode as UniverifyErrorCodeOrigin,
|
|
20
|
+
UniverifyErrorCode as UniverifyErrorCodeOrigin,
|
|
21
|
+
InternalResponse as InternalResponseOrigin,
|
|
22
|
+
Uni as UniOrigin
|
|
23
|
+
} from './interface'
|
|
24
|
+
|
|
25
|
+
declare global {
|
|
26
|
+
type GetUniverifyManager = GetUniverifyManagerOrigin
|
|
27
|
+
type UniverifyManager = UniverifyManagerOrigin
|
|
28
|
+
type PreLoginOptions = PreLoginOptionsOrigin
|
|
29
|
+
type LoginOptions = LoginOptionsOrigin
|
|
30
|
+
type UniverifyStyle = UniverifyStyleOrigin
|
|
31
|
+
type PreLoginSuccessCallback = PreLoginSuccessCallbackOrigin
|
|
32
|
+
type PreLoginFail = PreLoginFailOrigin
|
|
33
|
+
type PreLoginFailCallback = PreLoginFailCallbackOrigin
|
|
34
|
+
type PreLoginComplete = PreLoginCompleteOrigin
|
|
35
|
+
type PreLoginCompleteCallback = PreLoginCompleteCallbackOrigin
|
|
36
|
+
type LoginSuccess = LoginSuccessOrigin
|
|
37
|
+
type LoginSuccessCallback = LoginSuccessCallbackOrigin
|
|
38
|
+
type LoginFail = LoginFailOrigin
|
|
39
|
+
type LoginFailCallback = LoginFailCallbackOrigin
|
|
40
|
+
type LoginComplete = LoginCompleteOrigin
|
|
41
|
+
type LoginCompleteCallback = LoginCompleteCallbackOrigin
|
|
42
|
+
type UniverifyErrorCode = UniverifyErrorCodeOrigin
|
|
43
|
+
type UniverifyErrorCode = UniverifyErrorCodeOrigin
|
|
44
|
+
type InternalResponse = InternalResponseOrigin
|
|
45
|
+
interface Uni extends UniOrigin { }
|
|
46
|
+
}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
export interface Uni {
|
|
2
|
+
/**
|
|
3
|
+
* @description 获取一键登录管理对象
|
|
4
|
+
* @tutorial https://uniapp.dcloud.net.cn/univerify.html#univerifymanager
|
|
5
|
+
* @uniPlatform {
|
|
6
|
+
* "app": {
|
|
7
|
+
* "android": {
|
|
8
|
+
* "osVer": "4.4",
|
|
9
|
+
* "uniVer": "√",
|
|
10
|
+
* "unixVer": "3.99"
|
|
11
|
+
* },
|
|
12
|
+
* "ios": {
|
|
13
|
+
* "osVer": "9.0",
|
|
14
|
+
* "uniVer": "√",
|
|
15
|
+
* "unixVer": "x"
|
|
16
|
+
* }
|
|
17
|
+
* }
|
|
18
|
+
* }
|
|
19
|
+
*/
|
|
20
|
+
getUniverifyManager : GetUniverifyManager
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type GetUniverifyManager = () => UniverifyManager
|
|
24
|
+
|
|
25
|
+
export interface UniverifyManager {
|
|
26
|
+
/**
|
|
27
|
+
* @description 预登录
|
|
28
|
+
* @uniPlatform {
|
|
29
|
+
* "app": {
|
|
30
|
+
* "android": {
|
|
31
|
+
* "osVer": "4.4",
|
|
32
|
+
* "uniVer": "√",
|
|
33
|
+
* "unixVer": "3.99"
|
|
34
|
+
* },
|
|
35
|
+
* "ios": {
|
|
36
|
+
* "osVer": "9.0",
|
|
37
|
+
* "uniVer": "√",
|
|
38
|
+
* "unixVer": "x"
|
|
39
|
+
* }
|
|
40
|
+
* }
|
|
41
|
+
* }
|
|
42
|
+
*/
|
|
43
|
+
preLogin(options : PreLoginOptions) : void
|
|
44
|
+
/**
|
|
45
|
+
* @description 登录
|
|
46
|
+
* @uniPlatform {
|
|
47
|
+
* "app": {
|
|
48
|
+
* "android": {
|
|
49
|
+
* "osVer": "4.4",
|
|
50
|
+
* "uniVer": "√",
|
|
51
|
+
* "unixVer": "3.99"
|
|
52
|
+
* },
|
|
53
|
+
* "ios": {
|
|
54
|
+
* "osVer": "9.0",
|
|
55
|
+
* "uniVer": "√",
|
|
56
|
+
* "unixVer": "x"
|
|
57
|
+
* }
|
|
58
|
+
* }
|
|
59
|
+
* }
|
|
60
|
+
*/
|
|
61
|
+
login(options : LoginOptions) : void
|
|
62
|
+
/**
|
|
63
|
+
* @description 关闭登录页
|
|
64
|
+
* @uniPlatform {
|
|
65
|
+
* "app": {
|
|
66
|
+
* "android": {
|
|
67
|
+
* "osVer": "4.4",
|
|
68
|
+
* "uniVer": "√",
|
|
69
|
+
* "unixVer": "3.99"
|
|
70
|
+
* },
|
|
71
|
+
* "ios": {
|
|
72
|
+
* "osVer": "9.0",
|
|
73
|
+
* "uniVer": "√",
|
|
74
|
+
* "unixVer": "x"
|
|
75
|
+
* }
|
|
76
|
+
* }
|
|
77
|
+
* }
|
|
78
|
+
*/
|
|
79
|
+
close() : void
|
|
80
|
+
/**
|
|
81
|
+
* @description 预登录是否有效
|
|
82
|
+
* @uniPlatform {
|
|
83
|
+
* "app": {
|
|
84
|
+
* "android": {
|
|
85
|
+
* "osVer": "4.4",
|
|
86
|
+
* "uniVer": "√",
|
|
87
|
+
* "unixVer": "3.99"
|
|
88
|
+
* },
|
|
89
|
+
* "ios": {
|
|
90
|
+
* "osVer": "9.0",
|
|
91
|
+
* "uniVer": "√",
|
|
92
|
+
* "unixVer": "x"
|
|
93
|
+
* }
|
|
94
|
+
* }
|
|
95
|
+
* }
|
|
96
|
+
*/
|
|
97
|
+
isPreLoginResultValid() : boolean
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* 预登录参数
|
|
102
|
+
*/
|
|
103
|
+
export type PreLoginOptions = {
|
|
104
|
+
success ?: PreLoginSuccessCallback,
|
|
105
|
+
fail ?: PreLoginFailCallback,
|
|
106
|
+
complete ?: PreLoginCompleteCallback
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* 登录参数
|
|
111
|
+
*/
|
|
112
|
+
export type LoginOptions = {
|
|
113
|
+
univerifyStyle ?: UniverifyStyle,
|
|
114
|
+
success ?: LoginSuccessCallback,
|
|
115
|
+
fail ?: LoginFailCallback,
|
|
116
|
+
complete ?: LoginCompleteCallback
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* 登录页样式
|
|
121
|
+
*/
|
|
122
|
+
export type UniverifyStyle = {
|
|
123
|
+
/**
|
|
124
|
+
* 是否全屏
|
|
125
|
+
*/
|
|
126
|
+
fullScreen ?: boolean,
|
|
127
|
+
/**
|
|
128
|
+
* logo路径
|
|
129
|
+
*/
|
|
130
|
+
logoPath ?: string,
|
|
131
|
+
/**
|
|
132
|
+
* 登录页背景色
|
|
133
|
+
*/
|
|
134
|
+
backgroundColor ?: string,
|
|
135
|
+
/**
|
|
136
|
+
* 登录按钮文字
|
|
137
|
+
*/
|
|
138
|
+
loginBtnText ?: string
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export type PreLoginSuccessCallback = () => void
|
|
142
|
+
export interface PreLoginFail extends IUniError {
|
|
143
|
+
errCode : UniverifyErrorCode
|
|
144
|
+
}
|
|
145
|
+
export type PreLoginFailCallback = (err : PreLoginFail) => void
|
|
146
|
+
export type PreLoginComplete = any;
|
|
147
|
+
export type PreLoginCompleteCallback = (res : PreLoginComplete) => void
|
|
148
|
+
|
|
149
|
+
export type LoginSuccess = {
|
|
150
|
+
/**
|
|
151
|
+
* 登录授权唯一标识
|
|
152
|
+
*/
|
|
153
|
+
openid : string,
|
|
154
|
+
/**
|
|
155
|
+
* token
|
|
156
|
+
*/
|
|
157
|
+
accessToken : string
|
|
158
|
+
}
|
|
159
|
+
export type LoginSuccessCallback = (res : LoginSuccess) => void
|
|
160
|
+
export interface LoginFail extends IUniError {
|
|
161
|
+
errCode : UniverifyErrorCode
|
|
162
|
+
}
|
|
163
|
+
export type LoginFailCallback = (err : LoginFail) => void
|
|
164
|
+
export type LoginComplete = any;
|
|
165
|
+
export type LoginCompleteCallback = (res : LoginComplete) => void
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* 30002 其他登录方式
|
|
169
|
+
* 30003 登录界面关闭
|
|
170
|
+
* 30004 其他错误
|
|
171
|
+
* 30005 预登录失败
|
|
172
|
+
* 30006 一键登录失败
|
|
173
|
+
*/
|
|
174
|
+
// export type UniverifyErrorCode = 30002 | 30003 | 30004 | 30005 | 30006;
|
|
175
|
+
export type UniverifyErrorCode = 30004 | 30005 | 30006;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* SDK响应数据结构
|
|
179
|
+
*/
|
|
180
|
+
export type InternalResponse = {
|
|
181
|
+
/**
|
|
182
|
+
* 个验用户唯一标识
|
|
183
|
+
*/
|
|
184
|
+
gyuid : string,
|
|
185
|
+
/**
|
|
186
|
+
* code 返回结果,30000为成功
|
|
187
|
+
*/
|
|
188
|
+
code : number,
|
|
189
|
+
/**
|
|
190
|
+
* msg 返回结果详情,为json格式,包含errorCode、errorDesc、metadata、及其他业务自定义的字段
|
|
191
|
+
*/
|
|
192
|
+
msg : string,
|
|
193
|
+
/**
|
|
194
|
+
* 请求的运营商,CM 移动、CT 电信、CU 联通
|
|
195
|
+
*/
|
|
196
|
+
operator : string,
|
|
197
|
+
/**
|
|
198
|
+
* 接口请求是否成功
|
|
199
|
+
*/
|
|
200
|
+
isSuccess : boolean
|
|
201
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
// 本文件为自动构建生成
|
|
1
2
|
import {
|
|
2
3
|
FacialRecognitionVerifyErrorCode as FacialRecognitionVerifyErrorCodeOrigin,
|
|
4
|
+
StartFacialRecognitionVerifyScreenOrientation as StartFacialRecognitionVerifyScreenOrientationOrigin,
|
|
3
5
|
IFacialRecognitionVerifyError as IFacialRecognitionVerifyErrorOrigin,
|
|
4
6
|
StartFacialRecognitionVerifySuccess as StartFacialRecognitionVerifySuccessOrigin,
|
|
5
7
|
StartFacialRecognitionVerifySuccessCallback as StartFacialRecognitionVerifySuccessCallbackOrigin,
|
|
@@ -13,6 +15,7 @@ import {
|
|
|
13
15
|
|
|
14
16
|
declare global {
|
|
15
17
|
type FacialRecognitionVerifyErrorCode = FacialRecognitionVerifyErrorCodeOrigin
|
|
18
|
+
type StartFacialRecognitionVerifyScreenOrientation = StartFacialRecognitionVerifyScreenOrientationOrigin
|
|
16
19
|
type IFacialRecognitionVerifyError = IFacialRecognitionVerifyErrorOrigin
|
|
17
20
|
type StartFacialRecognitionVerifySuccess = StartFacialRecognitionVerifySuccessOrigin
|
|
18
21
|
type StartFacialRecognitionVerifySuccessCallback = StartFacialRecognitionVerifySuccessCallbackOrigin
|
|
@@ -9,6 +9,14 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
export type FacialRecognitionVerifyErrorCode = 10010 | 10012 | 10011 | 10013 | 10020 | 10001;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* 认证时屏幕方向
|
|
15
|
+
* - land 横屏
|
|
16
|
+
* - port 竖屏
|
|
17
|
+
*/
|
|
18
|
+
export type StartFacialRecognitionVerifyScreenOrientation = "land" | "port";
|
|
19
|
+
|
|
12
20
|
export interface IFacialRecognitionVerifyError extends IUniError {
|
|
13
21
|
errCode : FacialRecognitionVerifyErrorCode
|
|
14
22
|
};
|
|
@@ -46,9 +54,25 @@ export type StartFacialRecognitionVerifyOptions = {
|
|
|
46
54
|
*/
|
|
47
55
|
progressBarColor ?: string | null,
|
|
48
56
|
/**
|
|
49
|
-
* 认证界面UI
|
|
57
|
+
* 认证界面UI朝向。
|
|
58
|
+
* @type {StartFacialRecognitionVerifyScreenOrientation}
|
|
59
|
+
* @defaultValue "port"
|
|
60
|
+
* @uniPlatform {
|
|
61
|
+
* "app": {
|
|
62
|
+
* "android": {
|
|
63
|
+
* "osVer": "5.0",
|
|
64
|
+
* "uniVer": "√",
|
|
65
|
+
* "unixVer": "3.9+"
|
|
66
|
+
* },
|
|
67
|
+
* "ios": {
|
|
68
|
+
* "osVer": "x",
|
|
69
|
+
* "uniVer": "x",
|
|
70
|
+
* "unixVer": "x"
|
|
71
|
+
* }
|
|
72
|
+
* }
|
|
73
|
+
* }
|
|
50
74
|
*/
|
|
51
|
-
screenOrientation ?:
|
|
75
|
+
screenOrientation ?: StartFacialRecognitionVerifyScreenOrientation | null,
|
|
52
76
|
/**
|
|
53
77
|
* 成功回调
|
|
54
78
|
*/
|
package/uts-plugin.d.ts
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/// <reference path='./types/native/UniError.d.ts' />
|
|
2
|
-
/// <reference path='./types/native/SourceError.d.ts' />
|
|
3
|
-
/// <reference path='./types/native/UniAggregateError.d.ts' />
|
|
4
|
-
/// <reference path='./types/native/UTSAndroidHookProxy.d.ts' />
|
|
5
1
|
/// <reference path='./types/uni/base/index.d.ts' />
|
|
6
2
|
/// <reference path='./types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/index.d.ts' />
|
|
7
3
|
/// <reference path='./types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/index.d.ts' />
|
|
@@ -9,3 +5,20 @@
|
|
|
9
5
|
/// <reference path='./types/uni/uts-plugin-api/lib/uni-network/utssdk/index.d.ts' />
|
|
10
6
|
/// <reference path='./types/uni/uts-plugin-api/lib/uni-prompt/utssdk/index.d.ts' />
|
|
11
7
|
/// <reference path='./types/uni/uts-plugin-api/lib/uni-storage/utssdk/index.d.ts' />
|
|
8
|
+
|
|
9
|
+
import {
|
|
10
|
+
UniError as UniErrorOrigin,
|
|
11
|
+
SourceError as SourceErrorOrigin,
|
|
12
|
+
UniAggregateError as UniAggregateErrorOrigin,
|
|
13
|
+
UTSAndroidHookProxy as UTSAndroidHookProxyOrigin,
|
|
14
|
+
} from './types/native'
|
|
15
|
+
|
|
16
|
+
declare global {
|
|
17
|
+
const UniError: typeof UniErrorOrigin
|
|
18
|
+
type UniError = UniErrorOrigin
|
|
19
|
+
const SourceError: typeof SourceErrorOrigin
|
|
20
|
+
type SourceError = SourceErrorOrigin
|
|
21
|
+
const UniAggregateError: typeof UniAggregateErrorOrigin
|
|
22
|
+
type UniAggregateError = UniAggregateErrorOrigin
|
|
23
|
+
type UTSAndroidHookProxy = UTSAndroidHookProxyOrigin
|
|
24
|
+
}
|