diff --git a/.env.base b/.env.base index 6357a92..a7ed28d 100644 --- a/.env.base +++ b/.env.base @@ -17,4 +17,4 @@ VITE_USE_ALL_ELEMENT_PLUS_STYLE=true VITE_USE_MOCK=false # 是否使用在线图标 -VITE_USE_ONLINE_ICON=true +VITE_USE_ONLINE_ICON=false diff --git a/.env.dev b/.env.dev index 7de1c6f..f239e31 100644 --- a/.env.dev +++ b/.env.dev @@ -29,10 +29,10 @@ VITE_USE_BUNDLE_ANALYZER=false VITE_USE_ALL_ELEMENT_PLUS_STYLE=false # 是否开启mock -VITE_USE_MOCK=true +VITE_USE_MOCK=false # 是否切割css VITE_USE_CSS_SPLIT=true # 是否使用在线图标 -VITE_USE_ONLINE_ICON=true +VITE_USE_ONLINE_ICON=false diff --git a/.env.pro b/.env.pro index bf5d37d..935057a 100644 --- a/.env.pro +++ b/.env.pro @@ -29,10 +29,10 @@ VITE_USE_BUNDLE_ANALYZER=true VITE_USE_ALL_ELEMENT_PLUS_STYLE=false # 是否开启mock -VITE_USE_MOCK=true +VITE_USE_MOCK=false # 是否切割css VITE_USE_CSS_SPLIT=true # 是否使用在线图标 -VITE_USE_ONLINE_ICON=true +VITE_USE_ONLINE_ICON=false diff --git a/.env.test b/.env.test index be7aae9..56fdea5 100644 --- a/.env.test +++ b/.env.test @@ -29,10 +29,10 @@ VITE_USE_BUNDLE_ANALYZER=false VITE_USE_ALL_ELEMENT_PLUS_STYLE=false # 是否开启mock -VITE_USE_MOCK=true +VITE_USE_MOCK=false # 是否切割css VITE_USE_CSS_SPLIT=false # 是否使用在线图标 -VITE_USE_ONLINE_ICON=true +VITE_USE_ONLINE_ICON=false diff --git a/index.html b/index.html index 60f5b87..0f748a0 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,7 @@ - + <%= title %> @@ -16,7 +16,8 @@ justify-content: center; align-items: center; flex-direction: column; - background: #f0f2f5; + color: #f5eee9; + background: #100c0a; } .app-loading .app-loading-wrap { @@ -38,8 +39,9 @@ } .app-loading .app-loading-logo { - width: 100px; + width: 72px; margin: 0 auto 15px; + border-radius: 12px; } .app-loading .app-loading-item { @@ -55,7 +57,7 @@ position: absolute; width: 100%; height: 100%; - border: 4px solid #2d8cf0; + border: 4px solid #c4322a; border-bottom: 0; border-left-color: transparent; border-radius: 50%; @@ -68,7 +70,7 @@ left: calc(50% - 20px); width: 40px; height: 40px; - border: 4px solid #87bdff; + border: 4px solid #ff8a72; border-right: 0; border-top-color: transparent; border-radius: 50%; @@ -85,16 +87,6 @@ } } - @keyframes loader-outter { - 0% { - transform: rotate(0deg); - } - - 100% { - transform: rotate(360deg); - } - } - @keyframes loader-inner { 0% { transform: rotate(0deg); @@ -105,20 +97,11 @@ } } - @keyframes loader-inner { - 0% { - transform: rotate(0deg); - } - - 100% { - transform: rotate(-360deg); - } - }
- +
<%= title %>
diff --git a/mock/_createProductionServer.ts b/mock/_createProductionServer.ts deleted file mode 100644 index c289b03..0000000 --- a/mock/_createProductionServer.ts +++ /dev/null @@ -1,20 +0,0 @@ -// Author: fruit.com.cn - -import { createProdMockServer } from 'vite-plugin-mock/es/createProdMockServer' - -const modules = import.meta.glob('./**/*.mock.ts', { - import: 'default', - eager: true -}) - -const mockModules: any[] = [] -Object.keys(modules).forEach(async (key) => { - if (key.includes('_')) { - return - } - mockModules.push(...(modules[key] as any)) -}) - -export function setupProdMockServer() { - createProdMockServer(mockModules) -} diff --git a/mock/role/index.mock.ts b/mock/role/index.mock.ts deleted file mode 100644 index a483d96..0000000 --- a/mock/role/index.mock.ts +++ /dev/null @@ -1,131 +0,0 @@ -// Author: fruit.com.cn - -import { MockMethod } from 'vite-plugin-mock' -import { SUCCESS_CODE } from '@/constants' - -const timeout = 1000 - -const adminList = [ - { - path: '/dashboard', - component: '#', - redirect: '/dashboard/index', - name: 'Dashboard', - meta: { - title: '工作台', - icon: 'ant-design:dashboard-filled' - }, - children: [ - { - path: 'index', - name: 'dashboard', - component: 'views/common/DashboardView', - meta: { - title: '工作台', - icon: 'ant-design:dashboard-filled', - affix: true - } - } - ] - }, - { - path: '/content', - component: '#', - redirect: '/content/dramas', - name: 'Content', - meta: { - title: '内容管理', - icon: 'ep:video-camera', - alwaysShow: true - }, - children: [ - { - path: 'dramas', - name: 'dramas', - component: 'views/contentManagement/DramaManagementView', - meta: { - title: '短剧管理' - } - }, - { - path: 'episodes', - name: 'episodes', - component: 'views/contentManagement/EpisodeManagementView', - meta: { - title: '剧集管理' - } - } - ] - }, - { - path: '/system', - component: '#', - redirect: '/system/access', - name: 'System', - meta: { - title: '后台管理', - icon: 'ep:setting', - alwaysShow: true - }, - children: [ - { - path: 'access', - name: 'access', - component: 'views/permission/RoleManagementView', - meta: { - title: '角色权限配置' - } - }, - { - path: 'admin-users', - name: 'admin-users', - component: 'views/userManagement/AdminUsersView', - meta: { - title: '管理员用户列表' - } - }, - { - path: 'menus', - name: 'menus', - component: 'views/permission/MenuManagementView', - meta: { - title: '菜单管理' - } - }, - { - path: 'role-categories', - name: 'role-categories', - component: 'views/permission/RoleCategoriesView', - meta: { - title: '角色分类' - } - }, - { - path: 'settings', - name: 'settings', - component: 'views/systemManagement/SettingsView', - meta: { - title: '系统设置' - } - } - ] - } -] - -const testList = adminList.filter((route) => route.path !== '/system') - -export default [ - // 列表接口 - { - url: '/mock/role/list', - method: 'get', - timeout, - response: ({ query }) => { - const { roleName } = query - return { - code: SUCCESS_CODE, - data: roleName === 'admin' ? adminList : testList - } - } - } -] as MockMethod[] diff --git a/mock/user/index.mock.ts b/mock/user/index.mock.ts deleted file mode 100644 index 4595f34..0000000 --- a/mock/user/index.mock.ts +++ /dev/null @@ -1,92 +0,0 @@ -// Author: fruit.com.cn - -import { SUCCESS_CODE } from '@/constants' - -const timeout = 1000 - -const List: { - username: string - password: string - role: string - roleId: string - permissions: string | string[] -}[] = [ - { - username: 'admin', - password: 'admin123', - role: 'admin', - roleId: '1', - permissions: ['*.*.*'] - }, - { - username: 'test', - password: 'test', - role: 'test', - roleId: '2', - permissions: ['example:dialog:create', 'example:dialog:delete'] - } -] - -export default [ - // 列表接口 - { - url: '/mock/user/list', - method: 'get', - response: ({ query }) => { - const { username, pageIndex, pageSize } = query - - const mockList = List.filter((item) => { - if (username && item.username.indexOf(username) < 0) return false - return true - }) - const pageList = mockList.filter( - (_, index) => index < pageSize * pageIndex && index >= pageSize * (pageIndex - 1) - ) - - return { - code: SUCCESS_CODE, - data: { - total: mockList.length, - list: pageList - } - } - } - }, - // 登录接口 - { - url: '/mock/user/login', - method: 'post', - timeout, - response: ({ body }) => { - const data = body - let hasUser = false - for (const user of List) { - if (user.username === data.username && user.password === data.password) { - hasUser = true - return { - code: SUCCESS_CODE, - data: user - } - } - } - if (!hasUser) { - return { - code: 500, - message: '账号或密码错误' - } - } - } - }, - // 退出接口 - { - url: '/mock/user/loginOut', - method: 'get', - timeout, - response: () => { - return { - code: SUCCESS_CODE, - data: null - } - } - } -] diff --git a/package.json b/package.json index e441b28..0c3f7e6 100644 --- a/package.json +++ b/package.json @@ -24,8 +24,6 @@ "prepare": "husky install" }, "dependencies": { - "@element-plus/icons-vue": "^2.3.2", - "@faker-js/faker": "^8.4.0", "@iconify/iconify": "^3.1.1", "@iconify/vue": "^4.1.1", "@vueuse/core": "^10.7.2", @@ -103,7 +101,6 @@ "vite": "5.0.12", "vite-plugin-ejs": "^1.7.0", "vite-plugin-eslint": "^1.8.1", - "vite-plugin-mock": "2.9.6", "vite-plugin-progress": "^0.0.7", "vite-plugin-purge-icons": "^0.10.0", "vite-plugin-style-import": "2.0.0", diff --git a/public/brand-mark.png b/public/brand-mark.png new file mode 100644 index 0000000..d6f5dc1 Binary files /dev/null and b/public/brand-mark.png differ diff --git a/public/favicon.ico b/public/favicon.ico deleted file mode 100644 index 5a7de08..0000000 Binary files a/public/favicon.ico and /dev/null differ diff --git a/public/logo.png b/public/logo.png deleted file mode 100644 index b76c71b..0000000 Binary files a/public/logo.png and /dev/null differ diff --git a/src/api/login/index.ts b/src/api/login/index.ts index 5cff93a..68ca033 100644 --- a/src/api/login/index.ts +++ b/src/api/login/index.ts @@ -26,10 +26,6 @@ export const getAdminRoleApi = ( return request.get({ url: '/admin/auth/menus', params }) } -export const getTestRoleApi = (params: RoleParams): Promise> => { - return request.get({ url: '/mock/role/list2', params }) -} - /** 自助改密(首登强制改密也走这个接口) */ export const changePasswordApi = (data: { oldPassword: string; newPassword: string }) => { return request.post({ url: '/admin/auth/password', data }) diff --git a/src/assets/imgs/avatar.jpg b/src/assets/imgs/avatar.jpg deleted file mode 100644 index d46a70a..0000000 Binary files a/src/assets/imgs/avatar.jpg and /dev/null differ diff --git a/src/assets/imgs/logo.png b/src/assets/imgs/logo.png deleted file mode 100644 index b76c71b..0000000 Binary files a/src/assets/imgs/logo.png and /dev/null differ diff --git a/src/components/Logo/src/Logo.vue b/src/components/Logo/src/Logo.vue index a0d4212..6a7c88d 100644 --- a/src/components/Logo/src/Logo.vue +++ b/src/components/Logo/src/Logo.vue @@ -68,7 +68,12 @@ watch( >