Commit 33b713cf authored by nick zheng's avatar nick zheng
parents 5d52de8c a0b1ca29
VITE_APP_ENV = 'PROD' VITE_APP_ENV = 'PROD'
VITE_APP_NAME = 'DIGITAL_PERSON_FE'
VITE_APP_THEME_COLOR = '#2468f2'
VITE_PORT = 8848
VITE_PUBLIC_PATH = /fe
VITE_ROUTER_MODE = 'h5'
VITE_VITEST = true
VITE_HIDE_HOME = false
export const BASE_URLS: Record<'DEV' | 'PROD', string> = { export const BASE_URLS: Record<'DEV' | 'PROD', string> = {
DEV: 'https://poc-sit.gsstcloud.com', DEV: 'https://digitalperson-sit.gsstcloud.com',
PROD: '', PROD: 'https://digitalperson-sit.gsstcloud.com',
} }
...@@ -13,11 +13,13 @@ export interface MenuOption { ...@@ -13,11 +13,13 @@ export interface MenuOption {
} }
export function getHistoryMode(modeString: ViteEnv['VITE_ROUTER_MODE']): RouterHistory { export function getHistoryMode(modeString: ViteEnv['VITE_ROUTER_MODE']): RouterHistory {
const PUBLIC_PATH = import.meta.env.VITE_PUBLIC_PATH
if (modeString === 'h5') { if (modeString === 'h5') {
return createWebHistory() return createWebHistory(PUBLIC_PATH)
} }
return createWebHashHistory() return createWebHashHistory(PUBLIC_PATH)
} }
function menuSort(routes: RouteRecordRaw[]) { function menuSort(routes: RouteRecordRaw[]) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment