import { baseUrlType } from "src/app/type/types";

const domainName: string = document.domain; //域名
const port: string = location.port; //端口
const protocolName: string = document.location.protocol; //http协议
const wsName: string = protocolName === "http:" ? "ws" : "wss"; //ws协议
const baseUrl: baseUrlType = {
  domain: `${protocolName}//${domainName}:${port}`, //chrome下载地址
  host: `${protocolName}//${domainName}:${port}/service`, //接口地址
  specimenViewHost: `${protocolName}//${domainName}:${port}/specimenView`, //业务视图地址
  bigScreenHost: `${protocolName}//${domainName}:${port}/largeScreen`, //大屏地址地址
  bigScreenHost2: `${protocolName}//${domainName}:${port}/largeScreen2`, //运送陪检大屏地址
  bigScreenHost3: `${protocolName}//${domainName}:${port}/largeScreen3`, //运维大屏地址
  homeWs: `${wsName}://${domainName}:${port}/webSocket/index`, //websocket首页地址
  mainWs: `${wsName}://${domainName}:${port}/webSocket/message/manage`, //websocket管理端地址
  nurseWs: `${wsName}://${domainName}:${port}/webSocket/message/nurse`, //websocket护士端地址
  fwtWs: `${wsName}://${domainName}:${port}/webSocket/message/ser`, //websocket服务台地址
  phoneWs: `${wsName}://${domainName}:${port}/webSocket/message/phone`, //websocket服务台来电地址
  // phoneWs: `${wsName}://192.168.3.108:29999/webSocket/message/phone`, //websocket服务台来电地址-测试
};
export default baseUrl;
