import request from '@/common/axiosHelper.js'
/* 登录 */
export function login(data) {
  return request({
    url: '/Meter/LoginOwner',
    method: 'POST',
    data
  })
}

/* 发送手机验证码 */
export function sendSms(phone) {
  return request({
    url: '/Meter/SendSms',
    method: 'get',
    params:{phone}
  })
}

/* 获取欠费信息 */
export function Getfdc_pm_unfare(phone) {
  return request({
    url: '/Meter/Getfdc_pm_unfare',
    method: 'get',
    params:{phone}
  })
}

/* 获取缴费记录 */
export function Getfdc_pm_revfare(phone) {
  return request({
    url: '/Meter/Getfdc_pm_revfare',
    method: 'get',
    params:{phone}
  })
}

/* 获取房产信息 */
export function GetOwnerHouse(phone) {
  return request({
    url: '/Meter/GetOwnerHouse',
    method: 'get',
    params:{phone}
  })
}

/* 获取报修记录 */
export function GetRepaireList(phone) {
  return request({
    url: '/Meter/GetRepaireList',
    method: 'get',
    params:{phone}
  })
}
/* 获取投诉记录 */
export function GetComplaintList(phone) {
  return request({
    url: '/Meter/GetComplaintList',
    method: 'get',
    params:{phone}
  })
}

/* 我要报修 */
export function Insertfdc_pm_repair(data) {
  return request({
    url: '/Meter/Insertfdc_pm_repair',
    method: 'post',
    data
  })
}
/* 我要投诉 */
export function Insertfdc_pm_repairByTousu(data) {
  return request({
    url: '/Meter/Insertfdc_pm_repairByTousu',
    method: 'post',
    data
  })
}
/* 报修详情 */
export function GetRepairDetail(code) {
  return request({
    url: '/Meter/GetRepairDetail',
    method: 'get',
    params:{code}
  })
}

/* 绑定房屋信息 */
export function BindHouse(phone) {
  return request({
    url: '/Meter/BindHouse',
    method: 'get',
    params:{phone}
  })
}

/* 生成微信支付二维码 */
export function MakePayUrl(data) {
  return request({
    url: '/Meter/MakePayUrl',
    method: 'post',
    data
  })
}

/* 登出 */
export function logout(userid) {
  return request({
    url: '/user/logout',
    method: 'get',
    params: { userid }
  })
}

