Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
9cd9ab48
D
Docs
项目概览
OpenHarmony
/
Docs
大约 2 年 前同步成功
通知
161
Star
293
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看板
提交
9cd9ab48
编写于
6月 30, 2022
作者:
L
liangZ15
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Signed-off-by: liangZ15 <lihongliang20@huawei.com>
上级
a955c19e
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
5 addition
and
43 deletion
+5
-43
zh-cn/application-dev/reference/apis/js-apis-update.md
zh-cn/application-dev/reference/apis/js-apis-update.md
+5
-43
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-update.md
浏览文件 @
9cd9ab48
...
@@ -201,7 +201,7 @@ updater.getNewVersionInfo().then(info => {
...
@@ -201,7 +201,7 @@ updater.getNewVersionInfo().then(info => {
console.log(`info versionName = ` + info.versionComponents[0].displayVersion);
console.log(`info versionName = ` + info.versionComponents[0].displayVersion);
console.log(`info versionCode = ` + info.versionComponents[0].innerVersion);
console.log(`info versionCode = ` + info.versionComponents[0].innerVersion);
}).catch(err => {
}).catch(err => {
console.log("getNewVersionInfo promise error $JSON.stringify(err));
console.log("getNewVersionInfo promise error $JSON.stringify(err)
"
);
});
});
```
```
...
@@ -1254,7 +1254,7 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
...
@@ -1254,7 +1254,7 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
| subStatus | number | 否 | 子状态 |
| subStatus | number | 否 | 子状态 |
| progress | number | 是 | 进度 |
| progress | number | 是 | 进度 |
| installMode | number | 是 | 安装模式 |
| installMode | number | 是 | 安装模式 |
| errorMessages | Array
\<
[
ErrorMessage
](
#errorMessage
)
> | 否 | 错误
内容
|
| errorMessages | Array
\<
[
ErrorMessage
](
#errorMessage
)
> | 否 | 错误
信息
|
| versionComponets | Array
\<
[
VersionComponet
](
#versionComponet
)
> | 是 | 版本组件 |
| versionComponets | Array
\<
[
VersionComponet
](
#versionComponet
)
> | 是 | 版本组件 |
## ErrorMessage
## ErrorMessage
...
@@ -1281,9 +1281,10 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
...
@@ -1281,9 +1281,10 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
## UpgradeTaskCallback
## UpgradeTaskCallback
### onTaskUpdate(eventInfo: [EventInfo](#eventInfo))
### onTaskUpdate
onTaskUpdate(eventInfo:
[
EventInfo
](
#eventInfo
)
): void
更新
事件回调。
事件回调。
**系统能力**
:以下各项对应的系统能力均为:SystemCapability.Update.UpdateService
**系统能力**
:以下各项对应的系统能力均为:SystemCapability.Update.UpdateService
...
@@ -1291,45 +1292,6 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
...
@@ -1291,45 +1292,6 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
| --------------- | ---------------------------------------- | ---- | ---- |
| --------------- | ---------------------------------------- | ---- | ---- |
| eventInfo |
[
EventInfo
](
#eventInfo
)
| 是 | 事件信息 |
| eventInfo |
[
EventInfo
](
#eventInfo
)
| 是 | 事件信息 |
## NewVersionInfo
新版本信息。
**系统能力**
:以下各项对应的系统能力均为:SystemCapability.Update.UpdateService
| 名称 | 参数类型 | 必填 | 说明 |
| --------------- | ---------------------------------------- | ---- | ---- |
| status |
[
NewVersionStatus
](
#newversionstatus
)
| 是 | 升级状态 |
| errMsg | string | 是 | 错误信息 |
| checkResults | Array
<
[
CheckResult
](
#checkresult
)
>
| 是 | 检测结果 |
| descriptionInfo | Array
\<
[
DescriptionInfo
](
#descriptioninfo
)
> | 是 | 描述信息 |
## CheckResult
检测结果。
**系统能力**
:以下各项对应的系统能力均为:SystemCapability.Update.UpdateService
| 名称 | 参数类型 | 必填 | 说明 |
| ------------- | ----------------------------- | ---- | ------ |
| versionName | string | 是 | 版本名称 |
| versionCode | number | 是 | 版本编码 |
| size | number | 是 | 版本大小 |
| verifyInfo | string | 是 | 版本校验信息 |
| packageType |
[
PackageTypes
](
#packagetypes
)
| 是 | 版本类型 |
| descriptionId | string | 是 | 版本描述信息 |
## DescriptionInfo
版本描述信息。
**系统能力**
:以下各项对应的系统能力均为:SystemCapability.Update.UpdateService
| 名称 | 参数类型 | 必填 | 说明 |
| ------------- | ------ | ---- | ------------- |
| descriptionId | string | 是 | 版本versionId信息 |
| content | string | 是 | 版本changelog信息 |
## BusinessVendor
## BusinessVendor
设备厂家。
设备厂家。
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录