const cfg = {
  http: "http://",
  https: "https://",
  host: "testapi.hoolihome.com",
  host_cdn: "testapi.hoolihome.com",
  api: function(env) {
    /* 接口服务器域名 */
    let api = "//testapi.hoolihome.com";
    let host = window.location.host;
    if (env !== "java") {
      api = "//testapi.hoolihome.com";
    }
    if (host === "readym.hoolihome.com") {
      api = "//readyapi.hoolihome.com";
    } else if (host === "m.hoolihome.com") {
      api = "//api.hoolihome.com";
    }
    return api;
  },
  cdn: function() {
    /* cdn服务器域名 */
    return "//" + this.host_cdn;
  }
};

export default cfg;
