/* * @Author: your name * @Date: 2021-04-01 10:18:41 * @LastEditTime: 2021-06-19 10:13:04 * @LastEditors: Please set LastEditors * @Description: In User Settings Edit * @FilePath: \exclusive-cloud-admin\common\src\assets\environment\environment.ts */ // 环境配置文件,区分各个环境 let origin = window.location.origin; let host = window.location.host; host = host.split(':')[0]; // const protocol = window.location.protocol; const protocol = "https:"; let platform = 'devlop'; switch (host) { case '127.0.0.1': case 'localhost': platform = 'develop'; break; case '120.31.138.91': case '10.11.70.14': case 'test-agentfront.eflycloud.com': case 'test-agent150b9.eflycloud.com': case 'test-agent12cff.eflycloud.com': case 'test-agent13e37.eflycloud.com': case 'agent9d35.eflycloud.com': case 'agentbc16.eflycloud.com': case 'test-tpl.eflycloud.com': platform = 'test'; break; case 'desktop001.eflycloud.com': platform = 'rj001'; break; case '121.201.125.130': case 'pre-agentadmin.eflycloud.com': case 'pre-agentfront.eflycloud.com': case 'agent17d90.eflycloud.com': case 'agent15db7.eflycloud.com': case 'agent117da.eflycloud.com': case 'agent167e7.eflycloud.com': case 'agent147ec.eflycloud.com': case 'agent102b1.eflycloud.com': case 'agent102b1.eflycloud.com': case 'agent129ca.eflycloud.com': case 'agentea54.eflycloud.com': case 'agent4913.eflycloud.com': case 'agent9e86.eflycloud.com': case 'agent665e.eflycloud.com': case 'agent953d.eflycloud.com': case 'agent6474.eflycloud.com': case 'agent17d90.agent.eflycloud.com': case 'agent15db7.agent.eflycloud.com': case 'agent117da.agent.eflycloud.com': platform = 'preonline'; break; default: platform = 'online'; } console.log('platform:'+platform) let config = { develop: { platform: 'develop', apiPrefix: "https://test-agentafter.eflycloud.com", agentHost: 'test-agentfront.eflycloud.com', apiOam: "http://10.11.70.14:30004", vncUrl: 'http://120.31.138.91:30005/vncCore', exclusiveCloudIndex: protocol +'//' + host, cloudUrl: protocol + '//' + host + '/manage', deployMode: 'ip' }, test: { platform: 'test', apiPrefix: protocol + '//test-agentafter.eflycloud.com', apiOam: "http://10.11.70.14:30004", vncUrl: origin + '/vncCore', exclusiveCloudIndex: protocol +'//' + host, cloudUrl: protocol + '//' + host + '/manage', deployMode: 'domain' }, preonline: { platform: 'preonline', apiPrefix: protocol + '//pre-agentafter.eflycloud.com', apiOam: 'http://' + host + ':30004', vncUrl: origin + '/vncCore', exclusiveCloudIndex: protocol +'//' + host, cloudUrl: protocol + '//' + host + '/manage', deployMode: 'domain' }, online: { platform: 'online', apiPrefix: protocol + '//agentafter.eflycloud.com', apiOam: "http://" + host + ":30004", vncUrl: origin + '/vncCore', exclusiveCloudIndex: protocol +'//' + host, cloudUrl: protocol + '//' + host + '/manage', deployMode: 'domain' }, } // @ts-ignore export default config[platform];