未验证 提交 e040bbf5 编写于 作者: O openharmony_ci 提交者: Gitee

!20644 FIX:添加deviceInfo api 接口使用示例

Merge pull request !20644 from cheng_jinsong/0710
......@@ -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.
先完成此消息的编辑!
想要评论请 注册