@cdwx/system
Version:
成都文宣业务类服务模块组件库
29 lines (28 loc) • 786 B
JavaScript
var r = Object.defineProperty;
var i = (e, t, s) => t in e ? r(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
var c = (e, t, s) => i(e, typeof t != "symbol" ? t + "" : t, s);
import { createHttp as h } from "../../../../packages/http/src/index.js";
const n = class n {
constructor() {
// 系统模块路径
c(this, "httpInstance");
this.httpInstance = this.refreshHttp();
}
static getInstance() {
return n.instance || (n.instance = new n()), n.instance;
}
refreshHttp(t) {
return t ? this.httpInstance = h({
baseURL: t
}) : this.httpInstance = h(), this.httpInstance;
}
get http() {
return this.httpInstance;
}
};
c(n, "instance", null);
let a = n;
const f = a.getInstance();
export {
f as default
};