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.
yanzong_qianduan/api/goods/index.js

100 lines
2.7 KiB

11 months ago
import request from '@/utils/request'
// api地址
10 months ago
const api = {
10 months ago
browseHistoryList: 'goods/browseLog',
11 months ago
list: 'goods/list',
detail: 'goods/detail',
basic: 'goods/basic',
specData: 'goods/specData',
skuInfo: 'goods/skuInfo',
recommended: 'goods/recommended',
poster: 'goods/poster',
10 months ago
serveList:'goods.service/list',
presale:'goods/presale'
11 months ago
}
10 months ago
// 短连接
export const goodsShortUrl = (param, option) => {
return request.post('goods/shortUrl', param, option)
}
// 商品价格修改
export const editGoodsPrice = (param, option) => {
return request.post('StoreKeeper/editGoodsPrice', param, option)
}
10 months ago
// 商品浏览记录
10 months ago
export const browseHistoryList = (param, option) => {
return request.get('goods/browseLog', param, option)
10 months ago
}
// 商品浏览记录 删除
export const browseHistoryDel = (param, option) => {
return request.post('goods/browseDel', param, option)
}
10 months ago
10 months ago
// 取消预约
export const canlpresale = (data) => {
return request.get('goods/canlpresale', data)
}
// 预约列表
export const presaleList = (data) => {
return request.get('goods/presaleList', data)
}
// 立即预约
export const presale = (data) => {
return request.get('goods/presale', data)
}
10 months ago
10 months ago
// // 商品浏览记录
// export const presale = (param, option) => {
// return request.get(api.presale, param, option)
// }
10 months ago
// 服务
export const serveList = (param, option) => {
return request.get(api.serveList, param, option)
}
11 months ago
// 商品列表
export const list = (param, option) => {
return request.post(api.list, param, option)
11 months ago
}
// 商品详情(详细数据)
export const detail = (goodsId, verifyStatus = true, param = {}) => {
verifyStatus = Number(verifyStatus)
return request.get(api.detail, { goodsId, verifyStatus, ...param })
}
// 商品详情(基本数据)
export const basic = (goodsId, verifyStatus = true, param = {}) => {
verifyStatus = Number(verifyStatus)
return request.get(api.basic, { goodsId, verifyStatus, ...param })
}
// 获取商品规格数据
export const specData = (goodsId) => {
return request.get(api.specData, { goodsId })
}
// 获取推荐的商品列表
export const recommended = () => {
return request.get(api.recommended)
}
// 获取商品的指定SKU信息
export const skuInfo = (goodsId, goodsSkuId, param) => {
return request.get(api.skuInfo, { goodsId, goodsSkuId, ...param })
}
// 生成商品海报
export const poster = param => {
return request.get(api.poster, param)
9 months ago
}
// 店长设置秒杀价
export const editGoodsSeckillPrice = param => {
return request.post('StoreKeeper/editGoodsSeckillPrice', param)
}
// 是否有货
export const getGoodsStock = param => {
8 months ago
return request.post('goods/getGoodsStock', param)
9 months ago
}