goods.js 1.47 KB
import { http } from '@/main'

const url = 'rop-scrm-shopmall/router'
const getGoodsListApi = params => {
    params.method = 'scrm.api.shopmall.goods.configuration.page'
    return http({
        url,
        method: 'post',
        data: params,
        sign: true
    })
}

const updateGoodsStatusApi = params => {
    params.method = 'scrm.api.shopmall.goods.configuration.upgrade.update.status'
    return http({
        url,
        method: 'post',
        data: params,
        sign: true
    })
}

const delGoodsApi = params => {
    params.method = 'scrm.api.shopmall.goods.configuration.upgrade.delete'
    return http({
        url,
        method: 'post',
        data: params,
        sign: true
    })
}


const getCarlifeGoodsApi = params => {
    params.method = 'scrm.api.shopmall.goods.smartcarlife.page'
    return http({
        url,
        method: 'post',
        data: params,
        sign: true
    })
}


const addGoodsApi = params => {
    params.method = 'scrm.api.shopmall.goods.configuration.upgrade.add.or.update'
    return http({
        url,
        method: 'post',
        data: params,
        sign: true
    })
}


const getGoodsDetail = params => {
    params.method = 'scrm.api.shopmall.goods.configuration.detail'
    return http({
        url,
        method: 'post',
        data: params,
        sign: true
    })
}


export default {
    getGoodsListApi,
    updateGoodsStatusApi,
    delGoodsApi,
    getCarlifeGoodsApi,
    addGoodsApi,
    getGoodsDetail
}