// 线上测试 pre  线上正式online
// TODO 上线前检查
const app = getApp()
// const __env__ = 'pre'

// const dbDomains = {
//   'online': "https://95721.activity-18.m.duiba.com.cn",
//   'pre': "https://activity-pre.m.duiba.com.cn",
//   'test': "https://activity.m.duibatest.com.cn"
// }

// const dbDomainPaths = {
//   'online': dbDomains['online'] + "/projectx/p764e268d",
//   'pre': dbDomains['pre'] + "/projectx/p764e268d",
//   'test': dbDomains['test'] + "/projectx/pfebb155c"
// }

// /**小程序接口 */
// export const dbDomain = dbDomains[__env__]
// /**活动接口 */
// export const apiDbDomain = dbDomainPaths[__env__]


// 小程序授权登陆
export const dbLoginParam = {
  url: "/weimocloud/wechat/autoLogin", //dbDomain +
  method: "POST",
  header: {}
}

// 验证用户是否授权过
export const dbCheckHavePower = {
  url: "/weimocloud/wechat/loginCheck", //dbDomain +
  method: "POST",
  header: {}
}

/** 活动首页*/
export const apiCoopIndex = {
  url: "/weimocloud/projectx/index", //apiDbDomain +
  header: {},
  method: "GET"
}

/** 扫码*/
export const apiScan = {
  url: "/weimocloud/projectx/scan", //apiDbDomain +
  header: {},
  method: "GET"
}


// 上传头像数据
export const uploadFile = {
  url: "/weimocloud/customActivity/imgUploadUrl",
  method: "POST",
  header: {

  }
}

//保存头像昵称
export const authAvatar = {
  url: "/weimocloud/projectx/authAvatar",
  method: "GET",
  header: {}
}

// weimocloud/projectx/getTicketStatus?ticket=xx&qrcodeSign=xxx

//查询瓶盖码有没有过期
export const getTicketStatus = {
  url: "/weimocloud/projectx/getTicketStatus",
  method: "GET",
  header: {}
}


//获取邀请者头像昵称
export const getShareUserInfo = {
  url: "/weimocloud/projectx/getShareUserInfo",
  method: "GET",
  header: {}
}

//助力
export const doAssist = {
  url: "/weimocloud/projectx/doAssist",
  method: "GET",
  header: {}
}

//获取活动状态
export const getActivityStatus = {
  url: "/weimocloud/projectx/getActivityStatus",
  method: "GET",
  header: {}
}

//轮训查询奖品orderId
export const queryOrderId = {
  url: "/weimocloud/projectx/getOrderId",
  method: "GET",
  header: {}
}

export const userRecord = {
  url: "/weimocloud/projectx/userRecord",
  method: "GET",
  header: {}
}