Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
c9194ca8
D
Docs
项目概览
OpenHarmony
/
Docs
大约 1 年 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
c9194ca8
编写于
7月 10, 2023
作者:
C
chengjinsong2
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加deviceInfo api 示例
Signed-off-by:
N
chengjinsong2
<
chengjinsong2@huawei.com
>
上级
a7fb2ef5
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
109 addition
and
0 deletion
+109
-0
zh-cn/application-dev/reference/apis/js-apis-device-info.md
zh-cn/application-dev/reference/apis/js-apis-device-info.md
+109
-0
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-device-info.md
浏览文件 @
c9194ca8
...
...
@@ -54,3 +54,112 @@ import deviceInfo from '@ohos.deviceInfo'
| distributionOSVersion
<sup>
10+
</sup>
| String | 是 | 否 | 发行版系统版本号。 |
| distributionOSApiVersion
<sup>
10+
</sup>
| number| 是 | 否 | 发行版系统api版本。 |
| distributionOSReleaseType
<sup>
10+
</sup>
| String | 是 | 否 | 发行版系统类型。 |
**示例**
```
import deviceinfo from '@ohos.deviceInfo'
let deviceTypeInfo = deviceinfo.deviceType;
console.info('the value of the deviceType is :' + deviceTypeInfo);
let manufactureInfo = deviceinfo.manufacture;
console.info('the value of the manufactureInfo is :' + manufactureInfo);
let brandInfo = deviceinfo.brand;
console.info('the value of the device brand is :' + brandInfo);
let marketNameInfo = deviceinfo.marketName;
console.info('the value of the deviceinfo marketName is :' + marketNameInfo);
let productSeriesInfo = deviceinfo.productSeries;
console.info('the value of the deviceinfo productSeries is :' + productSeriesInfo);
let productModelInfo = deviceinfo.productModel;
console.info('the value of the deviceinfo productModel is :' + productModelInfo);
let softwareModelInfo = deviceinfo.softwareModel;
console.info('the value of the deviceinfo softwareModel is :' + softwareModelInfo);
let hardwareModelInfo = deviceinfo.hardwareModel;
console.info('the value of the deviceinfo hardwareModel is :' + hardwareModelInfo);
let hardwareProfileInfo = deviceinfo.hardwareProfile;
console.info('the value of the deviceinfo hardwareProfile is :' + hardwareProfileInfo);
let serialInfo = deviceinfo.serial;
console.info('the value of the deviceinfo serial is :' + serialInfo);
let bootloaderVersionInfo = deviceinfo.bootloaderVersion;
console.info('the value of the deviceinfo bootloaderVersion is :' + bootloaderVersionInfo);
let abiListInfo = deviceinfo.abiList;
console.info('the value of the deviceinfo abiList is :' + abiListInfo);
let securityPatchTagInfo = deviceinfo.securityPatchTag;
console.info('the value of the deviceinfo securityPatchTag is :' + securityPatchTagInfo);
let displayVersionInfo = deviceinfo.displayVersion;
console.info('the value of the deviceinfo displayVersion is :' + displayVersionInfo);
let incrementalVersionInfo = deviceinfo.incrementalVersion;
console.info('the value of the deviceinfo incrementalVersion is :' + incrementalVersionInfo);
let osReleaseTypeInfo = deviceinfo.osReleaseType;
console.info('the value of the deviceinfo osReleaseType is :' + osReleaseTypeInfo);
let osFullNameInfo = deviceinfo.osFullName;
console.info('the value of the deviceinfo osFullName is :' + osFullNameInfo);
let majorVersionInfo = deviceinfo.majorVersion;
console.info('the value of the deviceinfo majorVersion is :' + majorVersionInfo);
let seniorVersionInfo = deviceinfo.seniorVersion;
console.info('the value of the deviceinfo seniorVersion is :' + seniorVersionInfo);
let featureVersionInfo = deviceinfo.featureVersion;
console.info('the value of the deviceinfo featureVersion is :' + featureVersionInfo);
let buildVersionInfo = deviceinfo.buildVersion;
console.info('the value of the deviceinfo buildVersion is :' + buildVersionInfo);
let sdkApiVersionInfo = deviceinfo.sdkApiVersion;
console.info('the value of the deviceinfo sdkApiVersion is :' + sdkApiVersionInfo);
let firstApiVersionInfo = deviceinfo.firstApiVersion;
console.info('the value of the deviceinfo firstApiVersion is :' + firstApiVersionInfo);
let versionIdInfo = deviceinfo.versionId;
console.info('the value of the deviceinfo versionId is :' + versionIdInfo);
let buildTypeInfo = deviceinfo.buildType;
console.info('the value of the deviceinfo buildType is :' + buildTypeInfo);
let buildUserInfo = deviceinfo.buildUser;
console.info('the value of the deviceinfo buildUser is :' + buildUserInfo);
let buildHostInfo = deviceinfo.buildHost;
console.info('the value of the deviceinfo buildHost is :' + buildHostInfo);
let buildTimeInfo = deviceinfo.buildTime;
console.info('the value of the deviceinfo buildTime is :' + buildTimeInfo);
let buildRootHashInfo = deviceinfo.buildRootHash;
console.info('the value of the deviceinfo buildRootHash is :' + buildRootHashInfo);
let udid = deviceinfo.udid;
console.info('the value of the deviceinfo udid is :' + udid);
let distributionOSName = deviceinfo.distributionOSName
console.info('the value of the deviceinfo distributionOSName is :' + distributionOSName);
let distributionOSVersion = deviceinfo.distributionOSVersion
console.info('the value of the deviceinfo distributionOSVersion is :' + distributionOSVersion);
let distributionOSApiVersion = deviceinfo.distributionOSApiVersion
console.info('the value of the deviceinfo distributionOSApiVersion is :' + distributionOSApiVersion);
let distributionOSReleaseType = deviceinfo.distributionOSReleaseType
console.info('the value of the deviceinfo distributionOSReleaseType is :' + distributionOSReleaseType);
```
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录