import request from '@/utils/request' //引入axios请求及拦截器
export default {
    //新增商品
    addGoods(data) {
        return request({
            url: '/goods',
            method: 'post',
            data
        })
    },
    //修改商品
    editGoods(data) {
        return request({
            url: '/goods/edit',
            method: 'post',
            data
        })
    },
    //新增题库商品
    addGoodsbank(data) {
        return request({
            url: '/goods/bank',
            method: 'post',
            data
        })
    },
    //修改题库商品
    editGoodsbank(data) {
        return request({
            url: '/goods/bank/edit',
            method: 'post',
            data
        })
    },
    //查询商品题库列表
    inquireGoodsbanklist(data) {
        return request({
            url: '/goods/bank/list',
            method: 'get',
            params: data
        })
    },
    //查询商品列表
    inquireGoods(data) {
        return request({
            url: '/goods/list',
            method: 'get',
            params: data
        })
    },
    //获取商品详细信息
    obtainGoods(data) {
        return request({
            url: `/goods/` + data,
            method: 'get',
        })
    },
}