import service from '@/service'

export const inquiryFilter = (users,status,days=7) => {
    return service({
        method: 'get',
        url: '/store/inquiryFilter',
        params: {
            users,
            status,
            days
        }
    })
}

export const inquiryList = (users,keys={},page=1,page_size=20) => {
    return service({
        method: 'post',
        url: '/store/inquiryList',
        data: {
            users,
            keys,
            page,
            page_size,
        }
    })
}

export const customerList = () => {
    return service({
        method: 'get',
        url: '/store/customerList'
    })
}

export const inquiryStatus = (ids) => {
    return service({
        method: 'post',
        url: '/store/inquiryStatus',
        data: {
            ids
        }
    })
}

export const createInquiry = (user_id,note='') => {
    return service({
        method: 'post',
        url: '/store/createInquiry',
        data: {
            user_id,
            note
        }
    })
}

export const removeInquiry = (ids) => {
    return service({
        method: 'post',
        url: '/store/removeInquiry',
        data: {
            ids
        }
    })
}

export const addInquiryGoods = (user_id,goods) => {
    return service({
        method: 'post',
        url: '/store/addInquiryGoods',
        data: {
            user_id,
            goods
        }
    })
}
