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.
29 lines
561 B
29 lines
561 B
1 year ago
|
import request from '@/utils/request'
|
||
|
|
||
|
// api地址
|
||
|
const api = {
|
||
|
list: 'goods/list',
|
||
|
detail: 'goods/detail',
|
||
|
specData: 'goods/specData',
|
||
|
cartList: 'goods/cartList'
|
||
|
}
|
||
|
|
||
|
// 商品列表
|
||
|
export const list = param => {
|
||
|
return request.get(api.list, param)
|
||
|
}
|
||
|
|
||
|
export const cartList = param => {
|
||
|
return request.get(api.cartList, param)
|
||
|
}
|
||
|
|
||
|
// 商品详情
|
||
|
export const detail = goodsId => {
|
||
|
return request.get(api.detail, { goodsId })
|
||
|
}
|
||
|
|
||
|
// 获取商品规格数据
|
||
|
export const specData = (goodsId) => {
|
||
|
return request.get(api.specData, { goodsId })
|
||
|
}
|