import request from '@/sheep/request';

const PayOrderApi = {
  // 获得支付订单
  getOrder: (id) => {
    return request({
      url: '/pay/order/get',
      method: 'GET',
      params: { id }
    });
  },
  // 获得支付后的订单条件
  getByStatus: (id) => {
    return request({
      url: '/trade/order/getPayOrderByStatus',
      method: 'GET',
      params: { id }
    });
  },
  // 获得支付后的订单条件2 实际用的
  getByStatus2: (id) => {
    return request({
      url: '/trade/order/getPayOrderByStatus2',
      method: 'GET',
      params: { id }
    });
  },
  // 富友微信jsapi支付成功
  getFuYouPayOrderByStatus: (payOrderNo) => {
    return request({
      url: '/trade/order/getFuYouPayOrderByStatus',
      method: 'POST',
      params:{
		payOrderNo
	  }
    });
  },
  getPayOrder: (tradeOrderId) => {
    return request({
      url: '/trade/order/getPayOrder',
      method: 'GET',
      params: { tradeOrderId }
    });
  },
  // 提交支付订单
  submitOrder: (data) => {
    return request({
      url: '/pay/order/submit',
      method: 'POST',
      data
    });
  },
  // 佣金、消费分抵扣完 0元购
  ZeroPurchaseSubmit: (data) => {
    return request({
      url: '/trade/order/submit-ZeroPurchase',
      method: 'POST',
      data
    });
  },
  // 第三方富友支付
  fuYouSubmitOrder: (data) => {
    return request({
      url: '/fuYou/pay/order/submit',
      method: 'POST',
      data
    });
  },
  
};

export default PayOrderApi;
