feat: hot reload
This commit is contained in:
@@ -11,6 +11,6 @@ export function getAdminRouterBase(pathname = window.location.pathname): string
|
||||
|
||||
export function getApiBaseURL(pathname = window.location.pathname): string {
|
||||
const tenantCode = getTenantCodeFromPath(pathname)
|
||||
return `/t/${tenantCode}/v1`
|
||||
const origin = import.meta.env.DEV ? 'http://localhost:8080' : ''
|
||||
return `${origin}/t/${tenantCode}/v1`
|
||||
}
|
||||
|
||||
|
||||
2
frontend/superadmin/dist/index.html
vendored
2
frontend/superadmin/dist/index.html
vendored
@@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>QuyUn Super Admin</title>
|
||||
<script type="module" crossorigin src="./assets/index-CHzhCW76.js"></script>
|
||||
<script type="module" crossorigin src="./assets/index-BJ_2zMy4.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="./assets/index-B1dbpKz4.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import axios from 'axios'
|
||||
import { getToken, setToken } from './auth'
|
||||
|
||||
export const api = axios.create({ baseURL: '/super/v1' })
|
||||
const baseURL = import.meta.env.DEV ? 'http://localhost:8080/super/v1' : '/super/v1'
|
||||
export const api = axios.create({ baseURL })
|
||||
|
||||
api.interceptors.request.use((config) => {
|
||||
const token = getToken()
|
||||
|
||||
@@ -11,6 +11,6 @@ export function getUserRouterBase(pathname = window.location.pathname): string {
|
||||
|
||||
export function getApiBaseURL(pathname = window.location.pathname): string {
|
||||
const tenantCode = getTenantCodeFromPath(pathname)
|
||||
return `/t/${tenantCode}/v1`
|
||||
const origin = import.meta.env.DEV ? 'http://localhost:8080' : ''
|
||||
return `${origin}/t/${tenantCode}/v1`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user