mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2024-11-01 22:20:27 +08:00
21 lines
354 B
TypeScript
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}`;
|
|
}
|
|
};
|