123456789101112131415161718192021222324252627282930 |
- const { request } = require('../../../api/request')
- /**
- * 商品详情
- * @returns {Promise<*>}
- */
- export const getProductDetail = (productId) => request({
- url: '/api/user/caigou/product/detail',
- method: 'POST',
- data: {
- product_id: productId
- },
- showLoading: true
- })
- /**
- * 收藏/取消收藏商品
- * @param productId 商品ID
- * @param type 类型 1收藏2取消收藏
- * @returns {Promise<*>}
- */
- export const postProductCollect = (productId, type) => request({
- url: '/api/user/caigou/product/collect',
- method: 'POST',
- data: {
- product_id: productId,
- type: type
- },
- showLoading: true
- })
|