{"size": 3240, "ext": "js", "max_stars_repo_path": "utils/product.js", "max_stars_repo_name": "victorycjw/FruitShop", "max_stars_repo_stars_event_min_datetime": "2020-03-23T15:28:43.000Z", "max_stars_repo_stars_event_max_datetime": "2020-06-20T16:41:35.000Z", "max_issues_repo_path": "utils/product.js", "max_issues_repo_name": "victorycjw/FruitShop", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "utils/product.js", "max_forks_repo_name": "victorycjw/FruitShop", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 2, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 25.1162790698, "max_line_length": 70, "alphanum_fraction": 0.6953703704}
const app = getApp()
const request = require('request.js')

//根据OPENID查询用户是否已存在
export function checkUserInfo(data, resolve) {
  request.request({
    url: `${app.globalData.API_URL}/appbasic/checkUserInfo`,
    data: data,
    success: resolve,
    fail: function() {}
  })
}

//注册用户信息
export function addUserInfo(data, resolve) {
  request.request({
    url: `${app.globalData.API_URL}/appbasic/addUserInfo`,
    data: data,
    success: resolve,
    fail: function() {}
  })
}


// 大厅红包列表(未抢完的)
export function getLandMineList(formdata, resolve) {
  formdata.sysCode = app.globalData.SYS_CODE
  formdata.sysName = app.globalData.SYS_NAME
  request.request({
    url: `${app.globalData.API_URL}/appLandMine/getLandMineList`,
    data: formdata,
    success: resolve,
    fail: function() {},
    complete: function() {}
  })
}

// 创建雷包
export function createLandMine(formdata, resolve) {
  formdata.sysCode = app.globalData.SYS_CODE
  formdata.sysName = app.globalData.SYS_NAME
  request.request({
    url: `${app.globalData.API_URL}/appLandMine/createLandMine`,
    data: formdata,
    success: resolve,
    fail: function() {},
    complete: function() {}
  })
}

// 创建雷包记录
export function getCreateGameRecList(formdata, resolve) {
  formdata.sysCode = app.globalData.SYS_CODE
  formdata.sysName = app.globalData.SYS_NAME
  request.request({
    url: `${app.globalData.API_URL}/appLandMine/getCreateGameRecList`,
    data: formdata,
    success: resolve,
    fail: function() {},
    complete: function() {}
  })
}



// 抢红包
export function grabRedPacket(formdata, resolve) {
  formdata.sysCode = app.globalData.SYS_CODE
  formdata.sysName = app.globalData.SYS_NAME
  request.request({
    url: `${app.globalData.API_URL}/appLandMine/grabRedPacket`,
    data: formdata,
    success: resolve,
    fail: function() {},
    complete: function() {}
  })
}
// 抢红包
export function grabSubsidy(formdata, resolve) {
  formdata.sysCode = app.globalData.SYS_CODE
  formdata.sysName = app.globalData.SYS_NAME
  request.request({
    url: `${app.globalData.API_URL}/appLandMine/grabSubsidy`,
    data: formdata,
    success: resolve,
    fail: function() {},
    complete: function() {}
  })
}
// 抢雷包记录
export function getGrabRedPacketList(formdata, resolve) {
  formdata.sysCode = app.globalData.SYS_CODE
  formdata.sysName = app.globalData.SYS_NAME
  request.request({
    url: `${app.globalData.API_URL}/appLandMine/getGrabRedPacketList`,
    data: formdata,
    success: resolve,
    fail: function() {},
    complete: function() {}
  })
}

// 单个雷包记录
export function getRedPacketListById(formdata, resolve) {
  formdata.sysCode = app.globalData.SYS_CODE
  formdata.sysName = app.globalData.SYS_NAME
  request.request({
    url: `${app.globalData.API_URL}/appLandMine/getRedPacketListById`,
    data: formdata,
    success: resolve,
    fail: function() {},
    complete: function() {}
  })
}



// 抢补助时间判断
export function getSubsidyDateState(formdata, resolve) {
  formdata.sysCode = app.globalData.SYS_CODE
  formdata.sysName = app.globalData.SYS_NAME
  request.request({
    url: `${app.globalData.API_URL}/appLandMine/getSubsidyDateState`,
    data: formdata,
    success: resolve,
    fail: function() {},
    complete: function() {}
  })
}