diff --git a/.env b/.env index 01db102..6a529a8 100644 --- a/.env +++ b/.env @@ -1,8 +1,6 @@ VITE_BASE_URL=/ -VITE_APP_TITLE=Vue-AntD-Web - -VITE_APP_DESC=Vue-AntD-Web +VITE_APP_TITLE="WANFi Platform" # the prefix of the icon name VITE_ICON_PREFIX=icon @@ -12,10 +10,7 @@ VITE_ICON_PREFIX=icon VITE_ICON_LOCAL_PREFIX=icon-local # auth route mode: static | dynamic -VITE_AUTH_ROUTE_MODE=dynamic - -# static auth route home -VITE_ROUTE_HOME=manage_user +VITE_AUTH_ROUTE_MODE=static # default menu icon VITE_MENU_ICON=mdi:menu diff --git a/.env.prod b/.env.prod index 92c0aa8..9a336a2 100644 --- a/.env.prod +++ b/.env.prod @@ -1,5 +1,5 @@ # backend service base url, prod environment -VITE_SERVICE_BASE_URL=/prod-api +VITE_SERVICE_BASE_URL=/u-api # other backend service base url, prod environment VITE_OTHER_SERVICE_BASE_URL= `{ diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 7232979..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 SoybeanJS - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md index a7d1c1e..8e04369 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,4 @@ -# Front-End at CRM - -## Wfc-Cloud-Vue-AntD-Web(SoybeanAdmin AntDesign) +# WANFI 用户平台 ## 使用 @@ -17,8 +15,10 @@ npm install -g pnpm ```bash +npm install -g pnpm pnpm i ``` + > 由于本项目采用了 pnpm monorepo 的管理方式,因此请不要使用 npm 或 yarn 来安装依赖。 **启动项目** @@ -31,4 +31,4 @@ pnpm dev ```bash pnpm build -``` \ No newline at end of file +``` diff --git a/src/locales/langs/en-us.ts b/src/locales/langs/en-us.ts index c2df1cf..52acd61 100644 --- a/src/locales/langs/en-us.ts +++ b/src/locales/langs/en-us.ts @@ -1,6 +1,6 @@ const local: any = { system: { - title: 'Vue-AntD-Web' + title: 'WANFi Platform' }, common: { action: 'Action', diff --git a/src/locales/langs/zh-cn.ts b/src/locales/langs/zh-cn.ts index a094607..7da9af8 100644 --- a/src/locales/langs/zh-cn.ts +++ b/src/locales/langs/zh-cn.ts @@ -1,6 +1,6 @@ const local:any = { system: { - title: 'Vue-AntD-Web' + title: 'WANFi 平台', }, common: { action: '操作', diff --git a/src/router/routes/builtin.ts b/src/router/routes/builtin.ts index 953df9f..055708b 100644 --- a/src/router/routes/builtin.ts +++ b/src/router/routes/builtin.ts @@ -1,11 +1,11 @@ import type { CustomRoute } from '@elegant-router/types'; import { layouts, views } from '../elegant/imports'; -import { getRoutePath, transformElegantRoutesToVueRoutes } from '../elegant/transform'; +import { transformElegantRoutesToVueRoutes } from '../elegant/transform'; export const ROOT_ROUTE: CustomRoute = { name: 'root', path: '/', - redirect: getRoutePath(import.meta.env.VITE_ROUTE_HOME) || 'manage_user', + redirect: '/home', meta: { title: 'root', constant: true diff --git a/src/store/modules/route/index.ts b/src/store/modules/route/index.ts index f73e1b9..46c4f8b 100644 --- a/src/store/modules/route/index.ts +++ b/src/store/modules/route/index.ts @@ -40,7 +40,7 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => { const authRouteMode = ref(import.meta.env.VITE_AUTH_ROUTE_MODE); /** Home route key */ - const routeHome = ref(import.meta.env.VITE_ROUTE_HOME); + const routeHome = ref('home'); /** * Set route home diff --git a/src/theme/settings.ts b/src/theme/settings.ts index 6fbf003..fe659f6 100644 --- a/src/theme/settings.ts +++ b/src/theme/settings.ts @@ -2,34 +2,12 @@ export const themeSettings: App.Theme.ThemeSetting = { themeScheme: 'light', themeColor: '#646cff', - otherColor: { - info: '#2080f0', - success: '#52c41a', - warning: '#faad14', - error: '#f5222d' - }, + otherColor: { info: '#2080f0', success: '#52c41a', warning: '#faad14', error: '#f5222d' }, isInfoFollowPrimary: true, - layout: { - mode: 'vertical', - scrollMode: 'content' - }, - page: { - animate: true, - animateMode: 'fade-slide' - }, - header: { - height: 56, - breadcrumb: { - visible: true, - showIcon: true - } - }, - tab: { - visible: true, - cache: true, - height: 44, - mode: 'chrome' - }, + layout: { mode: 'horizontal-mix', scrollMode: 'content' }, + page: { animate: true, animateMode: 'fade-slide' }, + header: { height: 56, breadcrumb: { visible: true, showIcon: true } }, + tab: { visible: false, cache: true, height: 44, mode: 'chrome' }, fixedHeaderAndTab: true, sider: { inverted: false, @@ -39,12 +17,7 @@ export const themeSettings: App.Theme.ThemeSetting = { mixCollapsedWidth: 64, mixChildMenuWidth: 200 }, - footer: { - visible: false, - fixed: false, - height: 48, - right: true - } + footer: { visible: true, fixed: false, height: 36, right: true } }; /** diff --git a/src/typings/components.d.ts b/src/typings/components.d.ts index 2695c39..a5dc4fc 100644 --- a/src/typings/components.d.ts +++ b/src/typings/components.d.ts @@ -32,7 +32,6 @@ declare module 'vue' { AMenuDivider: typeof import('ant-design-vue/es')['MenuDivider'] AMenuItem: typeof import('ant-design-vue/es')['MenuItem'] AModal: typeof import('ant-design-vue/es')['Modal'] - AntTree: typeof import('./../components/custom/ant-tree.vue')['default'] APopconfirm: typeof import('ant-design-vue/es')['Popconfirm'] APopover: typeof import('ant-design-vue/es')['Popover'] AppLoading: typeof import('./../components/common/app-loading.vue')['default'] @@ -66,7 +65,6 @@ declare module 'vue' { IconGridiconsFullscreen: typeof import('~icons/gridicons/fullscreen')['default'] IconGridiconsFullscreenExit: typeof import('~icons/gridicons/fullscreen-exit')['default'] IconIcRoundDelete: typeof import('~icons/ic/round-delete')['default'] - IconIcRoundMenu: typeof import('~icons/ic/round-menu')['default'] IconIcRoundPlus: typeof import('~icons/ic/round-plus')['default'] IconIcRoundRefresh: typeof import('~icons/ic/round-refresh')['default'] IconIcRoundSearch: typeof import('~icons/ic/round-search')['default'] diff --git a/src/typings/env.d.ts b/src/typings/env.d.ts index d151ffb..ace9243 100644 --- a/src/typings/env.d.ts +++ b/src/typings/env.d.ts @@ -13,8 +13,6 @@ declare namespace Env { readonly VITE_BASE_URL: string; /** The title of the application */ readonly VITE_APP_TITLE: string; - /** The description of the application */ - readonly VITE_APP_DESC: string; /** The router history mode */ readonly VITE_ROUTER_HISTORY_MODE?: RouterHistoryMode; /** The prefix of the iconify icon */ @@ -78,13 +76,6 @@ declare namespace Env { * - Dynamic: the auth routes is generated in back-end */ readonly VITE_AUTH_ROUTE_MODE: 'static' | 'dynamic'; - /** - * The home route key - * - * It only has effect when the auth route mode is static, if the route mode is dynamic, the home route key is - * defined in the back-end - */ - readonly VITE_ROUTE_HOME: import('@elegant-router/types').LastLevelRouteKey; /** * Default menu icon if menu icon is not set * diff --git a/src/views/_builtin/login/modules/pwd-login.vue b/src/views/_builtin/login/modules/pwd-login.vue index e840b2d..7703bd4 100644 --- a/src/views/_builtin/login/modules/pwd-login.vue +++ b/src/views/_builtin/login/modules/pwd-login.vue @@ -45,6 +45,9 @@ async function getCheckCode() { if (!error) { codeImg.value = `data:image/png;base64,${data.img}`; model.uuid = data.uuid; + if (data?.text) { + model.code = data.text; + } } } diff --git a/src/views/_builtin/login/modules/register.vue b/src/views/_builtin/login/modules/register.vue index 02d9b0c..64d7440 100644 --- a/src/views/_builtin/login/modules/register.vue +++ b/src/views/_builtin/login/modules/register.vue @@ -124,7 +124,7 @@ const showSteps = computed(() => !isMobile.value); :current="currentStep" size="small" class="max-w-full mb-16px" - :direction="'horizontal'" + direction="horizontal" :responsive="false" > diff --git a/vite.config.ts b/vite.config.ts index 92ec3fc..a967ed1 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -4,7 +4,6 @@ import { defineConfig, loadEnv } from 'vite'; import dayjs from 'dayjs'; import { setupVitePlugins } from './build/plugins'; import { createViteProxy } from './build/config'; -//test export default defineConfig(configEnv => { const viteEnv = loadEnv(configEnv.mode, process.cwd()) as unknown as Env.ImportMeta; @@ -32,8 +31,8 @@ export default defineConfig(configEnv => { }, server: { host: '0.0.0.0', - port: 9527, - open: true, + port: 8085, + open: false, proxy: createViteProxy(viteEnv, configEnv.command === 'serve'), fs: { cachedChecks: false diff --git a/vitest.config.ts b/vitest.config.ts index cb8191c..644b643 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -1,7 +1,5 @@ -import { defineConfig } from 'vitest/config' +import { defineConfig } from 'vitest/config'; export default defineConfig({ - test: { - - } -}) + test: {} +});