更新
This commit is contained in:
@@ -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,8 +315,8 @@
|
|||||||
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:'10089145264'
|
merchantNo: '10089145264'
|
||||||
}
|
}
|
||||||
|
|
||||||
oilPayApi.aggregatePay(payData).then(res => {
|
oilPayApi.aggregatePay(payData).then(res => {
|
||||||
@@ -324,50 +324,25 @@
|
|||||||
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
|
||||||
// this.getPayStatus(this.outTradeNo)
|
})
|
||||||
// this.getLastMoney()
|
oilPayApi.wxPayIntegral({
|
||||||
// this.getCards()
|
appId: 'wxc1d226ac9c5bea36',
|
||||||
// console.log('success:' + JSON.stringify(res));
|
orderId: this.order.orderSerialNumber
|
||||||
uni.showToast({
|
})
|
||||||
title: res.msg
|
uni.redirectTo({
|
||||||
})
|
url: '/BagStation/pages/makeOrder/payResult?status=success&&payMethod=' +
|
||||||
|
this.payMethod
|
||||||
uni.redirectTo({
|
})
|
||||||
url: '/BagStation/pages/makeOrder/payResult?status=success&&payMethod=' +
|
|
||||||
this.payMethod,
|
|
||||||
fail: (err) => {
|
|
||||||
// console.log(err)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
} else {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
fail: function(err) {
|
|
||||||
console.log(res, err, '************')
|
|
||||||
// console.log('fail:' + JSON.stringify(err));
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// uni.showToast({
|
|
||||||
// title: res.msg
|
|
||||||
// })
|
|
||||||
// uni.redirectTo({
|
|
||||||
// url: '/BagStation/pages/makeOrder/payResult?status=success',
|
|
||||||
// fail: (err) => {
|
|
||||||
// console.log(err)
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
} else {
|
} else {
|
||||||
// uni.redirectTo({
|
uni.showToast({
|
||||||
// url: '/BagStation/pages/makeOrder/payResult?status=fail'
|
title: res.msg,
|
||||||
// })
|
icon: 'none'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
@@ -439,7 +414,7 @@
|
|||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
moneyFormath(value) {
|
moneyFormath(value) {
|
||||||
console.log(value)
|
// console.log(value)
|
||||||
if (value != 'xxx.x') {
|
if (value != 'xxx.x') {
|
||||||
let number = value.toFixed(2)
|
let number = value.toFixed(2)
|
||||||
return number
|
return number
|
||||||
|
|||||||
@@ -10,4 +10,12 @@ export default {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 积分处理
|
||||||
|
wxPayIntegral(data) {
|
||||||
|
return request({
|
||||||
|
url: '/oil-pay/yiBaoPay/wxPayIntegral',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user