Files
padui-home/config/index.ts
T
2023-04-22 13:04:22 +08:00

42 lines
1.2 KiB
TypeScript

const appName = "头牌派对";
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 "prod":
proxyTarget = "https://xxxxxx.com";
break;
default:
proxyTarget = "https://xxxxxx.com";
break;
}
const beianhao = "鲁ICP备2023011417号-1";
const beianhaoUrl = "https://beian.miit.gov.cn/#/Integrated/index";
const androidUrl = "http://img.haloapp.vip/card-release_jiagu_sign.apk";
const iosUrl = "https://www.pgyer.com/toupai";
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,
injectScriptStr,
beianhao,
beianhaoUrl,
androidUrl,
iosUrl
};