import request from '@/utils/request'


export function save(data) {
    return request({
        url: '/system/goods/save',
        method: 'post',
        data
    })
}

export function list(data) {
    return request({
        url: '/system/goods/list',
        method: 'post',
        params: {pageNum: data.pageNum, pageSize: data.pageSize},
        data
    })
}

export function remove(goodsId) {
    return request({
        url: '/system/goods/remove',
        method: 'get',
        params: {goodsId}
    })
}

export function onShelf(goodsId) {
    return request({
        url: '/system/goods/onShelf',
        method: 'get',
        params: {goodsId}
    })
}

export function offShelf(goodsId) {
    return request({
        url: '/system/goods/offShelf',
        method: 'get',
        params: {goodsId}
    })
}

export function detail(goodsId) {
    return request({
        url: '/system/goods/detail',
        method: 'get',
        params: {goodsId}
    })
}

export function serverUserList(data) {
    return request({
        url: '/system/goods/serverUserList',
        method: 'post',
        data
    })
}