diff --git a/.env b/.env index c4c156d204a6a37a1471e86e5790401071e26882..1077f64510a0bc63bc142afc457617e63093ce74 100755 --- a/.env +++ b/.env @@ -1,6 +1,6 @@ # 【通用】环境变量 -# 版本号 +# 版本号 VITE_VERSION = 3.0.1 # 端口号 @@ -10,7 +10,8 @@ VITE_PORT = 3006 VITE_BASE_URL = / # API 地址前缀 -VITE_API_URL = http://127.0.0.1:8001 +VITE_API_URL = /adminapi + # 权限模式( frontend | backend ) VITE_ACCESS_MODE = backend @@ -31,4 +32,15 @@ VITE_APP_ICONIFY_PREFIX = ep,ant-design,carbon,ic,logos,lucide,ri # 后端模式是否使用权限码接口 VITE_BACKEND_MODE_USE_CODE = true +# ============================================================================= +# 静态资源配置(两种模式) +# ============================================================================= + +# 【模式 1】同域访问(默认,dist 部署到后端 public 目录) +# 静态资源使用相对路径,浏览器自动使用当前域名访问 +VITE_STATIC_URL = + +# 【模式 2】CDN 访问(静态资源使用对象存储或 CDN) +# 直接配置 CDN 域名 +# VITE_STATIC_URL = https://cdn.example.com diff --git a/.env.development b/.env.development index 6e6e8cfb1e4db9f36c4c74262fbfa7deb1fbba0b..fb9e1856ccbf37b194abc355f0b5f4b64bc05fe3 100755 --- a/.env.development +++ b/.env.development @@ -10,4 +10,7 @@ VITE_API_URL = /adminapi VITE_DROP_CONSOLE = false # 本地开发代理的目标后端地址(仅开发环境生效,用于解决跨域) -VITE_API_PROXY_URL = http://127.0.0.1:8001 \ No newline at end of file +VITE_API_PROXY_URL = http://127.0.0.1:8001 + +# VITE_API_PROXY_URL = http://demo.madong.tech + diff --git a/.env.production.example b/.env.production.example new file mode 100644 index 0000000000000000000000000000000000000000..31d14e9f1f709b4a253a37b59af3824b349f965f --- /dev/null +++ b/.env.production.example @@ -0,0 +1,23 @@ +# 【生产】环境变量 + +# API 地址前缀 +VITE_API_URL = http://127.0.0.1:8001/adminapi + +# 删除 console +VITE_DROP_CONSOLE = true + +# ============================================================================== +# 静态资源配置(选择其中一种) +# ============================================================================== +VITE_STATIC_URL = + +# 【场景 1】同域访问(dist 部署到后端 public 目录) +# 静态资源使用相对路径,浏览器自动使用当前域名访问 + +# 【场景 2】代理转发(前后端分离,通过后端服务器代理) +# 静态资源通过后端域名访问,可能需要添加路径前缀 +# VITE_STATIC_URL = http://example.com + +# 【场景 3】OSS/CDN(静态资源使用对象存储或 CDN) +# 直接配置 CDN 域名 +# VITE_STATIC_URL = https://cdn.example.com diff --git a/AI_CONTEXT.md b/AI_CONTEXT.md index 1b6e07e6803bbd07f29040f92a240d6a50aadda9..39902aa887eae063c286b94e67762cd8f96575dc 100644 --- a/AI_CONTEXT.md +++ b/AI_CONTEXT.md @@ -65,7 +65,7 @@ src/app/views/{模块名}/{实体名}/ ```typescript import { BaseService } from '@/utils/request' -import { {EntityName}Row } from '@/app/api/{模块名}/models/{实体名}-model' +import { {EntityName}Row } from '@/api/{模块名}/models/{实体名}-model' /** * {实体名} API 服务 @@ -98,7 +98,7 @@ export default {EntityName}Service ```typescript import { CrudSchema } from '@/components/crud' -import { {EntityName}Service } from '@/app/api/{模块名}/{实体名}' +import { {EntityName}Service } from '@/api/{模块名}/{实体名}' import { $t } from '@/locales' /** @@ -477,7 +477,7 @@ const handleCreateSuccess = () => { ```typescript import { BaseService } from '@/utils/request' -import { PostRow } from '@/app/api/system/models/post-model' +import { PostRow } from '@/api/system/models/post-model' /** * 岗位管理 API 服务 @@ -493,7 +493,7 @@ export default PostService ```typescript import { CrudSchema } from '@/components/crud' -import { PostService } from '@/app/api/system/post' +import { PostService } from '@/api/system/post' import { $t } from '@/locales' /** 岗位管理 CRUD 配置 */ @@ -692,7 +692,7 @@ export const crudSchema = (): CrudSchema => { ```typescript import { BaseService } from '@/utils/request' -import { DeptRow } from '@/app/api/system/models/dept-model' +import { DeptRow } from '@/api/system/models/dept-model' /** * 部门管理 API 服务 @@ -714,7 +714,7 @@ export default DeptService ``tsx import { CrudSchema } from '@/components/crud' -import { DeptService, getDeptTree } from '@/app/api/system/dept' +import { DeptService, getDeptTree } from '@/api/system/dept' import { $t } from '@/locales' /** 部门管理 CRUD 配置 */ diff --git a/RESOURCE_URL_GUIDE.md b/RESOURCE_URL_GUIDE.md new file mode 100644 index 0000000000000000000000000000000000000000..99aef3590270f7f76e4d0a6714e927d32ad81452 --- /dev/null +++ b/RESOURCE_URL_GUIDE.md @@ -0,0 +1,361 @@ +# 资源 URL 处理机制说明 + +## 概述 + +本框架提供了一套完整的资源 URL 处理机制,支持多种前后端部署场景。 + +## 支持的部署场景 + +### 1. 同域部署 +**场景**:前后端在同一域名,如 `example.com` 都在同一服务器 + +**配置**: +```javascript +// .env +VITE_API_URL = / +``` + +**处理**: +- 存储:相对路径 `/upload/image.jpg` +- 显示:`https://example.com/upload/image.jpg` + +### 2. 前后端分离代理转发 +**场景**:开发环境通过代理访问后端 + +**配置**: +```javascript +// .env.development +VITE_API_URL = /adminapi +VITE_API_PROXY_URL = http://127.0.0.1:8001 +``` + +**处理**: +- 存储:相对路径 `upload/image.jpg` +- 显示:`https://localhost:3000/upload/image.jpg`(通过静态资源域名) + +### 3. 前后端分离直接访问 +**场景**:生产环境前后端跨域部署 + +**配置**: +```javascript +// .env.production +VITE_API_URL = https://api.example.com +``` + +**处理**: +- 存储:相对路径 `upload/image.jpg` +- 显示:`https://api.example.com/upload/image.jpg` + +### 4. OSS/CDN +**场景**:使用对象存储(阿里云 OSS、腾讯云 COS 等) + +**系统配置**: +```javascript +{ + storage_type: 'aliyun_oss', + url_mode: 'absolute', + cdn_url: 'https://cdn.example.com', + enable_static_cdn: true, + cdn_params: 'token=xxx&version=v1' +} +``` + +**处理**: +- 存储:完整 URL `https://cdn.example.com/upload/image.jpg` +- 显示:直接使用完整 URL,自动添加 CDN 参数 + +### 5. 混合模式 +**场景**:静态资源走 CDN,API 走后端 + +**配置**: +```javascript +{ + static_domain: 'https://static.example.com', + cdn_url: 'https://cdn.example.com', + enable_static_cdn: true +} +``` + +**处理**: +- 存储:相对路径 `upload/image.jpg` +- 显示:`https://static.example.com/upload/image.jpg` + +## 核心 API + +### buildResourceUrl(relativeUrl, options?) + +构建资源完整 URL + +**参数**: +- `relativeUrl`: 相对路径或完整 URL +- `options`: 可选配置,可覆盖系统配置 + +**返回**:完整 URL + +```javascript +import { buildResourceUrl } from '@/utils' + +// 相对路径转完整 URL +const url = buildResourceUrl('/upload/image.jpg') +// => 'https://example.com/upload/image.jpg' + +// 完整 URL 直接返回 +const url2 = buildResourceUrl('https://cdn.example.com/image.jpg') +// => 'https://cdn.example.com/image.jpg' +``` + +### extractRelativePath(url, options?) + +提取相对路径(用于存储) + +**参数**: +- `url`: 完整 URL 或相对路径 +- `options`: 可选配置 + +**返回**:相对路径或完整 URL(取决于配置) + +```javascript +import { extractRelativePath } from '@/utils' + +// 完整 URL 转相对路径 +const path = extractRelativePath('https://example.com/upload/image.jpg') +// => 'upload/image.jpg' + +// OSS 模式可能返回完整 URL +const path2 = extractRelativePath('https://cdn.example.com/image.jpg', { urlMode: 'absolute' }) +// => 'https://cdn.example.com/image.jpg' +``` + +### batchProcessUrls(urls, mode, options?) + +批量处理 URL + +```javascript +import { batchProcessUrls } from '@/utils' + +// 构建完整 URL +const fullUrls = batchProcessUrls('/img1.jpg,/img2.jpg', 'build') +// => ['https://example.com/img1.jpg', 'https://example.com/img2.jpg'] + +// 提取相对路径 +const relativePaths = batchProcessUrls(['https://ex.com/a.jpg', 'https://ex.com/b.jpg'], 'extract') +// => ['a.jpg', 'b.jpg'] +``` + +## 组件使用 + +### PosterUpload 组件 + +```vue + + + +``` + +**Props**: +- `value` (String): 图片 URL +- `autoHandleBaseUrl` (Boolean): 是否自动处理 URL,默认 true +- `urlMode` (String): URL 处理模式,'auto' | 'relative' | 'absolute' +- `width` (Number): 宽度,默认 320 +- `height` (Number): 高度,默认 150 + +### Avatar 组件 + +```vue + +``` + +**Props**: +- `value` (String): 头像 URL +- `autoHandleBaseUrl` (Boolean): 是否自动处理 URL,默认 true +- `urlMode` (String): URL 处理模式 + +## 配置说明 + +### 环境变量 + +| 变量名 | 说明 | 示例 | +|---------|------|------| +| `VITE_BASE_URL` | 应用基础路径 | `/` 或 `/admin/` | +| `VITE_API_URL` | API 地址 | `/` 或 `/adminapi` 或 `https://api.example.com` | +| `VITE_API_PROXY_URL` | 代理目标地址 | `http://127.0.0.1:8001` | + +### 系统配置 + +通过 `useSystemConfigStore()` 配置: + +```javascript +{ + // 存储类型 + storage_type: 'local' | 'aliyun_oss' | 'tencent_cos' | 'qiniu' | 'aws_s3', + + // URL 处理模式 + url_mode: 'auto' | 'relative' | 'absolute', + + // CDN 域名 + cdn_url: 'https://cdn.example.com', + + // CDN URL 参数(如 OSS 签名) + cdn_params: 'token=xxx&version=v1', + + // 静态资源域名(与 API 分离) + static_domain: 'https://static.example.com', + + // 是否启用静态资源 CDN + enable_static_cdn: true +} +``` + +## 最佳实践 + +### 1. 本地开发 +```javascript +// .env.development +VITE_API_URL = /adminapi +VITE_API_PROXY_URL = http://127.0.0.1:8001 +``` + +### 2. 测试环境(同域) +```javascript +// .env.test +VITE_API_URL = / +``` + +### 3. 生产环境(前后端分离) +```javascript +// .env.production +VITE_API_URL = https://api.example.com +``` + +### 4. 生产环境(CDN) +```javascript +// 系统配置 +{ + storage_type: 'aliyun_oss', + url_mode: 'absolute', + cdn_url: 'https://cdn.example.com', + enable_static_cdn: true +} +``` + +## 工具函数 + +### isSameOrigin() +判断是否为同域部署 + +```javascript +import { isSameOrigin } from '@/utils' + +if (isSameOrigin()) { + // 同域,使用相对路径 +} +``` + +### isUsingCdn() +判断是否使用 CDN + +```javascript +import { isUsingCdn } from '@/utils' + +if (isUsingCdn()) { + // 使用 CDN +} +``` + +### isOssStorage() +判断是否为 OSS 存储 + +```javascript +import { isOssStorage } from '@/utils' + +if (isOssStorage()) { + // OSS 存储,可能需要特殊处理 +} +``` + +## 迁移指南 + +### 从旧版本迁移 + +旧版本使用 `fullUrl` 和 `stripBaseUrl`: + +```javascript +// 旧版本 +import { fullUrl, stripBaseUrl } from '@/utils' + +// 显示 +const displayUrl = fullUrl(imageUrl) + +// 存储 +const storageUrl = stripBaseUrl(imageUrl) +``` + +新版本使用资源处理机制: + +```javascript +// 新版本 +import { buildResourceUrl, extractRelativePath } from '@/utils' + +// 显示 +const displayUrl = buildResourceUrl(imageUrl) + +// 存储 +const storageUrl = extractRelativePath(imageUrl) +``` + +## 常见问题 + +### Q: 为什么显示的图片多了 `/adminapi` 前缀? + +A: 检查 `VITE_API_URL` 配置。静态资源不应该使用 API 前缀。 + +解决方法: +- 方法 1:配置 `static_domain` +- 方法 2:使用 `extractRelativePath` 提取相对路径 + +### Q: OSS 图片无法显示? + +A: 检查系统配置: +- `storage_type` 是否正确 +- `cdn_url` 是否配置 +- `url_mode` 是否为 `absolute` + +### Q: 代理模式下图片 404? + +A: 检查 `static_domain` 配置,确保静态资源不经过 API 代理。 + +## 技术细节 + +### URL 处理优先级 + +1. 如果是完整 URL(http:// 或 https://),直接返回 +2. 如果是 Data URL(base64),直接返回 +3. 否则根据配置拼接域名 + +### 路径标准化 + +- 自动移除 API 前缀(/adminapi, /webapi, /api, /sys) +- 自动处理 CDN 参数 +- 自动处理斜杠 + +### 性能优化 + +- 使用 `computed` 缓存计算结果 +- 批量处理避免重复计算 +- 条件判断提前返回 + +## 相关文件 + +- `src/utils/resource.ts` - 资源 URL 处理核心逻辑 +- `src/apps/official/views/doc/components/poster-upload.vue` - 海报上传组件 +- `src/components/form/components/avatar.vue` - 头像上传组件 +- `.env*` - 环境配置文件 diff --git a/src/app/api/core/base.ts b/src/api/core/base.ts similarity index 100% rename from src/app/api/core/base.ts rename to src/api/core/base.ts diff --git a/src/app/api/core/dict-api.ts b/src/api/core/dict-api.ts similarity index 100% rename from src/app/api/core/dict-api.ts rename to src/api/core/dict-api.ts diff --git a/src/app/api/core/download.ts b/src/api/core/download.ts similarity index 100% rename from src/app/api/core/download.ts rename to src/api/core/download.ts diff --git a/src/app/api/system/auth/auth-model.d.ts b/src/api/member/auth/auth-model.d.ts similarity index 100% rename from src/app/api/system/auth/auth-model.d.ts rename to src/api/member/auth/auth-model.d.ts diff --git a/src/api/member/auth/auth.ts b/src/api/member/auth/auth.ts new file mode 100644 index 0000000000000000000000000000000000000000..6defae06b7c097b1820aab201414c94bf6cb9911 --- /dev/null +++ b/src/api/member/auth/auth.ts @@ -0,0 +1,46 @@ +import BaseService from '@/api/core/base'; +import request from '@/utils/http'; + +const baseUrl = '/member/auth'; + +export const AuthService = { + ...BaseService({ baseUrl }), + tagMenuIds(params: any) { + return request.get({ url: `${baseUrl}/tag-menu-ids`, params }); + }, + + tagScopeIds(params: any) { + return request.get({ url: `${baseUrl}/tag-scope-ids`, params }); + }, + + userListByTagId(params: any) { + return request.get({ url: `${baseUrl}/user-list-by-tag-id`, params }); + }, + + userListExcludeTagId(params: any) { + return request.get({ url: `${baseUrl}/user-list-exclude-tag-id`, params }); + }, + + removeUserTag(data: any) { + return request.post({ url: `${baseUrl}/remove-user-tag`, data }); + }, + + saveTagMenu(data: any) { + return request.post({ url: `${baseUrl}/save-tag-menu`, data }); + }, + + saveUserTag(data: any) { + return request.post({ url: `${baseUrl}/save-user-tag`, data }); + }, + + getMemberAllPermission() { + return request.get({ url: `${baseUrl}/permissions`, params: {} }); + }, + + getMemberPermissionByTagId(id: number | string, params: any) { + return request.get({ url: `${baseUrl}/${id}/tag-permissions`, params: { format: 'tree' } }); + }, + +}; + +export default AuthService; diff --git a/src/api/member/auth/index.ts b/src/api/member/auth/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..269586ee8b8ae24b9a02f84ee4a663139f079a2d --- /dev/null +++ b/src/api/member/auth/index.ts @@ -0,0 +1 @@ +export * from './auth'; diff --git a/src/app/api/member/index.ts b/src/api/member/index.ts similarity index 100% rename from src/app/api/member/index.ts rename to src/api/member/index.ts diff --git a/src/app/api/member/level/index.ts b/src/api/member/level/index.ts similarity index 94% rename from src/app/api/member/level/index.ts rename to src/api/member/level/index.ts index d263e8cb9c9e5a15298a62d33cd77b0494c7cef9..ad56f69c53514cc159420ab5e4c607bc1da2adc9 100644 --- a/src/app/api/member/level/index.ts +++ b/src/api/member/level/index.ts @@ -1,4 +1,4 @@ -import BaseService from '@/app/api/core/base' +import BaseService from '@/api/core/base' import request from '@/utils/http' import type { MemberLevel } from './level-model' diff --git a/src/app/api/member/level/level-model.d.ts b/src/api/member/level/level-model.d.ts similarity index 100% rename from src/app/api/member/level/level-model.d.ts rename to src/api/member/level/level-model.d.ts diff --git a/src/app/api/member/points/index.ts b/src/api/member/points/index.ts similarity index 95% rename from src/app/api/member/points/index.ts rename to src/api/member/points/index.ts index 78f1b4fa14a6026184cd327182abe787ded4cc12..6eccf1540d0bdff1c79e8785275564bfd34fc5a7 100644 --- a/src/app/api/member/points/index.ts +++ b/src/api/member/points/index.ts @@ -1,4 +1,4 @@ -import BaseService from '@/app/api/core/base' +import BaseService from '@/api/core/base' import request from '@/utils/http' import type { MemberPointsLog } from './points-model' diff --git a/src/app/api/member/points/points-model.d.ts b/src/api/member/points/points-model.d.ts similarity index 100% rename from src/app/api/member/points/points-model.d.ts rename to src/api/member/points/points-model.d.ts diff --git a/src/app/api/member/tag/index.ts b/src/api/member/tag/index.ts similarity index 94% rename from src/app/api/member/tag/index.ts rename to src/api/member/tag/index.ts index 03b5fd80ee5ae1bed4f4999432da9c3b820a84b4..2df68d9d40c00807697d7e3d57bd344ff40226f8 100644 --- a/src/app/api/member/tag/index.ts +++ b/src/api/member/tag/index.ts @@ -1,4 +1,4 @@ -import BaseService from '@/app/api/core/base' +import BaseService from '@/api/core/base' import request from '@/utils/http' import type { MemberTag } from './tag-model' diff --git a/src/app/api/member/tag/tag-model.d.ts b/src/api/member/tag/tag-model.d.ts similarity index 100% rename from src/app/api/member/tag/tag-model.d.ts rename to src/api/member/tag/tag-model.d.ts diff --git a/src/app/api/member/user/index.ts b/src/api/member/user/index.ts similarity index 96% rename from src/app/api/member/user/index.ts rename to src/api/member/user/index.ts index a0b3e6bcc5ca1bc959f9dea8bbd75da91192df5f..2b1d31432f80ac081ec729173a14adbe0cda1923 100644 --- a/src/app/api/member/user/index.ts +++ b/src/api/member/user/index.ts @@ -1,4 +1,4 @@ -import BaseService from '@/app/api/core/base' +import BaseService from '@/api/core/base' import request from '@/utils/http' import type { Member } from './user-model' diff --git a/src/app/api/member/user/user-model.d.ts b/src/api/member/user/user-model.d.ts similarity index 100% rename from src/app/api/member/user/user-model.d.ts rename to src/api/member/user/user-model.d.ts diff --git a/src/app/api/monitor/logs/index.ts b/src/api/monitor/logs/index.ts similarity index 100% rename from src/app/api/monitor/logs/index.ts rename to src/api/monitor/logs/index.ts diff --git a/src/app/api/monitor/logs/logs-model.d.ts b/src/api/monitor/logs/logs-model.d.ts similarity index 100% rename from src/app/api/monitor/logs/logs-model.d.ts rename to src/api/monitor/logs/logs-model.d.ts diff --git a/src/app/api/monitor/logs/logs.ts b/src/api/monitor/logs/logs.ts similarity index 91% rename from src/app/api/monitor/logs/logs.ts rename to src/api/monitor/logs/logs.ts index 9dff8f46ead4607aaa0d77ef7e939557af7f3afc..2235fd79e76620ec8384b021efe832ea2f4e8637 100644 --- a/src/app/api/monitor/logs/logs.ts +++ b/src/api/monitor/logs/logs.ts @@ -1,4 +1,4 @@ -import BaseService from '@/app/api/core/base'; +import BaseService from '@/api/core/base'; import type { LoginRecordRow, OperateRecordRow } from './logs-model'; const loginBaseUrl = '/logs/login'; diff --git a/src/app/api/monitor/redis/index.ts b/src/api/monitor/redis/index.ts similarity index 100% rename from src/app/api/monitor/redis/index.ts rename to src/api/monitor/redis/index.ts diff --git a/src/app/api/monitor/redis/redis-model.d.ts b/src/api/monitor/redis/redis-model.d.ts similarity index 100% rename from src/app/api/monitor/redis/redis-model.d.ts rename to src/api/monitor/redis/redis-model.d.ts diff --git a/src/app/api/monitor/redis/redis.ts b/src/api/monitor/redis/redis.ts similarity index 100% rename from src/app/api/monitor/redis/redis.ts rename to src/api/monitor/redis/redis.ts diff --git a/src/app/api/monitor/server/index.ts b/src/api/monitor/server/index.ts similarity index 100% rename from src/app/api/monitor/server/index.ts rename to src/api/monitor/server/index.ts diff --git a/src/app/api/monitor/server/server-model.d.ts b/src/api/monitor/server/server-model.d.ts similarity index 100% rename from src/app/api/monitor/server/server-model.d.ts rename to src/api/monitor/server/server-model.d.ts diff --git a/src/app/api/monitor/server/server.ts b/src/api/monitor/server/server.ts similarity index 100% rename from src/app/api/monitor/server/server.ts rename to src/api/monitor/server/server.ts diff --git a/src/api/request.ts b/src/api/request.ts new file mode 100644 index 0000000000000000000000000000000000000000..c02ed77b530884eb49ad2f788e34e0b545c93c81 --- /dev/null +++ b/src/api/request.ts @@ -0,0 +1,46 @@ +export * from '@/utils/http'; + + + +export const getApiBaseUrl = (customValue?: string | null): string => { + const getBaseUrl = (value: string): string => { + // 如果是 useCurrentDomain,返回当前域名并添加 /adminapi + if (value === 'useCurrentDomain') { + const currentDomain = window.location.protocol + '//' + window.location.host; + return currentDomain + '/adminapi'; + } + + // 如果是完整 URL,直接返回 + if (/^https?:\/\//i.test(value)) { + return value; + } + + // 如果是相对路径,确保以 / 开头 + const normalizedPath = value.replace(/^\/+/, ''); + + // 如果是当前域名,添加 /adminapi + if (normalizedPath === '') { + return window.location.protocol + '//' + window.location.host + '/adminapi'; + } + + // 如果已经是 /adminapi 开头,直接返回 + if (normalizedPath.startsWith('adminapi')) { + return window.location.protocol + '//' + window.location.host + '/' + normalizedPath; + } + + // 其他相对路径,添加当前域名 + return window.location.protocol + '//' + window.location.host + '/' + normalizedPath; + }; + + if (customValue) { + return getBaseUrl(customValue); + } + + const envValue = import.meta.env.VITE_API_URL; + if (envValue) { + return getBaseUrl(envValue); + } + + // 默认返回当前域名 + /adminapi + return window.location.protocol + '//' + window.location.host + '/adminapi'; +} \ No newline at end of file diff --git a/src/app/api/setting/config/config-model.d.ts b/src/api/setting/config/config-model.d.ts similarity index 100% rename from src/app/api/setting/config/config-model.d.ts rename to src/api/setting/config/config-model.d.ts diff --git a/src/app/api/setting/config/config.ts b/src/api/setting/config/config.ts similarity index 100% rename from src/app/api/setting/config/config.ts rename to src/api/setting/config/config.ts diff --git a/src/app/api/setting/config/index.ts b/src/api/setting/config/index.ts similarity index 100% rename from src/app/api/setting/config/index.ts rename to src/api/setting/config/index.ts diff --git a/src/app/api/setting/dept/dept-model.d.ts b/src/api/setting/dept/dept-model.d.ts similarity index 100% rename from src/app/api/setting/dept/dept-model.d.ts rename to src/api/setting/dept/dept-model.d.ts diff --git a/src/app/api/setting/dept/dept.ts b/src/api/setting/dept/dept.ts similarity index 89% rename from src/app/api/setting/dept/dept.ts rename to src/api/setting/dept/dept.ts index 7a5e1b3a2d8f91b2b92680250220f6cee05f4292..69685db320aa76558f64c89760dfd4e43bca6593 100644 --- a/src/app/api/setting/dept/dept.ts +++ b/src/api/setting/dept/dept.ts @@ -1,4 +1,4 @@ -import BaseService from "@/app/api/core/base"; +import BaseService from "@/api/core/base"; import type { DeptRow, DeptTree } from "./dept-model"; import request from '@/utils/http'; diff --git a/src/app/api/setting/dept/index.ts b/src/api/setting/dept/index.ts similarity index 100% rename from src/app/api/setting/dept/index.ts rename to src/api/setting/dept/index.ts diff --git a/src/app/api/setting/dict/dict-item-model.d.ts b/src/api/setting/dict/dict-item-model.d.ts similarity index 100% rename from src/app/api/setting/dict/dict-item-model.d.ts rename to src/api/setting/dict/dict-item-model.d.ts diff --git a/src/app/api/setting/dict/dict-item.ts b/src/api/setting/dict/dict-item.ts similarity index 81% rename from src/app/api/setting/dict/dict-item.ts rename to src/api/setting/dict/dict-item.ts index ca9f568260d5734768ed5c593bacf521c6dfd4fe..9d4edec7f021b1e8901fd09f3f4443de71df3ec5 100644 --- a/src/app/api/setting/dict/dict-item.ts +++ b/src/api/setting/dict/dict-item.ts @@ -1,4 +1,4 @@ -import BaseService from "@/app/api/core/base"; +import BaseService from "@/api/core/base"; import type { DictItemRow } from "./dict-item-model"; const baseUrl = '/system/dict-item'; diff --git a/src/app/api/setting/dict/dict-model.d.ts b/src/api/setting/dict/dict-model.d.ts similarity index 100% rename from src/app/api/setting/dict/dict-model.d.ts rename to src/api/setting/dict/dict-model.d.ts diff --git a/src/app/api/setting/dict/dict.ts b/src/api/setting/dict/dict.ts similarity index 93% rename from src/app/api/setting/dict/dict.ts rename to src/api/setting/dict/dict.ts index f325c7fc67f76c6183b2fa310394e8dc7ee02143..4ef6e051be57fe905e2bdcb745de3515411c62b6 100644 --- a/src/app/api/setting/dict/dict.ts +++ b/src/api/setting/dict/dict.ts @@ -1,4 +1,4 @@ -import BaseService from "@/app/api/core/base"; +import BaseService from "@/api/core/base"; import type { DictOptions, DictRow } from "./dict-model"; import request from '@/utils/http'; diff --git a/src/app/api/setting/dict/index.ts b/src/api/setting/dict/index.ts similarity index 100% rename from src/app/api/setting/dict/index.ts rename to src/api/setting/dict/index.ts diff --git a/src/app/api/setting/gateway/index.ts b/src/api/setting/gateway/index.ts similarity index 88% rename from src/app/api/setting/gateway/index.ts rename to src/api/setting/gateway/index.ts index 70832f5039e09f4ba91aede01bc4d6e6f2f02b79..e017df1f71d20393c08e9a3bc1f3fb888ad79068 100644 --- a/src/app/api/setting/gateway/index.ts +++ b/src/api/setting/gateway/index.ts @@ -1,5 +1,5 @@ -import BaseService from "@/app/api/core/base"; +import BaseService from "@/api/core/base"; import type { GatewayLimiterRow, GatewayBlacklistRow } from "./model"; diff --git a/src/app/api/setting/gateway/model.d.ts b/src/api/setting/gateway/model.d.ts similarity index 100% rename from src/app/api/setting/gateway/model.d.ts rename to src/api/setting/gateway/model.d.ts diff --git a/src/app/api/setting/message/index.ts b/src/api/setting/message/index.ts similarity index 94% rename from src/app/api/setting/message/index.ts rename to src/api/setting/message/index.ts index ee9b958d1b0dfc6f23aeb6ceebd46587a716ad78..03b475f5c3bd09e01a1eff4f15033d51718dc3b9 100644 --- a/src/app/api/setting/message/index.ts +++ b/src/api/setting/message/index.ts @@ -1,4 +1,4 @@ -import BaseService from '@/app/api/core/base'; +import BaseService from '@/api/core/base'; import type { MessageRow } from "./model"; import request from '@/utils/http'; diff --git a/src/app/api/setting/message/model.d.ts b/src/api/setting/message/model.d.ts similarity index 100% rename from src/app/api/setting/message/model.d.ts rename to src/api/setting/message/model.d.ts diff --git a/src/app/api/setting/notice/index.ts b/src/api/setting/notice/index.ts similarity index 88% rename from src/app/api/setting/notice/index.ts rename to src/api/setting/notice/index.ts index 52d030e579dcf62e818e9e8411bc54fca8fd3c79..c528fc81289f1c479f820235cada77196718ae53 100644 --- a/src/app/api/setting/notice/index.ts +++ b/src/api/setting/notice/index.ts @@ -1,4 +1,4 @@ -import BaseService from "@/app/api/core/base"; +import BaseService from "@/api/core/base"; import type { NoticeRow } from "./model"; import request from '@/utils/http'; diff --git a/src/app/api/setting/notice/model.d.ts b/src/api/setting/notice/model.d.ts similarity index 100% rename from src/app/api/setting/notice/model.d.ts rename to src/api/setting/notice/model.d.ts diff --git a/src/app/api/setting/post/index.ts b/src/api/setting/post/index.ts similarity index 100% rename from src/app/api/setting/post/index.ts rename to src/api/setting/post/index.ts diff --git a/src/app/api/setting/post/post-model.d.ts b/src/api/setting/post/post-model.d.ts similarity index 100% rename from src/app/api/setting/post/post-model.d.ts rename to src/api/setting/post/post-model.d.ts diff --git a/src/app/api/setting/post/post.ts b/src/api/setting/post/post.ts similarity index 79% rename from src/app/api/setting/post/post.ts rename to src/api/setting/post/post.ts index 5252f728fc2f1e4c2603834e4edf73bb9bf22ffe..36e33bfaecf7abec3b453df2c036b1d39ab09666 100644 --- a/src/app/api/setting/post/post.ts +++ b/src/api/setting/post/post.ts @@ -1,4 +1,4 @@ -import BaseService from '@/app/api/core/base'; +import BaseService from '@/api/core/base'; import type { PostRow } from './post-model'; const baseUrl = '/org/post'; diff --git a/src/app/views/tools/plugin/.gitignore b/src/api/system/auth/auth-model.d.ts similarity index 100% rename from src/app/views/tools/plugin/.gitignore rename to src/api/system/auth/auth-model.d.ts diff --git a/src/app/api/system/auth/auth.ts b/src/api/system/auth/auth.ts similarity index 94% rename from src/app/api/system/auth/auth.ts rename to src/api/system/auth/auth.ts index b9e7ec0f8950b5c59399ed5d5a4eea72959ae746..47f5f5b66b4ae3bb258b59b6bf120cb3cfb6f0a9 100644 --- a/src/app/api/system/auth/auth.ts +++ b/src/api/system/auth/auth.ts @@ -1,4 +1,4 @@ -import BaseService from '@/app/api/core/base'; +import BaseService from '@/api/core/base'; import request from '@/utils/http'; const baseUrl = '/system/auth'; @@ -63,7 +63,7 @@ export const AuthService = { }, fetchGetMenuList() { // 获取用户菜单列表-返回前端路由格式 - return request.get({ url: `${baseUrl}/user-menus` ,params: { format: 'art' } }); + return request.get({ url: `${baseUrl}/user-menus`, params: { format: 'art' } }); } }; diff --git a/src/app/api/system/auth/index.ts b/src/api/system/auth/index.ts similarity index 100% rename from src/app/api/system/auth/index.ts rename to src/api/system/auth/index.ts diff --git a/src/app/api/system/index.ts b/src/api/system/index.ts similarity index 100% rename from src/app/api/system/index.ts rename to src/api/system/index.ts diff --git a/src/app/api/system/menu/index.ts b/src/api/system/menu/index.ts similarity index 100% rename from src/app/api/system/menu/index.ts rename to src/api/system/menu/index.ts diff --git a/src/app/api/system/menu/menu-model.d.ts b/src/api/system/menu/menu-model.d.ts similarity index 100% rename from src/app/api/system/menu/menu-model.d.ts rename to src/api/system/menu/menu-model.d.ts diff --git a/src/app/api/system/menu/menu.ts b/src/api/system/menu/menu.ts similarity index 92% rename from src/app/api/system/menu/menu.ts rename to src/api/system/menu/menu.ts index ba472250160d684186d6d584c6191747926a5e8f..180c5eedae61bd8876db344feae218ee19e5a8c4 100644 --- a/src/app/api/system/menu/menu.ts +++ b/src/api/system/menu/menu.ts @@ -1,4 +1,4 @@ -import BaseService from '@/app/api/core/base'; +import BaseService from '@/api/core/base'; import type { MenuRow } from './menu-model'; import request from '@/utils/http'; diff --git a/src/app/api/system/profile/index.ts b/src/api/system/profile/index.ts similarity index 100% rename from src/app/api/system/profile/index.ts rename to src/api/system/profile/index.ts diff --git a/src/app/api/system/profile/model.d.ts b/src/api/system/profile/model.d.ts similarity index 100% rename from src/app/api/system/profile/model.d.ts rename to src/api/system/profile/model.d.ts diff --git a/src/app/api/system/role/index.ts b/src/api/system/role/index.ts similarity index 100% rename from src/app/api/system/role/index.ts rename to src/api/system/role/index.ts diff --git a/src/app/api/system/role/role-model.d.ts b/src/api/system/role/role-model.d.ts similarity index 100% rename from src/app/api/system/role/role-model.d.ts rename to src/api/system/role/role-model.d.ts diff --git a/src/app/api/system/role/role.ts b/src/api/system/role/role.ts similarity index 92% rename from src/app/api/system/role/role.ts rename to src/api/system/role/role.ts index 467adc4ebe336fb7352d01802556132f14e46384..2e70c5344d79bb1f4767d91fb723094c0f73482d 100644 --- a/src/app/api/system/role/role.ts +++ b/src/api/system/role/role.ts @@ -1,4 +1,4 @@ -import BaseService from '@/app/api/core/base' +import BaseService from '@/api/core/base' import request from '@/utils/http' import type { RoleRow } from './role-model' import type { DeptTree } from '../../org/dept/dept-model' diff --git a/src/app/api/system/rule/index.ts b/src/api/system/rule/index.ts similarity index 100% rename from src/app/api/system/rule/index.ts rename to src/api/system/rule/index.ts diff --git a/src/app/api/system/rule/rule-model.d.ts b/src/api/system/rule/rule-model.d.ts similarity index 100% rename from src/app/api/system/rule/rule-model.d.ts rename to src/api/system/rule/rule-model.d.ts diff --git a/src/app/api/system/rule/rule.ts b/src/api/system/rule/rule.ts similarity index 94% rename from src/app/api/system/rule/rule.ts rename to src/api/system/rule/rule.ts index 67a869c0663b0f3994e3637df8e8338e245aa344..187ca24ba714d5302fecc8bb1b106c42cbea4a06 100644 --- a/src/app/api/system/rule/rule.ts +++ b/src/api/system/rule/rule.ts @@ -1,4 +1,4 @@ -import BaseService from '@/app/api/core/base'; +import BaseService from '@/api/core/base'; import request from '@/utils/http'; import type { RouteRow } from './rule-model'; diff --git a/src/app/api/system/user/index.ts b/src/api/system/user/index.ts similarity index 100% rename from src/app/api/system/user/index.ts rename to src/api/system/user/index.ts diff --git a/src/app/api/system/user/user-model.d.ts b/src/api/system/user/user-model.d.ts similarity index 100% rename from src/app/api/system/user/user-model.d.ts rename to src/api/system/user/user-model.d.ts diff --git a/src/app/api/system/user/user.ts b/src/api/system/user/user.ts similarity index 96% rename from src/app/api/system/user/user.ts rename to src/api/system/user/user.ts index e672d208754c86219644e954b3b356e8034f8991..67d1469c0c0a43f516469dae02a3dd98734a94cf 100644 --- a/src/app/api/system/user/user.ts +++ b/src/api/system/user/user.ts @@ -1,4 +1,4 @@ -import BaseService from '@/app/api/core/base'; +import BaseService from '@/api/core/base'; import request from '@/utils/http'; import type { User } from './user-model'; diff --git a/src/app/api/tools/plugin-develop/index.ts b/src/api/tools/apps/develop/index.ts similarity index 63% rename from src/app/api/tools/plugin-develop/index.ts rename to src/api/tools/apps/develop/index.ts index f9a7f9af64540c0ee8d880d268dc0862909d1b2d..b9335eddffe4280c34a2efbed227e0f8c8c978ac 100644 --- a/src/app/api/tools/plugin-develop/index.ts +++ b/src/api/tools/apps/develop/index.ts @@ -1,5 +1,5 @@ -import BaseService from '@/app/api/core/base'; -import type {PluginDevelopRow} from './model'; +import BaseService from '@/api/core/base'; +import type { PluginDevelopRow } from './model'; const baseUrl = '/plugin/develop'; diff --git a/src/app/api/tools/plugin-develop/model.ts b/src/api/tools/apps/develop/model.ts similarity index 100% rename from src/app/api/tools/plugin-develop/model.ts rename to src/api/tools/apps/develop/model.ts diff --git a/src/app/api/tools/generator/index.ts b/src/api/tools/apps/generator/index.ts similarity index 95% rename from src/app/api/tools/generator/index.ts rename to src/api/tools/apps/generator/index.ts index b4391f077957c7f4b6a785e671565241926a91ed..88b7938ff524b6a6e996a6a28fbda44eff6b42fa 100644 --- a/src/app/api/tools/generator/index.ts +++ b/src/api/tools/apps/generator/index.ts @@ -1,5 +1,5 @@ import request from '@/utils/http' -import BaseService from '../../core/base' +import BaseService from '../../../core/base' const baseUrl = '/generator/code' diff --git a/src/app/api/tools/generator/model.d.ts b/src/api/tools/apps/generator/model.d.ts similarity index 100% rename from src/app/api/tools/generator/model.d.ts rename to src/api/tools/apps/generator/model.d.ts diff --git a/src/app/api/tools/features/index.ts b/src/api/tools/apps/module/index.ts similarity index 81% rename from src/app/api/tools/features/index.ts rename to src/api/tools/apps/module/index.ts index b142817a96bac1d4a94568fa7aeec8e77ba1d57e..2a5773bdb1280647ed1a7e351efd377e9487d48b 100644 --- a/src/app/api/tools/features/index.ts +++ b/src/api/tools/apps/module/index.ts @@ -1,4 +1,4 @@ -import BaseService from '@/app/api/core/base' +import BaseService from "@/api/core/base"; import type { FeaturesRow, FeaturesSearchParams, @@ -9,16 +9,16 @@ import type { FeaturesDownloadParams, FeaturesOperationResponse, FeaturesStatistics, - FeaturesUpgradeRecord -} from './model' -import request from '@/utils/http' + FeaturesUpgradeRecord, +} from "./model"; +import request from "@/utils/http"; -const baseUrl = '/plugin' +const baseUrl = "/plugin"; /** * 功能模块API服务 */ -export const FeaturesService = { +export const AppsService = { // ...BaseService({ // baseUrl, // forbiddenMethods: ['export','changStatus','remove','delete'] @@ -31,8 +31,8 @@ export const FeaturesService = { getFeaturesList(params: FeaturesSearchParams): Promise { return request.get({ url: baseUrl, - params - }) + params, + }); }, /** @@ -41,8 +41,8 @@ export const FeaturesService = { */ getFeaturesDetail(name: string | number): Promise { return request.get({ - url: `${baseUrl}/detail/${name}` - }) + url: `${baseUrl}/detail/${name}`, + }); }, /** @@ -52,8 +52,8 @@ export const FeaturesService = { installFeatures(data: FeaturesInstallParams): Promise { return request.post({ url: `${baseUrl}/install`, - data - }) + data, + }); }, /** @@ -63,8 +63,8 @@ export const FeaturesService = { uninstallFeatures(data: FeaturesUninstallParams): Promise { return request.post({ url: `${baseUrl}/uninstall`, - data - }) + data, + }); }, /** @@ -74,8 +74,8 @@ export const FeaturesService = { downloadFeatures(data: FeaturesDownloadParams): Promise { return request.post({ url: `${baseUrl}/${data.features_id}/download`, - data - }) + data, + }); }, /** @@ -84,9 +84,9 @@ export const FeaturesService = { */ getFeaturesUpgradeLogs(name: string | number): Promise { return request.get({ - url: `${baseUrl}/${name}/upgrade-logs` - }) + url: `${baseUrl}/${name}/upgrade-logs`, + }); }, -} +}; -export default FeaturesService \ No newline at end of file +export default AppsService; diff --git a/src/app/api/tools/features/model.d.ts b/src/api/tools/apps/module/model.d.ts similarity index 100% rename from src/app/api/tools/features/model.d.ts rename to src/api/tools/apps/module/model.d.ts diff --git a/src/app/api/tools/crontab/crontab-model.d.ts b/src/api/tools/crontab/crontab-model.d.ts similarity index 100% rename from src/app/api/tools/crontab/crontab-model.d.ts rename to src/api/tools/crontab/crontab-model.d.ts diff --git a/src/app/api/tools/crontab/crontab.ts b/src/api/tools/crontab/crontab.ts similarity index 96% rename from src/app/api/tools/crontab/crontab.ts rename to src/api/tools/crontab/crontab.ts index 5d4c226b5c72067ab25a32c3f4565fb4cfeb0999..ae1386f189db9bb48258c3ad50f73ed0ac0ae02c 100644 --- a/src/app/api/tools/crontab/crontab.ts +++ b/src/api/tools/crontab/crontab.ts @@ -1,4 +1,4 @@ -import BaseService from '@/app/api/core/base' +import BaseService from '@/api/core/base' import type { CrontabLogRow, CrontabRow } from './crontab-model' import request from '@/utils/http' diff --git a/src/app/api/tools/crontab/index.ts b/src/api/tools/crontab/index.ts similarity index 100% rename from src/app/api/tools/crontab/index.ts rename to src/api/tools/crontab/index.ts diff --git a/src/app/api/tools/delegation/index.ts b/src/api/tools/delegation/index.ts similarity index 100% rename from src/app/api/tools/delegation/index.ts rename to src/api/tools/delegation/index.ts diff --git a/src/app/api/tools/delegation/model.d.ts b/src/api/tools/delegation/model.d.ts similarity index 100% rename from src/app/api/tools/delegation/model.d.ts rename to src/api/tools/delegation/model.d.ts diff --git a/src/app/api/tools/files/files-model.d.ts b/src/api/tools/files/files-model.d.ts similarity index 100% rename from src/app/api/tools/files/files-model.d.ts rename to src/api/tools/files/files-model.d.ts diff --git a/src/app/api/tools/files/files.ts b/src/api/tools/files/files.ts similarity index 61% rename from src/app/api/tools/files/files.ts rename to src/api/tools/files/files.ts index 150df0b83d85cad5a9f1bf7ca496fb21a0b17296..b359e9ffdff4b1a4da46e511c0e4db38593c8004 100644 --- a/src/app/api/tools/files/files.ts +++ b/src/api/tools/files/files.ts @@ -1,8 +1,8 @@ -import BaseService from '@/app/api/core/base'; -import request from '@/utils/http'; -import type { FilesRow } from './files-model'; +import BaseService from "@/api/core/base"; +import request from "@/utils/http"; +import type { FilesRow } from "./files-model"; -const baseUrl = '/files'; +const baseUrl = "/files"; export const FilesService = { ...BaseService({ baseUrl }), @@ -14,21 +14,20 @@ export const FilesService = { downloadById(id: string | number) { return request.get({ url: `${baseUrl}/download-by-id/${id}`, - responseType: 'blob', + responseType: "blob", isResponse: true, } as any); }, - /** - * 通过文件id集合获取文件信息 - * @param data - */ + * 通过文件id集合获取文件信息 + * @param data + */ getFileInfoByIds(params: any) { return request.post({ - url: '/sys/fileInfo/getFileInfoByIds', - params - }) + url: "/sys/fileInfo/getFileInfoByIds", + params, + }); }, /** * 初始化切片 @@ -37,9 +36,9 @@ export const FilesService = { initiateMultipartUpload(params: any) { return request.post({ - url: '/sys/fileInfo/initiateMultipartUpload', - params - }) + url: "/sys/fileInfo/initiateMultipartUpload", + params, + }); }, /** @@ -47,7 +46,7 @@ export const FilesService = { * /sys/fileInfo/uploadPart */ uploadPart(data: any) { - return request.upload('/sys/fileInfo/uploadPart', data) + return request.upload("/sys/fileInfo/uploadPart", data); }, /** * 已完成分片上传-告知合并 @@ -55,9 +54,9 @@ export const FilesService = { */ completeMultipartUpload(params: any) { return request.post({ - url: '/sys/fileInfo/completeMultipartUpload', - params - }) + url: "/sys/fileInfo/completeMultipartUpload", + params, + }); }, /** * 取消分片上传 @@ -65,10 +64,10 @@ export const FilesService = { */ abortMultipartUpload(params: any) { return request.post({ - url: '/sys/fileInfo/abortMultipartUpload', - params - }) - } + url: "/sys/fileInfo/abortMultipartUpload", + params, + }); + }, }; export default FilesService; diff --git a/src/app/api/tools/files/index.ts b/src/api/tools/files/index.ts similarity index 100% rename from src/app/api/tools/files/index.ts rename to src/api/tools/files/index.ts diff --git a/src/app/api/tools/recycle/index.ts b/src/api/tools/recycle/index.ts similarity index 100% rename from src/app/api/tools/recycle/index.ts rename to src/api/tools/recycle/index.ts diff --git a/src/app/api/tools/recycle/recycle-bin-model.d.ts b/src/api/tools/recycle/recycle-bin-model.d.ts similarity index 100% rename from src/app/api/tools/recycle/recycle-bin-model.d.ts rename to src/api/tools/recycle/recycle-bin-model.d.ts diff --git a/src/app/api/tools/recycle/recycle.ts b/src/api/tools/recycle/recycle.ts similarity index 87% rename from src/app/api/tools/recycle/recycle.ts rename to src/api/tools/recycle/recycle.ts index 674ac133d55fb48c99f3938da7ce90c7fe472d6b..86ba5cf09b5130f7c9abc01fbfaf9be984a723e6 100644 --- a/src/app/api/tools/recycle/recycle.ts +++ b/src/api/tools/recycle/recycle.ts @@ -1,4 +1,4 @@ -import BaseService from '@/app/api/core/base'; +import BaseService from '@/api/core/base'; import request from '@/utils/http'; import type { RecycleBinRow } from './recycle-bin-model'; diff --git a/src/app/api/tools/terminal/index.ts b/src/api/tools/terminal/index.ts similarity index 90% rename from src/app/api/tools/terminal/index.ts rename to src/api/tools/terminal/index.ts index c0b5bdacfc7f3cd962449d1d93a1d27a62c7c348..f71b67816b8552b461a06422d2f5fdc182a5eb86 100644 --- a/src/app/api/tools/terminal/index.ts +++ b/src/api/tools/terminal/index.ts @@ -1,5 +1,5 @@ -import BaseService from '@/app/api/core/base'; -import { getApiBaseUrl } from '@/app/api/request'; +import BaseService from '@/api/core/base'; +import { getApiBaseUrl } from '@/api/request'; import { useUserStore } from '@/store/modules/user'; import request from '@/utils/http'; diff --git a/src/app/api/tools/terminal/model.d.ts b/src/api/tools/terminal/model.d.ts similarity index 100% rename from src/app/api/tools/terminal/model.d.ts rename to src/api/tools/terminal/model.d.ts diff --git a/src/app/api/web/index.ts b/src/api/web/index.ts similarity index 100% rename from src/app/api/web/index.ts rename to src/api/web/index.ts diff --git a/src/app/api/web/link/index.ts b/src/api/web/link/index.ts similarity index 84% rename from src/app/api/web/link/index.ts rename to src/api/web/link/index.ts index 1d8addec2daca8e37781f83c40b4b5171946ce9f..b7204197df42fe1862623c669e65bcbc42a06f1b 100644 --- a/src/app/api/web/link/index.ts +++ b/src/api/web/link/index.ts @@ -1,4 +1,4 @@ -import BaseService from '@/app/api/core/base'; +import BaseService from '@/api/core/base'; import request from '@/utils/http'; import type { Link } from './link-model'; diff --git a/src/app/api/web/link/link-model.d.ts b/src/api/web/link/link-model.d.ts similarity index 100% rename from src/app/api/web/link/link-model.d.ts rename to src/api/web/link/link-model.d.ts diff --git a/src/app/api/web/menu/index.ts b/src/api/web/menu/index.ts similarity index 84% rename from src/app/api/web/menu/index.ts rename to src/api/web/menu/index.ts index 1779744979aa1b10e7bf5b544e6d1480c08e0398..a404b01cb6b0b57d9b08aaea85d6703b416b812a 100644 --- a/src/app/api/web/menu/index.ts +++ b/src/api/web/menu/index.ts @@ -1,4 +1,4 @@ -import BaseService from '@/app/api/core/base'; +import BaseService from '@/api/core/base'; import request from '@/utils/http'; import type { Menu } from './menu-model'; diff --git a/src/app/api/web/menu/menu-model.d.ts b/src/api/web/menu/menu-model.d.ts similarity index 100% rename from src/app/api/web/menu/menu-model.d.ts rename to src/api/web/menu/menu-model.d.ts diff --git a/src/app/api/request.ts b/src/app/api/request.ts deleted file mode 100644 index b7a96e258b3620781cf39bc26cfd3919f719cb67..0000000000000000000000000000000000000000 --- a/src/app/api/request.ts +++ /dev/null @@ -1,19 +0,0 @@ -export * from '@/utils/http'; - - - -export const getApiBaseUrl = (customValue?: string | null): string => { - if (customValue) { - return customValue === 'useCurrentDomain' - ? window.location.protocol + '//' + window.location.host - : customValue; - } - - const envValue = import.meta.env.VITE_API_URL; - if (envValue) { - return envValue === 'useCurrentDomain' - ? window.location.protocol + '//' + window.location.host - : envValue; - } - return window.location.protocol + '//' + window.location.host; -} \ No newline at end of file diff --git a/src/app/api/tools/module/index.ts b/src/app/api/tools/module/index.ts deleted file mode 100644 index 460f123eaed9e1be5f35659b1fb1b816c1c47431..0000000000000000000000000000000000000000 --- a/src/app/api/tools/module/index.ts +++ /dev/null @@ -1,43 +0,0 @@ -import BaseService from "@/app/api/core/base"; -import type { ModuleRow } from "./model"; -import request from '@/utils/http'; - -const baseUrl = '/modules'; - -export const ModulesService = { - - async list(params?: Record): Promise { - return request.get({ - url: baseUrl, - params, - }) - }, - - async get(name: string | number): Promise { - return request.get({ - url: `${baseUrl}/${name}`, - }) - }, - - async upload(file: File): Promise { - return request.post({ - url: `${baseUrl}/upload`, - data: file, - }) - }, - - async install(data: any): Promise { - return request.post({ - url: `${baseUrl}/install`, - data, - }) - }, - async uninstall(name: string | number): Promise { - return request.del({ - url: `${baseUrl}/${name}/uninstall`, - }) - }, -}; - -export type * from './model'; -export default ModulesService; diff --git a/src/app/api/tools/module/model.d.ts b/src/app/api/tools/module/model.d.ts deleted file mode 100644 index 9f987da7f95592214ec22bd758564a1ac49657bb..0000000000000000000000000000000000000000 --- a/src/app/api/tools/module/model.d.ts +++ /dev/null @@ -1,15 +0,0 @@ - -export interface ModuleRow { - name: string; - title: string; - version: string; - description: string; - author: string; - created_at: string; - updated_at: string; - is_installed: boolean; - installed_version: string; - enable: boolean; - logo: string; - tags?: any; -} \ No newline at end of file diff --git a/src/app/views/member/tag/index.vue b/src/app/views/member/tag/index.vue deleted file mode 100644 index 7616543fe323710afb0a228d40eff4d9358e847f..0000000000000000000000000000000000000000 --- a/src/app/views/member/tag/index.vue +++ /dev/null @@ -1,14 +0,0 @@ - - - \ No newline at end of file diff --git a/src/app/views/tools/generator/index.vue b/src/app/views/tools/generator/index.vue deleted file mode 100644 index 42774713dd4a94d6a6c9c470c9d9b434e5fe3e8a..0000000000000000000000000000000000000000 --- a/src/app/views/tools/generator/index.vue +++ /dev/null @@ -1,113 +0,0 @@ - - - diff --git a/src/features/.gitignore b/src/apps/.gitignore similarity index 100% rename from src/features/.gitignore rename to src/apps/.gitignore diff --git a/src/features/demo/api/auth.ts b/src/apps/demo/api/auth.ts similarity index 82% rename from src/features/demo/api/auth.ts rename to src/apps/demo/api/auth.ts index 9dc7b6a2b6bead468731f8eee7366fe11b35d1f5..a9f45df22b22d18fe4e0d2266c80790a2cc6050a 100644 --- a/src/features/demo/api/auth.ts +++ b/src/apps/demo/api/auth.ts @@ -1,4 +1,4 @@ -import request from '@/utils/http' +import request from "@/utils/http"; /** * 登录 @@ -7,11 +7,11 @@ import request from '@/utils/http' */ export function fetchLogin(params: Api.Auth.LoginParams) { return request.post({ - url: '/api/auth/login', - params + url: "/api/auth/login", + params, // showSuccessMessage: true // 显示成功消息 // showErrorMessage: false // 不显示错误消息 - }) + }); } /** @@ -20,10 +20,10 @@ export function fetchLogin(params: Api.Auth.LoginParams) { */ export function fetchGetUserInfo() { return request.get({ - url: '/api/user/info' + url: "/api/user/info", // 自定义请求头 // headers: { // 'X-Custom-Header': 'your-custom-value' // } - }) + }); } diff --git a/src/features/demo/api/dictApi.ts b/src/apps/demo/api/dictApi.ts similarity index 100% rename from src/features/demo/api/dictApi.ts rename to src/apps/demo/api/dictApi.ts diff --git a/src/features/demo/api/hello_world.ts b/src/apps/demo/api/hello_world.ts similarity index 74% rename from src/features/demo/api/hello_world.ts rename to src/apps/demo/api/hello_world.ts index c7d2d5b4ec72e9cb5bcda7d92fe67bdf8d3369fd..64fea2392d568382ad4aea4ed444993dd8caa977 100644 --- a/src/features/demo/api/hello_world.ts +++ b/src/apps/demo/api/hello_world.ts @@ -1,4 +1,4 @@ -import BaseService from '@/app/api/core/base'; +import BaseService from '@/api/core/base'; diff --git a/src/features/demo/api/system-manage.ts b/src/apps/demo/api/system-manage.ts similarity index 100% rename from src/features/demo/api/system-manage.ts rename to src/apps/demo/api/system-manage.ts diff --git a/src/app/assets/images/3d/icon1.webp b/src/apps/demo/assets/images/3d/icon1.webp similarity index 100% rename from src/app/assets/images/3d/icon1.webp rename to src/apps/demo/assets/images/3d/icon1.webp diff --git a/src/app/assets/images/3d/icon2.webp b/src/apps/demo/assets/images/3d/icon2.webp similarity index 100% rename from src/app/assets/images/3d/icon2.webp rename to src/apps/demo/assets/images/3d/icon2.webp diff --git a/src/app/assets/images/3d/icon3.webp b/src/apps/demo/assets/images/3d/icon3.webp similarity index 100% rename from src/app/assets/images/3d/icon3.webp rename to src/apps/demo/assets/images/3d/icon3.webp diff --git a/src/app/assets/images/3d/icon4.webp b/src/apps/demo/assets/images/3d/icon4.webp similarity index 100% rename from src/app/assets/images/3d/icon4.webp rename to src/apps/demo/assets/images/3d/icon4.webp diff --git a/src/app/assets/images/3d/icon5.webp b/src/apps/demo/assets/images/3d/icon5.webp similarity index 100% rename from src/app/assets/images/3d/icon5.webp rename to src/apps/demo/assets/images/3d/icon5.webp diff --git a/src/app/assets/images/3d/icon6.webp b/src/apps/demo/assets/images/3d/icon6.webp similarity index 100% rename from src/app/assets/images/3d/icon6.webp rename to src/apps/demo/assets/images/3d/icon6.webp diff --git a/src/app/assets/images/3d/icon7.webp b/src/apps/demo/assets/images/3d/icon7.webp similarity index 100% rename from src/app/assets/images/3d/icon7.webp rename to src/apps/demo/assets/images/3d/icon7.webp diff --git a/src/app/assets/images/3d/icon8.webp b/src/apps/demo/assets/images/3d/icon8.webp similarity index 100% rename from src/app/assets/images/3d/icon8.webp rename to src/apps/demo/assets/images/3d/icon8.webp diff --git a/src/app/assets/images/avatar/avatar.webp b/src/apps/demo/assets/images/avatar/avatar.webp similarity index 100% rename from src/app/assets/images/avatar/avatar.webp rename to src/apps/demo/assets/images/avatar/avatar.webp diff --git a/src/app/assets/images/avatar/avatar1.webp b/src/apps/demo/assets/images/avatar/avatar1.webp similarity index 100% rename from src/app/assets/images/avatar/avatar1.webp rename to src/apps/demo/assets/images/avatar/avatar1.webp diff --git a/src/app/assets/images/avatar/avatar10.webp b/src/apps/demo/assets/images/avatar/avatar10.webp similarity index 100% rename from src/app/assets/images/avatar/avatar10.webp rename to src/apps/demo/assets/images/avatar/avatar10.webp diff --git a/src/app/assets/images/avatar/avatar2.webp b/src/apps/demo/assets/images/avatar/avatar2.webp similarity index 100% rename from src/app/assets/images/avatar/avatar2.webp rename to src/apps/demo/assets/images/avatar/avatar2.webp diff --git a/src/app/assets/images/avatar/avatar3.webp b/src/apps/demo/assets/images/avatar/avatar3.webp similarity index 100% rename from src/app/assets/images/avatar/avatar3.webp rename to src/apps/demo/assets/images/avatar/avatar3.webp diff --git a/src/app/assets/images/avatar/avatar4.webp b/src/apps/demo/assets/images/avatar/avatar4.webp similarity index 100% rename from src/app/assets/images/avatar/avatar4.webp rename to src/apps/demo/assets/images/avatar/avatar4.webp diff --git a/src/app/assets/images/avatar/avatar5.webp b/src/apps/demo/assets/images/avatar/avatar5.webp similarity index 100% rename from src/app/assets/images/avatar/avatar5.webp rename to src/apps/demo/assets/images/avatar/avatar5.webp diff --git a/src/app/assets/images/avatar/avatar6.webp b/src/apps/demo/assets/images/avatar/avatar6.webp similarity index 100% rename from src/app/assets/images/avatar/avatar6.webp rename to src/apps/demo/assets/images/avatar/avatar6.webp diff --git a/src/app/assets/images/avatar/avatar7.webp b/src/apps/demo/assets/images/avatar/avatar7.webp similarity index 100% rename from src/app/assets/images/avatar/avatar7.webp rename to src/apps/demo/assets/images/avatar/avatar7.webp diff --git a/src/app/assets/images/avatar/avatar8.webp b/src/apps/demo/assets/images/avatar/avatar8.webp similarity index 100% rename from src/app/assets/images/avatar/avatar8.webp rename to src/apps/demo/assets/images/avatar/avatar8.webp diff --git a/src/app/assets/images/avatar/avatar9.webp b/src/apps/demo/assets/images/avatar/avatar9.webp similarity index 100% rename from src/app/assets/images/avatar/avatar9.webp rename to src/apps/demo/assets/images/avatar/avatar9.webp diff --git a/src/app/assets/images/ceremony/hb.png b/src/apps/demo/assets/images/ceremony/hb.png similarity index 100% rename from src/app/assets/images/ceremony/hb.png rename to src/apps/demo/assets/images/ceremony/hb.png diff --git a/src/app/assets/images/ceremony/sd.png b/src/apps/demo/assets/images/ceremony/sd.png similarity index 100% rename from src/app/assets/images/ceremony/sd.png rename to src/apps/demo/assets/images/ceremony/sd.png diff --git a/src/app/assets/images/ceremony/xc.png b/src/apps/demo/assets/images/ceremony/xc.png similarity index 100% rename from src/app/assets/images/ceremony/xc.png rename to src/apps/demo/assets/images/ceremony/xc.png diff --git a/src/app/assets/images/ceremony/yd.png b/src/apps/demo/assets/images/ceremony/yd.png similarity index 100% rename from src/app/assets/images/ceremony/yd.png rename to src/apps/demo/assets/images/ceremony/yd.png diff --git a/src/app/assets/images/common/logo.webp b/src/apps/demo/assets/images/common/logo.webp similarity index 100% rename from src/app/assets/images/common/logo.webp rename to src/apps/demo/assets/images/common/logo.webp diff --git a/src/app/assets/images/cover/img1.webp b/src/apps/demo/assets/images/cover/img1.webp similarity index 100% rename from src/app/assets/images/cover/img1.webp rename to src/apps/demo/assets/images/cover/img1.webp diff --git a/src/app/assets/images/cover/img10.webp b/src/apps/demo/assets/images/cover/img10.webp similarity index 100% rename from src/app/assets/images/cover/img10.webp rename to src/apps/demo/assets/images/cover/img10.webp diff --git a/src/app/assets/images/cover/img2.webp b/src/apps/demo/assets/images/cover/img2.webp similarity index 100% rename from src/app/assets/images/cover/img2.webp rename to src/apps/demo/assets/images/cover/img2.webp diff --git a/src/app/assets/images/cover/img3.webp b/src/apps/demo/assets/images/cover/img3.webp similarity index 100% rename from src/app/assets/images/cover/img3.webp rename to src/apps/demo/assets/images/cover/img3.webp diff --git a/src/app/assets/images/cover/img4.webp b/src/apps/demo/assets/images/cover/img4.webp similarity index 100% rename from src/app/assets/images/cover/img4.webp rename to src/apps/demo/assets/images/cover/img4.webp diff --git a/src/app/assets/images/cover/img5.webp b/src/apps/demo/assets/images/cover/img5.webp similarity index 100% rename from src/app/assets/images/cover/img5.webp rename to src/apps/demo/assets/images/cover/img5.webp diff --git a/src/app/assets/images/cover/img6.webp b/src/apps/demo/assets/images/cover/img6.webp similarity index 100% rename from src/app/assets/images/cover/img6.webp rename to src/apps/demo/assets/images/cover/img6.webp diff --git a/src/app/assets/images/cover/img7.webp b/src/apps/demo/assets/images/cover/img7.webp similarity index 100% rename from src/app/assets/images/cover/img7.webp rename to src/apps/demo/assets/images/cover/img7.webp diff --git a/src/app/assets/images/cover/img8.webp b/src/apps/demo/assets/images/cover/img8.webp similarity index 100% rename from src/app/assets/images/cover/img8.webp rename to src/apps/demo/assets/images/cover/img8.webp diff --git a/src/app/assets/images/cover/img9.webp b/src/apps/demo/assets/images/cover/img9.webp similarity index 100% rename from src/app/assets/images/cover/img9.webp rename to src/apps/demo/assets/images/cover/img9.webp diff --git a/src/app/assets/images/draw/draw1.png b/src/apps/demo/assets/images/draw/draw1.png similarity index 100% rename from src/app/assets/images/draw/draw1.png rename to src/apps/demo/assets/images/draw/draw1.png diff --git a/src/app/assets/images/favicon.ico b/src/apps/demo/assets/images/favicon.ico similarity index 100% rename from src/app/assets/images/favicon.ico rename to src/apps/demo/assets/images/favicon.ico diff --git a/src/app/assets/images/lock/bg_dark.webp b/src/apps/demo/assets/images/lock/bg_dark.webp similarity index 100% rename from src/app/assets/images/lock/bg_dark.webp rename to src/apps/demo/assets/images/lock/bg_dark.webp diff --git a/src/app/assets/images/lock/bg_light.webp b/src/apps/demo/assets/images/lock/bg_light.webp similarity index 100% rename from src/app/assets/images/lock/bg_light.webp rename to src/apps/demo/assets/images/lock/bg_light.webp diff --git a/src/app/assets/images/login/lf_icon2.webp b/src/apps/demo/assets/images/login/lf_icon2.webp similarity index 100% rename from src/app/assets/images/login/lf_icon2.webp rename to src/apps/demo/assets/images/login/lf_icon2.webp diff --git a/src/app/assets/images/safeguard/server.png b/src/apps/demo/assets/images/safeguard/server.png similarity index 100% rename from src/app/assets/images/safeguard/server.png rename to src/apps/demo/assets/images/safeguard/server.png diff --git a/src/app/assets/images/settings/menu_layouts/dual_column.png b/src/apps/demo/assets/images/settings/menu_layouts/dual_column.png similarity index 100% rename from src/app/assets/images/settings/menu_layouts/dual_column.png rename to src/apps/demo/assets/images/settings/menu_layouts/dual_column.png diff --git a/src/app/assets/images/settings/menu_layouts/horizontal.png b/src/apps/demo/assets/images/settings/menu_layouts/horizontal.png similarity index 100% rename from src/app/assets/images/settings/menu_layouts/horizontal.png rename to src/apps/demo/assets/images/settings/menu_layouts/horizontal.png diff --git a/src/app/assets/images/settings/menu_layouts/mixed.png b/src/apps/demo/assets/images/settings/menu_layouts/mixed.png similarity index 100% rename from src/app/assets/images/settings/menu_layouts/mixed.png rename to src/apps/demo/assets/images/settings/menu_layouts/mixed.png diff --git a/src/app/assets/images/settings/menu_layouts/vertical.png b/src/apps/demo/assets/images/settings/menu_layouts/vertical.png similarity index 100% rename from src/app/assets/images/settings/menu_layouts/vertical.png rename to src/apps/demo/assets/images/settings/menu_layouts/vertical.png diff --git a/src/app/assets/images/settings/menu_styles/dark.png b/src/apps/demo/assets/images/settings/menu_styles/dark.png similarity index 100% rename from src/app/assets/images/settings/menu_styles/dark.png rename to src/apps/demo/assets/images/settings/menu_styles/dark.png diff --git a/src/app/assets/images/settings/menu_styles/design.png b/src/apps/demo/assets/images/settings/menu_styles/design.png similarity index 100% rename from src/app/assets/images/settings/menu_styles/design.png rename to src/apps/demo/assets/images/settings/menu_styles/design.png diff --git a/src/app/assets/images/settings/menu_styles/light.png b/src/apps/demo/assets/images/settings/menu_styles/light.png similarity index 100% rename from src/app/assets/images/settings/menu_styles/light.png rename to src/apps/demo/assets/images/settings/menu_styles/light.png diff --git a/src/app/assets/images/settings/theme_styles/dark.png b/src/apps/demo/assets/images/settings/theme_styles/dark.png similarity index 100% rename from src/app/assets/images/settings/theme_styles/dark.png rename to src/apps/demo/assets/images/settings/theme_styles/dark.png diff --git a/src/app/assets/images/settings/theme_styles/light.png b/src/apps/demo/assets/images/settings/theme_styles/light.png similarity index 100% rename from src/app/assets/images/settings/theme_styles/light.png rename to src/apps/demo/assets/images/settings/theme_styles/light.png diff --git a/src/app/assets/images/settings/theme_styles/system.png b/src/apps/demo/assets/images/settings/theme_styles/system.png similarity index 100% rename from src/app/assets/images/settings/theme_styles/system.png rename to src/apps/demo/assets/images/settings/theme_styles/system.png diff --git a/src/app/assets/images/svg/403.svg b/src/apps/demo/assets/images/svg/403.svg similarity index 100% rename from src/app/assets/images/svg/403.svg rename to src/apps/demo/assets/images/svg/403.svg diff --git a/src/app/assets/images/svg/404.svg b/src/apps/demo/assets/images/svg/404.svg similarity index 100% rename from src/app/assets/images/svg/404.svg rename to src/apps/demo/assets/images/svg/404.svg diff --git a/src/app/assets/images/svg/500.svg b/src/apps/demo/assets/images/svg/500.svg similarity index 100% rename from src/app/assets/images/svg/500.svg rename to src/apps/demo/assets/images/svg/500.svg diff --git a/src/app/assets/images/svg/login_icon.svg b/src/apps/demo/assets/images/svg/login_icon.svg similarity index 100% rename from src/app/assets/images/svg/login_icon.svg rename to src/apps/demo/assets/images/svg/login_icon.svg diff --git a/src/app/assets/images/user/avatar.webp b/src/apps/demo/assets/images/user/avatar.webp similarity index 100% rename from src/app/assets/images/user/avatar.webp rename to src/apps/demo/assets/images/user/avatar.webp diff --git a/src/app/assets/images/user/bg.webp b/src/apps/demo/assets/images/user/bg.webp similarity index 100% rename from src/app/assets/images/user/bg.webp rename to src/apps/demo/assets/images/user/bg.webp diff --git a/src/features/demo/assets/styles/core/app.scss b/src/apps/demo/assets/styles/core/app.scss similarity index 100% rename from src/features/demo/assets/styles/core/app.scss rename to src/apps/demo/assets/styles/core/app.scss diff --git a/src/features/demo/assets/styles/core/dark.scss b/src/apps/demo/assets/styles/core/dark.scss similarity index 100% rename from src/features/demo/assets/styles/core/dark.scss rename to src/apps/demo/assets/styles/core/dark.scss diff --git a/src/features/demo/assets/styles/core/el-dark.scss b/src/apps/demo/assets/styles/core/el-dark.scss similarity index 100% rename from src/features/demo/assets/styles/core/el-dark.scss rename to src/apps/demo/assets/styles/core/el-dark.scss diff --git a/src/features/demo/assets/styles/core/el-light.scss b/src/apps/demo/assets/styles/core/el-light.scss similarity index 100% rename from src/features/demo/assets/styles/core/el-light.scss rename to src/apps/demo/assets/styles/core/el-light.scss diff --git a/src/features/demo/assets/styles/core/el-ui.scss b/src/apps/demo/assets/styles/core/el-ui.scss similarity index 100% rename from src/features/demo/assets/styles/core/el-ui.scss rename to src/apps/demo/assets/styles/core/el-ui.scss diff --git a/src/features/demo/assets/styles/core/md.scss b/src/apps/demo/assets/styles/core/md.scss similarity index 100% rename from src/features/demo/assets/styles/core/md.scss rename to src/apps/demo/assets/styles/core/md.scss diff --git a/src/features/demo/assets/styles/core/mixin.scss b/src/apps/demo/assets/styles/core/mixin.scss similarity index 100% rename from src/features/demo/assets/styles/core/mixin.scss rename to src/apps/demo/assets/styles/core/mixin.scss diff --git a/src/features/demo/assets/styles/core/reset.scss b/src/apps/demo/assets/styles/core/reset.scss similarity index 100% rename from src/features/demo/assets/styles/core/reset.scss rename to src/apps/demo/assets/styles/core/reset.scss diff --git a/src/features/demo/assets/styles/core/router-transition.scss b/src/apps/demo/assets/styles/core/router-transition.scss similarity index 100% rename from src/features/demo/assets/styles/core/router-transition.scss rename to src/apps/demo/assets/styles/core/router-transition.scss diff --git a/src/features/demo/assets/styles/core/tailwind.css b/src/apps/demo/assets/styles/core/tailwind.css similarity index 100% rename from src/features/demo/assets/styles/core/tailwind.css rename to src/apps/demo/assets/styles/core/tailwind.css diff --git a/src/features/demo/assets/styles/core/theme-animation.scss b/src/apps/demo/assets/styles/core/theme-animation.scss similarity index 100% rename from src/features/demo/assets/styles/core/theme-animation.scss rename to src/apps/demo/assets/styles/core/theme-animation.scss diff --git a/src/features/demo/assets/styles/core/theme-change.scss b/src/apps/demo/assets/styles/core/theme-change.scss similarity index 100% rename from src/features/demo/assets/styles/core/theme-change.scss rename to src/apps/demo/assets/styles/core/theme-change.scss diff --git a/src/features/demo/assets/styles/custom/one-dark-pro.scss b/src/apps/demo/assets/styles/custom/one-dark-pro.scss similarity index 100% rename from src/features/demo/assets/styles/custom/one-dark-pro.scss rename to src/apps/demo/assets/styles/custom/one-dark-pro.scss diff --git a/src/features/demo/assets/styles/index.scss b/src/apps/demo/assets/styles/index.scss similarity index 100% rename from src/features/demo/assets/styles/index.scss rename to src/apps/demo/assets/styles/index.scss diff --git a/src/app/assets/svg/loading.ts b/src/apps/demo/assets/svg/loading.ts similarity index 100% rename from src/app/assets/svg/loading.ts rename to src/apps/demo/assets/svg/loading.ts diff --git a/src/features/demo/lang/en/demo.json b/src/apps/demo/lang/en/demo.json similarity index 100% rename from src/features/demo/lang/en/demo.json rename to src/apps/demo/lang/en/demo.json diff --git a/src/features/demo/lang/zh-cn/demo.json b/src/apps/demo/lang/zh-cn/demo.json similarity index 100% rename from src/features/demo/lang/zh-cn/demo.json rename to src/apps/demo/lang/zh-cn/demo.json diff --git a/src/features/demo/mock/json/chinaMap.json b/src/apps/demo/mock/json/chinaMap.json similarity index 100% rename from src/features/demo/mock/json/chinaMap.json rename to src/apps/demo/mock/json/chinaMap.json diff --git a/src/features/demo/mock/temp/articleList.ts b/src/apps/demo/mock/temp/articleList.ts similarity index 93% rename from src/features/demo/mock/temp/articleList.ts rename to src/apps/demo/mock/temp/articleList.ts index 4d0bcf9fd97585ffd014c33868ce3b1f93571de4..1426181ecb04f7142c82525d1de519fd8531f818 100644 --- a/src/features/demo/mock/temp/articleList.ts +++ b/src/apps/demo/mock/temp/articleList.ts @@ -1,13 +1,13 @@ -import cover1 from '@features/demo/assets/images/cover/img1.webp' -import cover2 from '@features/demo/assets/images/cover/img2.webp' -import cover3 from '@features/demo/assets/images/cover/img3.webp' -import cover4 from '@features/demo/assets/images/cover/img4.webp' -import cover5 from '@features/demo/assets/images/cover/img5.webp' -import cover6 from '@features/demo/assets/images/cover/img6.webp' -import cover7 from '@features/demo/assets/images/cover/img7.webp' -import cover8 from '@features/demo/assets/images/cover/img8.webp' -import cover9 from '@features/demo/assets/images/cover/img9.webp' -import cover10 from '@features/demo/assets/images/cover/img10.webp' +import cover1 from '@/apps/demo/assets/images/cover/img1.webp' +import cover2 from '@/apps/demo/assets/images/cover/img2.webp' +import cover3 from '@/apps/demo/assets/images/cover/img3.webp' +import cover4 from '@/apps/demo/assets/images/cover/img4.webp' +import cover5 from '@/apps/demo/assets/images/cover/img5.webp' +import cover6 from '@/apps/demo/assets/images/cover/img6.webp' +import cover7 from '@/apps/demo/assets/images/cover/img7.webp' +import cover8 from '@/apps/demo/assets/images/cover/img8.webp' +import cover9 from '@/apps/demo/assets/images/cover/img9.webp' +import cover10 from '@/apps/demo/assets/images/cover/img10.webp' export const ArticleList = [ { diff --git a/src/features/demo/mock/temp/commentDetail.ts b/src/apps/demo/mock/temp/commentDetail.ts similarity index 100% rename from src/features/demo/mock/temp/commentDetail.ts rename to src/apps/demo/mock/temp/commentDetail.ts diff --git a/src/features/demo/mock/temp/commentList.ts b/src/apps/demo/mock/temp/commentList.ts similarity index 100% rename from src/features/demo/mock/temp/commentList.ts rename to src/apps/demo/mock/temp/commentList.ts diff --git a/src/features/demo/mock/temp/formData.ts b/src/apps/demo/mock/temp/formData.ts similarity index 88% rename from src/features/demo/mock/temp/formData.ts rename to src/apps/demo/mock/temp/formData.ts index 421b8ee07fe9ef1571047bbe49278998d9a122df..52547d51a0f61351573250e9db4ad9bbf042c08a 100644 --- a/src/features/demo/mock/temp/formData.ts +++ b/src/apps/demo/mock/temp/formData.ts @@ -1,13 +1,13 @@ -import avatar1 from '@features/demo/assets/images/avatar/avatar1.webp' -import avatar2 from '@features/demo/assets/images/avatar/avatar2.webp' -import avatar3 from '@features/demo/assets/images/avatar/avatar3.webp' -import avatar4 from '@features/demo/assets/images/avatar/avatar4.webp' -import avatar5 from '@features/demo/assets/images/avatar/avatar5.webp' -import avatar6 from '@features/demo/assets/images/avatar/avatar6.webp' -import avatar7 from '@features/demo/assets/images/avatar/avatar7.webp' -import avatar8 from '@features/demo/assets/images/avatar/avatar8.webp' -import avatar9 from '@features/demo/assets/images/avatar/avatar9.webp' -import avatar10 from '@features/demo/assets/images/avatar/avatar10.webp' +import avatar1 from '@/apps/demo/assets/images/avatar/avatar1.webp' +import avatar2 from '@/apps/demo/assets/images/avatar/avatar2.webp' +import avatar3 from '@/apps/demo/assets/images/avatar/avatar3.webp' +import avatar4 from '@/apps/demo/assets/images/avatar/avatar4.webp' +import avatar5 from '@/apps/demo/assets/images/avatar/avatar5.webp' +import avatar6 from '@/apps/demo/assets/images/avatar/avatar6.webp' +import avatar7 from '@/apps/demo/assets/images/avatar/avatar7.webp' +import avatar8 from '@/apps/demo/assets/images/avatar/avatar8.webp' +import avatar9 from '@/apps/demo/assets/images/avatar/avatar9.webp' +import avatar10 from '@/apps/demo/assets/images/avatar/avatar10.webp' export interface User { id: number diff --git a/src/features/demo/mock/upgrade/changeLog.ts b/src/apps/demo/mock/upgrade/changeLog.ts similarity index 100% rename from src/features/demo/mock/upgrade/changeLog.ts rename to src/apps/demo/mock/upgrade/changeLog.ts diff --git a/src/features/demo/routes/article.ts b/src/apps/demo/routes/article.ts similarity index 100% rename from src/features/demo/routes/article.ts rename to src/apps/demo/routes/article.ts diff --git a/src/features/demo/routes/dashboard.ts b/src/apps/demo/routes/dashboard.ts similarity index 100% rename from src/features/demo/routes/dashboard.ts rename to src/apps/demo/routes/dashboard.ts diff --git a/src/features/demo/routes/examples.ts b/src/apps/demo/routes/examples.ts similarity index 100% rename from src/features/demo/routes/examples.ts rename to src/apps/demo/routes/examples.ts diff --git a/src/features/demo/routes/exception.ts b/src/apps/demo/routes/exception.ts similarity index 100% rename from src/features/demo/routes/exception.ts rename to src/apps/demo/routes/exception.ts diff --git a/src/features/demo/routes/help.ts b/src/apps/demo/routes/help.ts similarity index 100% rename from src/features/demo/routes/help.ts rename to src/apps/demo/routes/help.ts diff --git a/src/features/demo/routes/index.ts b/src/apps/demo/routes/index.ts similarity index 100% rename from src/features/demo/routes/index.ts rename to src/apps/demo/routes/index.ts diff --git a/src/features/demo/routes/result.ts b/src/apps/demo/routes/result.ts similarity index 100% rename from src/features/demo/routes/result.ts rename to src/apps/demo/routes/result.ts diff --git a/src/features/demo/routes/safeguard.ts b/src/apps/demo/routes/safeguard.ts similarity index 100% rename from src/features/demo/routes/safeguard.ts rename to src/apps/demo/routes/safeguard.ts diff --git a/src/features/demo/routes/system.ts b/src/apps/demo/routes/system.ts similarity index 100% rename from src/features/demo/routes/system.ts rename to src/apps/demo/routes/system.ts diff --git a/src/features/demo/routes/template.ts b/src/apps/demo/routes/template.ts similarity index 100% rename from src/features/demo/routes/template.ts rename to src/apps/demo/routes/template.ts diff --git a/src/features/demo/routes/widgets.ts b/src/apps/demo/routes/widgets.ts similarity index 100% rename from src/features/demo/routes/widgets.ts rename to src/apps/demo/routes/widgets.ts diff --git a/src/features/demo/views/article/comment/index.vue b/src/apps/demo/views/article/comment/index.vue similarity index 69% rename from src/features/demo/views/article/comment/index.vue rename to src/apps/demo/views/article/comment/index.vue index 6a3f5da089fd4ae7ec569c36c7e29f21367aa714..44e6ff362f9236452e8dd7b50adaed1934ce2801 100644 --- a/src/features/demo/views/article/comment/index.vue +++ b/src/apps/demo/views/article/comment/index.vue @@ -73,60 +73,68 @@ diff --git a/src/features/demo/views/article/detail/index.vue b/src/apps/demo/views/article/detail/index.vue similarity index 95% rename from src/features/demo/views/article/detail/index.vue rename to src/apps/demo/views/article/detail/index.vue index f49f220a36920402a7a2170706a065f8dff9ef2a..5924d6bfa18fad880fe337b34768b9a5d15e9aaf 100644 --- a/src/features/demo/views/article/detail/index.vue +++ b/src/apps/demo/views/article/detail/index.vue @@ -10,8 +10,8 @@ diff --git a/src/app/views/dashboard/analytics/index.vue b/src/apps/demo/views/dashboard/analysis/index.vue similarity index 100% rename from src/app/views/dashboard/analytics/index.vue rename to src/apps/demo/views/dashboard/analysis/index.vue diff --git a/src/app/views/dashboard/analytics/modules/customer-satisfaction.vue b/src/apps/demo/views/dashboard/analysis/modules/customer-satisfaction.vue similarity index 100% rename from src/app/views/dashboard/analytics/modules/customer-satisfaction.vue rename to src/apps/demo/views/dashboard/analysis/modules/customer-satisfaction.vue diff --git a/src/app/views/dashboard/analytics/modules/sales-mapping-by-country.vue b/src/apps/demo/views/dashboard/analysis/modules/sales-mapping-by-country.vue similarity index 100% rename from src/app/views/dashboard/analytics/modules/sales-mapping-by-country.vue rename to src/apps/demo/views/dashboard/analysis/modules/sales-mapping-by-country.vue diff --git a/src/app/views/dashboard/analytics/modules/target-vs-reality.vue b/src/apps/demo/views/dashboard/analysis/modules/target-vs-reality.vue similarity index 100% rename from src/app/views/dashboard/analytics/modules/target-vs-reality.vue rename to src/apps/demo/views/dashboard/analysis/modules/target-vs-reality.vue diff --git a/src/app/views/dashboard/analytics/modules/today-sales.vue b/src/apps/demo/views/dashboard/analysis/modules/today-sales.vue similarity index 100% rename from src/app/views/dashboard/analytics/modules/today-sales.vue rename to src/apps/demo/views/dashboard/analysis/modules/today-sales.vue diff --git a/src/app/views/dashboard/analytics/modules/top-products.vue b/src/apps/demo/views/dashboard/analysis/modules/top-products.vue similarity index 100% rename from src/app/views/dashboard/analytics/modules/top-products.vue rename to src/apps/demo/views/dashboard/analysis/modules/top-products.vue diff --git a/src/app/views/dashboard/analytics/modules/total-revenue.vue b/src/apps/demo/views/dashboard/analysis/modules/total-revenue.vue similarity index 100% rename from src/app/views/dashboard/analytics/modules/total-revenue.vue rename to src/apps/demo/views/dashboard/analysis/modules/total-revenue.vue diff --git a/src/app/views/dashboard/analytics/modules/visitor-insights.vue b/src/apps/demo/views/dashboard/analysis/modules/visitor-insights.vue similarity index 100% rename from src/app/views/dashboard/analytics/modules/visitor-insights.vue rename to src/apps/demo/views/dashboard/analysis/modules/visitor-insights.vue diff --git a/src/app/views/dashboard/analytics/modules/volume-service-level.vue b/src/apps/demo/views/dashboard/analysis/modules/volume-service-level.vue similarity index 100% rename from src/app/views/dashboard/analytics/modules/volume-service-level.vue rename to src/apps/demo/views/dashboard/analysis/modules/volume-service-level.vue diff --git a/src/app/views/dashboard/workspace/index.vue b/src/apps/demo/views/dashboard/console/index.vue similarity index 100% rename from src/app/views/dashboard/workspace/index.vue rename to src/apps/demo/views/dashboard/console/index.vue diff --git a/src/app/views/dashboard/workspace/modules/about-project.vue b/src/apps/demo/views/dashboard/console/modules/about-project.vue similarity index 100% rename from src/app/views/dashboard/workspace/modules/about-project.vue rename to src/apps/demo/views/dashboard/console/modules/about-project.vue diff --git a/src/app/views/dashboard/workspace/modules/active-user.vue b/src/apps/demo/views/dashboard/console/modules/active-user.vue similarity index 100% rename from src/app/views/dashboard/workspace/modules/active-user.vue rename to src/apps/demo/views/dashboard/console/modules/active-user.vue diff --git a/src/app/views/dashboard/workspace/modules/card-list.vue b/src/apps/demo/views/dashboard/console/modules/card-list.vue similarity index 100% rename from src/app/views/dashboard/workspace/modules/card-list.vue rename to src/apps/demo/views/dashboard/console/modules/card-list.vue diff --git a/src/app/views/dashboard/workspace/modules/dynamic-stats.vue b/src/apps/demo/views/dashboard/console/modules/dynamic-stats.vue similarity index 100% rename from src/app/views/dashboard/workspace/modules/dynamic-stats.vue rename to src/apps/demo/views/dashboard/console/modules/dynamic-stats.vue diff --git a/src/features/demo/views/dashboard/console/modules/new-user.vue b/src/apps/demo/views/dashboard/console/modules/new-user.vue similarity index 91% rename from src/features/demo/views/dashboard/console/modules/new-user.vue rename to src/apps/demo/views/dashboard/console/modules/new-user.vue index 761878c183dc4aa682ea9d24d9240edf4618499f..9d395228f611e4d5930e20a30403624b875dc423 100644 --- a/src/features/demo/views/dashboard/console/modules/new-user.vue +++ b/src/apps/demo/views/dashboard/console/modules/new-user.vue @@ -53,12 +53,12 @@ diff --git a/src/components/core/charts/art-map-chart/index.vue b/src/components/core/charts/art-map-chart/index.vue index 62bd2b8fee68b8459d36199d3900ef00e0432ce1..16e7d6804b5526c642e6689b605dcbfcf10b0163 100644 --- a/src/components/core/charts/art-map-chart/index.vue +++ b/src/components/core/charts/art-map-chart/index.vue @@ -5,287 +5,293 @@ -
+
diff --git a/src/components/core/layouts/art-chat-window/index.vue b/src/components/core/layouts/art-chat-window/index.vue index c9aeab52e8b72c58e8539411c85c25b7e298f99d..15971be34535c657d5a006a112da5d9c76a7d801 100644 --- a/src/components/core/layouts/art-chat-window/index.vue +++ b/src/components/core/layouts/art-chat-window/index.vue @@ -1,7 +1,11 @@ @@ -78,9 +88,14 @@
- +
- 发送 + 发送
@@ -89,174 +104,175 @@ diff --git a/src/components/core/layouts/art-fireworks-effect/index.vue b/src/components/core/layouts/art-fireworks-effect/index.vue index 7c7461d1d67a92c40c28067c7abbce1193ebe827..be852744654f3115bdafd32d97a610c5f67212e8 100644 --- a/src/components/core/layouts/art-fireworks-effect/index.vue +++ b/src/components/core/layouts/art-fireworks-effect/index.vue @@ -10,9 +10,9 @@ import { useEventListener } from '@vueuse/core' import { mittBus } from '@/utils/sys' import type { Handler } from 'mitt' - import bp from '@/app/assets/images/ceremony/hb.png' - import sd from '@/app/assets/images/ceremony/sd.png' - import yd from '@/app/assets/images/ceremony/yd.png' + import bp from '@/assets/images/ceremony/hb.png' + import sd from '@/assets/images/ceremony/sd.png' + import yd from '@/assets/images/ceremony/yd.png' defineOptions({ name: 'ArtFireworksEffect' }) diff --git a/src/components/core/layouts/art-header-bar/index.vue b/src/components/core/layouts/art-header-bar/index.vue index 0d00c601fd20c232f389e9766dc29d95e7551f35..f5d95438b617c77141051b320cc5e79c45bd9231 100755 --- a/src/components/core/layouts/art-header-bar/index.vue +++ b/src/components/core/layouts/art-header-bar/index.vue @@ -21,7 +21,7 @@

