cool-admin-vue/src/config/dev.ts
神仙都没用 1735d6258e 发布7.x
2023-09-28 13:50:15 +08:00

21 lines
354 B
TypeScript

import { getUrlParam, storage } from "/@/cool/utils";
import { proxy } from "./proxy";
export default {
// 根地址
host: proxy["/dev/"].target,
// 请求地址
get baseUrl() {
let proxy = getUrlParam("proxy");
if (proxy) {
storage.set("proxy", proxy);
} else {
proxy = storage.get("proxy") || "dev";
}
return `/${proxy}`;
}
};