@doubao-apps/create 0.0.32 → 0.0.33
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/dist/{36.js → 421.js} +2 -2
- package/dist/cli.js +63 -63
- package/dist/index.js +1 -1
- package/dist/template-empty/package.json +3 -3
- package/dist/template-empty/references/reference/open-api/README.md +0 -32
- package/dist/template-empty/references/reference/open-api.md +5 -8930
- package/dist/template-starter/package.json +3 -3
- package/dist/template-starter/references/reference/open-api/README.md +0 -32
- package/dist/template-starter/references/reference/open-api.md +5 -8930
- package/package.json +1 -1
- package/dist/template-empty/references/reference/open-api/01-/345/237/272/347/241/200-/350/264/246/345/217/267-/347/263/273/347/273/237.md +0 -536
- package/dist/template-empty/references/reference/open-api/02-/345/256/232/344/275/215.md +0 -359
- package/dist/template-empty/references/reference/open-api/03-/345/255/230/345/202/250.md +0 -409
- package/dist/template-empty/references/reference/open-api/04-/350/267/257/347/224/261.md +0 -165
- package/dist/template-empty/references/reference/open-api/05-/347/225/214/351/235/242-/344/272/244/344/272/222.md +0 -432
- package/dist/template-empty/references/reference/open-api/06-/347/225/214/351/235/242-/350/276/223/345/205/245.md +0 -72
- package/dist/template-empty/references/reference/open-api/07-/347/275/221/347/273/234.md +0 -468
- package/dist/template-empty/references/reference/open-api/08-/345/252/222/344/275/223.md +0 -346
- package/dist/template-empty/references/reference/open-api/09-/345/274/200/346/224/276/350/203/275/345/212/233-/344/270/232/345/212/241/350/203/275/345/212/233.md +0 -1238
- package/dist/template-empty/references/reference/open-api/10-/346/225/260/346/215/256/345/210/206/346/236/220.md +0 -67
- package/dist/template-empty/references/reference/open-api/11-/350/256/276/345/244/207-/350/223/235/347/211/231.md +0 -961
- package/dist/template-empty/references/reference/open-api/12-/350/256/276/345/244/207-wi-fi.md +0 -311
- package/dist/template-empty/references/reference/open-api/13-/350/256/276/345/244/207-/345/212/240/351/200/237/345/272/246/350/256/241.md +0 -104
- package/dist/template-empty/references/reference/open-api/14-/350/256/276/345/244/207-ibeacon.md +0 -148
- package/dist/template-empty/references/reference/open-api/15-/350/256/276/345/244/207-/347/275/227/347/233/230.md +0 -82
- package/dist/template-empty/references/reference/open-api/16-/350/256/276/345/244/207-/350/256/276/345/244/207/346/226/271/345/220/221.md +0 -104
- package/dist/template-empty/references/reference/open-api/17-/350/256/276/345/244/207-/351/231/200/350/236/272/344/273/252.md +0 -104
- package/dist/template-empty/references/reference/open-api/18-ui-/350/276/223/345/205/245.md +0 -49
- package/dist/template-empty/references/reference/open-api/19-/350/256/276/345/244/207-/347/275/221/347/273/234.md +0 -164
- package/dist/template-empty/references/reference/open-api/20-/350/256/276/345/244/207-/347/237/255/344/277/241.md +0 -62
- package/dist/template-empty/references/reference/open-api/21-/350/256/276/345/244/207-/346/227/240/351/232/234/347/242/215.md +0 -43
- package/dist/template-empty/references/reference/open-api/22-/350/256/276/345/244/207-/345/237/272/347/241/200/344/277/241/346/201/257.md +0 -133
- package/dist/template-empty/references/reference/open-api/23-/350/256/276/345/244/207-/347/224/265/346/261/240.md +0 -83
- package/dist/template-empty/references/reference/open-api/24-/350/256/276/345/244/207-/346/227/245/345/216/206.md +0 -215
- package/dist/template-empty/references/reference/open-api/25-/350/256/276/345/244/207-/345/211/252/350/264/264/346/235/277.md +0 -70
- package/dist/template-empty/references/reference/open-api/26-/350/256/276/345/244/207-/350/201/224/347/263/273/344/272/272.md +0 -270
- package/dist/template-empty/references/reference/open-api/27-/350/256/276/345/244/207-/345/212/240/345/257/206.md +0 -56
- package/dist/template-empty/references/reference/open-api/28-/350/256/276/345/244/207-/347/224/265/350/257/235.md +0 -41
- package/dist/template-empty/references/reference/open-api/29-/350/256/276/345/244/207-/346/211/253/347/240/201.md +0 -100
- package/dist/template-empty/references/reference/open-api/30-/350/256/276/345/244/207-/345/261/217/345/271/225.md +0 -173
- package/dist/template-empty/references/reference/open-api/31-/350/256/276/345/244/207-/351/234/207/345/212/250.md +0 -66
- package/dist/template-empty/references/reference/open-api/32-/346/226/207/344/273/266/347/263/273/347/273/237.md +0 -1043
- package/dist/template-starter/references/reference/open-api/01-/345/237/272/347/241/200-/350/264/246/345/217/267-/347/263/273/347/273/237.md +0 -536
- package/dist/template-starter/references/reference/open-api/02-/345/256/232/344/275/215.md +0 -359
- package/dist/template-starter/references/reference/open-api/03-/345/255/230/345/202/250.md +0 -409
- package/dist/template-starter/references/reference/open-api/04-/350/267/257/347/224/261.md +0 -165
- package/dist/template-starter/references/reference/open-api/05-/347/225/214/351/235/242-/344/272/244/344/272/222.md +0 -432
- package/dist/template-starter/references/reference/open-api/06-/347/225/214/351/235/242-/350/276/223/345/205/245.md +0 -72
- package/dist/template-starter/references/reference/open-api/07-/347/275/221/347/273/234.md +0 -468
- package/dist/template-starter/references/reference/open-api/08-/345/252/222/344/275/223.md +0 -346
- package/dist/template-starter/references/reference/open-api/09-/345/274/200/346/224/276/350/203/275/345/212/233-/344/270/232/345/212/241/350/203/275/345/212/233.md +0 -1238
- package/dist/template-starter/references/reference/open-api/10-/346/225/260/346/215/256/345/210/206/346/236/220.md +0 -67
- package/dist/template-starter/references/reference/open-api/11-/350/256/276/345/244/207-/350/223/235/347/211/231.md +0 -961
- package/dist/template-starter/references/reference/open-api/12-/350/256/276/345/244/207-wi-fi.md +0 -311
- package/dist/template-starter/references/reference/open-api/13-/350/256/276/345/244/207-/345/212/240/351/200/237/345/272/246/350/256/241.md +0 -104
- package/dist/template-starter/references/reference/open-api/14-/350/256/276/345/244/207-ibeacon.md +0 -148
- package/dist/template-starter/references/reference/open-api/15-/350/256/276/345/244/207-/347/275/227/347/233/230.md +0 -82
- package/dist/template-starter/references/reference/open-api/16-/350/256/276/345/244/207-/350/256/276/345/244/207/346/226/271/345/220/221.md +0 -104
- package/dist/template-starter/references/reference/open-api/17-/350/256/276/345/244/207-/351/231/200/350/236/272/344/273/252.md +0 -104
- package/dist/template-starter/references/reference/open-api/18-ui-/350/276/223/345/205/245.md +0 -49
- package/dist/template-starter/references/reference/open-api/19-/350/256/276/345/244/207-/347/275/221/347/273/234.md +0 -164
- package/dist/template-starter/references/reference/open-api/20-/350/256/276/345/244/207-/347/237/255/344/277/241.md +0 -62
- package/dist/template-starter/references/reference/open-api/21-/350/256/276/345/244/207-/346/227/240/351/232/234/347/242/215.md +0 -43
- package/dist/template-starter/references/reference/open-api/22-/350/256/276/345/244/207-/345/237/272/347/241/200/344/277/241/346/201/257.md +0 -133
- package/dist/template-starter/references/reference/open-api/23-/350/256/276/345/244/207-/347/224/265/346/261/240.md +0 -83
- package/dist/template-starter/references/reference/open-api/24-/350/256/276/345/244/207-/346/227/245/345/216/206.md +0 -215
- package/dist/template-starter/references/reference/open-api/25-/350/256/276/345/244/207-/345/211/252/350/264/264/346/235/277.md +0 -70
- package/dist/template-starter/references/reference/open-api/26-/350/256/276/345/244/207-/350/201/224/347/263/273/344/272/272.md +0 -270
- package/dist/template-starter/references/reference/open-api/27-/350/256/276/345/244/207-/345/212/240/345/257/206.md +0 -56
- package/dist/template-starter/references/reference/open-api/28-/350/256/276/345/244/207-/347/224/265/350/257/235.md +0 -41
- package/dist/template-starter/references/reference/open-api/29-/350/256/276/345/244/207-/346/211/253/347/240/201.md +0 -100
- package/dist/template-starter/references/reference/open-api/30-/350/256/276/345/244/207-/345/261/217/345/271/225.md +0 -173
- package/dist/template-starter/references/reference/open-api/31-/350/256/276/345/244/207-/351/234/207/345/212/250.md +0 -66
- package/dist/template-starter/references/reference/open-api/32-/346/226/207/344/273/266/347/263/273/347/273/237.md +0 -1043
package/package.json
CHANGED
|
@@ -1,536 +0,0 @@
|
|
|
1
|
-
# Open API: 基础 / 账号 / 系统
|
|
2
|
-
|
|
3
|
-
账号、授权、宿主基础信息、窗口信息和能力可用性。
|
|
4
|
-
|
|
5
|
-
[返回目录](./README.md) | [返回速查](../open-api.md)
|
|
6
|
-
|
|
7
|
-
## 速查
|
|
8
|
-
|
|
9
|
-
| API | 说明 |
|
|
10
|
-
| --- | --- |
|
|
11
|
-
| [getAccountInfo](#getaccountinfo) | 异步获取账号信息。 |
|
|
12
|
-
| [getAccountInfoSync](#getaccountinfosync) | 同步获取账号信息。<br><br>同步 API。 |
|
|
13
|
-
| [authorize](#authorize) | 初始化授权。<br><br>按 scope 申请授权。 |
|
|
14
|
-
| [canIUse](#caniuse) | 检测当前宿主是否支持指定 API 或能力。<br><br>用于兼容性判断。 |
|
|
15
|
-
| [getWindowInfoSync](#getwindowinfosync) | 获取窗口信息。<br><br>同步 API。 |
|
|
16
|
-
| [getSystemSetting](#getsystemsetting) | 获取设备设置。 |
|
|
17
|
-
| [getAppBaseInfoSync](#getappbaseinfosync) | 获取应用基础信息。<br><br>同步 API。 |
|
|
18
|
-
| [getWindowInfo](#getwindowinfo) | 获取窗口信息。 |
|
|
19
|
-
| [getAppBaseInfo](#getappbaseinfo) | 获取应用基础信息。 |
|
|
20
|
-
|
|
21
|
-
## API 详情
|
|
22
|
-
|
|
23
|
-
<a id="getaccountinfo"></a>
|
|
24
|
-
### getAccountInfo()
|
|
25
|
-
|
|
26
|
-
> **getAccountInfo**(`params`?): `Promise`\<[`GetAccountInfoResult`](#getaccountinforesult)\>
|
|
27
|
-
|
|
28
|
-
异步获取账号信息。
|
|
29
|
-
|
|
30
|
-
#### Parameters
|
|
31
|
-
|
|
32
|
-
• **params?**
|
|
33
|
-
|
|
34
|
-
#### Returns
|
|
35
|
-
|
|
36
|
-
`Promise`\<[`GetAccountInfoResult`](#getaccountinforesult)\>
|
|
37
|
-
|
|
38
|
-
#### Example
|
|
39
|
-
|
|
40
|
-
```typescript
|
|
41
|
-
import { getAccountInfo } from '@doubao-apps/framework/api';
|
|
42
|
-
|
|
43
|
-
const result = await getAccountInfo();
|
|
44
|
-
console.log(result.miniProgram.appId);
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
<a id="getaccountinfosync"></a>
|
|
48
|
-
### getAccountInfoSync()
|
|
49
|
-
|
|
50
|
-
> **getAccountInfoSync**(`params`?): [`GetAccountInfoResult`](#getaccountinforesult)
|
|
51
|
-
|
|
52
|
-
同步获取账号信息。
|
|
53
|
-
|
|
54
|
-
#### Parameters
|
|
55
|
-
|
|
56
|
-
• **params?**
|
|
57
|
-
|
|
58
|
-
#### Returns
|
|
59
|
-
|
|
60
|
-
[`GetAccountInfoResult`](#getaccountinforesult)
|
|
61
|
-
|
|
62
|
-
#### Example
|
|
63
|
-
|
|
64
|
-
```typescript
|
|
65
|
-
import { getAccountInfoSync } from '@doubao-apps/framework/api';
|
|
66
|
-
|
|
67
|
-
const result = getAccountInfoSync();
|
|
68
|
-
console.log(result.miniProgram.appId, result.miniProgram.envVersion, result.miniProgram.version);
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
<a id="authorize"></a>
|
|
72
|
-
### authorize()
|
|
73
|
-
|
|
74
|
-
> **authorize**(`params`): `Promise`\<`object`\>
|
|
75
|
-
|
|
76
|
-
初始化授权
|
|
77
|
-
|
|
78
|
-
#### Parameters
|
|
79
|
-
|
|
80
|
-
• **params**: [`AuthorizeRequest`](#authorizerequest)
|
|
81
|
-
|
|
82
|
-
授权参数
|
|
83
|
-
|
|
84
|
-
#### Returns
|
|
85
|
-
|
|
86
|
-
`Promise`\<`object`\>
|
|
87
|
-
|
|
88
|
-
Promise 对象,授权成功时会返回授权结果
|
|
89
|
-
|
|
90
|
-
#### Remarks
|
|
91
|
-
|
|
92
|
-
按 scope 申请授权。
|
|
93
|
-
|
|
94
|
-
<a id="caniuse"></a>
|
|
95
|
-
### canIUse()
|
|
96
|
-
|
|
97
|
-
> **canIUse**(`params`): `Promise`\<[`CanIUseResult`](#caniuseresult)\>
|
|
98
|
-
|
|
99
|
-
检测当前宿主是否支持指定 API 或能力。
|
|
100
|
-
|
|
101
|
-
#### Parameters
|
|
102
|
-
|
|
103
|
-
• **params**: [`CanIUseParams`](#caniuseparams)
|
|
104
|
-
|
|
105
|
-
#### Returns
|
|
106
|
-
|
|
107
|
-
`Promise`\<[`CanIUseResult`](#caniuseresult)\>
|
|
108
|
-
|
|
109
|
-
#### Remarks
|
|
110
|
-
|
|
111
|
-
用于兼容性判断。
|
|
112
|
-
|
|
113
|
-
<a id="getwindowinfosync"></a>
|
|
114
|
-
### getWindowInfoSync()
|
|
115
|
-
|
|
116
|
-
> **getWindowInfoSync**(`_param`?): [`GetWindowInfoResult`](#getwindowinforesult)
|
|
117
|
-
|
|
118
|
-
获取窗口信息。
|
|
119
|
-
|
|
120
|
-
#### Parameters
|
|
121
|
-
|
|
122
|
-
• **\_param?**
|
|
123
|
-
|
|
124
|
-
#### Returns
|
|
125
|
-
|
|
126
|
-
[`GetWindowInfoResult`](#getwindowinforesult)
|
|
127
|
-
|
|
128
|
-
返回窗口尺寸、状态栏高度和安全区域等信息,字段见 [GetWindowInfoResult](#getwindowinforesult)。
|
|
129
|
-
|
|
130
|
-
#### Example
|
|
131
|
-
|
|
132
|
-
```typescript
|
|
133
|
-
import { getWindowInfoSync } from '@doubao-apps/framework/api';
|
|
134
|
-
|
|
135
|
-
const result = getWindowInfoSync();
|
|
136
|
-
|
|
137
|
-
console.log(result.windowWidth, result.windowHeight);
|
|
138
|
-
console.log(result.safeArea?.top, result.screenTop);
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
<a id="getsystemsetting"></a>
|
|
142
|
-
### getSystemSetting()
|
|
143
|
-
|
|
144
|
-
> **getSystemSetting**(`params`?): [`GetSystemSettingResult`](#getsystemsettingresult)
|
|
145
|
-
|
|
146
|
-
获取设备设置。
|
|
147
|
-
|
|
148
|
-
#### Parameters
|
|
149
|
-
|
|
150
|
-
• **params?**
|
|
151
|
-
|
|
152
|
-
#### Returns
|
|
153
|
-
|
|
154
|
-
[`GetSystemSettingResult`](#getsystemsettingresult)
|
|
155
|
-
|
|
156
|
-
返回蓝牙、定位、Wi-Fi 系统开关和设备方向等字段,见 [GetSystemSettingResult](#getsystemsettingresult)。
|
|
157
|
-
|
|
158
|
-
#### Example
|
|
159
|
-
|
|
160
|
-
```typescript
|
|
161
|
-
import { getSystemSetting } from '@doubao-apps/framework/api';
|
|
162
|
-
|
|
163
|
-
const result = getSystemSetting();
|
|
164
|
-
|
|
165
|
-
console.log(result.bluetoothEnabled, result.locationEnabled);
|
|
166
|
-
console.log(result.wifiEnabled, result.deviceOrientation);
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
<a id="getappbaseinfosync"></a>
|
|
170
|
-
### getAppBaseInfoSync()
|
|
171
|
-
|
|
172
|
-
> **getAppBaseInfoSync**(`_params`?): [`GetAppBaseInfoResult`](#getappbaseinforesult)
|
|
173
|
-
|
|
174
|
-
获取应用基础信息。
|
|
175
|
-
|
|
176
|
-
#### Parameters
|
|
177
|
-
|
|
178
|
-
• **\_params?**
|
|
179
|
-
|
|
180
|
-
#### Returns
|
|
181
|
-
|
|
182
|
-
[`GetAppBaseInfoResult`](#getappbaseinforesult)
|
|
183
|
-
|
|
184
|
-
返回 SDK 版本、调试开关、宿主信息、语言和主题等字段,见 [GetAppBaseInfoResult](#getappbaseinforesult)。
|
|
185
|
-
|
|
186
|
-
#### Example
|
|
187
|
-
|
|
188
|
-
```typescript
|
|
189
|
-
import { getAppBaseInfoSync } from '@doubao-apps/framework/api';
|
|
190
|
-
|
|
191
|
-
const result = getAppBaseInfoSync();
|
|
192
|
-
|
|
193
|
-
console.log(result.language, result.SDKVersion, result.theme);
|
|
194
|
-
console.log(result.host?.appId, result.enableDebug);
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
<a id="getwindowinfo"></a>
|
|
198
|
-
### getWindowInfo()
|
|
199
|
-
|
|
200
|
-
> **getWindowInfo**(`_params`?): `Promise`\<[`GetWindowInfoResult`](#getwindowinforesult)\>
|
|
201
|
-
|
|
202
|
-
获取窗口信息。
|
|
203
|
-
|
|
204
|
-
#### Parameters
|
|
205
|
-
|
|
206
|
-
• **\_params?**
|
|
207
|
-
|
|
208
|
-
#### Returns
|
|
209
|
-
|
|
210
|
-
`Promise`\<[`GetWindowInfoResult`](#getwindowinforesult)\>
|
|
211
|
-
|
|
212
|
-
返回窗口尺寸、状态栏高度和安全区域等信息,字段见 [GetWindowInfoResult](#getwindowinforesult)。
|
|
213
|
-
|
|
214
|
-
#### Example
|
|
215
|
-
|
|
216
|
-
```typescript
|
|
217
|
-
import { getWindowInfo } from '@doubao-apps/framework/api';
|
|
218
|
-
|
|
219
|
-
const result = await getWindowInfo();
|
|
220
|
-
|
|
221
|
-
console.log(result.windowWidth, result.windowHeight);
|
|
222
|
-
console.log(result.safeArea?.top, result.screenTop);
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
<a id="getappbaseinfo"></a>
|
|
226
|
-
### getAppBaseInfo()
|
|
227
|
-
|
|
228
|
-
> **getAppBaseInfo**(`params`?): `Promise`\<[`GetAppBaseInfoResult`](#getappbaseinforesult)\>
|
|
229
|
-
|
|
230
|
-
获取应用基础信息。
|
|
231
|
-
|
|
232
|
-
#### Parameters
|
|
233
|
-
|
|
234
|
-
• **params?**
|
|
235
|
-
|
|
236
|
-
#### Returns
|
|
237
|
-
|
|
238
|
-
`Promise`\<[`GetAppBaseInfoResult`](#getappbaseinforesult)\>
|
|
239
|
-
|
|
240
|
-
返回 SDK 版本、调试开关、宿主信息、语言和主题等字段,见 [GetAppBaseInfoResult](#getappbaseinforesult)。
|
|
241
|
-
|
|
242
|
-
#### Example
|
|
243
|
-
|
|
244
|
-
```typescript
|
|
245
|
-
import { getAppBaseInfo } from '@doubao-apps/framework/api';
|
|
246
|
-
|
|
247
|
-
const result = await getAppBaseInfo();
|
|
248
|
-
|
|
249
|
-
console.log(result.language, result.SDKVersion, result.theme);
|
|
250
|
-
console.log(result.host?.appId, result.enableDebug);
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
## 相关类型
|
|
254
|
-
|
|
255
|
-
<a id="getaccountinforesult"></a>
|
|
256
|
-
### GetAccountInfoResult
|
|
257
|
-
|
|
258
|
-
获取当前账号信息。
|
|
259
|
-
|
|
260
|
-
#### Properties
|
|
261
|
-
|
|
262
|
-
##### miniProgram
|
|
263
|
-
|
|
264
|
-
> **miniProgram**: [`DoubaoAppAccountInfo`](#doubaoappaccountinfo)
|
|
265
|
-
|
|
266
|
-
豆包 App账号信息
|
|
267
|
-
|
|
268
|
-
##### plugin?
|
|
269
|
-
|
|
270
|
-
> `optional` **plugin**: [`PluginAccountInfo`](#pluginaccountinfo)
|
|
271
|
-
|
|
272
|
-
插件账号信息(仅在插件中调用时包含)
|
|
273
|
-
|
|
274
|
-
<a id="doubaoappaccountinfo"></a>
|
|
275
|
-
### DoubaoAppAccountInfo
|
|
276
|
-
|
|
277
|
-
豆包 App 账号信息。
|
|
278
|
-
|
|
279
|
-
#### Properties
|
|
280
|
-
|
|
281
|
-
##### appId
|
|
282
|
-
|
|
283
|
-
> **appId**: `string`
|
|
284
|
-
|
|
285
|
-
豆包 App appId
|
|
286
|
-
|
|
287
|
-
##### envVersion
|
|
288
|
-
|
|
289
|
-
> **envVersion**: `"develop"` \| `"trial"` \| `"release"`
|
|
290
|
-
|
|
291
|
-
豆包 App 运行环境。
|
|
292
|
-
|
|
293
|
-
- develop: 开发版
|
|
294
|
-
- trial: 体验版
|
|
295
|
-
- release: 正式版
|
|
296
|
-
|
|
297
|
-
##### version
|
|
298
|
-
|
|
299
|
-
> **version**: `string`
|
|
300
|
-
|
|
301
|
-
线上豆包 App 版本号。
|
|
302
|
-
|
|
303
|
-
<a id="pluginaccountinfo"></a>
|
|
304
|
-
### PluginAccountInfo
|
|
305
|
-
|
|
306
|
-
插件账号信息(仅在插件中调用时包含)。
|
|
307
|
-
|
|
308
|
-
#### Properties
|
|
309
|
-
|
|
310
|
-
##### appId
|
|
311
|
-
|
|
312
|
-
> **appId**: `string`
|
|
313
|
-
|
|
314
|
-
插件 appId
|
|
315
|
-
|
|
316
|
-
##### version
|
|
317
|
-
|
|
318
|
-
> **version**: `string`
|
|
319
|
-
|
|
320
|
-
插件版本号,'a.b.c' 形式
|
|
321
|
-
|
|
322
|
-
<a id="authorizerequest"></a>
|
|
323
|
-
### AuthorizeRequest
|
|
324
|
-
|
|
325
|
-
#### Properties
|
|
326
|
-
|
|
327
|
-
##### scope
|
|
328
|
-
|
|
329
|
-
> **scope**: [`Scope`](#scope-1)
|
|
330
|
-
|
|
331
|
-
授权范围
|
|
332
|
-
|
|
333
|
-
<a id="scope-1"></a>
|
|
334
|
-
<a id="scope"></a>
|
|
335
|
-
### Scope
|
|
336
|
-
|
|
337
|
-
> **Scope**: `"scope.userLocation"` \| `"scope.userFuzzyLocation"` \| `"scope.userLocationBackground"` \| `"scope.payment"` \| `"scope.record"` \| `"scope.bluetooth"` \| `"scope.camera"` \| `"scope.addPhoneContact"` \| `"scope.addPhoneCalendar"`
|
|
338
|
-
|
|
339
|
-
<a id="caniuseparams"></a>
|
|
340
|
-
### CanIUseParams
|
|
341
|
-
|
|
342
|
-
#### Properties
|
|
343
|
-
|
|
344
|
-
##### schema
|
|
345
|
-
|
|
346
|
-
> **schema**: `string`
|
|
347
|
-
|
|
348
|
-
<a id="caniuseresult"></a>
|
|
349
|
-
### CanIUseResult
|
|
350
|
-
|
|
351
|
-
#### Properties
|
|
352
|
-
|
|
353
|
-
##### result
|
|
354
|
-
|
|
355
|
-
> **result**: `boolean`
|
|
356
|
-
|
|
357
|
-
<a id="getwindowinforesult"></a>
|
|
358
|
-
### GetWindowInfoResult
|
|
359
|
-
|
|
360
|
-
#### Properties
|
|
361
|
-
|
|
362
|
-
##### pixelRatio
|
|
363
|
-
|
|
364
|
-
> **pixelRatio**: `number`
|
|
365
|
-
|
|
366
|
-
设备像素比
|
|
367
|
-
|
|
368
|
-
##### safeArea?
|
|
369
|
-
|
|
370
|
-
> `optional` **safeArea**: [`WindowSafeArea`](#windowsafearea)
|
|
371
|
-
|
|
372
|
-
安全区域
|
|
373
|
-
|
|
374
|
-
##### screenHeight
|
|
375
|
-
|
|
376
|
-
> **screenHeight**: `number`
|
|
377
|
-
|
|
378
|
-
屏幕高度
|
|
379
|
-
|
|
380
|
-
##### screenTop
|
|
381
|
-
|
|
382
|
-
> **screenTop**: `number`
|
|
383
|
-
|
|
384
|
-
窗口上边缘的 y 值
|
|
385
|
-
|
|
386
|
-
##### screenWidth
|
|
387
|
-
|
|
388
|
-
> **screenWidth**: `number`
|
|
389
|
-
|
|
390
|
-
屏幕宽度
|
|
391
|
-
|
|
392
|
-
##### statusBarHeight
|
|
393
|
-
|
|
394
|
-
> **statusBarHeight**: `number`
|
|
395
|
-
|
|
396
|
-
状态栏高度
|
|
397
|
-
|
|
398
|
-
##### windowHeight
|
|
399
|
-
|
|
400
|
-
> **windowHeight**: `number`
|
|
401
|
-
|
|
402
|
-
可使用窗口高度
|
|
403
|
-
|
|
404
|
-
##### windowWidth
|
|
405
|
-
|
|
406
|
-
> **windowWidth**: `number`
|
|
407
|
-
|
|
408
|
-
可使用窗口宽度
|
|
409
|
-
|
|
410
|
-
<a id="windowsafearea"></a>
|
|
411
|
-
### WindowSafeArea
|
|
412
|
-
|
|
413
|
-
#### Properties
|
|
414
|
-
|
|
415
|
-
##### bottom
|
|
416
|
-
|
|
417
|
-
> **bottom**: `number`
|
|
418
|
-
|
|
419
|
-
安全区域右下角纵坐标
|
|
420
|
-
|
|
421
|
-
##### height
|
|
422
|
-
|
|
423
|
-
> **height**: `number`
|
|
424
|
-
|
|
425
|
-
安全区域高度
|
|
426
|
-
|
|
427
|
-
##### left
|
|
428
|
-
|
|
429
|
-
> **left**: `number`
|
|
430
|
-
|
|
431
|
-
安全区域左上角横坐标
|
|
432
|
-
|
|
433
|
-
##### right
|
|
434
|
-
|
|
435
|
-
> **right**: `number`
|
|
436
|
-
|
|
437
|
-
安全区域右下角横坐标
|
|
438
|
-
|
|
439
|
-
##### top
|
|
440
|
-
|
|
441
|
-
> **top**: `number`
|
|
442
|
-
|
|
443
|
-
安全区域左上角纵坐标
|
|
444
|
-
|
|
445
|
-
##### width
|
|
446
|
-
|
|
447
|
-
> **width**: `number`
|
|
448
|
-
|
|
449
|
-
安全区域宽度
|
|
450
|
-
|
|
451
|
-
<a id="getsystemsettingresult"></a>
|
|
452
|
-
### GetSystemSettingResult
|
|
453
|
-
|
|
454
|
-
#### Properties
|
|
455
|
-
|
|
456
|
-
##### bluetoothEnabled
|
|
457
|
-
|
|
458
|
-
> **bluetoothEnabled**: `boolean`
|
|
459
|
-
|
|
460
|
-
蓝牙的系统开关
|
|
461
|
-
|
|
462
|
-
##### deviceOrientation
|
|
463
|
-
|
|
464
|
-
> **deviceOrientation**: [`DeviceOrientation`](#deviceorientation-1)
|
|
465
|
-
|
|
466
|
-
设备方向
|
|
467
|
-
|
|
468
|
-
##### locationEnabled
|
|
469
|
-
|
|
470
|
-
> **locationEnabled**: `boolean`
|
|
471
|
-
|
|
472
|
-
地理位置的系统开关
|
|
473
|
-
|
|
474
|
-
##### wifiEnabled
|
|
475
|
-
|
|
476
|
-
> **wifiEnabled**: `boolean`
|
|
477
|
-
|
|
478
|
-
Wi-Fi 的系统开关
|
|
479
|
-
|
|
480
|
-
<a id="deviceorientation-1"></a>
|
|
481
|
-
<a id="deviceorientation"></a>
|
|
482
|
-
### DeviceOrientation
|
|
483
|
-
|
|
484
|
-
> **DeviceOrientation**: `"portrait"` \| `"landscape"`
|
|
485
|
-
|
|
486
|
-
<a id="getappbaseinforesult"></a>
|
|
487
|
-
### GetAppBaseInfoResult
|
|
488
|
-
|
|
489
|
-
#### Properties
|
|
490
|
-
|
|
491
|
-
##### SDKVersion?
|
|
492
|
-
|
|
493
|
-
> `optional` **SDKVersion**: `string`
|
|
494
|
-
|
|
495
|
-
客户端基础库版本
|
|
496
|
-
|
|
497
|
-
##### enableDebug?
|
|
498
|
-
|
|
499
|
-
> `optional` **enableDebug**: `boolean`
|
|
500
|
-
|
|
501
|
-
是否已打开调试
|
|
502
|
-
|
|
503
|
-
##### host?
|
|
504
|
-
|
|
505
|
-
> `optional` **host**: [`AppBaseInfoHost`](#appbaseinfohost)
|
|
506
|
-
|
|
507
|
-
当前豆包 App运行的宿主环境
|
|
508
|
-
|
|
509
|
-
##### language
|
|
510
|
-
|
|
511
|
-
> **language**: `string`
|
|
512
|
-
|
|
513
|
-
当前语言
|
|
514
|
-
|
|
515
|
-
##### theme?
|
|
516
|
-
|
|
517
|
-
> `optional` **theme**: `"light"` \| `"dark"`
|
|
518
|
-
|
|
519
|
-
当前主题
|
|
520
|
-
|
|
521
|
-
##### version?
|
|
522
|
-
|
|
523
|
-
> `optional` **version**: `string`
|
|
524
|
-
|
|
525
|
-
宿主版本号
|
|
526
|
-
|
|
527
|
-
<a id="appbaseinfohost"></a>
|
|
528
|
-
### AppBaseInfoHost
|
|
529
|
-
|
|
530
|
-
#### Properties
|
|
531
|
-
|
|
532
|
-
##### appId
|
|
533
|
-
|
|
534
|
-
> **appId**: `string`
|
|
535
|
-
|
|
536
|
-
宿主 app 对应的 appId
|