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

/**
 * 订单管理接口
 */

// 获取订单列表
const getOrderList = function(params) {
    return request({
        url: '/order/findPageOrderList.do',
        method: 'get',
        params
    })
}
// 删除订单
const delOrder = function(params) {
    return request({
        url: '/order/deleteOrder.do',
        method: 'get',
        params
    })
}
// 手动支付骑行订单
const payOrder = function(params) {
    return request({
        url: '/order/payRidingOrder.do',
        method: 'get',
        params
    })
}
// 返还订单交易金额
const backOrder = function(params) {
    return request({
        url: '/order/refundRidingOrder.do',
        method: 'get',
        params
    })
}
// 订单操作记录
const findOrderControlRecord = function(params) {
    return request({
        url: '/order/findOrderControlRecord.do',
        method: 'get',
        params
    })
}
// 更新订单参数
const updateOrder = function(params) {
    return request({
        url: '/order/updatePayRidingOrder.do',
        method: 'get',
        params
    })
}

//  根据订单查询轨迹
const getRoute = function(params) {
    return request({
        url: '/order/routeDetails.do',
        method: 'get',
        params
    })
}

//  车辆轨迹
const bikeRoute = function(params) {
    return request({
        url: '/order/bikeDetails.do',
        method: 'get',
        params
    })
}
export default {
    getOrderList,
    delOrder,
    payOrder,
    backOrder,
    findOrderControlRecord,
    updateOrder,
    getRoute,
    bikeRoute
}
