// 1好办，2微盟，3取数平台，4观云台，5万象仪，6分享有礼，7付费会员，8会员通，9抖音 10云服务器 11商户后台
const config = {
  '/api-auth/login-for-haoban?requestProject=1': {
    serviceName: '好办',
    serviceType: 1
  },
  '/data-hook-frontend/#/flat-query-list': {
    serviceName: '取数平台',
    serviceType: 3
  },
  '/gicweb/cloud/#/storelist': {
    serviceName: '观云台',
    serviceType: 4
  },
  '/share-config/shareIndex': {
    serviceName: '分享有礼',
    serviceType: 6
  },
  '/gic-web/#/memberCardSet': {
    serviceName: '付费会员',
    serviceType: 7
  }
};

const defaultService = {
  serviceType: 11,
  serviceName: '商户'
};

function getService(key) {
  return config[key] || defaultService;
}

export function getCurrentService() {
  return getService(window.location.pathname + window.location.hash);
}
