import request from '@/utils/request'

// 查询商家自提地址列表
export function businessSelfPickupAddressPage(query) {
    return request({
        url: `/business/businessSelfPickupAddress/page`,
        method: 'get',
        params: query
    })
}

// 新增商家自提地址
export function businessSelfPickupAddressAdd(data) {
    return request({
        url: `/business/businessSelfPickupAddress/add`,
        method: 'post',
        data
    })
}
// 修改商家自提地址
export function businessSelfPickupAddressEdit(data) {
    return request({
        url: `/business/businessSelfPickupAddress/edit`,
        method: 'post',
        data
    })
}
// 删除商家自提地址
export function businessSelfPickupAddressDelete(ids) {
    return request({
        url: `/business/businessSelfPickupAddress/del/${ids}`,
        method: 'post',
    })
}
// 获取商家自提地址详细信息
export function businessSelfPickupAddressInfo(id) {
    return request({
        url: `/business/businessSelfPickupAddress/info/${id}`,
        method: 'get',
    })
}

// 设置默认
export function businessSetDefaultStatus(id) {
    return request({
        url: `/business/businessSelfPickupAddress/setDefaultStatus/${id}`,
        method: 'post',
    })
}

// 商家设置自提地址状态
export function businessSetStatus(id) {
    return request({
        url: `/business/businessSelfPickupAddress/setStatus/${id}`,
        method: 'post',
    })
}
