import request from '@/utils/request'

// 查询微信公众号列表
export function listAccount(query) {
  return request({
    url: '/wechat/account/list',
    method: 'get',
    params: query
  })
}

// 查询微信公众号详细
export function getAccount(uid) {
  return request({
    url: '/wechat/account/' + uid,
    method: 'get'
  })
}

// 新增微信公众号
export function addAccount(data) {
  return request({
    url: '/wechat/account',
    method: 'post',
    data: data
  })
}

// 修改微信公众号
export function updateAccount(data) {
  return request({
    url: '/wechat/account',
    method: 'put',
    data: data
  })
}

// 删除微信公众号
export function delAccount(uid) {
  return request({
    url: '/wechat/account/' + uid,
    method: 'delete'
  })
}
