import request from '@/utils/request'

// 创建业务密码
export function createBusiPwd(data) {
  return request({
    url: '/ecw/busi-pwd/create',
    method: 'post',
    data: data
  })
}

// 更新业务密码
export function updateBusiPwd(data) {
  return request({
    url: '/ecw/busi-pwd/update',
    method: 'put',
    data: data
  })
}

// 删除业务密码
export function deleteBusiPwd(id) {
  return request({
    url: '/ecw/busi-pwd/delete?id=' + id,
    method: 'delete'
  })
}

// 获得业务密码
export function getBusiPwd(id) {
  return request({
    url: '/ecw/busi-pwd/get?id=' + id,
    method: 'get'
  })
}

// 获得业务密码分页
export function getBusiPwdPage(query) {
  return request({
    url: '/ecw/busi-pwd/page',
    method: 'get',
    params: query
  })
}

// 导出业务密码 Excel
export function exportBusiPwdExcel(query) {
  return request({
    url: '/ecw/busi-pwd/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

// 验证业务密码
export function validatePwd(data){
  return request({
    url: '/ecw/busi-pwd/validate-pwd',
    method: 'post',
    data: data
  })
}