调整更新信息

This commit is contained in:
唐明明
2021-11-10 18:58:11 +08:00
parent 039fb6300c
commit f543bed848
2 changed files with 35 additions and 35 deletions

68
App.vue
View File

@@ -24,40 +24,40 @@
//#ifdef APP-PLUS
// 获取系统版本号
// getVersions({
// platform: plus.os.name,
// version : plus.runtime.versionCode
// }).then(res => {
// if(res.update){
// uni.showModal({
// title: "更新提示",
// content: res.note || '版本更新信息',
// confirmText: "更新",
// success: modalRes => {
// if (modalRes.confirm) {
// if (plus.os.name == "Android") {
// plus.runtime.openURL(res.info.download, err => {
// uni.showToast({
// title: err,
// icon : 'none'
// })
// });
// } else{
// uni.showToast({
// title: 'IOS应用暂未上架请打开测试(TestFlight)工具点击更新',
// icon : 'none'
// })
// }
// }
// }
// })
// }
// }).catch(err => {
// uni.showToast({
// title: err.message,
// icon : 'none'
// })
// })
getVersions({
platform: plus.os.name,
version : plus.runtime.versionCode
}).then(res => {
if(res.update){
uni.showModal({
title: "更新提示",
content: res.note || '版本更新信息',
confirmText: "更新",
success: modalRes => {
if (modalRes.confirm) {
if (plus.os.name == "Android") {
plus.runtime.openURL(res.info.download, err => {
uni.showToast({
title: err,
icon : 'none'
})
});
} else{
uni.showToast({
title: 'IOS应用暂未上架请打开测试(TestFlight)工具点击更新',
icon : 'none'
})
}
}
}
})
}
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
//#endif
},
onShow() {

File diff suppressed because one or more lines are too long