import request from '@/utils/request'

// 查询公众号二维码列表
export function listCode(query) {
  return request({
    url: '/wechat/code/list',
    method: 'get',
    params: query
  })
}

// 查询公众号二维码详细
export function getCode(uid) {
  return request({
    url: '/wechat/code/' + uid,
    method: 'get'
  })
}

// 新增公众号二维码
export function addCode(data) {
  return request({
    url: '/wechat/code',
    method: 'post',
    data: data
  })
}

// 修改公众号二维码
export function updateCode(data) {
  return request({
    url: '/wechat/code',
    method: 'put',
    data: data
  })
}

// 删除公众号二维码
export function delCode(uid) {
  return request({
    url: '/wechat/code/' + uid,
    method: 'delete'
  })
}
