import request from '@/utils/request'

// 查询微博列表
export function listWb(query) {
  return request({
    url: '/tcZz/netManage/wb/list',
    method: 'get',
    params: query
  })
}

// 查询微博详细
export function getWb(id) {
  return request({
    url: '/tcZz/netManage/wb/' + id,
    method: 'get'
  })
}

// 新增微博
export function addWb(data) {
  return request({
    url: '/tcZz/netManage/wb',
    method: 'post',
    data: data
  })
}

// 修改微博
export function updateWb(data) {
  return request({
    url: '/tcZz/netManage/wb',
    method: 'put',
    data: data
  })
}

// 删除微博
export function delWb(id) {
  return request({
    url: '/tcZz/netManage/wb/' + id,
    method: 'delete'
  })
}

// 微博批量启用禁用
export function updateIsStatus(query) {
  return request({
    url: '/tcZz/netManage/wb/isStatus',
    method: 'get',
    params: query
  })
}

// 通用导入
export function importExcel(data) {
  return request({
    url: '/tcZz/netManage/wb/common/importExcel',
    method: 'post',
    data,
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}