feat: 修改生产API标识,修改默认布局
This commit is contained in:
9
.env
9
.env
@@ -1,8 +1,6 @@
|
|||||||
VITE_BASE_URL=/
|
VITE_BASE_URL=/
|
||||||
|
|
||||||
VITE_APP_TITLE=Vue-AntD-Web
|
VITE_APP_TITLE="WANFi Platform"
|
||||||
|
|
||||||
VITE_APP_DESC=Vue-AntD-Web
|
|
||||||
|
|
||||||
# the prefix of the icon name
|
# the prefix of the icon name
|
||||||
VITE_ICON_PREFIX=icon
|
VITE_ICON_PREFIX=icon
|
||||||
@@ -12,10 +10,7 @@ VITE_ICON_PREFIX=icon
|
|||||||
VITE_ICON_LOCAL_PREFIX=icon-local
|
VITE_ICON_LOCAL_PREFIX=icon-local
|
||||||
|
|
||||||
# auth route mode: static | dynamic
|
# auth route mode: static | dynamic
|
||||||
VITE_AUTH_ROUTE_MODE=dynamic
|
VITE_AUTH_ROUTE_MODE=static
|
||||||
|
|
||||||
# static auth route home
|
|
||||||
VITE_ROUTE_HOME=manage_user
|
|
||||||
|
|
||||||
# default menu icon
|
# default menu icon
|
||||||
VITE_MENU_ICON=mdi:menu
|
VITE_MENU_ICON=mdi:menu
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# backend service base url, prod environment
|
# 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
|
# other backend service base url, prod environment
|
||||||
VITE_OTHER_SERVICE_BASE_URL= `{
|
VITE_OTHER_SERVICE_BASE_URL= `{
|
||||||
|
|||||||
21
LICENSE
21
LICENSE
@@ -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.
|
|
||||||
@@ -1,6 +1,4 @@
|
|||||||
# Front-End at CRM
|
# WANFI 用户平台
|
||||||
|
|
||||||
## Wfc-Cloud-Vue-AntD-Web(SoybeanAdmin AntDesign)
|
|
||||||
|
|
||||||
## 使用
|
## 使用
|
||||||
|
|
||||||
@@ -17,8 +15,10 @@
|
|||||||
npm install -g pnpm
|
npm install -g pnpm
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
npm install -g pnpm
|
||||||
pnpm i
|
pnpm i
|
||||||
```
|
```
|
||||||
|
|
||||||
> 由于本项目采用了 pnpm monorepo 的管理方式,因此请不要使用 npm 或 yarn 来安装依赖。
|
> 由于本项目采用了 pnpm monorepo 的管理方式,因此请不要使用 npm 或 yarn 来安装依赖。
|
||||||
|
|
||||||
**启动项目**
|
**启动项目**
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
const local: any = {
|
const local: any = {
|
||||||
system: {
|
system: {
|
||||||
title: 'Vue-AntD-Web'
|
title: 'WANFi Platform'
|
||||||
},
|
},
|
||||||
common: {
|
common: {
|
||||||
action: 'Action',
|
action: 'Action',
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
const local:any = {
|
const local:any = {
|
||||||
system: {
|
system: {
|
||||||
title: 'Vue-AntD-Web'
|
title: 'WANFi 平台',
|
||||||
},
|
},
|
||||||
common: {
|
common: {
|
||||||
action: '操作',
|
action: '操作',
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import type { CustomRoute } from '@elegant-router/types';
|
import type { CustomRoute } from '@elegant-router/types';
|
||||||
import { layouts, views } from '../elegant/imports';
|
import { layouts, views } from '../elegant/imports';
|
||||||
import { getRoutePath, transformElegantRoutesToVueRoutes } from '../elegant/transform';
|
import { transformElegantRoutesToVueRoutes } from '../elegant/transform';
|
||||||
|
|
||||||
export const ROOT_ROUTE: CustomRoute = {
|
export const ROOT_ROUTE: CustomRoute = {
|
||||||
name: 'root',
|
name: 'root',
|
||||||
path: '/',
|
path: '/',
|
||||||
redirect: getRoutePath(import.meta.env.VITE_ROUTE_HOME) || 'manage_user',
|
redirect: '/home',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'root',
|
title: 'root',
|
||||||
constant: true
|
constant: true
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => {
|
|||||||
const authRouteMode = ref(import.meta.env.VITE_AUTH_ROUTE_MODE);
|
const authRouteMode = ref(import.meta.env.VITE_AUTH_ROUTE_MODE);
|
||||||
|
|
||||||
/** Home route key */
|
/** Home route key */
|
||||||
const routeHome = ref(import.meta.env.VITE_ROUTE_HOME);
|
const routeHome = ref('home');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set route home
|
* Set route home
|
||||||
|
|||||||
@@ -2,34 +2,12 @@
|
|||||||
export const themeSettings: App.Theme.ThemeSetting = {
|
export const themeSettings: App.Theme.ThemeSetting = {
|
||||||
themeScheme: 'light',
|
themeScheme: 'light',
|
||||||
themeColor: '#646cff',
|
themeColor: '#646cff',
|
||||||
otherColor: {
|
otherColor: { info: '#2080f0', success: '#52c41a', warning: '#faad14', error: '#f5222d' },
|
||||||
info: '#2080f0',
|
|
||||||
success: '#52c41a',
|
|
||||||
warning: '#faad14',
|
|
||||||
error: '#f5222d'
|
|
||||||
},
|
|
||||||
isInfoFollowPrimary: true,
|
isInfoFollowPrimary: true,
|
||||||
layout: {
|
layout: { mode: 'horizontal-mix', scrollMode: 'content' },
|
||||||
mode: 'vertical',
|
page: { animate: true, animateMode: 'fade-slide' },
|
||||||
scrollMode: 'content'
|
header: { height: 56, breadcrumb: { visible: true, showIcon: true } },
|
||||||
},
|
tab: { visible: false, cache: true, height: 44, mode: 'chrome' },
|
||||||
page: {
|
|
||||||
animate: true,
|
|
||||||
animateMode: 'fade-slide'
|
|
||||||
},
|
|
||||||
header: {
|
|
||||||
height: 56,
|
|
||||||
breadcrumb: {
|
|
||||||
visible: true,
|
|
||||||
showIcon: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
tab: {
|
|
||||||
visible: true,
|
|
||||||
cache: true,
|
|
||||||
height: 44,
|
|
||||||
mode: 'chrome'
|
|
||||||
},
|
|
||||||
fixedHeaderAndTab: true,
|
fixedHeaderAndTab: true,
|
||||||
sider: {
|
sider: {
|
||||||
inverted: false,
|
inverted: false,
|
||||||
@@ -39,12 +17,7 @@ export const themeSettings: App.Theme.ThemeSetting = {
|
|||||||
mixCollapsedWidth: 64,
|
mixCollapsedWidth: 64,
|
||||||
mixChildMenuWidth: 200
|
mixChildMenuWidth: 200
|
||||||
},
|
},
|
||||||
footer: {
|
footer: { visible: true, fixed: false, height: 36, right: true }
|
||||||
visible: false,
|
|
||||||
fixed: false,
|
|
||||||
height: 48,
|
|
||||||
right: true
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
2
src/typings/components.d.ts
vendored
2
src/typings/components.d.ts
vendored
@@ -32,7 +32,6 @@ declare module 'vue' {
|
|||||||
AMenuDivider: typeof import('ant-design-vue/es')['MenuDivider']
|
AMenuDivider: typeof import('ant-design-vue/es')['MenuDivider']
|
||||||
AMenuItem: typeof import('ant-design-vue/es')['MenuItem']
|
AMenuItem: typeof import('ant-design-vue/es')['MenuItem']
|
||||||
AModal: typeof import('ant-design-vue/es')['Modal']
|
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']
|
APopconfirm: typeof import('ant-design-vue/es')['Popconfirm']
|
||||||
APopover: typeof import('ant-design-vue/es')['Popover']
|
APopover: typeof import('ant-design-vue/es')['Popover']
|
||||||
AppLoading: typeof import('./../components/common/app-loading.vue')['default']
|
AppLoading: typeof import('./../components/common/app-loading.vue')['default']
|
||||||
@@ -66,7 +65,6 @@ declare module 'vue' {
|
|||||||
IconGridiconsFullscreen: typeof import('~icons/gridicons/fullscreen')['default']
|
IconGridiconsFullscreen: typeof import('~icons/gridicons/fullscreen')['default']
|
||||||
IconGridiconsFullscreenExit: typeof import('~icons/gridicons/fullscreen-exit')['default']
|
IconGridiconsFullscreenExit: typeof import('~icons/gridicons/fullscreen-exit')['default']
|
||||||
IconIcRoundDelete: typeof import('~icons/ic/round-delete')['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']
|
IconIcRoundPlus: typeof import('~icons/ic/round-plus')['default']
|
||||||
IconIcRoundRefresh: typeof import('~icons/ic/round-refresh')['default']
|
IconIcRoundRefresh: typeof import('~icons/ic/round-refresh')['default']
|
||||||
IconIcRoundSearch: typeof import('~icons/ic/round-search')['default']
|
IconIcRoundSearch: typeof import('~icons/ic/round-search')['default']
|
||||||
|
|||||||
9
src/typings/env.d.ts
vendored
9
src/typings/env.d.ts
vendored
@@ -13,8 +13,6 @@ declare namespace Env {
|
|||||||
readonly VITE_BASE_URL: string;
|
readonly VITE_BASE_URL: string;
|
||||||
/** The title of the application */
|
/** The title of the application */
|
||||||
readonly VITE_APP_TITLE: string;
|
readonly VITE_APP_TITLE: string;
|
||||||
/** The description of the application */
|
|
||||||
readonly VITE_APP_DESC: string;
|
|
||||||
/** The router history mode */
|
/** The router history mode */
|
||||||
readonly VITE_ROUTER_HISTORY_MODE?: RouterHistoryMode;
|
readonly VITE_ROUTER_HISTORY_MODE?: RouterHistoryMode;
|
||||||
/** The prefix of the iconify icon */
|
/** The prefix of the iconify icon */
|
||||||
@@ -78,13 +76,6 @@ declare namespace Env {
|
|||||||
* - Dynamic: the auth routes is generated in back-end
|
* - Dynamic: the auth routes is generated in back-end
|
||||||
*/
|
*/
|
||||||
readonly VITE_AUTH_ROUTE_MODE: 'static' | 'dynamic';
|
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
|
* Default menu icon if menu icon is not set
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -45,6 +45,9 @@ async function getCheckCode() {
|
|||||||
if (!error) {
|
if (!error) {
|
||||||
codeImg.value = `data:image/png;base64,${data.img}`;
|
codeImg.value = `data:image/png;base64,${data.img}`;
|
||||||
model.uuid = data.uuid;
|
model.uuid = data.uuid;
|
||||||
|
if (data?.text) {
|
||||||
|
model.code = data.text;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ const showSteps = computed(() => !isMobile.value);
|
|||||||
:current="currentStep"
|
:current="currentStep"
|
||||||
size="small"
|
size="small"
|
||||||
class="max-w-full mb-16px"
|
class="max-w-full mb-16px"
|
||||||
:direction="'horizontal'"
|
direction="horizontal"
|
||||||
:responsive="false"
|
:responsive="false"
|
||||||
>
|
>
|
||||||
<AStep :title="t('page.login.register.basicInfo')" />
|
<AStep :title="t('page.login.register.basicInfo')" />
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import { defineConfig, loadEnv } from 'vite';
|
|||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import { setupVitePlugins } from './build/plugins';
|
import { setupVitePlugins } from './build/plugins';
|
||||||
import { createViteProxy } from './build/config';
|
import { createViteProxy } from './build/config';
|
||||||
//test
|
|
||||||
|
|
||||||
export default defineConfig(configEnv => {
|
export default defineConfig(configEnv => {
|
||||||
const viteEnv = loadEnv(configEnv.mode, process.cwd()) as unknown as Env.ImportMeta;
|
const viteEnv = loadEnv(configEnv.mode, process.cwd()) as unknown as Env.ImportMeta;
|
||||||
@@ -32,8 +31,8 @@ export default defineConfig(configEnv => {
|
|||||||
},
|
},
|
||||||
server: {
|
server: {
|
||||||
host: '0.0.0.0',
|
host: '0.0.0.0',
|
||||||
port: 9527,
|
port: 8085,
|
||||||
open: true,
|
open: false,
|
||||||
proxy: createViteProxy(viteEnv, configEnv.command === 'serve'),
|
proxy: createViteProxy(viteEnv, configEnv.command === 'serve'),
|
||||||
fs: {
|
fs: {
|
||||||
cachedChecks: false
|
cachedChecks: false
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import { defineConfig } from 'vitest/config'
|
import { defineConfig } from 'vitest/config';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
test: {
|
test: {}
|
||||||
|
});
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|||||||
Reference in New Issue
Block a user