|
@ -22,7 +22,7 @@ export function appUpdate(isShowHint) { |
|
|
var content = res.data.updateContent; |
|
|
var content = res.data.updateContent; |
|
|
var version = res.data.installPackageVersion; |
|
|
var version = res.data.installPackageVersion; |
|
|
var isForcedUpdate = res.data.isForcedUpdate |
|
|
var isForcedUpdate = res.data.isForcedUpdate |
|
|
var versionName =res.data.installPackageName |
|
|
var versionName = res.data.installPackageName |
|
|
console.log("新版本提示") |
|
|
console.log("新版本提示") |
|
|
showDialog(versionName, content, isForcedUpdate, downUrl) |
|
|
showDialog(versionName, content, isForcedUpdate, downUrl) |
|
|
|
|
|
|
|
@ -45,12 +45,12 @@ export function appUpdate(isShowHint) { |
|
|
// }
|
|
|
// }
|
|
|
// })
|
|
|
// })
|
|
|
} else { |
|
|
} else { |
|
|
if(isShowHint){ |
|
|
if (isShowHint) { |
|
|
uni.showToast({ |
|
|
uni.showToast({ |
|
|
title: "当前是最新版本" |
|
|
title: "当前是最新版本" |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
console.log("没有新版本") |
|
|
console.log("没有新版本") |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -124,12 +124,16 @@ export function confirm(downUrl) { |
|
|
showLoading.setTitle("已连接到服务器"); |
|
|
showLoading.setTitle("已连接到服务器"); |
|
|
break; |
|
|
break; |
|
|
case 3: |
|
|
case 3: |
|
|
prg = parseInt( |
|
|
if (task.totalSize && > task.totalSize0) { |
|
|
(parseFloat(task.downloadedSize) / |
|
|
prg = parseInt( |
|
|
parseFloat(task.totalSize)) * |
|
|
(parseFloat(task.downloadedSize) / |
|
|
100 |
|
|
parseFloat(task.totalSize)) * |
|
|
); |
|
|
100 |
|
|
showLoading.setTitle(" 正在下载" + prg + "% "); |
|
|
); |
|
|
|
|
|
showLoading.setTitle("正在下载" + prg + "% "); |
|
|
|
|
|
}else { |
|
|
|
|
|
showLoading.setTitle("正在下载"); |
|
|
|
|
|
} |
|
|
break; |
|
|
break; |
|
|
case 4: |
|
|
case 4: |
|
|
plus.nativeUI.closeWaiting(); |
|
|
plus.nativeUI.closeWaiting(); |
|
|