You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
840 B
43 lines
840 B
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)
|
|
}
|
|
|
|
|
|
|