const packageEnv = require('./package.json')
const protocol = process.client && window.location.protocol
const isHttps = protocol === 'https:'

export default {
  defDomain: isHttps ? process.env.API_DOMAIN.replace('8680', '843') : process.env.API_DOMAIN,
  noGateDomain: '//1812501212048408.cn-hangzhou.fc.aliyuncs.com/2016-08-15/proxy/gdyactivity.online',
  goDomain: '//golivec.guangdianyun.tv/v1',
  privateDomain: '//privateapi.guangdianyun.tv/v1',
  activityDomain: '//activity.guangdianyun.tv/v1',
  defBanner: `${process.env.OSS_DOMAIN}/common/img/lottery_banner_default_v2.png`,
  defShareImg: `${protocol || 'https:'}${process.env.OSS_DOMAIN}/common/img/lottery.png`, // 必须带协议头，否则微信分享配置时无法生效
  env: process.env.X_CA_STAGE,
  private: process.env.private,
  ossImageServe: process.env.private ? '' : '?x-oss-process=style/mobilebackground',
  tokenKey: 'token'
}

/* sentry */
export const sentryOptions = {
  dsn: `${protocol}//610a9f4b831d4d10b228658886eaa18d@sentry.guangdianyun.tv/14`,
  version: packageEnv.version,
  env: process.env.X_CA_STAGE,
  name: packageEnv.name,
  isAjax: false,
  isError: false,
}

/* 谷歌统计 */
export const GTAG_ID = 'G-HZHJLDPT80'

// arms
export const armsPid = 'huh7k89btk@1db1146a1ca55ff'
