ts队列组件,兼容安卓小米升级方案

This commit is contained in:
唐明明
2021-11-15 17:17:18 +08:00
parent 24b23ac13c
commit 0f9b01274f
10 changed files with 649 additions and 283 deletions

29
App.vue
View File

@@ -36,12 +36,29 @@
success: modalRes => {
if (modalRes.confirm) {
if (plus.os.name == "Android") {
plus.runtime.openURL(res.info.download, err => {
uni.showToast({
title: err,
icon : 'none'
})
});
uni.showToast({
title: '新版本下载中,将在下载完成后自动为您安装更新包',
icon : 'none'
})
uni.downloadFile({
url : res.info.download,
success : apkPick=> {
plus.runtime.install(apkPick.tempFilePath, '', installRES => {
// 安装完成用于提示新版本引导,暂时无用
}, installERR => {
// 安装失败
})
},
fail(err){
uni.showToast({
title: '安装包下载失败,请检查您的网络或稍后重试',
icon : 'none'
})
}
})
// plus.runtime.openURL(res.info.download, err => {
// console.log(err)
// }, 'com.android.browser');
} else{
uni.showToast({
title: 'IOS应用暂未上架请打开测试(TestFlight)工具点击更新',