feat: 更新应用版本至1.3.18并启用更新提示

- 将config.js、manifest.json和version.json中的版本号更新为1.3.18
- 启用update.js中的版本更新提示模态框
- 在easycode.vue中添加发货操作的取消处理逻辑
This commit is contained in:
砂糖
2026-01-10 10:25:05 +08:00
parent 94e67c73b6
commit cd491678d9
5 changed files with 44 additions and 36 deletions

View File

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

View File

@@ -2,7 +2,7 @@
"name" : "科伦普",
"appid" : "__UNI__E781B49",
"description" : "",
"versionName" : "1.3.17",
"versionName" : "1.3.18",
"versionCode" : 1,
"transformPx" : false,
"app-plus" : {

View File

@@ -399,7 +399,15 @@
confirmText: '确认',
title: '确定要将钢卷号为:' + coilRes.data.currentCoilNo + '发货吗?',
showCancel: true,
success: async () => {
success: async (res) => {
console.log(res)
if (res.cancel) {
uni.showToast({
title: '已取消发货',
icon: 'none'
})
return;
}
try {
// 判断钢卷的质量状态必须是A+, AA-, B+其中之一
if (!['A+', 'A', 'A-', 'B+'].includes(coilRes.data.qualityStatus)) {
@@ -407,22 +415,22 @@
return;
}
// 1. 更新钢卷状态为已发货
await exportCoil(coilRes.data.coilId);
// await exportCoil(coilRes.data.coilId);
// 2. 插入一条已完成的待操作记录
await addPendingAction({
coilId: coilRes.data.coilId,
currentCoilNo: coilRes.data.currentCoilNo,
actionType: 402, // 402=发货
actionStatus: 2, // 直接标记为完成状态
scanTime: new Date(),
scanDevice: this.getDeviceInfo(),
priority: 0, // 0=普通
sourceType: 'scan',
warehouseId: coilRes.data.warehouseId,
processTime: new Date(),
completeTime: new Date()
});
// await addPendingAction({
// coilId: coilRes.data.coilId,
// currentCoilNo: coilRes.data.currentCoilNo,
// actionType: 402, // 402=发货
// actionStatus: 2, // 直接标记为完成状态
// scanTime: new Date(),
// scanDevice: this.getDeviceInfo(),
// priority: 0, // 0=普通
// sourceType: 'scan',
// warehouseId: coilRes.data.warehouseId,
// processTime: new Date(),
// completeTime: new Date()
// });
uni.showToast({
title: '发货成功',

View File

@@ -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);
}
}
});
}

View File

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