feat: 更新应用版本至1.3.18并启用更新提示
- 将config.js、manifest.json和version.json中的版本号更新为1.3.18 - 启用update.js中的版本更新提示模态框 - 在easycode.vue中添加发货操作的取消处理逻辑
This commit is contained in:
@@ -73,7 +73,7 @@ function checkStorageSpace() {
|
||||
function checkUpdate(forceCheck = false) {
|
||||
// 1. 准备本地版本信息
|
||||
const localVersion = plus.runtime.version; // 基座版本
|
||||
const staticVersion = '1.0.0'; // 静态默认版本
|
||||
const staticVersion = '1.3.18'; // 静态默认版本
|
||||
const localWgtVersion = uni.getStorageSync('wgtVersion') || staticVersion; // 本地wgt版本(从存储获取或用默认)
|
||||
const currentVersion = compareVersion(localWgtVersion, localVersion) > 0
|
||||
? localWgtVersion
|
||||
@@ -151,24 +151,24 @@ function checkUpdate(forceCheck = false) {
|
||||
|
||||
// 显示更新提示模态框
|
||||
function showUpdateModal(remoteVersion, wgtUrl) {
|
||||
// uni.showModal({
|
||||
// title: '发现新版本',
|
||||
// content: `检测到新版本(${remoteVersion}),是否立即下载并更新?`,
|
||||
// confirmText: '立即更新',
|
||||
// cancelText: '退出',
|
||||
// showCancel: true,
|
||||
// success: (modalRes) => {
|
||||
// if (modalRes.confirm) {
|
||||
// // 用户确认更新:检查存储空间 -> 下载 -> 安装
|
||||
// handleConfirmUpdate(wgtUrl, remoteVersion);
|
||||
// } else {
|
||||
// // 直接退出
|
||||
uni.showModal({
|
||||
title: '发现新版本',
|
||||
content: `检测到新版本(${remoteVersion}),是否立即下载并更新?`,
|
||||
confirmText: '立即更新',
|
||||
cancelText: '暂不更新',
|
||||
showCancel: true,
|
||||
success: (modalRes) => {
|
||||
if (modalRes.confirm) {
|
||||
// 用户确认更新:检查存储空间 -> 下载 -> 安装
|
||||
handleConfirmUpdate(wgtUrl, remoteVersion);
|
||||
} else {
|
||||
// 直接退出
|
||||
|
||||
// // 用户取消更新:询问是否忽略该版本
|
||||
// handleCancelUpdate(remoteVersion);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// 用户取消更新:询问是否忽略该版本
|
||||
// handleCancelUpdate(remoteVersion);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user