import request from '@/utils/request'



/**
 * 获取分类列表
 * @returns 
 */
export const getIndexType = (params) => request('/tdType', { params })

/**
 * 获取新闻公告列表
 * @returns 
 */
 export const getTipList = (params) => request('/notification', { params })
/**
 * 获取资源列表
 * @returns 
 * params 搜索条件放这里
 */
 export const getResourceList = (params) => request('/resource', { params })

/**
 * 加入收藏
 * @param {*} data 
 * @returns 
 */
 export const saveCollection = (targetType,targetId) => request(`/${targetType}/save/${targetId}`, { method: 'post' })

/**
 * 取消收藏
 * @param {*} data 
 * @returns 
 */
 export const removeCollection = (targetType,targetId) => request(`/${targetType}/save/${targetId}`, { method: 'delete'})
 
/**
 * 获取收藏
 * @param {*} data 
 * @returns 
 */
 export const getCollection = (targetType,targetId) => request(`/${targetType}/save/${targetId}`)

/**
 * 商铺详情
 * @param {*} id 
 * @returns 
 */
 export const getShopDetail = (id) => request(`/shop/${id}`)
 /**
 * 获取商铺套餐列表
 * @returns 
 */
  export const getShopPackage = (id,params) => request(`/shop/${id}/package`,{params})

  /**
 * 套餐详情
 * @param {*} id 
 * @returns 
 */
 export const getShopPackageDetail = (id) => request(`/taShopPackage/${id}`)
 
 /**
 * 获取套餐定位
 * @param {*} id 
 * @returns 
 */
   export const getShopcity = (id) => request(`/city/${id}`)

 /**
 * 本店指南
 * @param {*} id 
 * @returns 
 */
  export const getExtendContent = (type,id,params) => request(`/${type}/${id}/content`,{params})
 
/**
 * 景点详情
 * @param {*} id 
 * @returns 
 */
 export const getTouristDetail = (id) => request(`/tourist/${id}`)

/**
 * 获取推荐套餐列表
 * @returns 
 * params 搜索条件放这里
 */
 export const getRecommendList = (params) => request('/package/recommend', { params })



 
/**
 * 爆赞
 * @param {*} data 
 * @returns 
 */
 export const saveLike = (targetType,targetId) => request(`/${targetType}/like/${targetId}`, { method: 'post' })

/**
 * 取消爆赞
 * @param {*} data 
 * @returns 
 */
 export const removeLike = (targetType,targetId) => request(`/${targetType}/like/${targetId}`, { method: 'delete'})
 
//缺少套餐订单生成



/**
 * 获取搜索列表
 * @returns 
 */
 export const getIndexSearch  = (params) => request('/taSearch', { params })