import { http } from '@/utils/http'

// 招商加盟
export const getParkServiceInvestment = (parkId: string) => {
  return http({
    method: 'GET',
    url: `/service/investment/park/${parkId}`
  })
}

// 我要加油
export const getParkServiceOil = (parkId: string) => {
  return http({
    method: 'GET',
    url: `/service/oil/park/${parkId}`
  })
}

// 我要充电
export const getParkServicePower = (parkId: string) => {
  return http({
    method: 'GET',
    url: `/service/power/park/${parkId}`
  })
}

// 我要修车
export const getParkServiceCar = (parkId: string) => {
  return http({
    method: 'GET',
    url: `/service/car/park/${parkId}`
  })
}

// 司机之家
export const getParkServiceDriver = (parkId: string) => {
  return http({
    method: 'GET',
    url: `/service/driver/park/${parkId}`
  })
}

// 母婴室
export const getParkServiceBoy = (parkId: string) => {
  return http({
    method: 'GET',
    url: `/service/boy/park/${parkId}`
  })
}

// 服务设施
export const getParkServiceFacility = (data: any) => {
  return http({
    method: 'GET',
    url: `/service/facility/park/list`,
    data
  })
}

// 我要吃饭列表
export const getParkServiceEatList = (data: any) => {
  return http({
    method: 'GET',
    url: `/service/eat/park/list`,
    data
  })
}

// 我要吃饭详情
export const getParkServiceEatDetail = (id: string, parkId: string) => {
  return http({
    method: 'GET',
    url: `/service/eat/${id}/${parkId}`
  })
}

// 精选商家列表
export const getParkServiceShopList = (data: any) => {
  return http({
    method: 'GET',
    url: `/service/shop/park/list`,
    data
  })
}

// 精选商家详情
export const getParkServiceShopDetail = (id: string, parkId: string) => {
  return http({
    method: 'GET',
    url: `/service/shop/${id}/${parkId}`
  })
}

// 附近景区列表
export const getParkServiceScenicList = (data: any) => {
  return http({
    method: 'GET',
    url: `/service/scenic/park/list`,
    data
  })
}

// 附近景区详情
export const getParkServiceScenicDetail = (id: string, parkId: string) => {
  return http({
    method: 'GET',
    url: `/service/scenic/${id}/${parkId}`
  })
}

// 出行提醒
export const getParkServiceNoticeList = (data: any) => {
  return http({
    method: 'GET',
    url: `/service/notice/park/list`,
    data
  })
}

// 出行提醒详情
export const getParkServiceNoticeDetail = (id: string) => {
  return http({
    method: 'GET',
    url: `/service/notice/park/${id}`
  })
}

// 服务区
export const getParkServiceList = (data: any) => {
  return http({
    method: 'GET',
    url: `/service/service/park/list`,
    data
  })
}

// 服务区详情
export const getParkServiceDetail = (id: string) => {
  return http({
    method: 'GET',
    url: `/service/service/park/${id}`
  })
}

// 常见问题列表
export const getQuestionList = (data: any) => {
  return http({
    method: 'GET',
    url: `/other/question/list/web`,
    data
  })
}

// 常见问题详情
export const getQuestionDetail = (id: string) => {
  return http({
    method: 'GET',
    url: `/other/question/web/${id}`
  })
}

// 新增问题反馈
export const addQuestionFeedback = (data: any) => {
  return http({
    method: 'POST',
    url: `/operate/feedback/mpAdd`,
    data
  })
}

// 查询问题反馈列表
export const getQuestionFeedbackList = (data: any) => {
  return http({
    method: 'GET',
    url: `/operate/feedback/mpList`,
    data
  })
}

// 查询问题反馈详情
export const getQuestionFeedbackDetail = (id: string) => {
  return http({
    method: 'GET',
    url: `/operate/feedback/mp/${id}`
  })
}

/**
 * @description: 获取banner
 * @return {*}
 */
export const getBannerApi = () => {
  return http<EmptyObjectType[]>({
    method: 'GET',
    url: '/operate/banner/web'
  })
}

// 服务区信息
export function getParkInfo(id: string) {
  return http({
    url: '/space/park/' + id,
    method: 'GET'
  })
}

// 获取设备信息
export function getDeviceInfo(id: string) {
  return http({
    url: `/device/wx/code/${id}`,
    method: 'GET'
  })
}

// 查询设备供应商列表
export function getDeviceSupplierAll() {
  return http({
    url: '/device/assets/supplier/all',
    method: 'GET'
  })
}
