import { TK_SERVER_HTML_URL } from "@/constants/constants.js"; export default function (uuid) { const url = "/resource.js?u=" + uuid; // TK_SERVER_HTML_URL.replace("http", "http") + ":8000/resource.js?u=" + uuid; // if(process.env.NODE_ENV !== 'production') fetch(url); const isElectron = typeof nodeRequire != "undefined"; if (!isElectron) return; const https = window.nodeRequire("https"); // console.log("sent request: ", url); // "https://ecs-test.qmth.com.cn:8878/api/ecs_core" + https .get(url, (response) => { var configContent = ""; response .on("data", function (data) { //加载到内存 configContent += data; }) .on("end", function () { configContent; // console.log("resres", configContent); }); }) .on("error", () => { https.get(url); }); }