From 821205b18a6354134f0677d15930dc856ecc932b Mon Sep 17 00:00:00 2001 From: huangzhenbao <17818024429@163.com> Date: Thu, 5 Feb 2026 11:36:55 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E4=BF=9D=E7=95=99=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.uvue | 3 + favicon.ico | Bin 0 -> 164292 bytes layouts/admin/AdminLayout.uvue | 85 ++++++- layouts/admin/components/AdminHeader.uvue | 76 +++++- layouts/admin/pages/HomeIndex.uvue | 234 +++++------------- layouts/admin/store/adminNavStore.uts | 10 + layouts/admin/styles/admin-responsive.css | 36 +++ .../admin/docs/RESPONSIVE_LAYOUT_GUIDE.md | 85 +++++++ .../admin/docs/UNI_APP_X_PAGE_FIX_GUIDE.md | 14 ++ .../homePage/components/KpiMiniCard.uvue | 96 ++++--- pages/mall/admin/order/list.uvue | 8 +- .../product/product-statistics/index.uvue | 15 +- pages/mall/admin/user/MemberConfig.uvue | 2 +- pages/mall/admin/user/Statistic.uvue | 41 ++- pages/mall/admin/user/list.uvue | 18 +- 15 files changed, 476 insertions(+), 247 deletions(-) create mode 100644 favicon.ico create mode 100644 layouts/admin/styles/admin-responsive.css create mode 100644 pages/mall/admin/docs/RESPONSIVE_LAYOUT_GUIDE.md diff --git a/App.uvue b/App.uvue index c394e95c..8bc9ebcf 100644 --- a/App.uvue +++ b/App.uvue @@ -9,6 +9,9 @@ diff --git a/layouts/admin/store/adminNavStore.uts b/layouts/admin/store/adminNavStore.uts index 62305e0c..4779587e 100644 --- a/layouts/admin/store/adminNavStore.uts +++ b/layouts/admin/store/adminNavStore.uts @@ -38,8 +38,18 @@ export const tabs = ref([]) /** 是否折叠主侧边栏 */ export const isMainAsideCollapsed = ref(false) +/** 屏幕宽度 */ +export const windowWidth = ref(1024) + +/** 是否为移动端布局 (width < 768) */ +export const isMobile = computed(() => windowWidth.value < 768) + +/** 移动端菜单是否展开 */ +export const isMobileMenuOpen = ref(false) + /** 是否显示二级侧边栏 */ export const showSubSider = computed(() => { + if (isMobile.value) return false // 移动端不显式二级侧边栏在主体区域 const topMenus = getTopMenus() const activeMenu = topMenus.find(m => m.id === activeTopMenuId.value) return activeMenu ? activeMenu.groups.length > 0 : false diff --git a/layouts/admin/styles/admin-responsive.css b/layouts/admin/styles/admin-responsive.css new file mode 100644 index 00000000..4148ecb5 --- /dev/null +++ b/layouts/admin/styles/admin-responsive.css @@ -0,0 +1,36 @@ +/* 统一 KPI 统计网格响应式规范 */ + +.kpi-grid { + display: grid !important; + gap: 16px; + width: 100%; + box-sizing: border-box; +} + +/* 规则 1:屏幕宽度 >= 1200px -> 固定 4 列 */ +@media (min-width: 1200px) { + .kpi-grid { + grid-template-columns: repeat(4, minmax(0, 1fr)) !important; + } +} + +/* 规则 2:768px <= 屏幕宽度 < 1200px -> 固定 2 列 */ +@media (min-width: 768px) and (max-width: 1199.98px) { + .kpi-grid { + grid-template-columns: repeat(2, minmax(0, 1fr)) !important; + } +} + +/* 规则 3:屏幕宽度 < 768px -> 固定 1 列 */ +@media (max-width: 767.98px) { + .kpi-grid { + grid-template-columns: repeat(1, minmax(0, 1fr)) !important; + } +} + +/* 强制子项允许收缩,防止内部长文本撑爆网格 */ +.kpi-grid > * { + min-width: 0 !important; + flex: none !important; /* 覆盖旧的 flex 逻辑 */ + width: auto !important; /* 让 grid 控制宽度 */ +} diff --git a/pages/mall/admin/docs/RESPONSIVE_LAYOUT_GUIDE.md b/pages/mall/admin/docs/RESPONSIVE_LAYOUT_GUIDE.md new file mode 100644 index 00000000..b7618cce --- /dev/null +++ b/pages/mall/admin/docs/RESPONSIVE_LAYOUT_GUIDE.md @@ -0,0 +1,85 @@ +# 管理后台响应式布局实现指南 + +本文档总结了商城管理后台从固定布局到响应式布局的改造过程及核心技术点。 + +## 1. 核心目标 + +- **多终端适配**:确保后台在桌面端(宽屏)、平板端(中等屏幕)和移动端(窄屏)均能良好展示。 +- **自动适配状态管理**:系统能自动感知屏幕宽度并调整侧边栏显隐逻辑。 +- **布局平滑过渡**:侧边栏的收起、拉出及内容区的重排应具有良好的动画效果。 + +## 2. 状态管理 (Store) 扩展 + +在 [adminNavStore.uts](layouts/admin/store/adminNavStore.uts) 中引入了响应式状态: + +- `windowWidth`: 实时存储当前窗口宽度。 +- `isMobile`: 计算属性,当宽度小于 768px 时判定为移动端。 +- `isMobileMenuOpen`: 控制移动端模式下侧边栏的展开状态。 + +```typescript +export const windowWidth = ref(1024); +export const isMobile = computed(() => windowWidth.value < 768); +export const isMobileMenuOpen = ref(false); +``` + +## 3. 布局架构调整 (AdminLayout) + +[AdminLayout.uvue](layouts/admin/AdminLayout.uvue) 负责整体结构的响应式策略: + +### 3.1 监听并初始化 + +在 `onMounted` 中初始化宽度并监听 `uni.onWindowResize`: + +```typescript +onMounted(() => { + windowWidth.value = uni.getWindowInfo().windowWidth; + uni.onWindowResize((res) => { + windowWidth.value = res.size.windowWidth; + }); +}); +``` + +### 3.2 侧边栏处理 + +- **桌面端**:侧边栏常规展示,通过 `marginLeft` 为内容区腾出空间。 +- **移动端**:侧边栏通过 `position: absolute` 隐藏在屏幕外,通过 `translateX` 动画滑入。同时禁用二级侧边栏的常驻显示。 + +### 3.3 移动端遮罩与切换 + +- 引入 `mobile-mask` 遮罩层,点击遮罩自动关闭菜单。 +- [AdminHeader](layouts/admin/components/AdminHeader.uvue) 在移动端会显示 “☰” 切换按钮。 + +## 4. 页面内容重排 (HomeIndex) + +[HomeIndex.uvue](layouts/admin/pages/HomeIndex.uvue) 利用 CSS 媒体查询实现内容区域的自适应: + +### 4.1 KPI 卡片流式布局 + +使用 `flex-wrap: wrap` 配合 `min-width`: + +- **布局策略**:设置 `min-width: 250px` 作为安全边界,确保在 1200px 分辨率下依然能并排展示 4 个卡片。 +- **动态列数**: + - **宽屏 (>1200px)**: 4个卡片并排。 + - **中屏 (768px - 1200px)**: 强制 2 个并排。 + - **窄屏 (<768px)**: 1个卡片占满整行。 +- **高度控制**:统一固定为 `200px`。 + +### 4.2 图表响应式 + +- **垂直排列**:底部两个并排的图表在小屏下自动切换为垂直排列(`flex-direction: column`)。 +- **组件自适应**:图表组件内部利用父容器宽度自动伸缩。 +- **头部压缩**:移动端下,图表的配置项(如日期切换标签)由横向改为纵向,避免溢出。 + +## 5. 组件化实践 (KpiMiniCard) + +统一使用了 [KpiMiniCard](pages/mall/admin/homePage/components/KpiMiniCard.uvue) 组件,确保: + +- 样式一致性。 +- 代码复用性。 +- 内部样式的可维护性。 + +## 6. 使用建议 + +- 后续开发新页面时,请优先使用 `stats-row` 和 `stat-card` 进行布局。 +- 对于复杂的表格页面,建议在移动端隐藏非核心列,或使用横向滚动条展示。 +- 所有的宽度判定建议遵循 768px 这一标准断点。 diff --git a/pages/mall/admin/docs/UNI_APP_X_PAGE_FIX_GUIDE.md b/pages/mall/admin/docs/UNI_APP_X_PAGE_FIX_GUIDE.md index 7d2facf7..202bb409 100644 --- a/pages/mall/admin/docs/UNI_APP_X_PAGE_FIX_GUIDE.md +++ b/pages/mall/admin/docs/UNI_APP_X_PAGE_FIX_GUIDE.md @@ -11,6 +11,20 @@ - **解决方案**: 确保替换操作覆盖文件的完整生命周期,或者在发现 500 错误时检查文件末尾是否有残留的旧标签。 - **预防**: 优先使用 `create_file` 或子代理重写整个文件,而非局部替换复杂的 SFC 结构。 +#### **原因十二:KPI 统计网格响应式不一致 (用户体验红线)** + +- **现象**: 某些宽度下出现一行 3 个卡片,导致视觉不平衡或数据展示拥挤。 +- **原因**: 使用了 `repeat(auto-fit/auto-fill, ...)` 或基于 `min-width` 的 flex 自动布局。 +- **解决方案**: + 1. 使用全局统一类 `.kpi-grid`。 + 2. 严禁使用 `auto-fit/auto-fill`。 + 3. 必须显式使用视图断点拦截: + - `>= 1200px`: 固定 4 列 (`grid-template-columns: repeat(4, minmax(0, 1fr))`)。 + - `768px - 1199px`: 固定 2 列 (`grid-template-columns: repeat(2, minmax(0, 1fr))`)。 + - `< 768px`: 固定 1 列 (`grid-template-columns: repeat(1, minmax(0, 1fr))`)。 + 4. 使用 `minmax(0, 1fr)` 配分子项 `min-width: 0` 确保在任何容器宽度下网格不被撑爆。 +- **强制规则**: 任何页面都不允许出现一行 3 个卡片的情况。 + ## 🛠️ 完整修复流程 ``` diff --git a/pages/mall/admin/homePage/components/KpiMiniCard.uvue b/pages/mall/admin/homePage/components/KpiMiniCard.uvue index 89b9aee9..b7456b8e 100644 --- a/pages/mall/admin/homePage/components/KpiMiniCard.uvue +++ b/pages/mall/admin/homePage/components/KpiMiniCard.uvue @@ -81,7 +81,7 @@ const props = withDefaults(defineProps<{ const trendArrow = computed((): string => { if (props.trend === 'up') return '▲' if (props.trend === 'down') return '▼' - return '•' + return '' }) const trendClass = computed((): string => { @@ -94,33 +94,43 @@ const trendClass = computed((): string => { diff --git a/pages/mall/admin/order/list.uvue b/pages/mall/admin/order/list.uvue index ffbcbe2a..842d8ace 100644 --- a/pages/mall/admin/order/list.uvue +++ b/pages/mall/admin/order/list.uvue @@ -160,7 +160,7 @@ const orderData = ref([ typeColor: 'blue', cancelStatus: '用户已取消', product: { - img: 'https://img.crmeb.com/crmeb_demo/75211.png', + img: '/static/logo.png', name: '爱奇艺智能 奇遇LT01 投影仪 家用卧室 超高清手机便携投影机 (4K超清 支持...' }, user: { phone: '188****4074', id: '82694' }, @@ -176,7 +176,7 @@ const orderData = ref([ typeColor: 'purple', cancelStatus: '', product: { - img: 'https://img.crmeb.com/crmeb_demo/75211.png', + img: '/static/logo.png', name: '阿迪达斯官网 adidas BBALL CAP COT 男女训练运动帽子FQ5270 传奇墨水...' }, user: { phone: '你就给', id: '82703' }, @@ -192,7 +192,7 @@ const orderData = ref([ typeColor: 'green', cancelStatus: '', product: { - img: 'https://img.crmeb.com/crmeb_demo/75211.png', + img: '/static/logo.png', name: 'UR2024夏季新款女装复古纯欲氛围感一字肩短款T恤衫UWG440060' }, user: { phone: '王毅不睡了', id: '82689' }, @@ -208,7 +208,7 @@ const orderData = ref([ typeColor: 'blue', cancelStatus: '', product: { - img: 'https://img.crmeb.com/crmeb_demo/75211.png', + img: '/static/logo.png', name: '爱奇艺智能 奇遇LT01 投影仪 家用卧室 超高清手机便携投影机 (4K超清 支持...' }, user: { phone: '177****8361', id: '82697' }, diff --git a/pages/mall/admin/product/product-statistics/index.uvue b/pages/mall/admin/product/product-statistics/index.uvue index 2acbfe8e..07760492 100644 --- a/pages/mall/admin/product/product-statistics/index.uvue +++ b/pages/mall/admin/product/product-statistics/index.uvue @@ -16,8 +16,8 @@ - - + + @@ -367,19 +367,12 @@ function initChart() { .btn-query { background: #1890ff; color: #fff; font-size: 14px; height: 32px; padding: 0 15px; border-radius: 4px; border: none; } .btn-export { background: #1890ff; color: #fff; font-size: 14px; height: 32px; padding: 0 15px; border-radius: 4px; border: none; } -.stat-grid { - display: flex; - flex-direction: row; - flex-wrap: wrap; - gap: 16px; - margin-bottom: 16px; -} - +/* stat-grid 已废弃,由全局 kpi-grid 接管 */ .stat-card { - width: calc(33.33% - 11px); background: #fff; border-radius: 8px; padding: 20px; + min-width: 0; } .stat-main { diff --git a/pages/mall/admin/user/MemberConfig.uvue b/pages/mall/admin/user/MemberConfig.uvue index 02bed9c3..f563fac0 100644 --- a/pages/mall/admin/user/MemberConfig.uvue +++ b/pages/mall/admin/user/MemberConfig.uvue @@ -74,7 +74,7 @@ - + + diff --git a/pages/mall/admin/user/Statistic.uvue b/pages/mall/admin/user/Statistic.uvue index 838febcd..9c49f420 100644 --- a/pages/mall/admin/user/Statistic.uvue +++ b/pages/mall/admin/user/Statistic.uvue @@ -24,14 +24,14 @@ - + 用户概况 - + {{ item.icon }} @@ -221,22 +221,14 @@ function onExport() { color: #bfbfbf; } -.kpi-row { - display: flex; - flex-direction: row; - flex-wrap: wrap; - gap: 20px; - margin-bottom: 40px; -} - +/* kpi-row 已废弃,采用全局 kpi-grid */ .kpi-card { - flex: 1; - min-width: 200px; display: flex; flex-direction: row; align-items: center; gap: 16px; padding: 8px; + min-width: 0; /* 允许收缩 */ } .kpi-icon-box { @@ -296,6 +288,31 @@ function onExport() { width: 100%; } +@media (max-width: 1200px) { + .filter-card { + flex-direction: column; + align-items: flex-start; + gap: 16px; + } + + .filter-item { + width: 100%; + } + + .select-box, .date-picker-box { + flex: 1; + } + + .analysis-row { + flex-direction: column; + } + + .map-col, .gender-col { + width: 100%; + flex: none; + } +} + .map-col { flex: 7; } diff --git a/pages/mall/admin/user/list.uvue b/pages/mall/admin/user/list.uvue index 3e094337..36de2d25 100644 --- a/pages/mall/admin/user/list.uvue +++ b/pages/mall/admin/user/list.uvue @@ -154,15 +154,15 @@ const isAllChecked = ref(false) const activeDropdownId = ref(null) const userList = ref([ - { id: '77414', avatar: 'https://img.crmeb.com/crmeb_demo/77414.png', nickname: '199****0268', isMember: '否', level: '无', group: '无', spreadLevel: '', phone: '199****0268', userType: '公众号', balance: '88888.00', checked: false }, - { id: '75311', avatar: 'https://img.crmeb.com/crmeb_demo/75311.png', nickname: 'wljbhg', isMember: '否', level: '无', group: 'A类客户', spreadLevel: '', phone: '', userType: '公众号', balance: '100002.00', checked: false }, - { id: '75305', avatar: 'https://img.crmeb.com/crmeb_demo/75305.png', nickname: '相见欢', isMember: '否', level: '无', group: 'A类客户', spreadLevel: '', phone: '', userType: '公众号', balance: '100000.00', checked: false }, - { id: '75296', avatar: 'https://img.crmeb.com/crmeb_demo/75296.png', nickname: '..', isMember: '否', level: '无', group: 'A类客户', spreadLevel: '', phone: '', userType: '公众号', balance: '100000.00', checked: false }, - { id: '75293', avatar: 'https://img.crmeb.com/crmeb_demo/75293.png', nickname: '钟(钏)华', isMember: '否', level: '无', group: 'A类客户', spreadLevel: '', phone: '', userType: '公众号', balance: '100000.00', checked: false }, - { id: '75289', avatar: 'https://img.crmeb.com/crmeb_demo/75289.png', nickname: '小二上酒', isMember: '否', level: '无', group: 'A类客户', spreadLevel: '', phone: '', userType: '公众号', balance: '100000.00', checked: false }, - { id: '75257', avatar: 'https://img.crmeb.com/crmeb_demo/75257.png', nickname: '5+7', isMember: '是', level: '无', group: 'A类客户', spreadLevel: '', phone: '', userType: '公众号', balance: '100000.00', checked: false }, - { id: '75226', avatar: 'https://img.crmeb.com/crmeb_demo/75226.png', nickname: '慢步前行', isMember: '是', level: '无', group: 'A类客户', spreadLevel: '', phone: '', userType: '公众号', balance: '100000.00', checked: false }, - { id: '75211', avatar: 'https://img.crmeb.com/crmeb_demo/75211.png', nickname: '难得糊涂', isMember: '否', level: '无', group: 'A类客户', spreadLevel: '', phone: '', userType: '公众号', balance: '100000.00', checked: false } + { id: '77414', avatar: '/static/logo.png', nickname: '199****0268', isMember: '否', level: '无', group: '无', spreadLevel: '', phone: '199****0268', userType: '公众号', balance: '88888.00', checked: false }, + { id: '75311', avatar: '/static/logo.png', nickname: 'wljbhg', isMember: '否', level: '无', group: 'A类客户', spreadLevel: '', phone: '', userType: '公众号', balance: '100002.00', checked: false }, + { id: '75305', avatar: '/static/logo.png', nickname: '相见欢', isMember: '否', level: '无', group: 'A类客户', spreadLevel: '', phone: '', userType: '公众号', balance: '100000.00', checked: false }, + { id: '75296', avatar: '/static/logo.png', nickname: '..', isMember: '否', level: '无', group: 'A类客户', spreadLevel: '', phone: '', userType: '公众号', balance: '100000.00', checked: false }, + { id: '75293', avatar: '/static/logo.png', nickname: '钟(钏)华', isMember: '否', level: '无', group: 'A类客户', spreadLevel: '', phone: '', userType: '公众号', balance: '100000.00', checked: false }, + { id: '75289', avatar: '/static/logo.png', nickname: '小二上酒', isMember: '否', level: '无', group: 'A类客户', spreadLevel: '', phone: '', userType: '公众号', balance: '100000.00', checked: false }, + { id: '75257', avatar: '/static/logo.png', nickname: '5+7', isMember: '是', level: '无', group: 'A类客户', spreadLevel: '', phone: '', userType: '公众号', balance: '100000.00', checked: false }, + { id: '75226', avatar: '/static/logo.png', nickname: '慢步前行', isMember: '是', level: '无', group: 'A类客户', spreadLevel: '', phone: '', userType: '公众号', balance: '100000.00', checked: false }, + { id: '75211', avatar: '/static/logo.png', nickname: '难得糊涂', isMember: '否', level: '无', group: 'A类客户', spreadLevel: '', phone: '', userType: '公众号', balance: '100000.00', checked: false } ]) function onSearch() { From 151f5a5e1ada97870c84d3be29cfbfcc2d8f8b64 Mon Sep 17 00:00:00 2001 From: huangzhenbao <17818024429@163.com> Date: Thu, 5 Feb 2026 17:11:41 +0800 Subject: [PATCH 02/12] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../analytics/AnalyticsUserGenderSection.uvue | 257 +++++++++++++----- layouts/admin/AdminLayout.uvue | 147 ++++++++-- layouts/admin/components/AdminAside.uvue | 8 +- layouts/admin/components/AdminHeader.uvue | 30 +- layouts/admin/components/AdminSubsider.uvue | 68 ++++- layouts/admin/store/adminNavStore.uts | 34 ++- layouts/admin/styles/admin-responsive.css | 29 +- .../admin/docs/UNI_APP_X_PAGE_FIX_GUIDE.md | 94 +++++++ pages/mall/admin/user/Statistic.uvue | 90 +++--- uni_modules/charts/EChartsView.vue | 71 ++--- 10 files changed, 634 insertions(+), 194 deletions(-) diff --git a/components/analytics/AnalyticsUserGenderSection.uvue b/components/analytics/AnalyticsUserGenderSection.uvue index 41f67ab7..ab4a979e 100644 --- a/components/analytics/AnalyticsUserGenderSection.uvue +++ b/components/analytics/AnalyticsUserGenderSection.uvue @@ -1,12 +1,28 @@ - - diff --git a/pages/mall/admin/user-statistics.uvue b/pages/mall/admin/user-statistics.uvue deleted file mode 100644 index 143f67ef..00000000 --- a/pages/mall/admin/user-statistics.uvue +++ /dev/null @@ -1,65 +0,0 @@ - - - - - diff --git a/pages/mall/admin/user/MemberConfig.uvue b/pages/mall/admin/user/configuration/index.uvue similarity index 100% rename from pages/mall/admin/user/MemberConfig.uvue rename to pages/mall/admin/user/configuration/index.uvue diff --git a/pages/mall/admin/user/group.uvue b/pages/mall/admin/user/grouping/index.uvue similarity index 100% rename from pages/mall/admin/user/group.uvue rename to pages/mall/admin/user/grouping/index.uvue diff --git a/pages/mall/admin/user/label.uvue b/pages/mall/admin/user/label/index.uvue similarity index 100% rename from pages/mall/admin/user/label.uvue rename to pages/mall/admin/user/label/index.uvue diff --git a/pages/mall/admin/user/level.uvue b/pages/mall/admin/user/level/index.uvue similarity index 100% rename from pages/mall/admin/user/level.uvue rename to pages/mall/admin/user/level/index.uvue diff --git a/pages/mall/admin/user/list.uvue b/pages/mall/admin/user/management/index.uvue similarity index 100% rename from pages/mall/admin/user/list.uvue rename to pages/mall/admin/user/management/index.uvue diff --git a/pages/mall/admin/user/Statistic.uvue b/pages/mall/admin/user/statistics/index.uvue similarity index 100% rename from pages/mall/admin/user/Statistic.uvue rename to pages/mall/admin/user/statistics/index.uvue diff --git a/pages/mall/admin/user/user-configuration/index.uvue b/pages/mall/admin/user/user-configuration/index.uvue deleted file mode 100644 index 24b63f7a..00000000 --- a/pages/mall/admin/user/user-configuration/index.uvue +++ /dev/null @@ -1,25 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/mall/admin/user/user-grouping/index.uvue b/pages/mall/admin/user/user-grouping/index.uvue deleted file mode 100644 index 71efde80..00000000 --- a/pages/mall/admin/user/user-grouping/index.uvue +++ /dev/null @@ -1,25 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/mall/admin/user/user-label/index.uvue b/pages/mall/admin/user/user-label/index.uvue deleted file mode 100644 index 056b4908..00000000 --- a/pages/mall/admin/user/user-label/index.uvue +++ /dev/null @@ -1,25 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/mall/admin/user/user-level/index.uvue b/pages/mall/admin/user/user-level/index.uvue deleted file mode 100644 index 3834ce8f..00000000 --- a/pages/mall/admin/user/user-level/index.uvue +++ /dev/null @@ -1,25 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/mall/admin/user/user-management/index.uvue b/pages/mall/admin/user/user-management/index.uvue deleted file mode 100644 index d139353b..00000000 --- a/pages/mall/admin/user/user-management/index.uvue +++ /dev/null @@ -1,25 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/mall/admin/user/user-statistics/index.uvue b/pages/mall/admin/user/user-statistics/index.uvue deleted file mode 100644 index 27a569a2..00000000 --- a/pages/mall/admin/user/user-statistics/index.uvue +++ /dev/null @@ -1,25 +0,0 @@ - - - - - \ No newline at end of file From 0970fdbac394dba18ff2eff6478c798e585c6868 Mon Sep 17 00:00:00 2001 From: huangzhenbao <17818024429@163.com> Date: Thu, 5 Feb 2026 18:25:15 +0800 Subject: [PATCH 04/12] =?UTF-8?q?=E7=BB=A7=E7=BB=AD=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layouts/admin/router/adminComponentMap.uts | 12 ++-- layouts/admin/router/adminRoutes.uts | 12 ++-- pages.json | 4 +- pages/mall/admin/finance/withdrawal.uvue | 62 ++++++++++++++++-- .../mall/admin/marketing/integral/order.uvue | 4 ++ .../mall/admin/marketing/integral/record.uvue | 31 ++++++++- pages/mall/admin/product-classification.uvue | 64 ------------------ pages/mall/admin/product-labels.uvue | 64 ------------------ pages/mall/admin/product-management.uvue | 64 ------------------ pages/mall/admin/product-parameters.uvue | 64 ------------------ pages/mall/admin/product-protection.uvue | 64 ------------------ pages/mall/admin/product-reviews.uvue | 65 ------------------- pages/mall/admin/product-specifications.uvue | 64 ------------------ .../index.uvue} | 0 .../product/{label.uvue => labels/index.uvue} | 0 .../{param.uvue => parameters/index.uvue} | 0 .../product/product-classification/index.uvue | 25 ------- .../admin/product/product-label/index.uvue | 25 ------- .../admin/product/product-param/index.uvue | 25 ------- .../product/product-protection/index.uvue | 26 -------- .../admin/product/product-reviews/index.uvue | 25 ------- .../product/product-specifications/index.uvue | 26 -------- .../index.uvue} | 0 .../{reply.uvue => reviews/index.uvue} | 0 .../{attr.uvue => specifications/index.uvue} | 0 25 files changed, 101 insertions(+), 625 deletions(-) delete mode 100644 pages/mall/admin/product-classification.uvue delete mode 100644 pages/mall/admin/product-labels.uvue delete mode 100644 pages/mall/admin/product-management.uvue delete mode 100644 pages/mall/admin/product-parameters.uvue delete mode 100644 pages/mall/admin/product-protection.uvue delete mode 100644 pages/mall/admin/product-reviews.uvue delete mode 100644 pages/mall/admin/product-specifications.uvue rename pages/mall/admin/product/{classify.uvue => classification/index.uvue} (100%) rename pages/mall/admin/product/{label.uvue => labels/index.uvue} (100%) rename pages/mall/admin/product/{param.uvue => parameters/index.uvue} (100%) delete mode 100644 pages/mall/admin/product/product-classification/index.uvue delete mode 100644 pages/mall/admin/product/product-label/index.uvue delete mode 100644 pages/mall/admin/product/product-param/index.uvue delete mode 100644 pages/mall/admin/product/product-protection/index.uvue delete mode 100644 pages/mall/admin/product/product-reviews/index.uvue delete mode 100644 pages/mall/admin/product/product-specifications/index.uvue rename pages/mall/admin/product/{protection.uvue => protection/index.uvue} (100%) rename pages/mall/admin/product/{reply.uvue => reviews/index.uvue} (100%) rename pages/mall/admin/product/{attr.uvue => specifications/index.uvue} (100%) diff --git a/layouts/admin/router/adminComponentMap.uts b/layouts/admin/router/adminComponentMap.uts index afa9c55d..54ec49a4 100644 --- a/layouts/admin/router/adminComponentMap.uts +++ b/layouts/admin/router/adminComponentMap.uts @@ -30,12 +30,12 @@ import ProductStatistic from '@/pages/mall/admin/product/product-statistics/inde import ProductList from '@/pages/mall/admin/product/product-management/index.uvue' import ProductEdit from '@/pages/mall/admin/product/product-management/edit.uvue' import ProductMemberPrice from '@/pages/mall/admin/product/product-management/member-price.uvue' -import ProductClassify from '@/pages/mall/admin/product/classify.uvue' -import ProductReply from '@/pages/mall/admin/product/reply.uvue' -import ProductAttr from '@/pages/mall/admin/product/attr.uvue' -import ProductParam from '@/pages/mall/admin/product/param.uvue' -import ProductLabel from '@/pages/mall/admin/product/label.uvue' -import ProductProtection from '@/pages/mall/admin/product/protection.uvue' +import ProductClassify from '@/pages/mall/admin/product/classification/index.uvue' +import ProductReply from '@/pages/mall/admin/product/reviews/index.uvue' +import ProductAttr from '@/pages/mall/admin/product/specifications/index.uvue' +import ProductParam from '@/pages/mall/admin/product/parameters/index.uvue' +import ProductLabel from '@/pages/mall/admin/product/labels/index.uvue' +import ProductProtection from '@/pages/mall/admin/product/protection/index.uvue' // 导入订单模块(纯组件,不包含 AdminLayout) import OrderList from '@/pages/mall/admin/order/list.uvue' diff --git a/layouts/admin/router/adminRoutes.uts b/layouts/admin/router/adminRoutes.uts index 502dc2ae..b1f90708 100644 --- a/layouts/admin/router/adminRoutes.uts +++ b/layouts/admin/router/adminRoutes.uts @@ -301,7 +301,7 @@ export const routes: RouteRecord[] = [ { id: 'product_productClassify', title: '商品分类', - path: '/pages/mall/admin/product/classify', + path: '/pages/mall/admin/product/classification/index', componentKey: 'ProductClassify', parentId: 'product', groupId: 'product-manage', @@ -311,7 +311,7 @@ export const routes: RouteRecord[] = [ { id: 'product_productAttr', title: '商品规格', - path: '/pages/mall/admin/product/attr', + path: '/pages/mall/admin/product/specifications/index', componentKey: 'ProductAttr', parentId: 'product', groupId: 'product-manage', @@ -321,7 +321,7 @@ export const routes: RouteRecord[] = [ { id: 'product_paramList', title: '商品参数', - path: '/pages/mall/admin/product/param', + path: '/pages/mall/admin/product/parameters/index', componentKey: 'ProductParam', parentId: 'product', groupId: 'product-manage', @@ -331,7 +331,7 @@ export const routes: RouteRecord[] = [ { id: 'product_labelList', title: '商品标签', - path: '/pages/mall/admin/product/label', + path: '/pages/mall/admin/product/labels/index', componentKey: 'ProductLabel', parentId: 'product', groupId: 'product-manage', @@ -341,7 +341,7 @@ export const routes: RouteRecord[] = [ { id: 'product_protectionList', title: '商品保障', - path: '/pages/mall/admin/product/protection', + path: '/pages/mall/admin/product/protection/index', componentKey: 'ProductProtection', parentId: 'product', groupId: 'product-manage', @@ -351,7 +351,7 @@ export const routes: RouteRecord[] = [ { id: 'product_productEvaluate', title: '商品评论', - path: '/pages/mall/admin/product/reply', + path: '/pages/mall/admin/product/reviews/index', componentKey: 'ProductReply', parentId: 'product', groupId: 'product-manage', diff --git a/pages.json b/pages.json index cb78c7e9..b6c72b9d 100644 --- a/pages.json +++ b/pages.json @@ -460,7 +460,7 @@ } }, { - "path": "product-management", + "path": "product/product-management/index", "style": { "navigationBarTitleText": "商品管理", "navigationStyle": "custom" @@ -633,4 +633,4 @@ "navigationBarBackgroundColor": "#FFFFFF", "backgroundColor": "#F8F8F8" } -} \ No newline at end of file +} diff --git a/pages/mall/admin/finance/withdrawal.uvue b/pages/mall/admin/finance/withdrawal.uvue index 5d9ef872..61e9980d 100644 --- a/pages/mall/admin/finance/withdrawal.uvue +++ b/pages/mall/admin/finance/withdrawal.uvue @@ -5,19 +5,29 @@ 时间选择: - + 提现状态: - + + + {{ statusLabel }} + + + 提现方式: - + + + {{ methodLabel }} + + + 搜索: - + @@ -107,9 +117,10 @@ - - diff --git a/pages/mall/admin/product-labels.uvue b/pages/mall/admin/product-labels.uvue deleted file mode 100644 index 0fa9f92e..00000000 --- a/pages/mall/admin/product-labels.uvue +++ /dev/null @@ -1,64 +0,0 @@ - - - - diff --git a/pages/mall/admin/product-management.uvue b/pages/mall/admin/product-management.uvue deleted file mode 100644 index ab91ffdb..00000000 --- a/pages/mall/admin/product-management.uvue +++ /dev/null @@ -1,64 +0,0 @@ - - - - diff --git a/pages/mall/admin/product-parameters.uvue b/pages/mall/admin/product-parameters.uvue deleted file mode 100644 index 0c28fe61..00000000 --- a/pages/mall/admin/product-parameters.uvue +++ /dev/null @@ -1,64 +0,0 @@ - - - - diff --git a/pages/mall/admin/product-protection.uvue b/pages/mall/admin/product-protection.uvue deleted file mode 100644 index f045f2ba..00000000 --- a/pages/mall/admin/product-protection.uvue +++ /dev/null @@ -1,64 +0,0 @@ - - - - diff --git a/pages/mall/admin/product-reviews.uvue b/pages/mall/admin/product-reviews.uvue deleted file mode 100644 index aa0afb5b..00000000 --- a/pages/mall/admin/product-reviews.uvue +++ /dev/null @@ -1,65 +0,0 @@ - - - - diff --git a/pages/mall/admin/product-specifications.uvue b/pages/mall/admin/product-specifications.uvue deleted file mode 100644 index 9fde03b0..00000000 --- a/pages/mall/admin/product-specifications.uvue +++ /dev/null @@ -1,64 +0,0 @@ - - - - diff --git a/pages/mall/admin/product/classify.uvue b/pages/mall/admin/product/classification/index.uvue similarity index 100% rename from pages/mall/admin/product/classify.uvue rename to pages/mall/admin/product/classification/index.uvue diff --git a/pages/mall/admin/product/label.uvue b/pages/mall/admin/product/labels/index.uvue similarity index 100% rename from pages/mall/admin/product/label.uvue rename to pages/mall/admin/product/labels/index.uvue diff --git a/pages/mall/admin/product/param.uvue b/pages/mall/admin/product/parameters/index.uvue similarity index 100% rename from pages/mall/admin/product/param.uvue rename to pages/mall/admin/product/parameters/index.uvue diff --git a/pages/mall/admin/product/product-classification/index.uvue b/pages/mall/admin/product/product-classification/index.uvue deleted file mode 100644 index 9d71a55a..00000000 --- a/pages/mall/admin/product/product-classification/index.uvue +++ /dev/null @@ -1,25 +0,0 @@ - - - - - diff --git a/pages/mall/admin/product/product-label/index.uvue b/pages/mall/admin/product/product-label/index.uvue deleted file mode 100644 index 9d71a55a..00000000 --- a/pages/mall/admin/product/product-label/index.uvue +++ /dev/null @@ -1,25 +0,0 @@ - - - - - diff --git a/pages/mall/admin/product/product-param/index.uvue b/pages/mall/admin/product/product-param/index.uvue deleted file mode 100644 index 9d71a55a..00000000 --- a/pages/mall/admin/product/product-param/index.uvue +++ /dev/null @@ -1,25 +0,0 @@ - - - - - diff --git a/pages/mall/admin/product/product-protection/index.uvue b/pages/mall/admin/product/product-protection/index.uvue deleted file mode 100644 index ffe3f945..00000000 --- a/pages/mall/admin/product/product-protection/index.uvue +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - diff --git a/pages/mall/admin/product/product-reviews/index.uvue b/pages/mall/admin/product/product-reviews/index.uvue deleted file mode 100644 index 9d71a55a..00000000 --- a/pages/mall/admin/product/product-reviews/index.uvue +++ /dev/null @@ -1,25 +0,0 @@ - - - - - diff --git a/pages/mall/admin/product/product-specifications/index.uvue b/pages/mall/admin/product/product-specifications/index.uvue deleted file mode 100644 index 3060a6eb..00000000 --- a/pages/mall/admin/product/product-specifications/index.uvue +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - diff --git a/pages/mall/admin/product/protection.uvue b/pages/mall/admin/product/protection/index.uvue similarity index 100% rename from pages/mall/admin/product/protection.uvue rename to pages/mall/admin/product/protection/index.uvue diff --git a/pages/mall/admin/product/reply.uvue b/pages/mall/admin/product/reviews/index.uvue similarity index 100% rename from pages/mall/admin/product/reply.uvue rename to pages/mall/admin/product/reviews/index.uvue diff --git a/pages/mall/admin/product/attr.uvue b/pages/mall/admin/product/specifications/index.uvue similarity index 100% rename from pages/mall/admin/product/attr.uvue rename to pages/mall/admin/product/specifications/index.uvue From 7a75ab7df45a014d1490fa60352d5f3eb250b1fc Mon Sep 17 00:00:00 2001 From: huangzhenbao <17818024429@163.com> Date: Fri, 6 Feb 2026 08:40:46 +0800 Subject: [PATCH 05/12] =?UTF-8?q?=E7=BB=A7=E7=BB=AD=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=9A=84=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layouts/admin/router/adminComponentMap.uts | 259 +++++--------- layouts/admin/router/adminRoutes.uts | 2 +- main.uts | 8 +- pages.json | 7 - pages/mall/admin/setting/system/config.uvue | 373 ++++++++++++++++---- pages/mall/admin/system-settings.uvue | 65 ---- 6 files changed, 396 insertions(+), 318 deletions(-) delete mode 100644 pages/mall/admin/system-settings.uvue diff --git a/layouts/admin/router/adminComponentMap.uts b/layouts/admin/router/adminComponentMap.uts index 54ec49a4..b6789ef2 100644 --- a/layouts/admin/router/adminComponentMap.uts +++ b/layouts/admin/router/adminComponentMap.uts @@ -6,122 +6,25 @@ * value: 组件引用 * * 注意: - * 1. 所有组件必须静态导入,确保打包可分析 + * 1. 组件已切换为 defineAsyncComponent 异步导入,优化 H5 环境下的加载性能与包体积 * 2. 组件路径使用 @ 别名 * 3. 占位组件统一使用 PlaceholderPage */ +import { defineAsyncComponent } from 'vue' + // 导入占位组件 import PlaceholderPage from '@/layouts/admin/components/PlaceholderPage.uvue' // 导入首页(内部组件,不包含 AdminLayout) import HomeIndex from '@/layouts/admin/pages/HomeIndex.uvue' -// 导入用户模块(纯组件,不包含 AdminLayout) -import UserStatistic from '@/pages/mall/admin/user/statistics/index.uvue' -import UserList from '@/pages/mall/admin/user/management/index.uvue' -import UserLevel from '@/pages/mall/admin/user/level/index.uvue' -import UserGroup from '@/pages/mall/admin/user/grouping/index.uvue' -import UserLabel from '@/pages/mall/admin/user/label/index.uvue' -import MemberConfig from '@/pages/mall/admin/user/configuration/index.uvue' - -// 导入商品模块(纯组件,不包含 AdminLayout) -import ProductStatistic from '@/pages/mall/admin/product/product-statistics/index.uvue' -import ProductList from '@/pages/mall/admin/product/product-management/index.uvue' -import ProductEdit from '@/pages/mall/admin/product/product-management/edit.uvue' -import ProductMemberPrice from '@/pages/mall/admin/product/product-management/member-price.uvue' -import ProductClassify from '@/pages/mall/admin/product/classification/index.uvue' -import ProductReply from '@/pages/mall/admin/product/reviews/index.uvue' -import ProductAttr from '@/pages/mall/admin/product/specifications/index.uvue' -import ProductParam from '@/pages/mall/admin/product/parameters/index.uvue' -import ProductLabel from '@/pages/mall/admin/product/labels/index.uvue' -import ProductProtection from '@/pages/mall/admin/product/protection/index.uvue' - -// 导入订单模块(纯组件,不包含 AdminLayout) -import OrderList from '@/pages/mall/admin/order/list.uvue' -import OrderStatistic from '@/pages/mall/admin/order/order-statistics/index.uvue' -import OrderRefund from '@/pages/mall/admin/order/aftersales-order/index.uvue' -import OrderCashier from '@/pages/mall/admin/order/cashier-order/index.uvue' -import OrderVerify from '@/pages/mall/admin/order/write-off-records/index.uvue' -import OrderConfig from '@/pages/mall/admin/order/order-configuration/index.uvue' +// 用户、商品、订单模块已改为 defineAsyncComponent 异步加载,移除静态导入以优化 H5 加载性能 // 营销设置模块暂时使用 PlaceholderPage // 避免循环依赖问题 -import CmsArticle from '@/pages/mall/admin/cms/article/list.uvue' -import CmsCategory from '@/pages/mall/admin/cms/category/list.uvue' -import MarketingCouponList from '@/pages/mall/admin/marketing/coupon/list.uvue' -import MarketingCouponUser from '@/pages/mall/admin/marketing/coupon/user.uvue' -import MarketingIntegralStatistic from '@/pages/mall/admin/marketing/integral/statistic.uvue' -import MarketingIntegralProduct from '@/pages/mall/admin/marketing/integral/list.uvue' -import MarketingIntegralOrder from '@/pages/mall/admin/marketing/integral/order.uvue' -import MarketingIntegralRecord from '@/pages/mall/admin/marketing/integral/record.uvue' -import MarketingIntegralConfig from '@/pages/mall/admin/marketing/integral/config.uvue' -import MarketingLotteryList from '@/pages/mall/admin/marketing/lottery/list.uvue' -import MarketingLotteryConfig from '@/pages/mall/admin/marketing/lottery/config.uvue' -import MarketingCombinationProduct from '@/pages/mall/admin/marketing/combination/product.uvue' -import MarketingCombinationList from '@/pages/mall/admin/marketing/combination/list.uvue' -import MarketingCombinationCreate from '@/pages/mall/admin/marketing/combination/create.uvue' -import MarketingSeckillList from '@/pages/mall/admin/marketing/seckill/list.uvue' -import MarketingSeckillProduct from '@/pages/mall/admin/marketing/seckill/product.uvue' -import MarketingSeckillConfig from '@/pages/mall/admin/marketing/seckill/config.uvue' -// 导入财务模块(纯组件) -import FinanceTransactionStats from '@/pages/mall/admin/finance/transaction_stats.uvue' -import FinanceWithdrawal from '@/pages/mall/admin/finance/withdrawal.uvue' -import FinanceInvoice from '@/pages/mall/admin/finance/invoice.uvue' -import FinanceRecharge from '@/pages/mall/admin/finance/recharge.uvue' -import FinanceCapitalFlow from '@/pages/mall/admin/finance/capital_flow.uvue' -import FinanceBill from '@/pages/mall/admin/finance/bill.uvue' -import FinanceCommission from '@/pages/mall/admin/finance/commission.uvue' -import FinanceBalanceStats from '@/pages/mall/admin/finance/balance_stats.uvue' -import FinanceBalanceRecord from '@/pages/mall/admin/finance/balance_record.uvue' - -// 导入客服模块 -import KefuList from '@/pages/mall/admin/kefu/list.uvue' -import KefuWords from '@/pages/mall/admin/kefu/words.uvue' -import KefuFeedback from '@/pages/mall/admin/kefu/feedback.uvue' -import KefuAutoReply from '@/pages/mall/admin/kefu/auto_reply.uvue' -import KefuConfig from '@/pages/mall/admin/kefu/config.uvue' - -// 导入装修模块 -import DecorationHome from '@/pages/mall/admin/decoration/home.uvue' -import DecorationCategory from '@/pages/mall/admin/decoration/category.uvue' -import DecorationUser from '@/pages/mall/admin/decoration/user.uvue' -import DecorationData from '@/pages/mall/admin/decoration/data-config.uvue' -import DecorationStyle from '@/pages/mall/admin/design/theme-style.uvue' -import DecorationMaterial from '@/pages/mall/admin/design/material.uvue' -import DecorationLink from '@/pages/mall/admin/design/link-management.uvue' - -// 导入直播管理 -import MarketingLiveRoom from '@/pages/mall/admin/marketing/live/room.uvue' -import MarketingLiveProduct from '@/pages/mall/admin/marketing/live/product.uvue' -import MarketingLiveAnchor from '@/pages/mall/admin/marketing/live/anchor.uvue' - -// 导入用户充值 -import MarketingRechargeQuota from '@/pages/mall/admin/marketing/recharge/quota.uvue' -import MarketingRechargeConfig from '@/pages/mall/admin/marketing/recharge/config.uvue' - -// 导入每日签到 -import MarketingCheckinConfig from '@/pages/mall/admin/marketing/checkin/config.uvue' -import MarketingCheckinReward from '@/pages/mall/admin/marketing/checkin/reward.uvue' - -// 导入新人礼 -import MarketingNewcomerGift from '@/pages/mall/admin/marketing/newcomer/index.uvue' - -// 导入付费会员 -import MarketingMemberType from '@/pages/mall/admin/marketing/member/type.uvue' -import MarketingMemberRight from '@/pages/mall/admin/marketing/member/right.uvue' -import MarketingMemberCard from '@/pages/mall/admin/marketing/member/card.uvue' -import MarketingMemberRecord from '@/pages/mall/admin/marketing/member/record.uvue' -import MarketingMemberConfig from '@/pages/mall/admin/marketing/member/config.uvue' - -// 导入维护模块 -import MaintainDevConfig from '@/pages/mall/admin/maintain/dev/config.uvue' - -// import StatisticIndex from '@/pages/mall/admin/statistic/index.uvue' -// import SettingSystemConfig from '@/pages/mall/admin/setting/system/config.uvue' -// import SettingSystemAdmin from '@/pages/mall/admin/setting/system/admin.uvue' -// import SettingSystemRole from '@/pages/mall/admin/setting/system/role.uvue' +// 营销、内容、财务、客服、装修等模块已改为 defineAsyncComponent 异步加载,移除静态导入以优化 H5 加载性能 /** * 组件映射表 @@ -131,97 +34,97 @@ export const componentMap: Map = new Map([ ['HomeIndex', HomeIndex], // 用户模块 - ['UserStatistic', UserStatistic], - ['UserList', UserList], - ['UserLevel', UserLevel], - ['UserGroup', UserGroup], - ['UserLabel', UserLabel], - ['UserMemberConfig', MemberConfig], + ['UserStatistic', defineAsyncComponent(() => import('@/pages/mall/admin/user/statistics/index.uvue'))], + ['UserList', defineAsyncComponent(() => import('@/pages/mall/admin/user/management/index.uvue'))], + ['UserLevel', defineAsyncComponent(() => import('@/pages/mall/admin/user/level/index.uvue'))], + ['UserGroup', defineAsyncComponent(() => import('@/pages/mall/admin/user/grouping/index.uvue'))], + ['UserLabel', defineAsyncComponent(() => import('@/pages/mall/admin/user/label/index.uvue'))], + ['UserMemberConfig', defineAsyncComponent(() => import('@/pages/mall/admin/user/configuration/index.uvue'))], // 商品模块 - ['ProductStatistic', ProductStatistic], - ['ProductList', ProductList], - ['ProductEdit', ProductEdit], - ['ProductMemberPrice', ProductMemberPrice], - ['ProductClassify', ProductClassify], - ['ProductReply', ProductReply], - ['ProductAttr', ProductAttr], - ['ProductParam', ProductParam], - ['ProductLabel', ProductLabel], - ['ProductProtection', ProductProtection], + ['ProductStatistic', defineAsyncComponent(() => import('@/pages/mall/admin/product/product-statistics/index.uvue'))], + ['ProductList', defineAsyncComponent(() => import('@/pages/mall/admin/product/product-management/index.uvue'))], + ['ProductEdit', defineAsyncComponent(() => import('@/pages/mall/admin/product/product-management/edit.uvue'))], + ['ProductMemberPrice', defineAsyncComponent(() => import('@/pages/mall/admin/product/product-management/member-price.uvue'))], + ['ProductClassify', defineAsyncComponent(() => import('@/pages/mall/admin/product/classification/index.uvue'))], + ['ProductReply', defineAsyncComponent(() => import('@/pages/mall/admin/product/reviews/index.uvue'))], + ['ProductAttr', defineAsyncComponent(() => import('@/pages/mall/admin/product/specifications/index.uvue'))], + ['ProductParam', defineAsyncComponent(() => import('@/pages/mall/admin/product/parameters/index.uvue'))], + ['ProductLabel', defineAsyncComponent(() => import('@/pages/mall/admin/product/labels/index.uvue'))], + ['ProductProtection', defineAsyncComponent(() => import('@/pages/mall/admin/product/protection/index.uvue'))], // 订单模块 - ['OrderList', OrderList], - ['OrderStatistic', OrderStatistic], - ['OrderRefund', OrderRefund], - ['OrderCashier', OrderCashier], - ['OrderVerify', OrderVerify], - ['OrderConfig', OrderConfig], + ['OrderList', defineAsyncComponent(() => import('@/pages/mall/admin/order/list.uvue'))], + ['OrderStatistic', defineAsyncComponent(() => import('@/pages/mall/admin/order/order-statistics/index.uvue'))], + ['OrderRefund', defineAsyncComponent(() => import('@/pages/mall/admin/order/aftersales-order/index.uvue'))], + ['OrderCashier', defineAsyncComponent(() => import('@/pages/mall/admin/order/cashier-order/index.uvue'))], + ['OrderVerify', defineAsyncComponent(() => import('@/pages/mall/admin/order/write-off-records/index.uvue'))], + ['OrderConfig', defineAsyncComponent(() => import('@/pages/mall/admin/order/order-configuration/index.uvue'))], - // 营销模块 + // 营销模块已改为异步加载 // 1. 优惠券 - ['MarketingCouponList', MarketingCouponList], - ['MarketingCouponUser', MarketingCouponUser], + ['MarketingCouponList', defineAsyncComponent(() => import('@/pages/mall/admin/marketing/coupon/list.uvue'))], + ['MarketingCouponUser', defineAsyncComponent(() => import('@/pages/mall/admin/marketing/coupon/user.uvue'))], // 2. 积分管理 - ['MarketingIntegralStatistic', MarketingIntegralStatistic], - ['MarketingIntegralProduct', MarketingIntegralProduct], - ['MarketingIntegralOrder', MarketingIntegralOrder], - ['MarketingIntegralRecord', MarketingIntegralRecord], - ['MarketingIntegralConfig', MarketingIntegralConfig], + ['MarketingIntegralStatistic', defineAsyncComponent(() => import('@/pages/mall/admin/marketing/integral/statistic.uvue'))], + ['MarketingIntegralProduct', defineAsyncComponent(() => import('@/pages/mall/admin/marketing/integral/list.uvue'))], + ['MarketingIntegralOrder', defineAsyncComponent(() => import('@/pages/mall/admin/marketing/integral/order.uvue'))], + ['MarketingIntegralRecord', defineAsyncComponent(() => import('@/pages/mall/admin/marketing/integral/record.uvue'))], + ['MarketingIntegralConfig', defineAsyncComponent(() => import('@/pages/mall/admin/marketing/integral/config.uvue'))], // 3. 抽奖管理 - ['MarketingLotteryList', MarketingLotteryList], - ['MarketingLotteryConfig', MarketingLotteryConfig], + ['MarketingLotteryList', defineAsyncComponent(() => import('@/pages/mall/admin/marketing/lottery/list.uvue'))], + ['MarketingLotteryConfig', defineAsyncComponent(() => import('@/pages/mall/admin/marketing/lottery/config.uvue'))], // 4. 砍价管理 ['MarketingBargainProduct', PlaceholderPage], ['MarketingBargainList', PlaceholderPage], // 5. 拼团管理 - ['MarketingCombinationProduct', MarketingCombinationProduct], - ['MarketingCombinationList', MarketingCombinationList], - ['MarketingCombinationCreate', MarketingCombinationCreate], + ['MarketingCombinationProduct', defineAsyncComponent(() => import('@/pages/mall/admin/marketing/combination/product.uvue'))], + ['MarketingCombinationList', defineAsyncComponent(() => import('@/pages/mall/admin/marketing/combination/list.uvue'))], + ['MarketingCombinationCreate', defineAsyncComponent(() => import('@/pages/mall/admin/marketing/combination/create.uvue'))], // 6. 秒杀管理 - ['MarketingSeckillList', MarketingSeckillList], - ['MarketingSeckillProduct', MarketingSeckillProduct], - ['MarketingSeckillConfig', MarketingSeckillConfig], + ['MarketingSeckillList', defineAsyncComponent(() => import('@/pages/mall/admin/marketing/seckill/list.uvue'))], + ['MarketingSeckillProduct', defineAsyncComponent(() => import('@/pages/mall/admin/marketing/seckill/product.uvue'))], + ['MarketingSeckillConfig', defineAsyncComponent(() => import('@/pages/mall/admin/marketing/seckill/config.uvue'))], // 7. 付费会员 - ['MarketingMemberType', MarketingMemberType], - ['MarketingMemberRight', MarketingMemberRight], - ['MarketingMemberCard', MarketingMemberCard], - ['MarketingMemberRecord', MarketingMemberRecord], - ['MarketingMemberConfig', MarketingMemberConfig], + ['MarketingMemberType', defineAsyncComponent(() => import('@/pages/mall/admin/marketing/member/type.uvue'))], + ['MarketingMemberRight', defineAsyncComponent(() => import('@/pages/mall/admin/marketing/member/right.uvue'))], + ['MarketingMemberCard', defineAsyncComponent(() => import('@/pages/mall/admin/marketing/member/card.uvue'))], + ['MarketingMemberRecord', defineAsyncComponent(() => import('@/pages/mall/admin/marketing/member/record.uvue'))], + ['MarketingMemberConfig', defineAsyncComponent(() => import('@/pages/mall/admin/marketing/member/config.uvue'))], // 8. 直播管理 - ['MarketingLiveRoom', MarketingLiveRoom], - ['MarketingLiveProduct', MarketingLiveProduct], - ['MarketingLiveAnchor', MarketingLiveAnchor], + ['MarketingLiveRoom', defineAsyncComponent(() => import('@/pages/mall/admin/marketing/live/room.uvue'))], + ['MarketingLiveProduct', defineAsyncComponent(() => import('@/pages/mall/admin/marketing/live/product.uvue'))], + ['MarketingLiveAnchor', defineAsyncComponent(() => import('@/pages/mall/admin/marketing/live/anchor.uvue'))], // 9. 用户充值 - ['MarketingRechargeQuota', MarketingRechargeQuota], - ['MarketingRechargeConfig', MarketingRechargeConfig], + ['MarketingRechargeQuota', defineAsyncComponent(() => import('@/pages/mall/admin/marketing/recharge/quota.uvue'))], + ['MarketingRechargeConfig', defineAsyncComponent(() => import('@/pages/mall/admin/marketing/recharge/config.uvue'))], // 10. 每日签到 - ['MarketingCheckinConfig', MarketingCheckinConfig], - ['MarketingCheckinReward', MarketingCheckinReward], + ['MarketingCheckinConfig', defineAsyncComponent(() => import('@/pages/mall/admin/marketing/checkin/config.uvue'))], + ['MarketingCheckinReward', defineAsyncComponent(() => import('@/pages/mall/admin/marketing/checkin/reward.uvue'))], // 11. 渠道码 & 新人礼 ['MarketingChannelList', PlaceholderPage], - ['MarketingNewcomerGift', MarketingNewcomerGift], + ['MarketingNewcomerGift', defineAsyncComponent(() => import('@/pages/mall/admin/marketing/newcomer/index.uvue'))], // 内容模块 - ['CmsArticle', CmsArticle], - ['CmsCategory', CmsCategory], + ['CmsArticle', defineAsyncComponent(() => import('@/pages/mall/admin/cms/article/list.uvue'))], + ['CmsCategory', defineAsyncComponent(() => import('@/pages/mall/admin/cms/category/list.uvue'))], // 财务模块 - ['FinanceTransactionStats', FinanceTransactionStats], - ['FinanceWithdrawal', FinanceWithdrawal], - ['FinanceInvoice', FinanceInvoice], - ['FinanceRecharge', FinanceRecharge], - ['FinanceCapitalFlow', FinanceCapitalFlow], - ['FinanceBill', FinanceBill], - ['FinanceCommission', FinanceCommission], - ['FinanceBalanceStats', FinanceBalanceStats], - ['FinanceBalanceRecord', FinanceBalanceRecord], + ['FinanceTransactionStats', defineAsyncComponent(() => import('@/pages/mall/admin/finance/transaction_stats.uvue'))], + ['FinanceWithdrawal', defineAsyncComponent(() => import('@/pages/mall/admin/finance/withdrawal.uvue'))], + ['FinanceInvoice', defineAsyncComponent(() => import('@/pages/mall/admin/finance/invoice.uvue'))], + ['FinanceRecharge', defineAsyncComponent(() => import('@/pages/mall/admin/finance/recharge.uvue'))], + ['FinanceCapitalFlow', defineAsyncComponent(() => import('@/pages/mall/admin/finance/capital_flow.uvue'))], + ['FinanceBill', defineAsyncComponent(() => import('@/pages/mall/admin/finance/bill.uvue'))], + ['FinanceCommission', defineAsyncComponent(() => import('@/pages/mall/admin/finance/commission.uvue'))], + ['FinanceBalanceStats', defineAsyncComponent(() => import('@/pages/mall/admin/finance/balance_stats.uvue'))], + ['FinanceBalanceRecord', defineAsyncComponent(() => import('@/pages/mall/admin/finance/balance_record.uvue'))], // 数据模块 - 暂时使用占位组件 ['StatisticIndex', PlaceholderPage], // 设置模块 - 暂时使用占位组件 - ['SettingSystemConfig', PlaceholderPage], + ['SettingSystemConfig', defineAsyncComponent(() => import('@/pages/mall/admin/setting/system/config.uvue'))], ['SettingSystemAdmin', PlaceholderPage], ['SettingSystemRole', PlaceholderPage], @@ -231,27 +134,27 @@ export const componentMap: Map = new Map([ ['DistributionConfig', PlaceholderPage], // 客服模块 - ['KefuList', KefuList], - ['KefuWords', KefuWords], - ['KefuFeedback', KefuFeedback], - ['KefuAutoReply', KefuAutoReply], - ['KefuConfig', KefuConfig], + ['KefuList', defineAsyncComponent(() => import('@/pages/mall/admin/kefu/list.uvue'))], + ['KefuWords', defineAsyncComponent(() => import('@/pages/mall/admin/kefu/words.uvue'))], + ['KefuFeedback', defineAsyncComponent(() => import('@/pages/mall/admin/kefu/feedback.uvue'))], + ['KefuAutoReply', defineAsyncComponent(() => import('@/pages/mall/admin/kefu/auto_reply.uvue'))], + ['KefuConfig', defineAsyncComponent(() => import('@/pages/mall/admin/kefu/config.uvue'))], // 装修模块 - ['DecorationHome', DecorationHome], - ['DecorationCategory', DecorationCategory], - ['DecorationUser', DecorationUser], - ['DecorationData', DecorationData], - ['DecorationStyle', DecorationStyle], - ['DecorationMaterial', DecorationMaterial], - ['DecorationLink', DecorationLink], + ['DecorationHome', defineAsyncComponent(() => import('@/pages/mall/admin/decoration/home.uvue'))], + ['DecorationCategory', defineAsyncComponent(() => import('@/pages/mall/admin/decoration/category.uvue'))], + ['DecorationUser', defineAsyncComponent(() => import('@/pages/mall/admin/decoration/user.uvue'))], + ['DecorationData', defineAsyncComponent(() => import('@/pages/mall/admin/decoration/data-config.uvue'))], + ['DecorationStyle', defineAsyncComponent(() => import('@/pages/mall/admin/design/theme-style.uvue'))], + ['DecorationMaterial', defineAsyncComponent(() => import('@/pages/mall/admin/design/material.uvue'))], + ['DecorationLink', defineAsyncComponent(() => import('@/pages/mall/admin/design/link-management.uvue'))], // 应用模块 ['AppStatistic', PlaceholderPage], ['AppList', PlaceholderPage], // 维护模块 - ['MaintainDevConfig', MaintainDevConfig], + ['MaintainDevConfig', defineAsyncComponent(() => import('@/pages/mall/admin/maintain/dev/config.uvue'))], ['MaintainDevData', PlaceholderPage], ['MaintainDevTask', PlaceholderPage], ['MaintainDevAuth', PlaceholderPage], diff --git a/layouts/admin/router/adminRoutes.uts b/layouts/admin/router/adminRoutes.uts index b1f90708..3c8407c9 100644 --- a/layouts/admin/router/adminRoutes.uts +++ b/layouts/admin/router/adminRoutes.uts @@ -894,7 +894,7 @@ export const routes: RouteRecord[] = [ // ========== 设置模块 ========== { id: 'setting_systemConfig', - title: '系统配置', + title: '系统设置', path: '/pages/mall/admin/setting/system/config', componentKey: 'SettingSystemConfig', parentId: 'setting', diff --git a/main.uts b/main.uts index da42848e..3e40f0b5 100644 --- a/main.uts +++ b/main.uts @@ -7,11 +7,9 @@ export function createApp() { // 注册 i18n 全局属性,使组件可以使用 $t 方法 app.config.globalProperties.$t = (key: string, values?: any, locale?: string): string => { - if (!i18n.global) { - console.error('i18n is not initialized') - return key - } - return i18n.global.t(key, values, locale) || key + // 临时方案:移除对未定义 i18n 的引用,直接返回 Key + // 如果之后需要 i18n,应正确导入并初始化 + return key } return { app } diff --git a/pages.json b/pages.json index b6c72b9d..590bdf88 100644 --- a/pages.json +++ b/pages.json @@ -487,13 +487,6 @@ "navigationStyle": "custom" } }, - { - "path": "system-settings", - "style": { - "navigationBarTitleText": "系统设置", - "navigationStyle": "custom" - } - }, { "path": "subscription/plan-management", "style": { diff --git a/pages/mall/admin/setting/system/config.uvue b/pages/mall/admin/setting/system/config.uvue index 8ac661b7..e2e14b17 100644 --- a/pages/mall/admin/setting/system/config.uvue +++ b/pages/mall/admin/setting/system/config.uvue @@ -1,81 +1,330 @@ + + + + diff --git a/pages/mall/admin/finance/balance_stats.uvue b/pages/mall/admin/finance/balance_stats.uvue index 487852ff..df1b9746 100644 --- a/pages/mall/admin/finance/balance_stats.uvue +++ b/pages/mall/admin/finance/balance_stats.uvue @@ -1,63 +1,63 @@ -