zyejMAll-mobile/sheep/api/product/spu.js

86 lines
1.4 KiB
JavaScript
Raw Permalink Normal View History

2024-08-07 10:31:42 +08:00
import request from '@/sheep/request';
const SpuApi = {
2024-09-27 18:36:26 +08:00
// 获得商品促销列表
2024-09-30 19:00:13 +08:00
getSpusales: (params) => {
2024-09-27 18:36:26 +08:00
return request({
url:'/product/spu/get-recommend-page',
method: 'GET',
2024-09-30 19:00:13 +08:00
params,
2024-09-27 18:36:26 +08:00
custom: {
showLoading: false,
showError: false,
},
});
},
// 获得商品 SPU 列表
getSpuListByIds: (ids) => {
return request({
url: '/product/spu/list-by-ids',
method: 'GET',
params: {
ids
},
custom: {
showLoading: false,
showError: false,
},
});
},
// 获得商品 SPU 分页
getSpuPage: (params) => {
return request({
url: '/product/spu/page',
method: 'GET',
params,
custom: {
showLoading: false,
showError: false,
},
});
},
// 查询商品
getSpuDetail: (id) => {
return request({
url: '/product/spu/get-detail',
method: 'GET',
params: {
id
},
custom: {
showLoading: false,
showError: false,
},
});
},
//获取拼团列表接口
getSpulist: (id) => {
return request({
2024-09-30 19:00:13 +08:00
url: '/promotion/combination-activity/spuList',
method: 'GET',
params: {
count:3
},
custom: {
showLoading: false,
showError: false,
},
});
},
//获取秒杀列表接口
getSpuSeckilllist: (id) => {
return request({
url: '/promotion/seckill-activity/spuList',
2024-09-27 18:36:26 +08:00
method: 'GET',
params: {
count:3
},
custom: {
showLoading: false,
showError: false,
},
});
},
2024-08-07 10:31:42 +08:00
};
2024-09-27 18:36:26 +08:00
export default SpuApi;