fix: 更新应用版本至1.3.31并调整更新逻辑
- 将config.js和version.json中的版本号更新为1.3.31 - 移除easycode.vue中钢卷质量状态的发货限制 - 修改update.js的更新提示,取消更新时直接退出应用
This commit is contained in:
@@ -73,7 +73,7 @@ function checkStorageSpace() {
|
||||
function checkUpdate(forceCheck = false) {
|
||||
// 1. 准备本地版本信息
|
||||
const localVersion = plus.runtime.version; // 基座版本
|
||||
const staticVersion = '1.3.30'; // 静态默认版本
|
||||
const staticVersion = '1.3.31'; // 静态默认版本
|
||||
// const localWgtVersion = staticVersion;
|
||||
const localWgtVersion = uni.getStorageSync('wgtVersion') || staticVersion; // 本地wgt版本(从存储获取或用默认)
|
||||
const currentVersion = compareVersion(localWgtVersion, localVersion) > 0
|
||||
@@ -155,14 +155,16 @@ function checkUpdate(forceCheck = false) {
|
||||
title: '发现新版本',
|
||||
content: `检测到新版本(${remoteVersion}),是否立即下载并更新?`,
|
||||
confirmText: '立即更新',
|
||||
cancelText: '暂不更新',
|
||||
cancelText: '推出应用',
|
||||
showCancel: true,
|
||||
success: (modalRes) => {
|
||||
if (modalRes.confirm) {
|
||||
// 用户确认更新:检查存储空间 -> 下载 -> 安装
|
||||
handleConfirmUpdate(wgtUrl, remoteVersion);
|
||||
} else {
|
||||
// 直接退出
|
||||
// 直接退出
|
||||
plus.runtime.quit()
|
||||
|
||||
|
||||
// 用户取消更新:询问是否忽略该版本
|
||||
// handleCancelUpdate(remoteVersion);
|
||||
|
||||
Reference in New Issue
Block a user