diff --git a/RuoYi-App-master/App.vue b/RuoYi-App-master/App.vue index 94d0026..656874c 100644 --- a/RuoYi-App-master/App.vue +++ b/RuoYi-App-master/App.vue @@ -4,10 +4,13 @@ import { getToken } from '@/utils/auth' export default { + globalData: { + config: {} + }, onLaunch: function() { this.initApp() }, - onShow: function() { + onShow: function() { // 检查应用状态,确保从后台恢复时状态一致 this.checkAppState() }, @@ -30,27 +33,36 @@ } }, checkAppState() { - - - // 检查Token状态和页面导航栈状态 - console.log('应用从后台切换到前台,检查应用状态') - // 检查Token状态 - if (!getToken()) { - console.log('Token不存在,提示并跳转到登录页') - uni.showToast({ - icon: 'none', - title: '登录已过期,请重新登录' - }) - setTimeout(() => { - uni.reLaunch({ url: loginPage }) - }, 1500) - } else { - console.log('Token存在,不做操作') - } - - // 注意:应用从后台切换到前台的逻辑已在permission.js中处理 - // 这里不需要重复处理,保留此方法以便未来扩展 - } + // 检查Token状态和页面导航栈状态 + console.log('应用从后台切换到前台,检查应用状态') + + // 获取当前页面路径,判断是否在登录页 + const pages = getCurrentPages() + const currentPage = pages[pages.length - 1] + const currentPagePath = currentPage ? currentPage.route : '' + + // 如果当前页面是登录页,则不检查token + if (currentPagePath === 'pages/login') { + console.log('当前已在登录页面,不进行token检查') + return + } + + // 检查Token状态 + if (!getToken()) { + console.log('Token不存在,提示并跳转到登录页') + uni.showToast({ + icon: 'none', + title: '登录已过期,请重新登录' + }) + setTimeout(() => { + uni.reLaunch({ url: '/pages/login' }) + }, 1500) + } else { + console.log('Token存在,不做操作') + } + + + } } } diff --git a/RuoYi-App-master/locales/en-US.json b/RuoYi-App-master/locales/en-US.json index fe9119d..99e6767 100644 --- a/RuoYi-App-master/locales/en-US.json +++ b/RuoYi-App-master/locales/en-US.json @@ -44,6 +44,11 @@ "desc": "Cycle Count, Spot Check" } }, + "tabBar": { + "workbench": "Workbench", + "task": "Task", + "mine": "Mine" + }, "login": { "title": "Login", "username": "Username", @@ -94,6 +99,16 @@ "settingsSaved": "Settings saved", "saveSettingsFailed": "Failed to save settings" }, + "spaceAnalysis": { + "warehouse": "Warehouse:", + "warehousePlaceholder": "Please select a warehouse", + "cargoSpaceStatus": "Cargo Space Status Distribution", + "aisleStatistics": "Aisle Inbound/Outbound Statistics", + "quantity": "Quantity", + "inboundQuantity": "Inbound Quantity", + "outboundQuantity": "Outbound Quantity", + "aisle": "Aisle" + }, "task": { "list": { "all": "All", @@ -450,4 +465,5 @@ "getInventoryListFailed": "Failed to get inventory list" } } + } \ No newline at end of file diff --git a/RuoYi-App-master/locales/zh-CN.json b/RuoYi-App-master/locales/zh-CN.json index f12c4a1..cedb262 100644 --- a/RuoYi-App-master/locales/zh-CN.json +++ b/RuoYi-App-master/locales/zh-CN.json @@ -44,6 +44,11 @@ "desc": "周期盘点、抽查" } }, + "tabBar": { + "workbench": "工作台", + "task": "任务", + "mine": "我的" + }, "login": { "title": "登录", "username": "用户名", @@ -94,6 +99,16 @@ "settingsSaved": "设置已保存", "saveSettingsFailed": "保存设置失败" }, + "spaceAnalysis": { + "warehouse": "仓库:", + "warehousePlaceholder": "请选择仓库", + "cargoSpaceStatus": "货位状态分布", + "aisleStatistics": "巷道出入库统计", + "quantity": "数量", + "inboundQuantity": "入库数量", + "outboundQuantity": "出库数量", + "aisle": "巷道" + }, "task": { "list": { "all": "全部", @@ -451,4 +466,5 @@ "getInventoryListFailed": "获取库存列表失败" } } + } \ No newline at end of file diff --git a/RuoYi-App-master/manifest.json b/RuoYi-App-master/manifest.json index 0b3a38b..e76addc 100644 --- a/RuoYi-App-master/manifest.json +++ b/RuoYi-App-master/manifest.json @@ -1,5 +1,5 @@ { - "name" : "若依移动端", + "name" : "手持机", "appid" : "__UNI__A2DE016", "description" : "", "versionName" : "1.1.0", diff --git a/RuoYi-App-master/pages/charts/spaceAnalysis.vue b/RuoYi-App-master/pages/charts/spaceAnalysis.vue index 1fa8d84..e5e9b7a 100644 --- a/RuoYi-App-master/pages/charts/spaceAnalysis.vue +++ b/RuoYi-App-master/pages/charts/spaceAnalysis.vue @@ -2,12 +2,12 @@ - + @@ -58,7 +58,7 @@ export default { }, pieOpts: { title: { - name: '货位状态分布', + name: this.$t('spaceAnalysis.cargoSpaceStatus'), fontSize: 15 }, legend: { @@ -86,7 +86,7 @@ export default { }, columnOpts: { title: { - name: '巷道出入库统计', + name: this.$t('spaceAnalysis.aisleStatistics'), fontSize: 15 }, legend: { @@ -96,7 +96,7 @@ export default { fontSize: 12 }, yAxis: { - name: '数量', + name: this.$t('spaceAnalysis.quantity'), fontSize: 12 }, extra: { @@ -159,12 +159,12 @@ export default { if (res.code === 200 && res.data) { // 更新柱状图数据 this.columnData = { - categories: ['1巷道'], + categories: [`1${this.$t('spaceAnalysis.aisle')}`], series: [{ - name: '入库数量', + name: this.$t('spaceAnalysis.inboundQuantity'), data:[res.data["in"]] },{ - name: '出库数量', + name: this.$t('spaceAnalysis.outboundQuantity'), data:[res.data["out"]] }] } diff --git a/RuoYi-App-master/pages/index.vue b/RuoYi-App-master/pages/index.vue index fe2e18f..9c2866c 100644 --- a/RuoYi-App-master/pages/index.vue +++ b/RuoYi-App-master/pages/index.vue @@ -78,7 +78,8 @@