/* eslint-disable no-param-reassign */

const send_request = require('../utils/sendRequest')

/** 获取门禁详情 */
export function getGateDetail(id) {
  console.log("gateId", id)
  return send_request({
    url: '/access/gate/miniprogram/detail',
    method: "GET",
    data: {
      id: id,
    }
  })
}

/** 进入大门 */
export function enterGate(gateId, type) {
  let userInfo = wx.getStorageSync("userInfo")
  console.log("userId, gateId, type", userInfo.id, gateId, type)
  return send_request({
    url: '/access/access-log/miniprogram/enterGate',
    method: "GET",
    data: {
      userId: userInfo.id,
      gateId,
      type
    }
  })
}
