export const MODAL_MAP = {
  rule: 1,//规则
  rankInfo: 2,//排行榜信息
  rankPrize: 3,//排行榜中奖
  inviteRecord: 4,//邀请好友记录
  exchangeGoods: 5,//兑换商品
  energySuccess: 6 //能量兑换成功
}

export const PRIZE_PANEL = CFG.recordUrl;

export const SHARE_JOIN_URL = "";

//时间戳转换为：年-月-日
export const timestampToTime = function (timestamp) {
  if (timestamp === 0 || timestamp == null) {
    return ''
  } else {
    let date = new Date(timestamp);
    let Y = date.getFullYear() + '-';
    let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
    let D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate();
    return Y + M + D;
  }
}