调整目录结构

This commit is contained in:
2026-02-05 17:59:45 +08:00
parent 151f5a5e1a
commit 6b416e6a0a
17 changed files with 14 additions and 299 deletions

View File

@@ -18,12 +18,12 @@ import PlaceholderPage from '@/layouts/admin/components/PlaceholderPage.uvue'
import HomeIndex from '@/layouts/admin/pages/HomeIndex.uvue'
// 导入用户模块(纯组件,不包含 AdminLayout
import UserStatistic from '@/pages/mall/admin/user/Statistic.uvue'
import UserList from '@/pages/mall/admin/user/list.uvue'
import UserLevel from '@/pages/mall/admin/user/level.uvue'
import UserGroup from '@/pages/mall/admin/user/group.uvue'
import UserLabel from '@/pages/mall/admin/user/label.uvue'
import MemberConfig from '@/pages/mall/admin/user/MemberConfig.uvue'
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'

View File

@@ -69,7 +69,7 @@ export const topMenus: TopMenu[] = [
id: 'user',
title: '用户',
icon: 'user',
path: '/pages/mall/admin/user/list',
path: '/pages/mall/admin/user/management/index',
order: 2,
groups: [
{ id: 'user-manage', title: '', order: 1 }
@@ -228,7 +228,7 @@ export const routes: RouteRecord[] = [
{
id: 'user_statistic',
title: '用户统计',
path: '/pages/mall/admin/user/Statistic',
path: '/pages/mall/admin/user/statistics/index',
componentKey: 'UserStatistic',
parentId: 'user',
groupId: 'user-manage',
@@ -238,7 +238,7 @@ export const routes: RouteRecord[] = [
{
id: 'user_list',
title: '用户管理',
path: '/pages/mall/admin/user/list',
path: '/pages/mall/admin/user/management/index',
componentKey: 'UserList',
parentId: 'user',
groupId: 'user-manage',
@@ -248,7 +248,7 @@ export const routes: RouteRecord[] = [
{
id: 'user_group',
title: '用户分组',
path: '/pages/mall/admin/user/group',
path: '/pages/mall/admin/user/grouping/index',
componentKey: 'UserGroup',
parentId: 'user',
groupId: 'user-manage',
@@ -258,7 +258,7 @@ export const routes: RouteRecord[] = [
{
id: 'user_label',
title: '用户标签',
path: '/pages/mall/admin/user/label',
path: '/pages/mall/admin/user/label/index',
componentKey: 'UserLabel',
parentId: 'user',
groupId: 'user-manage',
@@ -268,7 +268,7 @@ export const routes: RouteRecord[] = [
{
id: 'user_level',
title: '用户等级',
path: '/pages/mall/admin/user/level',
path: '/pages/mall/admin/user/level/index',
componentKey: 'UserLevel',
parentId: 'user',
groupId: 'user-manage',

View File

@@ -453,7 +453,7 @@
"root": "pages/mall/admin",
"pages": [
{
"path": "user-management",
"path": "user/management/index",
"style": {
"navigationBarTitleText": "用户管理",
"navigationStyle": "custom"
@@ -481,7 +481,7 @@
}
},
{
"path": "user-statistics",
"path": "user/statistics/index",
"style": {
"navigationBarTitleText": "用户统计",
"navigationStyle": "custom"

View File

@@ -1,70 +0,0 @@
<template>
<AdminLayout :currentPage="currentPage">
<view class="Page">
<view class="Header">
<text class="Title">用户</text>
<text class="SubTitle">user-management</text>
</view>
<view class="Card">
<text class="Label">页面参数query</text>
<text class="Mono">{{ params }}</text>
</view>
</view>
</AdminLayout>
</template>
<script setup lang="uts">
import { ref } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import AdminLayout from '@/layouts/admin/AdminLayout.uvue'
const currentPage = ref('user-list') // 默认
onLoad((opts: Record<string, string>) => {
const action = opts['action'] || ''
if (action == 'group') currentPage.value = 'user-group'
else if (action == 'tag') currentPage.value = 'user-tag'
else if (action == 'level') currentPage.value = 'user-level'
else if (action == 'config') currentPage.value = 'user-config'
else currentPage.value = 'user-list'
})
</script>
<style>
.Page {
padding: 24rpx;
}
.Header {
padding: 24rpx;
border-radius: 16rpx;
background: #ffffff;
}
.Title {
font-size: 36rpx;
font-weight: 700;
}
.SubTitle {
margin-top: 8rpx;
font-size: 24rpx;
opacity: 0.7;
}
.Card {
margin-top: 24rpx;
padding: 24rpx;
border-radius: 16rpx;
background: #ffffff;
}
.Label {
font-size: 26rpx;
font-weight: 600;
margin-bottom: 12rpx;
}
.Mono {
font-size: 24rpx;
font-family: monospace;
line-height: 36rpx;
word-break: break-all;
}
</style>

View File

@@ -1,65 +0,0 @@
<template>
<AdminLayout currentPage="user">
<view class="Page">
<view class="Header">
<text class="Title">用户统计</text>
<text class="SubTitle">user-statistics</text>
</view>
<view class="Card">
<text class="Label">页面参数query</text>
<text class="Mono">{{ params }}</text>
</view>
</view>
</AdminLayout>
</template>
<script setup lang="uts">
import { ref } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import AdminLayout from '@/layouts/admin/AdminLayout.uvue'
const params = ref('')
onLoad((options) => {
// options: Record<string, any>
params.value = JSON.stringify(options ?? {})
})
</script>
<style>
.Page {
padding: 24rpx;
}
.Header {
padding: 24rpx;
border-radius: 16rpx;
background: #ffffff;
}
.Title {
font-size: 36rpx;
font-weight: 700;
}
.SubTitle {
margin-top: 8rpx;
font-size: 24rpx;
opacity: 0.7;
}
.Card {
margin-top: 24rpx;
padding: 24rpx;
border-radius: 16rpx;
background: #ffffff;
}
.Label {
font-size: 26rpx;
font-weight: 600;
margin-bottom: 12rpx;
}
.Mono {
font-size: 24rpx;
font-family: monospace;
line-height: 36rpx;
word-break: break-all;
}
</style>

View File

@@ -1,25 +0,0 @@
<template>
<AdminLayout :currentPage="currentPage">
<view class="page">
<view class="header">
<text class="title">{{ title }}</text>
<text class="sub-title">系统用户相关全局配置</text>
</view>
</view>
</AdminLayout>
</template>
<script setup lang="uts">
import { ref } from 'vue'
import AdminLayout from '@/layouts/admin/AdminLayout.uvue'
const currentPage = ref<string>('user-config')
const title = ref<string>('用户配置')
</script>
<style scoped lang="scss">
@import '@/uni.scss';
.page { padding: $space-lg; }
.header { padding: $space-lg; border-radius: $radius; background: $background-primary; box-shadow: $shadow-xs; }
.title { font-size: $font-size-lg; font-weight: $font-weight-bold; color: $text-primary; }
.sub-title { margin-top: $space-xs; font-size: $font-size-md; color: $text-secondary; }
</style>

View File

@@ -1,25 +0,0 @@
<template>
<AdminLayout :currentPage="currentPage">
<view class="page">
<view class="header">
<text class="title">{{ title }}</text>
<text class="sub-title">创建及管理用户分组</text>
</view>
</view>
</AdminLayout>
</template>
<script setup lang="uts">
import { ref } from 'vue'
import AdminLayout from '@/layouts/admin/AdminLayout.uvue'
const currentPage = ref<string>('user-group')
const title = ref<string>('用户分组')
</script>
<style scoped lang="scss">
@import '@/uni.scss';
.page { padding: $space-lg; }
.header { padding: $space-lg; border-radius: $radius; background: $background-primary; box-shadow: $shadow-xs; }
.title { font-size: $font-size-lg; font-weight: $font-weight-bold; color: $text-primary; }
.sub-title { margin-top: $space-xs; font-size: $font-size-md; color: $text-secondary; }
</style>

View File

@@ -1,25 +0,0 @@
<template>
<AdminLayout :currentPage="currentPage">
<view class="page">
<view class="header">
<text class="title">{{ title }}</text>
<text class="sub-title">自定义用户行为标签</text>
</view>
</view>
</AdminLayout>
</template>
<script setup lang="uts">
import { ref } from 'vue'
import AdminLayout from '@/layouts/admin/AdminLayout.uvue'
const currentPage = ref<string>('user-tag')
const title = ref<string>('用户标签')
</script>
<style scoped lang="scss">
@import '@/uni.scss';
.page { padding: $space-lg; }
.header { padding: $space-lg; border-radius: $radius; background: $background-primary; box-shadow: $shadow-xs; }
.title { font-size: $font-size-lg; font-weight: $font-weight-bold; color: $text-primary; }
.sub-title { margin-top: $space-xs; font-size: $font-size-md; color: $text-secondary; }
</style>

View File

@@ -1,25 +0,0 @@
<template>
<AdminLayout :currentPage="currentPage">
<view class="page">
<view class="header">
<text class="title">{{ title }}</text>
<text class="sub-title">配置会员等级及权益</text>
</view>
</view>
</AdminLayout>
</template>
<script setup lang="uts">
import { ref } from 'vue'
import AdminLayout from '@/layouts/admin/AdminLayout.uvue'
const currentPage = ref<string>('user-level')
const title = ref<string>('用户等级')
</script>
<style scoped lang="scss">
@import '@/uni.scss';
.page { padding: $space-lg; }
.header { padding: $space-lg; border-radius: $radius; background: $background-primary; box-shadow: $shadow-xs; }
.title { font-size: $font-size-lg; font-weight: $font-weight-bold; color: $text-primary; }
.sub-title { margin-top: $space-xs; font-size: $font-size-md; color: $text-secondary; }
</style>

View File

@@ -1,25 +0,0 @@
<template>
<AdminLayout :currentPage="currentPage">
<view class="page">
<view class="header">
<text class="title">{{ title }}</text>
<text class="sub-title">管理商城注册用户信息</text>
</view>
</view>
</AdminLayout>
</template>
<script setup lang="uts">
import { ref } from 'vue'
import AdminLayout from '@/layouts/admin/AdminLayout.uvue'
const currentPage = ref<string>('user-list')
const title = ref<string>('用户管理')
</script>
<style scoped lang="scss">
@import '@/uni.scss';
.page { padding: $space-lg; }
.header { padding: $space-lg; border-radius: $radius; background: $background-primary; box-shadow: $shadow-xs; }
.title { font-size: $font-size-lg; font-weight: $font-weight-bold; color: $text-primary; }
.sub-title { margin-top: $space-xs; font-size: $font-size-md; color: $text-secondary; }
</style>

View File

@@ -1,25 +0,0 @@
<template>
<AdminLayout :currentPage="currentPage">
<view class="page">
<view class="header">
<text class="title">{{ title }}</text>
<text class="sub-title">概览用户增长及活跃度数据</text>
</view>
</view>
</AdminLayout>
</template>
<script setup lang="uts">
import { ref } from 'vue'
import AdminLayout from '@/layouts/admin/AdminLayout.uvue'
const currentPage = ref<string>('user-statistics')
const title = ref<string>('用户统计')
</script>
<style scoped lang="scss">
@import '@/uni.scss';
.page { padding: $space-lg; }
.header { padding: $space-lg; border-radius: $radius; background: $background-primary; box-shadow: $shadow-xs; }
.title { font-size: $font-size-lg; font-weight: $font-weight-bold; color: $text-primary; }
.sub-title { margin-top: $space-xs; font-size: $font-size-md; color: $text-secondary; }
</style>