From 64a260231730a4af89acd47a8307419f9cc66ae5 Mon Sep 17 00:00:00 2001 From: zm2000 <18386612143@163.com> Date: Thu, 5 Nov 2026 18:00:38 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A6=96=E9=A1=B5/=E6=88=91=E7=9A=84/?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E7=95=8C=E9=9D=A2=E6=94=B9=E7=89=88=20+=20?= =?UTF-8?q?=E4=BB=93=E5=BA=93=E5=88=87=E6=8D=A2=20+=20=E5=B8=AE=E5=8A=A9?= =?UTF-8?q?=E6=94=AF=E6=8C=81=20+=20=E6=B2=89=E6=B5=B8=E5=BC=8F=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 首页与状态栏 - manifest.json 开启沉浸式状态栏(immersed:true),首页 .status_bar 与顶部渐变同色 #106eff - pages.json 首页增加 navigationBarTextStyle:"white"(状态栏前景色白色) - 首页常用功能九宫格改版:卡片高度自适应、两行菜单名不裁剪、长按排序/管理移除、拖拽预览、骨架屏、跑马灯后台暂停 我的页 - 新增仓库切换弹窗组件 StoreSelector,顶部账号卡片/门店名点击切换仓库 - 修复原“个人资料”跳转死路由(profile 不存在 → 404) - 操作列表 5 项合并为「帮助与支持」入口,修复 u-cell 图标不渲染问题 设置页 - 新增「帮助与支持」二级页 helpSupport(问题报障/意见反馈/帮助手册/操作信息/网络检测) - 精简 settings 列表(移除登录信息块与声音通知块) - 关于页改版为「检查更新」,支持 autoCheck=1 自动检查,浅蓝背景 主入口 - main.js 停用未完成的悬浮消息浮窗初始化 initializeFloatWindow() --- .../StoreSelector/StoreSelector.vue | 281 ++++++++++++++++++ src/main.js | 4 +- src/manifest.json | 5 + src/pages.json | 8 + src/pages/index/index.vue | 146 +++++---- src/pages/settings/about.vue | 97 ++++-- src/pages/settings/helpSupport.vue | 138 +++++++++ src/pages/settings/index.vue | 124 +------- src/pages/user/index.vue | 240 +++++++++------ 9 files changed, 760 insertions(+), 283 deletions(-) create mode 100644 src/components/StoreSelector/StoreSelector.vue create mode 100644 src/pages/settings/helpSupport.vue diff --git a/src/components/StoreSelector/StoreSelector.vue b/src/components/StoreSelector/StoreSelector.vue new file mode 100644 index 0000000..112d695 --- /dev/null +++ b/src/components/StoreSelector/StoreSelector.vue @@ -0,0 +1,281 @@ + + + + + diff --git a/src/main.js b/src/main.js index 1f74b18..c9f7770 100644 --- a/src/main.js +++ b/src/main.js @@ -44,7 +44,9 @@ async function initializeApp() { await store.dispatch("bluetoothPrint/initializeBluetooth"); // 3. 初始化安卓消息窗口模块(APP环境) - await initializeFloatWindow(); + // 已停用:浮窗功能未完成(落地页 /pages/message/index 为空,也无消息/角标数据来源), + // 需要恢复时取消下面一行注释即可(路由守卫里的 is_visible 在未初始化时会安全返回 false) + // await initializeFloatWindow(); // 4. 挂载路由和App RouterMount(app, router, "#app"); diff --git a/src/manifest.json b/src/manifest.json index 976049d..24c6feb 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -6,6 +6,11 @@ "versionCode" : 1000137, "transformPx" : false, "app-plus" : { + "statusbar" : { + "immersed" : true, + "style" : "dark", + "background" : "#FFFFFF" + }, "optimization" : { "subPackages" : true }, diff --git a/src/pages.json b/src/pages.json index a529886..d25e6c6 100644 --- a/src/pages.json +++ b/src/pages.json @@ -19,6 +19,7 @@ "path": "pages/index/index", "style": { "titleNView": false, + "navigationBarTextStyle": "white", "backgroundColor": "#f2f8ff" } }, @@ -76,6 +77,13 @@ "titleNView": false } }, + { + "path" : "pages/settings/helpSupport", + "style" : + { + "titleNView": false + } + }, { "path" : "pages/work/storage/receiving/receiving", "meta": { diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 7440c2e..8f554a8 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -16,7 +16,7 @@ - + @@ -26,7 +26,7 @@ - + @@ -53,7 +53,7 @@ - + @@ -257,7 +257,8 @@ unclaimedWaveCount: 0, showNoticePopup: false, quickActions: [], - pageSize: 12, + // 每页 9 个:3 列 × 3 行 + pageSize: 9, pageVisible: true, undoAction: null, FIXED_MENU_KEY: 'fixed_home_menus', @@ -424,6 +425,8 @@ onShow() { this.pageVisible = true; + // 首页顶部为深色渐变,状态栏文字/图标需改为白色(真机 App 端) + this.setAppStatusBarStyle('light'); if (this._skipNextShow) { this._skipNextShow = false; return; @@ -435,6 +438,8 @@ onHide() { // 离开页面时暂停跑马灯动画,避免后台持续占用渲染 this.pageVisible = false; + // 其他页面状态栏底色为白色,离开首页时恢复深色文字/图标 + this.setAppStatusBarStyle('dark'); }, onUnload() { @@ -443,6 +448,25 @@ }, methods: { + // 设置真机状态栏文字/图标颜色与底色(light=白色文字/蓝色底,dark=深色文字/白色底);非 App 端自动忽略 + setAppStatusBarStyle(style) { + // #ifdef APP-PLUS + try { + if (typeof plus !== 'undefined' && plus.navigator) { + if (plus.navigator.setStatusBarStyle) { + plus.navigator.setStatusBarStyle(style); + } + // 首页顶部为深色渐变,状态栏底色需与页面顶部一致,让页面背景“包含”系统状态栏 + if (plus.navigator.setStatusBarBackground) { + plus.navigator.setStatusBarBackground(style === 'light' ? '#106eff' : '#ffffff'); + } + } + } catch (e) { + console.warn('[index] 设置状态栏样式失败:', e); + } + // #endif + }, + async getLatestUserInfo() { try { const latestUser = await this.$store.dispatch('getUserInfo'); @@ -761,8 +785,8 @@ return []; } - // 用户权限菜单超过12个时,按固定优先级取前12个 - if (source.length > 12) { + // 用户权限菜单超过一页时,按固定优先级取前 pageSize 个(默认 3×3 = 9 个) + if (source.length > this.pageSize) { const defaultMenuNames = [ '收货作业', '商品查询', @@ -798,10 +822,10 @@ return key && !selectedKeys.has(key); }); - return [...prioritized, ...remaining].slice(0, 12); + return [...prioritized, ...remaining].slice(0, this.pageSize); } - // 低于12个时,商品查询置顶,其余全部显示 + // 不足一页时,商品查询置顶,其余全部显示 const selectedKeys = new Set(); const prioritized = []; @@ -1581,6 +1605,9 @@ src: url('~@/static/fonts/uicon-iconfont.ttf') format('truetype'); } + // 首页各面板之间统一垂直间隔(数据面板 → 走马灯 → 常用功能 两段一致) + $home-panel-gap: 24rpx; + .pda-home { display: flex; flex-direction: column; @@ -1600,14 +1627,20 @@ ); } + // 状态栏区域使用与首页顶部渐变起点一致的纯色,保证页面背景“包含”系统状态栏(覆盖 App.vue 中全局的白色 .status_bar) + .pda-home > .status_bar { + flex-shrink: 0; + background: #106eff; + } + // 紧凑型头部(透明,叠在页面顶部渐变上) .compact-header { position: relative; - padding: 16rpx 24rpx 20rpx; + padding: 16rpx 24rpx 0; // 数据条与跑马灯之间的间距(数据条被 v-if 隐藏时自动失效) .stat-strip + .org-switcher { - margin-top: 16rpx; + margin-top: $home-panel-gap; } .org-switcher { @@ -1622,12 +1655,12 @@ .news-pill { display: flex; align-items: center; - height: 56rpx; + height: 72rpx; padding: 0 18rpx; - background: rgba(255, 255, 255, 0.16); - border: 1rpx solid rgba(255, 255, 255, 0.22); - border-radius: 28rpx; - box-shadow: inset 0 1rpx 0 rgba(255, 255, 255, 0.25), 0 4rpx 12rpx rgba(6, 45, 120, 0.10); + background: #ffffff; + border: 1rpx solid transparent; + border-radius: 36rpx; + box-shadow: 0 4rpx 12rpx rgba(6, 45, 120, 0.10); box-sizing: border-box; overflow: hidden; @@ -1650,7 +1683,7 @@ .news-marquee { width: 100%; - height: 56rpx; + height: 72rpx; display: flex; align-items: center; overflow: hidden; @@ -1672,7 +1705,7 @@ white-space: nowrap; padding-right: 60rpx; font-size: 26rpx; - color: #ffffff; + color: #ff8c42; } } } @@ -1688,37 +1721,40 @@ .stat-item { flex: 1; min-width: 0; + height: 140rpx; + box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; - padding: 14rpx 8rpx; - background: rgba(255, 255, 255, 0.14); - border: 1rpx solid rgba(255, 255, 255, 0.22); + padding: 20rpx 8rpx; + background: rgba(255, 255, 255, 0.18); + backdrop-filter: blur(12rpx); + -webkit-backdrop-filter: blur(12rpx); + border: 1rpx solid rgba(255, 255, 255, 0.2); border-radius: 14rpx; - box-shadow: inset 0 1rpx 0 rgba(255, 255, 255, 0.25), 0 6rpx 16rpx rgba(6, 45, 120, 0.12); & + .stat-item { margin-left: 12rpx; } &:active { - background: rgba(255, 255, 255, 0.26); + background: rgba(255, 255, 255, 0.3); } &__value { font-size: 36rpx; - font-weight: 600; + font-weight: bold; color: #ffffff; line-height: 1.1; font-variant-numeric: tabular-nums; } &__label { - margin-top: 8rpx; + margin-top: 14rpx; max-width: 100%; font-size: 22rpx; - color: rgba(255, 255, 255, 0.78); + color: rgba(255, 255, 255, 0.88); line-height: 1.2; white-space: nowrap; overflow: hidden; @@ -1757,11 +1793,11 @@ -webkit-overflow-scrolling: touch; } - // 快捷入口区域 + // 快捷入口区域(按内容高度显示,不再强制撑到 tabBar) .quick-section { padding: 20rpx 20rpx 12rpx; background: #ffffff; - margin: 16rpx 20rpx 20rpx; + margin: $home-panel-gap 20rpx 20rpx; border-radius: 20rpx; box-shadow: 0 6rpx 24rpx rgba(15, 23, 42, 0.05); @@ -1769,7 +1805,7 @@ display: flex; justify-content: space-between; align-items: center; - margin-bottom: 14rpx; + margin-bottom: 30rpx; padding-bottom: 12rpx; border-bottom: 1rpx solid #f2f4f7; @@ -1885,12 +1921,15 @@ .grid-page { display: grid; grid-template-columns: repeat(3, 1fr); - grid-template-rows: repeat(4, auto); + // 3 列 × 3 行,每页 9 个 + grid-template-rows: repeat(3, auto); gap: 10rpx; padding: 0 10rpx; .grid-item { - min-height: 170rpx; + // 预留两行名称的高度(图标 92 + 间距 8 + 两行名称 90), + // 保证 1 行 / 2 行名称时卡片高度一致,避免换行后卡片长高把底部挤出可视区 + min-height: 190rpx; box-sizing: border-box; display: flex; flex-direction: column; @@ -1945,22 +1984,22 @@ } .item-icon-box { - width: 100rpx; - height: 100rpx; - border-radius: 20rpx; + width: 92rpx; + height: 92rpx; + border-radius: 18rpx; display: flex; align-items: center; justify-content: center; - margin-bottom: 12rpx; + margin-bottom: 8rpx; .item-icon-image { - width: 52rpx; - height: 52rpx; + width: 48rpx; + height: 48rpx; } .item-icon-font { font-family: 'uicon-iconfont' !important; - font-size: 58rpx; + font-size: 54rpx; line-height: 1; font-style: normal; font-weight: normal; @@ -1988,7 +2027,9 @@ .item-name { max-width: 100%; - font-size: 34rpx; + // 名称区固定按两行占位(32rpx × 1.4 × 2 ≈ 90rpx),避免换行后撑高整格 + min-height: 90rpx; + font-size: 32rpx; font-weight: bold; color: #333; text-align: center; @@ -2031,7 +2072,7 @@ position: fixed; z-index: 999; width: 140rpx; - height: 172rpx; + height: 164rpx; border-radius: 12rpx; background: rgba(255, 255, 255, 0.96); box-shadow: 0 12rpx 32rpx rgba(0, 0, 0, 0.16); @@ -2056,22 +2097,22 @@ } .item-icon-box { - width: 100rpx; - height: 100rpx; - border-radius: 20rpx; + width: 92rpx; + height: 92rpx; + border-radius: 18rpx; display: flex; align-items: center; justify-content: center; - margin-bottom: 12rpx; + margin-bottom: 8rpx; .item-icon-image { - width: 52rpx; - height: 52rpx; + width: 48rpx; + height: 48rpx; } .item-icon-font { font-family: 'uicon-iconfont' !important; - font-size: 58rpx; + font-size: 54rpx; line-height: 1; font-style: normal; font-weight: normal; @@ -2081,7 +2122,7 @@ .item-name { max-width: 100%; - font-size: 34rpx; + font-size: 32rpx; font-weight: bold; color: #333; text-align: center; @@ -2122,12 +2163,13 @@ width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); - grid-template-rows: repeat(4, auto); + grid-template-rows: repeat(3, auto); gap: 10rpx; padding: 0 10rpx; box-sizing: border-box; .skeleton-item { + // 与真实格子(两行名称预留后 190rpx)保持一致,避免加载完成时卡片高度跳变 min-height: 190rpx; display: flex; flex-direction: column; @@ -2136,10 +2178,10 @@ } .skeleton-icon { - width: 100rpx; - height: 100rpx; - border-radius: 20rpx; - margin-bottom: 12rpx; + width: 92rpx; + height: 92rpx; + border-radius: 18rpx; + margin-bottom: 8rpx; background: #eef1f5; animation: skeleton-pulse 1.2s ease-in-out infinite; } diff --git a/src/pages/settings/about.vue b/src/pages/settings/about.vue index bb8bfd5..6b66efa 100644 --- a/src/pages/settings/about.vue +++ b/src/pages/settings/about.vue @@ -1,31 +1,40 @@