import { getLaunchOptions } from "../utils/util" ; const DEV_HOST = "" ; const NORMAL_HOST = "" ; const MOCK_HOST = "" ; export function getHost ( ) { const options = getLaunchOptions ( ) ; if ( options . query && options . query . env ) { return options . query . env == "beta" ? DEV_HOST : options . query . env == "mock" ? MOCK_HOST : NORMAL_HOST ; } return NORMAL_HOST ; } export interface ICgiConfig { url : string ; method : "OPTIONS" | "GET" | "HEAD" | "POST" | "PUT" | "DELETE" | "TRACE" | "CONNECT" ; contentType ? : string ; } interface IAPI { [ key ] : ICgiConfig ; } export const API = { login : { url : "/login" , method : "POST" } , getInfo : { url : "/getInfo" , method : "POST" } } ;