Newer
Older
smart-metering-front / src / api / customer / advice.ts
/**
 * 客户关系-投诉建议请求接口
 */
import request from '../index'
import type { IAdviceQuery } from '@/views/customer/advice/advice_interface'

// 列表查询
export function getAdviceList(data: IAdviceQuery) {
  return request({
    url: `/customer/advice/listPage?offset=${data.offset}&limit=${data.limit}`,
    method: 'post',
    data,
  })
}

// 数据删除
export function deleteAdvice(data: { id: string }) {
  return request({
    url: '/customer/advice/delete',
    method: 'post',
    data,
  })
}

// 查看详情
export function getAdviceDetail(data: { id: string }) {
  return request({
    url: '/customer/advice/detail',
    method: 'post',
    data,
  })
}

// 新增数据
export function addAdvice(data: object) {
  return request({
    url: '/customer/advice/add',
    method: 'post',
    data,
  })
}
// 编辑数据
export function updateAdvice(data: object) {
  return request({
    url: '/customer/advice/update',
    method: 'post',
    data,
  })
}

// 导出列表
export function exportAdviceList(data: Omit<IAdviceQuery, 'limit' | 'offset'>) {
  return request({
    url: '/customer/advice/export',
    method: 'post',
    responseType: 'blob',
    data,
  })
}