- {{ AppConfig.systemInfo.name }} + {{ systemTitle }}

@@ -206,9 +206,10 @@ import { useI18n } from "vue-i18n"; import { useRouter } from "vue-router"; import { useFullscreen, useWindowSize } from "@vueuse/core"; -import { LanguageEnum, MenuTypeEnum } from "@/app/enums/appEnum"; +import { LanguageEnum, MenuTypeEnum } from "@/enums/appEnum"; import { useSettingStore } from "@/store/modules/setting"; import { useUserStore } from "@/store/modules/user"; +import { useSystemConfigStore } from "@/store/modules/system-config"; import { useMenuStore } from "@/store/modules/menu"; import AppConfig from "@/config"; import { languageOptions } from "@/locales"; @@ -230,6 +231,10 @@ const { width } = useWindowSize(); const settingStore = useSettingStore(); const userStore = useUserStore(); const menuStore = useMenuStore(); +const systemConfigStore = useSystemConfigStore(); + +// 优先使用后台配置的系统标题 +const systemTitle = computed(() => systemConfigStore.config.title || AppConfig.systemInfo.name) // 顶部栏功能配置 const { diff --git a/src/components/core/layouts/art-menus/art-sidebar-menu/index.vue b/src/components/core/layouts/art-menus/art-sidebar-menu/index.vue index 2ed7c04ad278edf8ddd52e585661f23cc7318710..5e6c2dc24c967d87d75af321870c92866d34054b 100755 --- a/src/components/core/layouts/art-menus/art-sidebar-menu/index.vue +++ b/src/components/core/layouts/art-menus/art-sidebar-menu/index.vue @@ -84,7 +84,7 @@ opacity: !menuOpen ? 0 : 1 }" > - {{ AppConfig.systemInfo.name }} + {{ systemTitle }}

