zhwl-miniapp/common/http/index.js

678 lines
14 KiB
JavaScript
Raw Permalink Normal View History

2025-06-26 12:38:35 +08:00
import https from './interface'
/* handle 默认是false true 为自己处理请求错误401、404、405不交给全局处理 */
export default {
// 查询区块管理列表
getBlockList (data) {
return https({
url: `/app/cms/blockList`,
method: 'GET',
data
})
},
// 查询文章列表
archivesList (data) {
return https({
url: `/app/cms/archivesList`,
method: 'GET',
data
})
},
// 查询文章详情
archieveDetail (data) {
return https({
url: `/app/cms/archieveDetail?id=${data.id}`,
method: 'GET'
})
},
// 查询热门攻略列表
introductionList (data) {
return https({
url: `/app/cms/introductionList`,
method: 'GET',
data
})
},
// 热门攻略详情
archieveRmglDetail (data) {
return https({
url: `/app/cms/archieveRmglDetail`,
method: 'GET',
data
})
},
// 查询旅游公告列表
noticeList (data) {
return https({
url: `/app/cms/noticeList`,
method: 'GET',
data
})
},
// 查询旅游资讯列表
informationList (data) {
return https({
url: `/app/cms/informationList`,
method: 'GET',
data
})
},
// 查询热门推荐列表
scenicList (data) {
return https({
url: `/app/cms/scenicList`,
method: 'GET',
data
})
},
// 查询景区详情 包含门票列表
scenicDetail (data) {
return https({
url: `/app/cms/scenicDetail/${data.id}`,
method: 'GET'
})
},
// 字典查询
common (data) {
return https({
url: `/app/common/${data.dictType}`,
method: 'GET'
})
},
// 微信小程序 授权登录
login (data) {
return https({
url: `/app/user/login`,
method: 'GET',
data
})
},
// 修改用户
updateUser (data) {
return https({
url: `/app/user/updateUser`,
method: 'post',
data
})
},
// 查询用户信息
getUserInfo (data) {
return https({
url: `/app/user/getUserInfo`,
method: 'GET',
data
})
},
// 收藏
addUserCollect (data) {
return https({
url: `/app/userCollect/addUserCollect`,
method: 'post',
data
})
},
// 取消收藏
deleteUserCollect (data) {
return https({
url: `/app/userCollect/deleteUserCollect`,
method: 'post',
data
})
},
// 我的收藏
myCollect (data) {
return https({
url: `/app/userCollect/myCollect`,
method: 'GET',
data
})
},
// 查询投诉建议列表
reportList (data) {
return https({
url: `/app/report/reportList`,
method: 'GET',
data
})
},
// 查询投诉建议详情
reportDetail (data) {
return https({
url: `/app/report/reportDetail/${data.id}`,
method: 'GET'
})
},
// 新增投诉建议
addReport (data) {
return https({
url: `/app/report/addReport`,
method: 'post',
data
})
},
// 查询游客信息
touristList (data) {
return https({
url: `/app/tour/touristList`,
method: 'GET',
data
})
},
// 添加游客
addTourist (data) {
return https({
url: `/app/tour/addTourist`,
method: 'post',
data
})
},
// 修改游客
updateTourist (data) {
return https({
url: `/app/tour/updateTourist`,
method: 'put',
data
})
},
// 删除游客
delTourist (data) {
return https({
url: `/app/tour/delTourist/${data.id}`,
method: 'delete'
})
},
// 获取景点推荐
scenicSpotList (data) {
return https({
url: `/app/cms/scenicSpotList`,
method: 'get',
data
})
},
// 获取景点详情
scenicSpotDetail (id) {
return https({
url: `/app/cms/scenicSpotDetail/${id}`,
method: 'get'
})
},
// 获取小程序配置信息
getConfigData (id) {
return https({
url: `/app/common/getConfigData`,
method: 'get'
})
},
// 新增景区门票订单
createTicketOrderPrepay (data) {
return https({
url: `/app/pay/createTicketOrder`,
method: 'post',
data
})
},
// 查询门票订单详情
getTicketOrderDetailPrepay (orderId) {
return https({
url: `/app/pay/getTicketOrderDetailPrepay/${orderId}`,
method: 'get'
})
},
// 门票订单列表
getTicketOrderPrepay (data) {
return https({
url: `/app/pay/getTicketOrderPrepay`,
method: 'get',
data
})
},
// 取消门票订单
cancelTicketOrderPrepay (orderCode) {
return https({
url: `/app/pay/cancelTicketOrder/${orderCode}`,
method: 'post'
})
},
// 获取门票详细信息
ticketDetail (id) {
return https({
url: `/app/cms/ticketDetail/${id}`,
method: 'get'
})
},
cinemaTicketDetail (data) {
return https({
url: `/app/cinemaTicket`,
method: 'get',
data
})
},
// 游客申请退款
toRefund (data) {
return https({
url: `/app/pay/ticketOrder/toRefund`,
method: 'post',
data
})
},
// 获取门票列表
ticketList (data) {
return https({
url: `/app/cms/ticketList`,
method: 'get',
data
})
},
// 获取分组列表
groupList (data) {
return https({
url: `/app/ticket/groupList`,
method: 'get',
data
})
},
// 获取活动专区列表
activityZoneList (data) {
return https({
url: `/app/cms/activityZoneList`,
method: 'get',
data
})
},
// 修改游客默认
updateTourStatus (data) {
return https({
url: `/app/tour/updateStatus`,
method: 'put',
data
})
},
// 手续费
calculateFee (data) {
return https({
url: `/app/pay/ticketOrder/calculateFee`,
method: 'get',
data
})
},
// 删除订单
deleteTicketOrder (orderId) {
return https({
url: `/app/pay/ticketOrder/deleteTicketOrder/${orderId}`,
method: 'put'
})
},
// 订单详情所有退款列表
getRefundListByOrderId (orderId) {
return https({
url: `/app/pay/ticketOrder/getRefundListByOrderId/${orderId}`,
method: 'get',
})
},
// 退款列表
getRefundList (data) {
return https({
url: `/app/pay/ticketOrder/getRefundList`,
method: 'get',
data
})
},
// 退款列表详情
getRefundInfo (refundId) {
return https({
url: `/app/pay/ticketOrder/getRefundInfo/${refundId}`,
method: 'get'
})
},
// 查询地图导览
mapList (data) {
return https({
url: `/app/cms/mapList`,
method: 'GET',
data
})
},
// 查询只会导览.
getGuideList (data) {
return https({
url: `/app/zhdl/guideList`,
method: 'get',
})
},
// 查询中国行政地区列表
listAll (parentCode) {
return https({
url: `/app/common/listAll?parentCode=${parentCode}`,
method: 'get'
})
},
// 获取手机号
getPhoneNumber (data) {
return https({
url: `/app/user/getPhoneNumber`,
method: 'get',
data
})
},
// 查询所属景区的全部数据点
pointMapList (data) {
return https({
url: `/app/point/pointMapList`,
method: 'get',
data
})
},
// 查询数据点相关的所有浏览路线
guideLineList (data) {
return https({
url: `/app/line/guideList`,
method: 'get',
data
})
},
// 查询路线详情
guideDetail (data) {
return https({
url: `/app/line/guideDetail`,
method: 'get',
data
})
},
// 权益卡激活
orderActivation (data) {
return https({
url: `/app/pay/orderActivation`,
method: 'put',
data
})
},
// 权益卡列表
orderNklist (data) {
return https({
url: `/app/pay/orderNklist`,
method: 'get',
data
})
},
getSalelnfo (data) {
return https({
url: `/app/cinemaTicket/getSaleInfo`,
method: 'get',
data
})
},
// 权益卡详情
orderNkDetail (id) {
return https({
url: `/app/pay/orderNkDetail/${id}`,
method: 'get'
})
},
// 演绎票下单
buyOtherTicket (data) {
return https({
url: `/app/cinemaTicket/buyTicket`,
method: 'post',
data
})
},
// 小程序查询导游列表
guideList (data) {
return https({
url: `/app/guide/list`,
method: 'get',
data
})
},
// 卡信息
getPrepaidCard () {
return https({
url: `/app/prepaidCard`,
method: 'get'
})
},
// 开卡
postPrepaidCard (data) {
return https({
url: `/app/prepaidCard`,
method: 'post',
data
})
},
// 充值
recharge (data) {
return https({
url: `/app/prepaidCard/recharge`,
method: 'put',
data
})
},
// 消费记录
logList (data) {
return https({
url: `/app/prepaidCard/logList`,
method: 'get',
data
})
},
// 民宿列表
hotelList () {
return https({
url: `/app/hotel/list`,
method: 'get'
})
},
// 民宿详情
hotelDetail (id) {
return https({
url: `/app/hotel/${id}`,
method: 'get'
})
},
// 门票继续支付
getTicketOrderSession (data) {
return https({
url: `/app/pay/getTicketOrderSession`,
method: 'get',
data
})
},
// 一卡通继续支付
continuePayment (data) {
return https({
url: `/app/pay/continue/payment/${data.id}`,
method: 'post',
data
})
},
// 分时预约列表
queryTicketTimeInventory (data) {
return https({
url: `/app/pay/queryTicketTimeInventory`,
method: 'get',
data
})
},
// 首页查询推荐酒店民宿
recommendList (data) {
return https({
url: `/app/hotel/homestay/recommend/list`,
method: 'get',
data
})
},
// 民宿列表
hotelList (data) {
return https({
url: `/app/hotel/homestay/list`,
method: 'get',
data
})
},
// 获取酒店民宿详情
homestayId (id) {
return https({
url: `/app/hotel/homestay/${id}`,
method: 'get'
})
},
// 根据酒店id查询房型列表
classifyList (data) {
return https({
url: `/app/hotel/homestay/room/classify/list`,
method: 'get',
data
})
},
// 根据房型id查询房型详情
classifyDetail (data) {
return https({
url: `/app/hotel/homestay/room/classify/detail`,
method: 'get',
data
})
},
// 新增住宿订单
hotelOrder (data) {
return https({
url: `/app/hotelHomestay/order`,
method: 'post',
data
})
},
// 获取住宿订单详细信息
hotelOrderDetail (id) {
return https({
url: `/app/hotelHomestay/order/${id}`,
method: 'get'
})
},
// 继续支付
hotelPayment (data) {
return https({
url: `/app/hotelHomestay/order/continue/payment`,
method: 'post',
data
})
},
// 查询住宿订单列表
hotelOrderList (data) {
return https({
url: `/app/hotelHomestay/order/list`,
method: 'get',
data
})
},
// 取消住宿订单
hotelOrderCancel (data) {
return https({
url: `/app/hotelHomestay/order/cancel`,
method: 'post',
data
})
},
// 删除住宿订单
delHotelOrder (id) {
return https({
url: `/app/hotelHomestay/order/${id}`,
method: 'delete'
})
},
// 计算违约金
computePenaltyFee (id) {
return https({
url: `/app/hotelHomestay/order/computePenaltyFee/${id}`,
method: 'get'
})
},
// 附近酒店民宿
hotelNearHomestay (data) {
return https({
url: `/app/query/near/hotel/homestay/list`,
method: 'get',
data
})
},
// 附近景区推荐门票
hotelNearScenic (data) {
return https({
url: `/app/query/near/scenic/recommend/ticket`,
method: 'get',
data
})
},
//门店信息列表
getShopList (data) {
return https({
url: `/app/eatery/shopInfo/list`,
method: 'GET',
data
})
},
// 查询房间最低价格
hotelLowestPrice (data) {
return https({
url: `/app/hotel/homestay/lowest/price`,
method: 'get',
data
})
},
// 根据酒店id查询钟点房设置
hourClassifyList (data) {
return https({
url: `/app/hotel/homestay/hour/room/classify/list`,
method: 'get',
data
})
},
// 根据钟点房房型id查询钟点房详情
hourClassifyDetail (data) {
return https({
url: `/app/hotel/homestay/hour/room/classify/detail`,
method: 'get',
data
})
},
// 查询钟点房最近一个月的最低价格
hourLowestPrice (data) {
return https({
url: `/app/hotel/homestay/hour/room/lowest/price`,
method: 'get',
data
})
},
// 根据酒店id查询可选择的房型名称
homeClassify (id) {
return https({
url: `/app/hotel/homestay/all/room/classify/level1/list/${id}`,
method: 'get'
})
},
// 民宿详情
hotelDetail (id) {
return https({
url: `/app/hotel/${id}`,
method: 'get'
})
},
// 获取人文风光详情
getChannelInfo (data) {
return https({
url: `/app/cms/humanityList`,
method: 'get',
data
})
},
// 获取人文风光列表
archivesCustomList (data) {
return https({
url: `/app/cms/archivesCustomList`,
method: 'get',
data
})
},
}