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}//f28c699ad832413c8b529520ea4b6df0@sentry.guangdianyun.tv/22`,
  version: packageEnv.version,
  env: process.env.X_CA_STAGE,
  name: packageEnv.name
}

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

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