import {request} from '@/utils/request.js'

// 订单列表
export function getOrderList(data) {
	return request({
		url: '/springbatchservice/order/user/search',
		method:'post',
		data
	})
}

// 生成二维码
export function qrCode(data) {
	return request({
		url: '/springbatchservice/order/qrCode/'+data,
	})
}


// 创建扫码支付订单
export function creatScanOrder(data) {
	return request({
		url: '/springbatchservice/order/creatScanOrder',
		method:'post',
		data
	})
}

// 获取订单最优优惠券
export function calculate(data) {
	return request({
		url: '/zswl-cloud-shop/goodsInfo/calculate',
		method:'post',
		data
	})
}

// 线下付款获取订单最优优惠券
export function calculateByInput(data) {
	return request({
		url: '/zswl-cloud-shop/goodsCouponLog/calculateByInput',
		method:'post',
		data
	})
}


// // 计算商品价格
// export function getOrderPrice(data) {
// 	return request({
// 		url: '/springbatchservice​/order​/orderPrice',
// 		method:'post',
// 		data
// 	})
// }

// // 申请退款
// export function applyRefund(data) {
// 	return request({
// 		url: '/zswl-cloud-bdb/orderRefund/applyRefund',
// 		method:'post',
// 		data
// 	})
// }
