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.
 
 
 
 
 

21 lines
452 B

import { get } from "../utils/request";
/**
* 获取商品信息
* @param {*} page 页号
* @param {*} category 分类,为空表示不分类
* @returns
*/
export const loadProductAPI = (page = 1, category = "") =>
get("/api/v1/products/", {
page,
category,
// per, 每页最多多少数据
});
/**
* 返回商品详情
* @param {*} id 商品id
* @returns
*/
export const loadProductByIdAPI = (id) => get("/api/v1/products/" + id);