import request from '@/utils/request'

// 获取商品详情
export const apiGoodsDetail = (params) => request.get({ url: '/goods/detail', data: params })

// 收藏列表
export const apiCollectLists = (params) => request.get({ url: '/collect/list', data: params })

// 商品收藏
export const apiGoodsCollection = (params) => request.post({ url: '/collect/add', data: params })

// 取消收藏
export const apiGoodsCollectionCancel = (params) =>
    request.get({ url: '/collect/del', data: params })

// 获取预约时间列表
export const apiAppointTime = (params = '') => request.get({ url: '/time/list', data: params })

// 获取提前预约时长
export const apiPreAppointTime = (params = '') =>
    request.get({ url: '/time/getTime', data: params })

// 添加评价
export const apiAddEvaluateGoods = (params = '') =>
    request.post({ url: '/comment/add', data: params })

// 获取商品评价列表
export const apiEvaluateGoodsLists = (params: any) =>
    request.post({ url: '/comment/list', data: params })

// 待评价列表
export const apiWaitEvaluateGoodsLists = (params: any) =>
    request.get({ url: '/order/wait/comment/list', data: params }, {})

// 获取商品评价统计数据-已评价、待评价
export const apiEvaluateStatis = (params: any) =>
    request.get({ url: '/comment/statistics/user', data: params })

// 获取商品评价统计数据-好评、差评...
export const apiEvaluateGoodsStatis = (params: any) =>
    request.get({ url: '/comment/statistics/goods', data: params })
