perf: 同步完整版分支代码
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
import { App } from "vue";
|
||||
import axios from "axios";
|
||||
import { loadEnv } from "@build/index";
|
||||
|
||||
let config: object = {};
|
||||
const { VITE_PUBLIC_PATH } = loadEnv();
|
||||
|
||||
const setConfig = (cfg?: unknown) => {
|
||||
config = Object.assign(config, cfg);
|
||||
@@ -30,10 +33,7 @@ export const getServerConfig = async (app: App): Promise<undefined> => {
|
||||
return axios({
|
||||
baseURL: "",
|
||||
method: "get",
|
||||
url:
|
||||
process.env.NODE_ENV === "production"
|
||||
? "/manages/serverConfig.json"
|
||||
: "/serverConfig.json"
|
||||
url: `${VITE_PUBLIC_PATH}serverConfig.json`
|
||||
})
|
||||
.then(({ data: config }) => {
|
||||
let $config = app.config.globalProperties.$config;
|
||||
|
Reference in New Issue
Block a user