提交 4ec335c7 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

docs(api): getEnvInfoSync

上级 89b9c319
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
* [uni.preloadPage](/api/preload-page) * [uni.preloadPage](/api/preload-page)
* [窗口动画](/api/router?id=animation) * [窗口动画](/api/router?id=animation)
* [页面](api/window/window.md) * [页面](api/window/window.md)
* [页面通讯](api/window/communication.md) * [页面通讯](api/window/communication.md)
* [subNVue原生子窗体](api/window/subNVues.md) * [subNVue原生子窗体](api/window/subNVues.md)
* [数据缓存](/api/storage/storage) * [数据缓存](/api/storage/storage)
* [uni.setStorage](/api/storage/storage?id=setstorage) * [uni.setStorage](/api/storage/storage?id=setstorage)
...@@ -150,6 +150,7 @@ ...@@ -150,6 +150,7 @@
* [获取发票抬头](api/other/invoice-title.md) * [获取发票抬头](api/other/invoice-title.md)
* [小程序跳转](api/other/open-miniprogram.md) * [小程序跳转](api/other/open-miniprogram.md)
* [账号信息](api/other/getAccountInfoSync.md) * [账号信息](api/other/getAccountInfoSync.md)
* [环境信息](api/other/getEnvInfoSync.md)
* [运动(计步器)](api/other/sport.md) * [运动(计步器)](api/other/sport.md)
* [统计](api/other/report.md) * [统计](api/other/report.md)
* [卡券](api/other/card.md) * [卡券](api/other/card.md)
......
#### uni.getEnvInfoSync()
获取小程序环境信息。
**平台差异说明**
|App|H5|微信小程序|支付宝小程序|百度小程序|字节跳动小程序|飞书小程序|QQ小程序|快手小程序|京东小程序|
|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|
|x|x|x|x|x|√|x|x|x|x|
**返回值**
**Object**
| 属性 | 类型 | 说明 |
| --- | --- | --- |
| microapp | MicroApp| 小程序信息 |
| common | Common | 通用参数 |
**MicroApp 类型说明**
| 属性 | 类型 | 说明 |
| --- | --- | --- |
| mpVersion | string | 小程序 appId |
| envType| string | 小程序环境 `development`测试版、`preview`预览版、`production`线上版 |
| appId| string | 小程序 appId |
**Common 类型说明**
| 属性 | 类型 | 说明 |
| --- | --- | --- |
| USER_DATA_PATH | string | 用户数据存储的路径(默认值 ttfile://user)|
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册