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.
54 lines
1.4 KiB
54 lines
1.4 KiB
/*
|
|
* @Author: ch
|
|
* @Date: 2022-04-02 09:54:53
|
|
* @LastEditors: ch
|
|
* @LastEditTime: 2022-04-09 15:28:08
|
|
* @Description: file content
|
|
*/
|
|
import {ToAsyncAwait, MsbRequest} from '@/common/utils';
|
|
|
|
const BASE_URL = '/mall/product';
|
|
/**
|
|
* 获取商品,瀑布流
|
|
* @param {*} params
|
|
*/
|
|
export const ApiGetGoodsList = (params) =>
|
|
ToAsyncAwait(MsbRequest.get(`${BASE_URL}/app/product/page`, params));
|
|
/**
|
|
* 获取推荐商品
|
|
* @param {*} params
|
|
*/
|
|
export const ApiGetRecommendedGoodsList = (params) =>
|
|
ToAsyncAwait(MsbRequest.get(`${BASE_URL}/app/product/recommended`, params));
|
|
/**
|
|
* 获取商品详情
|
|
* @param {*} params
|
|
*/
|
|
export const ApiGetGoodsDetail = (params) =>
|
|
ToAsyncAwait(MsbRequest.get(`${BASE_URL}/app/product/${params.id}`));
|
|
/**
|
|
* 获取商品sku信息
|
|
* @param {*} productId
|
|
*/
|
|
export const ApiGetGoodsSkus = (params) =>
|
|
ToAsyncAwait(MsbRequest.get(`${BASE_URL}/app/product/sku`,params));
|
|
|
|
/**
|
|
* 获取首页分类导航
|
|
*/
|
|
export const ApiGetCategoryNav = () =>
|
|
ToAsyncAwait(MsbRequest.get(`${BASE_URL}/app/product/categoryNavigation`));
|
|
|
|
|
|
/**
|
|
* 获取一级分类列表
|
|
*/
|
|
export const ApiGetCategoryOneList = () =>
|
|
ToAsyncAwait(MsbRequest.get(`${BASE_URL}/app/productCategory/levelOne`));
|
|
|
|
|
|
/**
|
|
* 获取二级分类和商品列表
|
|
*/
|
|
export const ApiGetCategoryTwoAndGoods = (params) =>
|
|
ToAsyncAwait(MsbRequest.get(`${BASE_URL}/app/productCategory/listCategoryAndProduct/${params.categoryId}`)); |