import Request from '../common/request.js';
let request = new Request().http
 
// 获取商品页一级分类
 export function getProductCate(data) {
 	 return request('/app/product/getProductCate',data,'GET');
 }
 // 根据一级分类获取子分类
 export function getProductCateByPid(data) {
 	 return request('/app/product/getProductCateByPid',data,'GET');
 }
 // 获取商品列表
 export function getProducts(data) {
 	 return request('/app/product/getProducts',data,'GET');
 }
 export function getProductDetails(data) {
 	 return request('/app/product/getProductDetails',data,'GET');
 }
 export function getCarts(data) {
 	 return request('/app/product/getCarts',data,'GET');
 }
 export function addCart(data) {
 	 return request('/app/product/addCart',data,'POST','application/json;charset=UTF-8');
 }
 export function delCart(data) {
 	 return request('/app/product/delCart',data,'POST','application/json;charset=UTF-8');
 }
 export function cartNum(data) {
 	 return request('/app/product/cartNum',data,'POST','application/json;charset=UTF-8');
 }
 export function getCartCount(data) {
 	 return request('/app/product/getCartCount',data,'GET');
 }
 export function getGoodsProduct() {
 	 return request('/app/product/getGoodsProduct',null,'GET');
 }
 export function getGoodsProducts(data) {
 	 return request('/app/product/getGoodsProducts',data,'GET');
 }
 export function getTuiProducts(data) {
 	 return request('/app/product/getTuiProducts',data,'GET');
 }
 export function getStoreProductAttrValueList(data) {
 	 return request('/app/product/getStoreProductAttrValueList',data,'GET');
 }
 
 
 // 获取今日热卖榜和30天畅销榜
 export function todayAndHot(data) {
 	 return request('/app/product/getTodayHotAndThirtyDaysNewProductHot',data,'GET');
 }

 //查询当前商品最近的购买记录10条
 export function productHistoryOrderList(data) {
 	 return request(`/app/product/productHistoryOrderList/${data}`,data,'POST');
 }
  // 商品好评榜单
 export function productGoodProductList(data) {
 	 return request('/app/product/productGoodProductList',data,'POST');
 }
  // 获取商品规格列表
  export function getProductValues(data) {
 	 return request('/app/product/getProductValues',data,'GET');
 }
// 当天商品实时销量榜单
 export function productSalesRanking(data) {
 	 return request('/app/product/productSalesRanking',data,'POST');
 }



//  商品评价
// 新增一级评论
 export function productCommentAdd(data) {
 	 return request('/app/store/productComment/add',data,'POST');
 }
 // 点赞/取消点赞
 export function productLike(data) {
 	 return request('/app/store/productComment/like',data,'POST');
 }
//查询评论列表
 export function productCommentPage(data) {
 	 return request('/app/store/productComment/page',data,'POST');
 }
 //回复评论
 export function productCommentReply(data) {
 	 return request('/app/store/productComment/reply',data,'POST');
 }
  // 查询店铺评价汇总
  export function summary(data) {
 	 return request(`/app/store/productComment/store/summary/${data}`,data,'GET');
 }
 
 
 
 
 //店铺
 
 //店铺查询
 export function getStore(data) {
 	 return request(`/app/store/store/getStore/${data}`,data,'POST');
 }
 
 //店铺商品查询
 export function getStoreProduct(data) {
 	 return request('/app/store/store/getStoreProduct',data,'POST');
 }
 //关注店铺/取消关注
 export function follow(data) {
 	 return request('/app/store/store/follow',data,'POST');
 }
 
 
 

 
 
 
 
 
 