feat: 初始化
This commit is contained in:
commit
ac0d3b2f7d
54 files changed
+1808
No files matched your search
@@ -0,0 +1,39 @@
|
||||
const appName = "协同办公XX管理后台";
|
||||
|
||||
const passid = "paasid";
|
||||
|
||||
const ENV: any = import.meta.env || process.env;
|
||||
const VITE_APP_ENV: string = ENV.VITE_APP_ENV;
|
||||
|
||||
let proxyTarget = "";
|
||||
switch (VITE_APP_ENV) {
|
||||
case "test":
|
||||
proxyTarget = "https://xxxxxx.com";
|
||||
break;
|
||||
case "uat":
|
||||
proxyTarget = "https://xxxxxx.com";
|
||||
break;
|
||||
case "prod":
|
||||
proxyTarget = "https://xxxxxx.com";
|
||||
break;
|
||||
default:
|
||||
proxyTarget = "https://xxxxxx.com";
|
||||
break;
|
||||
}
|
||||
|
||||
const vconsoleDebug = true;
|
||||
const scriptSrcStr = "var src = '/midjs/mjs/vconsole/v3.14.6/vconsole.min.js';document.write('<scr' + 'ipt src=\"' + src + '\"></scr' + 'ipt>');document.write('<scr' + 'ipt>new window.VConsole();</scr' + 'ipt>');";
|
||||
let temp = "";
|
||||
if (vconsoleDebug && (VITE_APP_ENV === "test" || VITE_APP_ENV === "uat")) {
|
||||
temp = scriptSrcStr;
|
||||
} else {
|
||||
temp = `if (/vconsole=true/.test(window.location)) {${scriptSrcStr}};`;
|
||||
}
|
||||
const injectScriptStr = `<script>;(function () {${temp}})();</script>`;
|
||||
|
||||
export {
|
||||
appName,
|
||||
proxyTarget,
|
||||
passid,
|
||||
injectScriptStr
|
||||
};
|
||||
Reference in new issue
Block a user