123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- const { request } = require('../../../api/request')
- /**
- * 商品列表
- * @param obj
- * @returns {Promise}
- */
- export const getProductList = (obj) => request({
- url: '/api/shop/product/list',
- method: 'POST',
- data: {
- 'page': obj.pageNum,
- 'page_size': obj.pageSize,
- 'type': obj.type // 商品状态
- },
- showLoading: true
- })
- /**
- * 商品删除
- * @param id
- * @returns {Promise | Promise<unknown>}
- */
- export const postProductDelete = (id) => request({
- url: '/api/shop/product/delete',
- method: 'POST',
- data: {
- id
- },
- showLoading: true
- })
- /**
- * 商品上下架
- * @param id
- * @param productStatus
- * @returns {Promise<*>}
- */
- export const postProductUp = (id, productStatus) => request({
- url: '/api/shop/product/up',
- method: 'POST',
- data: {
- id,
- 'product_status': productStatus // 状态(0下架1上架)
- },
- showLoading: true
- })
|