mirror of
https://github.com/pure-admin/pure-admin-thin.git
synced 2025-04-24 23:47:17 +08:00
Fix serverConfig.json fetching behavior across nested routes
Ensure that serverConfig.json is fetched consistently from the root directory regardless of the nested route level. Adjusted the axios request to use an absolute path, specifically targeting the serverConfig.json file in the root directory. This resolves the issue where serverConfig.json was being requested relative to the current route, leading to inconsistencies when navigating across nested routes.
This commit is contained in:
parent
e63e2152d6
commit
04875659ae
@ -31,7 +31,7 @@ export const getServerConfig = async (app: App): Promise<undefined> => {
|
||||
app.config.globalProperties.$config = getConfig();
|
||||
return axios({
|
||||
method: "get",
|
||||
url: `${VITE_PUBLIC_PATH}serverConfig.json`
|
||||
url: `${window.location.origin}/serverConfig.json`
|
||||
})
|
||||
.then(({ data: config }) => {
|
||||
let $config = app.config.globalProperties.$config;
|
||||
|
Loading…
x
Reference in New Issue
Block a user