import request from '@/utils/request'
import { preventRepeatFu } from "@/utils/hciot";

// 查询邮件用户列表
export function listEmail(query) {
    return request({
        url: '/system/email/list',
        method: 'get',
        params: query
    })
}

// 查询邮件用户详细
export function getEmail(id) {
    return request({
        url: '/system/email/' + id,
        method: 'get'
    })
}

// 新增邮件用户
export function addEmail(data) {
    preventRepeatFu(true)
    return request({
        url: '/system/email',
        method: 'post',
        data: data
    })
}

// 修改邮件用户
export function updateEmail(data) {
    preventRepeatFu(true)
    return request({
        url: '/system/email',
        method: 'put',
        data: data
    })
}

// 删除邮件用户
export function delEmail(id) {
    return request({
        url: '/system/email/' + id,
        method: 'delete'
    })
}
