import request from '@/utils/request'

export function getProductPage(params) {
    return request({
        url: '/admin/product/page',
        method: 'get',
        params
    })
}

export function getProductList(params) {
    return request({
        url: '/admin/product/list',
        method: 'get',
        params
    })
}

export function addProduct(data) {
    return request({
        url: '/admin/product/add',
        method: 'post',
        data: data
    })
}

export function editProduct(data) {
    return request({
        url: '/admin/product/update',
        method: 'post',
        data: data
    })
}

export function deleteProduct(productId) {
    return request({
        url: '/admin/product/delete/' + productId,
        method: 'get'
    })
}

