|
|
@ -183,7 +183,7 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
userIp:null, |
|
|
|
userIp: null, |
|
|
|
showtitles: "", |
|
|
|
showtitles: "", |
|
|
|
imgURL: this.global.imgURL, |
|
|
|
imgURL: this.global.imgURL, |
|
|
|
order: uni.getStorageSync('orderMade'), |
|
|
|
order: uni.getStorageSync('orderMade'), |
|
|
@ -223,13 +223,13 @@ |
|
|
|
onShow() { |
|
|
|
onShow() { |
|
|
|
this.datatime = this.timF(this.order.createTime); |
|
|
|
this.datatime = this.timF(this.order.createTime); |
|
|
|
const that = this |
|
|
|
const that = this |
|
|
|
wx.request({ |
|
|
|
wx.request({ |
|
|
|
url: 'http://ip-api.com/json', |
|
|
|
url: 'http://ip-api.com/json', |
|
|
|
success:function(e){ |
|
|
|
success: function(e) { |
|
|
|
console.log(e.data.query); |
|
|
|
console.log(e.data.query); |
|
|
|
that.userIp = e.data.query |
|
|
|
that.userIp = e.data.query |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
onReady() { |
|
|
|
onReady() { |
|
|
|
if (this.isCompany) { |
|
|
|
if (this.isCompany) { |
|
|
@ -315,41 +315,34 @@ |
|
|
|
payCode: 'WECHAT_ORDER_PAY_WECHAT', //APP填WECHAT_ORDER_PAY_APP,小程序填 |
|
|
|
payCode: 'WECHAT_ORDER_PAY_WECHAT', //APP填WECHAT_ORDER_PAY_APP,小程序填 |
|
|
|
orderId: this.order.orderSerialNumber, |
|
|
|
orderId: this.order.orderSerialNumber, |
|
|
|
payClient: 'XOIL_DRIVER_WECHAT_APPLET', //"支付端。安卓XOIL_DRIVER_ANDROID,小程序 |
|
|
|
payClient: 'XOIL_DRIVER_WECHAT_APPLET', //"支付端。安卓XOIL_DRIVER_ANDROID,小程序 |
|
|
|
userIp: (this.userIp?this.userIp:"36.57.160.59") , |
|
|
|
userIp: (this.userIp ? this.userIp : "36.57.160.59"), |
|
|
|
merchantNo:'10089027856' |
|
|
|
merchantNo: '10089027856' |
|
|
|
} |
|
|
|
} |
|
|
|
console.log(payData,'payDatapayData') |
|
|
|
console.log(payData, 'payDatapayData') |
|
|
|
oilPayApi.aggregatePay(payData).then(res => { |
|
|
|
oilPayApi.aggregatePay(payData).then(res => { |
|
|
|
if (res.code == 20000) { |
|
|
|
if (res.code == 20000) { |
|
|
|
uni.requestPayment({ |
|
|
|
uni.requestPayment({ |
|
|
|
provider: 'wxpay', |
|
|
|
provider: 'wxpay', |
|
|
|
...res.data.baseWxOrderVo, |
|
|
|
...res.data.baseWxOrderVo, |
|
|
|
success: (res1) => { |
|
|
|
success: (_res) => { |
|
|
|
console.log(res) |
|
|
|
uni.showToast({ |
|
|
|
if (res.code == 20000) { |
|
|
|
title: res.msg |
|
|
|
uni.showToast({ |
|
|
|
}) |
|
|
|
title: res.msg |
|
|
|
oilPayApi.wxPayIntegral({ |
|
|
|
}) |
|
|
|
appId: 'wx2f203fde39b883bc', |
|
|
|
|
|
|
|
orderId: this.order.orderSerialNumber |
|
|
|
uni.redirectTo({ |
|
|
|
}) |
|
|
|
url: '/BagStation/pages/makeOrder/payResult?status=success&&payMethod=' + |
|
|
|
uni.redirectTo({ |
|
|
|
this.payMethod, |
|
|
|
url: '/BagStation/pages/makeOrder/payResult?status=success&&payMethod=' + |
|
|
|
fail: (err) => { |
|
|
|
this.payMethod |
|
|
|
// console.log(err) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
|
|
title: res.msg, |
|
|
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
fail: function(err) { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
|
|
title: res.msg, |
|
|
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|