electron launcher
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

38 lines
1.5 KiB

const path = require('path');
const data_path = "/home/kylin/tcop/TIS_ZDFWGK_CPP/data/app/xmlx.json";
const fs = require("fs");
let data = null;
exports.MANUAL_CREATED_FLAG = Symbol("MANUAL_CREATED");
exports.MAIN_WINDOW_FLAG = Symbol("MAIN_WINDOW");
exports.SUSPENSION_WINDOW_FLAG = Symbol("SUSPENSION_WINDOW_FLAG");
// exports.MAIN_WINDOW_URL = "file://" + path.resolve(__dirname, '../renderer/pages/main/index.html')
// exports.APP_WINDOW_URL = "file://" + path.resolve(__dirname, '../renderer/pages/main/index.html?view=application')
// exports.LOGIN_WINDOW_URL = "file://" + path.resolve(__dirname, '../renderer/pages/main/index.html?view=login')
try {
data = JSON.parse(fs.readFileSync(data_path,'utf-8'));
}catch (e) {
data = {schema:"QB"}
}
const schema = data.schema;
// let url = "file://" + path.resolve(__dirname, './index.html')
switch (schema) {
case 'KT':
url = 'http://localhost:3806/';
break;
case 'QB':
url = 'http://localhost:3806/TIS_PLATFORM/';
// url = 'http://localhost:8080/TIS_PLATFORM/';
// url = 'http://tis.inscloudtech.com:9009/TIS_PLATFORM/#/pc';
break;
default:
url = 'http://localhost:3806/TIS_PLATFORM/';
break;
}
exports.MAIN_WINDOW_URL = url;
exports.SUSPENSION_WINDOW_URL = "file://" + path.resolve(__dirname, '../renderer/pages/suspension/index.html')
// exports.APP_WINDOW_URL = 'http://localhost:8080/?view=application'
// exports.LOGIN_WINDOW_URL = 'http://localhost:8080/?view=login'