import request from '@/utils/request'
import Qs from 'qs';

//查询获取商户token等信息
export function findByOpenIdAndMerchant(openId, merchantId) {
	return request({
		url: '/mobile/parkingInfoApi/findByOpenIdAndMerchant',
		data: Qs.stringify({
			openId: openId,
			merchantId: merchantId
		}),
		method: 'post',
	})
}

//查询停车详情
export function queryParkDetail(params) {
	return request({
		url: '/mobile/parkingInfoApi/queryParkDetail',
		data: Qs.stringify(params),
		method: 'post',
	})
}

//赠送优惠券
export function giveDiscountTicket(params) {
	return request({
		url: '/mobile/parkingInfoApi/giveDiscountTicket',
		data: Qs.stringify(params),
		method: 'post',
	})
}

//历史记录列表
export function discountTicketList(params) {
	return request({
		url: '/mobile/parkingInfoApi/discountTicketList',
		data: Qs.stringify(params),
		method: 'post',
	})
}

//历史记录详情
export function discountTicketDetail(id) {
	return request({
		url: '/mobile/parkingInfoApi/discountTicketDetail',
		data: Qs.stringify({
			id: id
		}),
		method: 'post',
	})
}


//绑定停车场商户
export function bindParkMerchant(data) {
	return request({
		url: '/mobile/parkingInfoApi/bindParkMerchant',
		data: Qs.stringify(data),
		method: 'post',
	})
}
