浏览代码

[升级][修改]:优化升级组件使用方式

tags/jenkins-front-end-screenad-193-v107^0
hupeng 5 年前
父节点
当前提交
bfbdf6de43
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. +2
    -3
      App.js

+ 2
- 3
App.js 查看文件

@@ -121,9 +121,7 @@ async codePushUpdate() {
this.codePushStatusDidChange.bind(this),
this.codePushDownloadDidProgress.bind(this)
).then((status: SyncStatus) => {
if(status!=CodePush.SyncStatus.UP_TO_DATE){
CodePush.restartApp();
}

}, (error: any) => {
CodePush.restartApp();
});
@@ -153,6 +151,7 @@ codePushStatusDidChange(syncStatus) {
break;
case CodePush.SyncStatus.UPDATE_INSTALLED:
this.setState({ syncMessage: "更新已安装,重启应用后生效", updating: false });
CodePush.restartApp();
break;
case CodePush.SyncStatus.UNKNOWN_ERROR:
this.setState({ syncMessage: "未知错误", updating: false });


正在加载...
取消
保存