/*
 * @Author: micky 1254597151@qq.com
 * @Date: 2023-08-14 15:38:40
 * @LastEditors: micky 1254597151@qq.com
 * @LastEditTime: 2023-12-20 20:08:02
 * @FilePath: \housekeeping-uniapp\src\api\goods.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '@/utils/request'

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

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

// 商品收藏
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/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 })

// 退单规则
export const apiRuleList = (params: any) =>
    request.get({ url: '/goods/getCancelOrderGoodsConfig', data: params })

// 获取活动专区详情
export const apiActivityDetail = (params: any) =>
    request.get({ url: '/activity/detail', data: params })

// 获取活动专区列表
export const apiActivityList = (params: any) => request.get({ url: '/activity/list', data: params })
