123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257 |
- import request from '@/utils/request'
- // 获取商品列表
- export function getProducts(data) {
- // {
- // 参数名称 是否必须 示例 备注
- // sid 否 二级分类编号
- // cid 否 一级分类编号(!)
- // keyword 否 搜索
- // priceOrder 否 价格排序
- // salesOrder 否 销量排序
- // news 否 是否新品
- // page 否 分页参数起始值
- // limit 否 分页数步长值
- // }
- return request({
- url: '/api/products',
- method: 'get',
- data
- });
- }
- // 获取商品详情
- export function goodsDetails(data, id) {
- return request({
- url: '/api/product/detail/' + id,
- method: 'get',
- data
- });
- }
- // 砍价列表
- export function getBargainList(data) {
- return request({
- url: '/api/bargain/list',
- method: 'get',
- data
- });
- }
- // 加入购物车
- export function cartAdd(data) {
- return request({
- url: '/api/cart/add',
- method: 'post',
- data
- });
- }
- // 收藏商品
- export function collectAdd(data) {
- return request({
- url: '/api/collect/add',
- method: 'post',
- data
- });
- }
- // 取消收藏商品
- export function collectDel(data) {
- return request({
- url: '/api/collect/del',
- method: 'post',
- data
- });
- }
- // 获取搜搜关键字
- export function searchKeyword(data) {
- return request({
- url: '/api/search/keyword',
- method: 'get',
- data
- });
- }
- // 获取热门分类信息
- export function groomList(data, type) {
- // 获取产品类型 1 精品推荐 2 热门榜单 3首发新品 4促销单品
- return request({
- url: '/api/groom/list/' + type,
- method: 'get',
- data
- });
- }
- // 获取秒杀商品详细
- export function seckillGoods(data, id) {
- return request({
- url: '/api/seckill/detail/' + id,
- method: 'get',
- data
- });
- }
- // 获取拼团商品详细
- export function groupGoods(data, id) {
- return request({
- url: '/api/combination/detail/' + id,
- method: 'get',
- data
- });
- }
- // 获取商品分类
- export function getCategoryList(data) {
- return request({
- url: '/api/category',
- method: 'get',
- data
- });
- }
- // 获取拼团列表
- export function getCombinationList(data) {
- return request({
- url: '/api/combination/list',
- method: 'get',
- data
- });
- }
- //取消拼团
- export function getCombinationLisRemove(data, id) {
- return request({
- url: '/api/combination/remove' + id,
- method: 'get',
- data
- });
- }
- //拼团开团页面数据
- export function getCombinationLisPink(data, id) {
- return request({
- url: '/api/combination/pink/' + id,
- method: 'get',
- data
- });
- }
- // 获取拼团海报
- export function getCombinationPoster(data) {
- return request({
- url: '/api/combination/poster',
- method: 'post',
- data
- });
- }
- // 获取秒杀分类
- export function getSeckillClass(data) {
- return request({
- url: '/api/seckill/index',
- method: 'get',
- data
- });
- }
- // 获取秒杀列表
- export function getSeckillList(data, id) {
- return request({
- url: '/api/seckill/list/' + id,
- method: 'get',
- data
- });
- }
- // 产品评价数量和好评度
- export function reply_config(data, id) {
- return request({
- url: '/api/reply/config/' + id,
- method: 'get',
- data
- });
- }
- // 获取产品评论
- export function reply_list(data, id) {
- return request({
- url: '/api/reply/list/' + id,
- method: 'get',
- data
- });
- }
- export function jfShop(data) {
- return request({
- url: '/api/product/hot',
- method: 'get',
- data
- });
- }
- //盲盒列表
- export function mysteryList(data) {
- return request({
- url: '/api/mystery/list',
- method: 'get',
- data
- });
- }
- //盲盒详情
- export function mysteryDetail(data) {
- return request({
- url: '/api/mystery/'+data.id,
- method: 'get',
- data
- });
- }
- //盲盒详情
- export function mysteryPay(data) {
- return request({
- url: '/api/mystery/'+data.id,
- method: 'post',
- data
- });
- }
- //我的盲盒
- export function mysteryMy(data) {
- return request({
- url: '/api/mystery/my',
- method: 'get',
- data
- });
- }
- //打开盲盒
- export function openMysteryMy(data) {
- return request({
- url: '/api/mystery/my',
- method: 'post',
- data
- });
- }
- // 合成方案
- export function craftGuide(data) {
- return request({
- url: '/api/nft/craft/guide',
- method: 'get',
- data
- });
- }
- // 选择合成列表
- export function nftMy(data) {
- return request({
- url: '/api/nft/my',
- method: 'get',
- data
- });
- }
- // 选择合成列表
- export function nftCraft(data) {
- return request({
- url: '/api/nft/craft',
- method: 'post',
- data
- });
- }
|