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

// 查询注册用户列表
export function listRegistered(query) {
    return request({
        url: '/system/registered/list',
        method: 'get',
        params: query
    })
}

// 查询注册用户详细
export function getRegistered(registeredId) {
    return request({
        url: '/system/registered/' + registeredId,
        method: 'get'
    })
}

// 新增注册用户
export function addRegistered(data) {
    preventRepeatFu(true)
    return request({
        url: '/system/registered/add',
        method: 'post',
        data: data
    })
}

// 修改注册用户
export function updateRegistered(data) {
    preventRepeatFu(true)
    return request({
        url: '/system/registered',
        method: 'put',
        data: data
    })
}

// 删除注册用户
export function delRegistered(registeredId) {
    return request({
        url: '/system/registered/' + registeredId,
        method: 'delete'
    })
}

// 注册用户添加到用户表
export function addUserRegistered(registeredId) {
    preventRepeatFu(true)
    return request({
        url: '/system/registered/' + registeredId,
        method: 'post'
    })
}

// 注册发送验证码
export function sendsms(query) {
    return request({
        url: '/system/sms/send-message',
        method: 'get',
        params: query
    })
}
