import request from '@/utils/request'

// 查询微信消息回复规则列表
export function listRule(query) {
  return request({
    url: '/wechat/rule/list',
    method: 'get',
    params: query
  })
}

// 查询微信消息回复规则详细
export function getRule(uid) {
  return request({
    url: '/wechat/rule/' + uid,
    method: 'get'
  })
}

// 新增微信消息回复规则
export function addRule(data) {
  return request({
    url: '/wechat/rule',
    method: 'post',
    data: data
  })
}

// 修改微信消息回复规则
export function updateRule(data) {
  return request({
    url: '/wechat/rule',
    method: 'put',
    data: data
  })
}

// 删除微信消息回复规则
export function delRule(uid) {
  return request({
    url: '/wechat/rule/' + uid,
    method: 'delete'
  })
}
