// 使用的接口  开始

// 根据位置标识码查询广告列表
export const linkList = (locationCode) => {
	return uni.$u.http.get(`/ad/list/${locationCode}`)
}

//获取医院列表
export const getHospitalList = (params) => {
	return uni.$u.http.get(`/info/hospital/list`, {
		params: params
	})
}

// 数据字典
export const dictData = (key) => {
	return uni.$u.http.get(`/dict/data/type/${key}`)
}

//获取产品服务列表
export const getServiceList = (params) => {
	return uni.$u.http.get(`/service/serviceProduct/list`, {
		params: params
	})
}

//查询医院详情 
export const getHospitalInfo = (id) => {
	return uni.$u.http.get(`/info/hospital/info/${id}`)
}




// 使用的接口  结束






// 获取广告位广告
export const bannerList = (locationCode) => {
	return uni.$u.http.get(`/ad/list/${locationCode}`)
}
// 查询景区列表（商家列表）
export const businessList = (params) => {
	return uni.$u.http.get(`/ticket/business/list`, {
		params: params
	})
}
// 获取公告列表
export const commonList = (params) => {
	return uni.$u.http.get(`/common/notice/list`, {
		params: params
	})
}
// 获取公告详情
export const commonInfo = (id) => {
	return uni.$u.http.get(`/common/notice/info/${id}`)
}
// 查询商家分类列表
export const categoryList = (params) => {
	return uni.$u.http.get(`/ticket/business/category/list`, {
		params: params
	})
}
// 获取区域商家数
export const businessLbs = (parentCode) => {
	return uni.$u.http.get(`/ticket/business/lbs-children/${parentCode} `)
}
// 坐标解析
export const cnAreaGetCode = (location) => {
	return uni.$u.http.get(`/base/cnArea/get-address/${location}`)
}
// 查询所有城市且按字母排序
export const cnAreaAllCity = (location) => {
	return uni.$u.http.get(`/base/cnArea/all-city`)
}
// 查询热门城市列表
export const hotsCity = () => {
	return uni.$u.http.get(`/base/cnArea/hots`)
}
// 获取商家详细信息
export const businessInfo = (data) => {
	return uni.$u.http.post(`/ticket/business/info`, data)
}
// 查询商家商品列表
export const businessProductPage = (params) => {
	return uni.$u.http.get(`/ticket/businessProduct/page`, {
		params: params
	})
}
// 新增用户收藏
export const userCollectAdd = (data) => {
	return uni.$u.http.post(`/user/userCollect/add`, data)
}
// 删除用户收藏
export const userCollectDel = (ids) => {
	return uni.$u.http.post(`/user/userCollect/del/${ids}`)
}
// 获取用户收藏
export const getUserCollect = (data) => {
	return uni.$u.http.post(`/user/userCollect/getUserCollect`, data)
}
// 获取商家商品详细信息
export const businessProductInfo = (businessProductId) => {
	return uni.$u.http.get(`/ticket/businessProduct/info/${businessProductId}`)
}
// 新增用户游客信息
export const uservisitorAdd = (data) => {
	return uni.$u.http.post(`/uservisitor/add`, data)
}
// 删除用户游客信息
export const uservisitorDel = (visitorId) => {
	return uni.$u.http.post(`/uservisitor/del/${visitorId}`)
}
// 设置用户游客是否默认
export const setDefaulted = (visitorId) => {
	return uni.$u.http.post(`/uservisitor/setDefaulted/${visitorId}`)
}
// 获取用户默认游客
export const getDefaulted = () => {
	return uni.$u.http.get(`/uservisitor/getDefaulted`)
}
// 查询用户游客信息列表(分页)
export const uservisitorPage = (params) => {
	return uni.$u.http.get(`/uservisitor/page`, {
		params: params
	})
}
// 查询用户游客信息列表
export const uservisitorList = (params) => {
	return uni.$u.http.get(`/uservisitor/list`, {
		params: params
	})
}
// 获取用户游客信息详细信息
export const uservisitorInfo = (visitorId) => {
	return uni.$u.http.get(`/uservisitor/info/${visitorId}`)
}
// 修改用户游客信息
export const uservisitorEdit = (data) => {
	return uni.$u.http.post(`/uservisitor/edit`, data)
}
// 构建订单
export const orderBuild = (data) => {
	return uni.$u.http.post(`/ticket/order/build`, data)
}
// 下单
export const orderCreate = (data) => {
	return uni.$u.http.post(`/ticket/order/create`, data)
}
// 支付
export const orderPay = (data) => {
	return uni.$u.http.post(`/ticket/order/pay`, data)
}
// 获取自己的票据订单详细信息(订单编号)
export const orderInfo = (orderNo) => {
	return uni.$u.http.get(`/ticket/order/detail/${orderNo}`)
}
// 获取自己的票据订单详细信息(订单id)
export const orderIdInfo = (orderId) => {
	return uni.$u.http.get(`/ticket/order/info/${orderId}`)
}
// 获取票据订单下券码详细信息
export const orderCouponList = (params) => {
	return uni.$u.http.get(`/ticket/order/coupon/list`, {
		params: params
	})
}


// 退款申请构单
export const refundBuild = (data) => {
	return uni.$u.http.post(`/ticket/refund/order/build`, data)
}
// 退款申请
export const orderRefund = (data) => {
	return uni.$u.http.post(`/ticket/refund/order/refund`, data)
}
// 分页查询用户的积分订单
export const shoporderPage = (params) => {
	return uni.$u.http.get(`/shoporder/page`, {
		params: params
	})
}
// 待支付订单取消
export const orderCancel = (data) => {
	return uni.$u.http.post(`/ticket/order/cancel`, data)
}
// 分页查询退款
export const refundOrderPage = (params) => {
	return uni.$u.http.get(`/ticket/refund/order/page`, {
		params: params
	})
}
// 退款订单详情

export const refundOrderInfo = (refundOrderId) => {
	return uni.$u.http.get(`/ticket/refund/order/info/${refundOrderId}`)
}
export const geocodeRegeo = (params) => {
	return uni.$u.http.get(`https://restapi.amap.com/v3/geocode/regeo`, {
		params: params
	})
}
// 根据行政编号查城市
export const cnAreaLbsCity = (code) => {
	return uni.$u.http.get(`/base/cnArea/lbs-city/${code}`)
}
// 热门商家商品列表
export const businessProductHotList = (code) => {
	return uni.$u.http.get(`/ticket/businessProduct/hot-list`)
}
// 获取首页底部文字
export const homeFoot = (code) => {
	return uni.$u.http.get(`/common/home/foot`)
}
// 获取分享配置
export const configShare = (code) => {
	return uni.$u.http.get(`/common/config/share`)
}
// 绑定地推人员
export const userBinding = (data) => {
	return uni.$u.http.post(`/user/binding`, data)
}