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

// 查询开放平台授权列表
export function listOpenapi(query) {
    return request({
        url: '/system/openapi/list',
        method: 'get',
        params: query
    })
}

// 查询开放平台授权详细
export function getOpenapi(id) {
    return request({
        url: '/system/openapi/' + id,
        method: 'get'
    })
}

// 新增开放平台授权
export function addOpenapi(data) {
    preventRepeatFu(true)
    return request({
        url: '/system/openapi',
        method: 'post',
        data: data
    })
}

// 修改开放平台授权
export function updateOpenapi(data) {
    preventRepeatFu(true)
    return request({
        url: '/system/openapi',
        method: 'put',
        data: data
    })
}

// 删除开放平台授权
export function delOpenapi(id) {
    return request({
        url: '/system/openapi/' + id,
        method: 'delete'
    })
}
