import request from '@/utils/request'

//设备列表
export function getMakerSpaceList(params) {
    return request({
        url: '/system/manage/bd-machine-maker-space/list',
        method: 'get',
        params
    })
}

//设备列表详情
export function getMakerSpaceDetailList(params) {
    return request({
        url: '/system/manage/bd-machine-maker-space/detailList',
        method: 'get',
        params
    })
}

//绑定设备
export function bindEquipment(data) {
    return request({
        url: '/system/manage/bd-machine-maker-space/save',
        method: 'post',
        data
    })
}

//解绑设备
export function unbindEquipment(data) {
    return request({
        url: '/system/manage/bd-machine-maker-space/update',
        method: 'post',
        data
    })
}

//设备码下拉选
export function getAvailableCode(params) {
    return request({
        url: '/system/manage/bd-machine-maker-space/available-code',
        method: 'get',
        params
    })
}


//购买次数列表
export function getMakerSpaceSilonumList(params) {
    return request({
        url: '/system/manage/bd-machine-maker-space/silo-num-list',
        method: 'get',
        params
    })
}

//购买次数详情列表
export function getMakerSpaceSilonumDetailList(params) {
    return request({
        url: '/system/manage/bd-machine-maker-space/num-detail',
        method: 'get',
        params
    })
}

//设备banner
export function getAppletConfigList(params) {
    return request({
        url: '/sale/manage/appletConfig/list',
        method: 'get',
        params
    })
}

//新增banner
export function saveBanner(data) {
    return request({
        url: '/sale/manage/appletConfig/save',
        method: 'post',
        data
    })
}

//banner和商品配置公用接口 banner传type:1,商品配置传type:2
//修改
export function updateBanner(data) {
    return request({
        url: '/sale/manage/appletConfig/update',
        method: 'post',
        data
    })
}
//查看单条详情
export function getBannerRowDetail(params) {
    return request({
        url: 'sale/manage/appletConfig/detail',
        method: 'get',
        params
    })
}
//删除
export function deletBannerRow(pkId) {
    return request({
        url: '/sale/manage/appletConfig/' + pkId,
        method: 'delete',
    })
}

//套餐配置列表
export function getThaliList(params) {
    return request({
        url: '/system/manage/thali/list',
        method: 'get',
        params
    })
}

//新增套餐配置
export function saveThali(data) {
    return request({
        url: '/system/manage/thali/save',
        method: 'post',
        data
    })
}

