fix: 更新应用版本至1.3.31并调整更新逻辑

- 将config.js和version.json中的版本号更新为1.3.31
- 移除easycode.vue中钢卷质量状态的发货限制
- 修改update.js的更新提示,取消更新时直接退出应用
This commit is contained in:
2026-04-24 13:23:01 +08:00
parent b93d636c8a
commit 3f1032713e
4 changed files with 18 additions and 16 deletions

View File

@@ -9,7 +9,7 @@ module.exports = {
// 应用名称 // 应用名称
name: "ruoyi-app", name: "ruoyi-app",
// 应用版本 // 应用版本
version: "1.3.30", version: "1.3.31",
// 应用logo // 应用logo
logo: "/static/logo.jpg", logo: "/static/logo.jpg",
// 官方网站 // 官方网站

View File

@@ -571,17 +571,17 @@
async handleShipSubmit() { async handleShipSubmit() {
try { try {
// 判断钢卷的质量状态必须是A+, AA-, B+,B,B-其中之一 // 判断钢卷的质量状态必须是A+, AA-, B+,B,B-其中之一
if (!['A+', 'A', 'A-', 'B+', 'B', 'B-'].includes(this.coilDetail.qualityStatus) // if (!['A+', 'A', 'A-', 'B+', 'B', 'B-'].includes(this.coilDetail.qualityStatus)
&& !(this.coilDetail.qualityStatus == null // && !(this.coilDetail.qualityStatus == null
|| this.coilDetail.qualityStatus == undefined // || this.coilDetail.qualityStatus == undefined
|| this.coilDetail.qualityStatus == '') // || this.coilDetail.qualityStatus == '')
) { // ) {
uni.showToast({ // uni.showToast({
title: '只能发货B-以上品质的钢卷', // title: '只能发货B-以上品质的钢卷',
icon: 'none' // icon: 'none'
}); // });
return; // return;
} // }
// 1. 更新钢卷状态为已发货 // 1. 更新钢卷状态为已发货
const res = await exportCoil(this.coilDetail.coilId); const res = await exportCoil(this.coilDetail.coilId);

View File

@@ -73,7 +73,7 @@ function checkStorageSpace() {
function checkUpdate(forceCheck = false) { function checkUpdate(forceCheck = false) {
// 1. 准备本地版本信息 // 1. 准备本地版本信息
const localVersion = plus.runtime.version; // 基座版本 const localVersion = plus.runtime.version; // 基座版本
const staticVersion = '1.3.30'; // 静态默认版本 const staticVersion = '1.3.31'; // 静态默认版本
// const localWgtVersion = staticVersion; // const localWgtVersion = staticVersion;
const localWgtVersion = uni.getStorageSync('wgtVersion') || staticVersion; // 本地wgt版本从存储获取或用默认 const localWgtVersion = uni.getStorageSync('wgtVersion') || staticVersion; // 本地wgt版本从存储获取或用默认
const currentVersion = compareVersion(localWgtVersion, localVersion) > 0 const currentVersion = compareVersion(localWgtVersion, localVersion) > 0
@@ -155,7 +155,7 @@ function checkUpdate(forceCheck = false) {
title: '发现新版本', title: '发现新版本',
content: `检测到新版本(${remoteVersion}),是否立即下载并更新?`, content: `检测到新版本(${remoteVersion}),是否立即下载并更新?`,
confirmText: '立即更新', confirmText: '立即更新',
cancelText: '暂不更新', cancelText: '推出应用',
showCancel: true, showCancel: true,
success: (modalRes) => { success: (modalRes) => {
if (modalRes.confirm) { if (modalRes.confirm) {
@@ -163,6 +163,8 @@ function checkUpdate(forceCheck = false) {
handleConfirmUpdate(wgtUrl, remoteVersion); handleConfirmUpdate(wgtUrl, remoteVersion);
} else { } else {
// 直接退出 // 直接退出
plus.runtime.quit()
// 用户取消更新:询问是否忽略该版本 // 用户取消更新:询问是否忽略该版本
// handleCancelUpdate(remoteVersion); // handleCancelUpdate(remoteVersion);

View File

@@ -1,5 +1,5 @@
{ {
"version": "klp 1.3.30", "version": "klp 1.3.31",
"wgtUrl": "http://49.232.154.205:10900/fadapp-update/klp/klp.wgt", "wgtUrl": "http://49.232.154.205:10900/fadapp-update/klp/klp.wgt",
"apkUrl": "http://49.232.154.205:10900/fadapp-update/klp/klp.apk" "apkUrl": "http://49.232.154.205:10900/fadapp-update/klp/klp.apk"
} }