import { HcApi } from '../../request/index'

export default {
    //分页
    async page(form) {
        return HcApi({
            url: '/api/blade-resource/oss/list',
            method: 'get',
            params: form,
        })
    },
    //详情
    async detail(id) {
        return HcApi({
            url: '/api/blade-resource/oss/detail',
            method: 'get',
            params: { id },
        })
    },
    //新增和编辑
    async submit(form) {
        return HcApi({
            url: '/api/blade-resource/oss/submit',
            method: 'post',
            data: form,
        })
    },
    //删除
    async del(ids) {
        return HcApi({
            url: '/api/blade-resource/oss/remove',
            method: 'post',
            params: { ids },
        })
    },
    async enable(id) {
        return HcApi({
            url: '/api/blade-resource/oss/enable',
            method: 'post',
            params: { id },
        })
    },
}
