import request from '@/utils/request'

// 查询商家合作申请列表
export function listMchApply(query) {
  return request({
    url: '/ss/mchApply/list',
    method: 'get',
    params: query
  })
}

// 查询商家合作申请详细
export function getMchApply(applyId) {
  return request({
    url: '/ss/mchApply/' + applyId,
    method: 'get'
  })
}

// 新增商家合作申请
export function addMchApply(data) {
  return request({
    url: '/ss/mchApply',
    method: 'post',
    data: data
  })
}

// 修改商家合作申请
export function updateMchApply(data) {
  return request({
    url: '/ss/mchApply',
    method: 'put',
    data: data
  })
}

// 删除商家合作申请
export function delMchApply(applyId) {
  return request({
    url: '/ss/mchApply/' + applyId,
    method: 'delete'
  })
}

// 审核商家合作申请
export function verifyMchApply(applyId, pass, remark) {
  return request({
    url: `/ss/mchApply/${applyId}/verify`,
    method: 'put',
    params: {
      applyId,
      pass,
      remark
    }
  })
}
