import request from "@/utils/request";
import {BASE} from "./apiGateway";
let orderApi = {
    //头部数量
	topStatusBarNum(params) {
		return request({
			url: `${BASE}/pay/topStatusBarNum`,
			method: 'GET',
      		params
		});
	},
//  订单列表   
    orderList(params) {
        return request({
            url: `${BASE}/pay/orderList`,
            method: 'GET',
            params
        });
    },
    //  订单详情   
    orderInfo(params) {
        return request({
            url: `${BASE}/pay/orderInfo`,
            method: 'GET',
            params
        });
    },
// 微信内支付jsapi支付
	wxWapPay(data) {
		return request({
			url: `${BASE}/pay/wxWapPay`,
			method: 'POST',
      		data
		});
	},
// 工单查询支付信息  
    getPayInfo(params) {
        return request({
            url: `${BASE}/pay/getPayInfo`,
            method: 'GET',
            params
        });
    },
//查询是否有未支付订单    
    existWaitForPay(params) {
        return request({
            url: `${BASE}/pay/existWaitForPay`,
            method: 'GET',
            params
        });
    },
// 取消订单
    cancleOrder(data) {
        return request({
            url: `${BASE}/pay/cancleOrder`,
            method: 'POST',
            data
        });
    },
//申请退款    
    applyRefund(data) {
        return request({
            url: `${BASE}/pay/applyRefund`,
            method: 'POST',
            data
        });
    },
};

export default orderApi;
