const protocol = EASY_ENV_IS_BROWSER ? window.location.protocol : 'http';

const hostMap = {
  apiHost: `http://localhost:7002/`,
  // apiHost: `http://192.168.28.199:7001/`,
  // apiHost: 'https://quantum-blocks-vcc2.liangkebang.net/',
  h5Host: 'https://quantum-h5-vcc2.liangkebang.net',
  qiniuHost: `https://appsync.lkbang.net`,
  shenceUrl: `${protocol}//bn.xyqb.com/sa?project=default`,
  opapiHost: `https://opapi-vcc2.liangkebang.net`,
  qiniuUpHost: `${protocol}//up-z0.qiniup.com`,
  // kdspHost: 'https://kdsp-api-vcc2.liangkebang.net',
  talosHost: 'https://talos-vcc2.liangkebang.net',
  kdspHost: 'https://kdsp-api-vcc2.liangkebang.net',
  yxmTenantId: 560761,
  appIdMap: {
    560761: 'wxe16bf9293671506c',
    560867: 'wxccb8435d68e8c7d6',
  },
};

if (EASY_ENV_IS_BROWSER) {
  const apolloCfg = window.apollo || window.__INITIAL_STATE__.apollo;
  if (apolloCfg) {
    for (const key in apolloCfg) {
      if (apolloCfg[key]) {
        hostMap[key] = apolloCfg[key];
      }
    }
  }
}

export default hostMap;