@@ -132,7 +132,8 @@ diff --git a/src/components/core/layouts/art-settings-panel/composables/useSettingsConfig.ts b/src/components/core/layouts/art-settings-panel/composables/useSettingsConfig.ts index a2a58dca970b8b8bbea1f374977a1b77da8eebe2..35e8066e12d0d303d789db64c920bed98f57dc27 100644 --- a/src/components/core/layouts/art-settings-panel/composables/useSettingsConfig.ts +++ b/src/components/core/layouts/art-settings-panel/composables/useSettingsConfig.ts @@ -1,6 +1,6 @@ import { computed } from 'vue' import { useI18n } from 'vue-i18n' -import { ContainerWidthEnum } from '@/app/enums/appEnum' +import { ContainerWidthEnum } from '@/enums/appEnum' import AppConfig from '@/config' import { headerBarConfig } from '@/config/modules/headerBar' diff --git a/src/components/core/layouts/art-settings-panel/composables/useSettingsHandlers.ts b/src/components/core/layouts/art-settings-panel/composables/useSettingsHandlers.ts index d957879c0542f1714371fed9359efe9d473c1abd..392c690012ad417ad76e72d62bc4e38e775af5cd 100644 --- a/src/components/core/layouts/art-settings-panel/composables/useSettingsHandlers.ts +++ b/src/components/core/layouts/art-settings-panel/composables/useSettingsHandlers.ts @@ -1,6 +1,6 @@ import { useSettingStore } from '@/store/modules/setting' import { storeToRefs } from 'pinia' -import type { ContainerWidthEnum } from '@/app/enums/appEnum' +import type { ContainerWidthEnum } from '@/enums/appEnum' /** * 设置项通用处理逻辑 diff --git a/src/components/core/layouts/art-settings-panel/composables/useSettingsPanel.ts b/src/components/core/layouts/art-settings-panel/composables/useSettingsPanel.ts index 12b01b987f8c16bde28cb4e92d6a4d72e3c2df91..66877a8ebda8abb6e7ab7b6b17204b47ee18e678 100644 --- a/src/components/core/layouts/art-settings-panel/composables/useSettingsPanel.ts +++ b/src/components/core/layouts/art-settings-panel/composables/useSettingsPanel.ts @@ -3,7 +3,7 @@ import { useSettingStore } from '@/store/modules/setting' import { storeToRefs } from 'pinia' import { useBreakpoints } from '@vueuse/core' import AppConfig from '@/config' -import { SystemThemeEnum, MenuTypeEnum } from '@/app/enums/appEnum' +import { SystemThemeEnum, MenuTypeEnum } from '@/enums/appEnum' import { mittBus } from '@/utils/sys' import { useTheme } from '@/hooks/core/useTheme' import { useCeremony } from '@/hooks/core/useCeremony' diff --git a/src/components/core/layouts/art-settings-panel/composables/useSettingsState.ts b/src/components/core/layouts/art-settings-panel/composables/useSettingsState.ts index aa6a6fb76c3228399ab811dc81ef11ecd4565ceb..65352d29dd44d29957609550a6c4744414bcf875 100644 --- a/src/components/core/layouts/art-settings-panel/composables/useSettingsState.ts +++ b/src/components/core/layouts/art-settings-panel/composables/useSettingsState.ts @@ -1,5 +1,5 @@ import { useSettingStore } from '@/store/modules/setting' -import { MenuThemeEnum, MenuTypeEnum } from '@/app/enums/appEnum' +import { MenuThemeEnum, MenuTypeEnum } from '@/enums/appEnum' /** * 设置状态管理 diff --git a/src/components/core/layouts/art-settings-panel/widget/MenuStyleSettings.vue b/src/components/core/layouts/art-settings-panel/widget/MenuStyleSettings.vue index bb5a84ab09a7ae3ea267a843d323adee6465dec4..61237ebbbc421ab899f7ac407f84d600a31eeab8 100644 --- a/src/components/core/layouts/art-settings-panel/widget/MenuStyleSettings.vue +++ b/src/components/core/layouts/art-settings-panel/widget/MenuStyleSettings.vue @@ -23,7 +23,7 @@