import request from '$project/utils/request'
import Qs from 'qs';

//订单列表
export function orderList(params) {

return request({
		url: '/mobile/orderInfoApi/orderList',
		data: Qs.stringify(params),
		method: 'post',
	})
}
//订单详情
export function orderDetail(params) {

   return request({
   		url: '/mobile/orderInfoApi/orderDetail',
   		data: Qs.stringify(params),
   		method: 'post',
   	})
}

//微信支付
export function wxJsapiPay(params,code) {
    var   url="";
    if(code){
      url='&popularizePersonId='+code;
    }
    return request({
        url: '/wxPay/wxJsapiPay?orderId='+params+url,

        method: 'get',
    })
}
//支付宝支付(url)
export function tradePrecreatePay(params,code) {
    var   url="";
    if(code){
        url='&popularizePersonId='+code;
    }
    return request({
        url: '/aliPay/tradePrecreatePay?orderId='+params+url,
        method: 'get',
    })
}
//微信支付(url)
export function wxNativePay(params,code) {
    var   url="";
    if(code){
        url='&popularizePersonId='+code;
    }
    return request({
        url: '/wxPay/wxNativePay?orderId='+params+url,
        method: 'get',
    })
}