// 查询产品列表
export const productPage = (params) => {
  return uni.$u.http.get(`/shop/product/page`, { params: params })
}
// 查询商品分类列表
export const productCategoryList = (params) => {
  return uni.$u.http.get(`/shop/productCategory/list`, { params: params })
}
// 查询用户积分日志列表
export const integralPage = (params) => {
  return uni.$u.http.get(`/user/integral/page`, { params: params })
}
// 获取产品详细信息
export const productInfo = (productId) => {
  return uni.$u.http.get(`/shop/product/info/${productId}`)
}
// 查询订单评论列表
export const commentList = (params) => {
  return uni.$u.http.get(`/shoporder/commentList`, { params: params })
}
// 新增用户地址
export const useraddressAdd = (data) => {
  return uni.$u.http.post(`/useraddress/add`, data)
}
// 查询用户地址列表
export const useraddressPage = (data) => {
  return uni.$u.http.get(`/useraddress/list`, data)
}
// 获得省市区三级数据
export const cnAreaTree = () => {
  return uni.$u.http.get(`/base/cnArea/tree-lbs`)
}
// 设置用户游客是否默认
export const useraddressSetDefaulted = (id) => {
  return uni.$u.http.post(`/useraddress/setDefaultStatus/${id}`)
}
// 获取用户地址详细信息
export const useraddressInfo = (id) => {
  return uni.$u.http.get(`/useraddress/info/${id}`)
}
// 修改用户地址
export const useraddressEdit = (data) => {
  return uni.$u.http.post(`/useraddress/edit`, data)
}
// 删除用户地址
export const useraddressDel = (ids) => {
  return uni.$u.http.post(`/useraddress/del/${ids}`)
}
// 构建订单
export const shoporderBild = (data) => {
  return uni.$u.http.post(`/shoporder/build`, data)
}
// 创建订单
export const shoporderCreate = (data) => {
  return uni.$u.http.post(`/shoporder/create`, data)
}
// 查询订单
export const shoporderInfo = (orderId) => {
  return uni.$u.http.get(`/shoporder/info/${orderId}`)
}
// 分页查询用户的积分订单
export const shoporderPage = (params) => {
  return uni.$u.http.get(`/shoporder/page`, { params: params })
}
// 简单收货对订单收货只需要传订单ID
export const simpleReceiving = (data) => {
  return uni.$u.http.post(`/shoporder/shopOrderPackage/simpleReceiving`, data)
}
// 获取订单发货包裹详细信息
export const shopOrderPackageInfo = (packageId) => {
  return uni.$u.http.get(`/shoporder/shopOrderPackage/info/${packageId}`)
}
// 订单评论
export const shoporderComment = (data) => {
  return uni.$u.http.post(`/shoporder/comment`, data)
}