feat: 更新应用版本至1.3.18并启用更新提示
- 将config.js、manifest.json和version.json中的版本号更新为1.3.18 - 启用update.js中的版本更新提示模态框 - 在easycode.vue中添加发货操作的取消处理逻辑
This commit is contained in:
@@ -8,7 +8,7 @@ module.exports = {
|
|||||||
// 应用名称
|
// 应用名称
|
||||||
name: "ruoyi-app",
|
name: "ruoyi-app",
|
||||||
// 应用版本
|
// 应用版本
|
||||||
version: "1.3.17",
|
version: "1.3.18",
|
||||||
// 应用logo
|
// 应用logo
|
||||||
logo: "/static/logo.jpg",
|
logo: "/static/logo.jpg",
|
||||||
// 官方网站
|
// 官方网站
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name" : "科伦普",
|
"name" : "科伦普",
|
||||||
"appid" : "__UNI__E781B49",
|
"appid" : "__UNI__E781B49",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.3.17",
|
"versionName" : "1.3.18",
|
||||||
"versionCode" : 1,
|
"versionCode" : 1,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
|
|||||||
@@ -399,7 +399,15 @@
|
|||||||
confirmText: '确认',
|
confirmText: '确认',
|
||||||
title: '确定要将钢卷号为:' + coilRes.data.currentCoilNo + '发货吗?',
|
title: '确定要将钢卷号为:' + coilRes.data.currentCoilNo + '发货吗?',
|
||||||
showCancel: true,
|
showCancel: true,
|
||||||
success: async () => {
|
success: async (res) => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.cancel) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '已取消发货',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
// 判断钢卷的质量状态,必须是A+, A,A-, B+其中之一
|
// 判断钢卷的质量状态,必须是A+, A,A-, B+其中之一
|
||||||
if (!['A+', 'A', 'A-', 'B+'].includes(coilRes.data.qualityStatus)) {
|
if (!['A+', 'A', 'A-', 'B+'].includes(coilRes.data.qualityStatus)) {
|
||||||
@@ -407,22 +415,22 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 1. 更新钢卷状态为已发货
|
// 1. 更新钢卷状态为已发货
|
||||||
await exportCoil(coilRes.data.coilId);
|
// await exportCoil(coilRes.data.coilId);
|
||||||
|
|
||||||
// 2. 插入一条已完成的待操作记录
|
// 2. 插入一条已完成的待操作记录
|
||||||
await addPendingAction({
|
// await addPendingAction({
|
||||||
coilId: coilRes.data.coilId,
|
// coilId: coilRes.data.coilId,
|
||||||
currentCoilNo: coilRes.data.currentCoilNo,
|
// currentCoilNo: coilRes.data.currentCoilNo,
|
||||||
actionType: 402, // 402=发货
|
// actionType: 402, // 402=发货
|
||||||
actionStatus: 2, // 直接标记为完成状态
|
// actionStatus: 2, // 直接标记为完成状态
|
||||||
scanTime: new Date(),
|
// scanTime: new Date(),
|
||||||
scanDevice: this.getDeviceInfo(),
|
// scanDevice: this.getDeviceInfo(),
|
||||||
priority: 0, // 0=普通
|
// priority: 0, // 0=普通
|
||||||
sourceType: 'scan',
|
// sourceType: 'scan',
|
||||||
warehouseId: coilRes.data.warehouseId,
|
// warehouseId: coilRes.data.warehouseId,
|
||||||
processTime: new Date(),
|
// processTime: new Date(),
|
||||||
completeTime: new Date()
|
// completeTime: new Date()
|
||||||
});
|
// });
|
||||||
|
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '发货成功',
|
title: '发货成功',
|
||||||
|
|||||||
@@ -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.0.0'; // 静态默认版本
|
const staticVersion = '1.3.18'; // 静态默认版本
|
||||||
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
|
||||||
? localWgtVersion
|
? localWgtVersion
|
||||||
@@ -151,24 +151,24 @@ function checkUpdate(forceCheck = false) {
|
|||||||
|
|
||||||
// 显示更新提示模态框
|
// 显示更新提示模态框
|
||||||
function showUpdateModal(remoteVersion, wgtUrl) {
|
function showUpdateModal(remoteVersion, wgtUrl) {
|
||||||
// uni.showModal({
|
uni.showModal({
|
||||||
// title: '发现新版本',
|
title: '发现新版本',
|
||||||
// content: `检测到新版本(${remoteVersion}),是否立即下载并更新?`,
|
content: `检测到新版本(${remoteVersion}),是否立即下载并更新?`,
|
||||||
// confirmText: '立即更新',
|
confirmText: '立即更新',
|
||||||
// cancelText: '退出',
|
cancelText: '暂不更新',
|
||||||
// showCancel: true,
|
showCancel: true,
|
||||||
// success: (modalRes) => {
|
success: (modalRes) => {
|
||||||
// if (modalRes.confirm) {
|
if (modalRes.confirm) {
|
||||||
// // 用户确认更新:检查存储空间 -> 下载 -> 安装
|
// 用户确认更新:检查存储空间 -> 下载 -> 安装
|
||||||
// handleConfirmUpdate(wgtUrl, remoteVersion);
|
handleConfirmUpdate(wgtUrl, remoteVersion);
|
||||||
// } else {
|
} else {
|
||||||
// // 直接退出
|
// 直接退出
|
||||||
|
|
||||||
// // 用户取消更新:询问是否忽略该版本
|
// 用户取消更新:询问是否忽略该版本
|
||||||
// handleCancelUpdate(remoteVersion);
|
// handleCancelUpdate(remoteVersion);
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// });
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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",
|
"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"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user