import request from '@/utils/request' // api地址 const api = { list: 'goods/list', detail: 'goods/detail', specData: 'goods/specData', categoryList:'categoryList', goodsList:'goodsList', goodsInfo:'goodsInfo' } // 商品列表 export const list = param => { return request.get(api.list, param) } // 商品详情 export const detail = goodsId => { return request.get(api.detail, { goodsId }) } // 获取商品规格数据 export const specData = (goodsId) => { return request.get(api.specData, { goodsId }) } export const categoryList = (data, option) => { return request.post(api.categoryList, data, option) } export const goodsList = (data, option) => { return request.post(api.goodsList, data, option) } export const goodsInfo = (data, option) => { return request.post(api.goodsInfo, data, option) }