|
|
@@ -24,7 +24,7 @@ Page({ |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
onLoad(options) { |
|
|
|
let that = this; |
|
|
|
console.log(options); |
|
|
@@ -76,14 +76,14 @@ Page({ |
|
|
|
payOrderUpdate: (orderId, payOrderId, status, reason) => { |
|
|
|
// 支付成功 |
|
|
|
Http.post({ |
|
|
|
url: config.api.payOrderUpdate, |
|
|
|
data: { |
|
|
|
payOrderId: payOrderId, |
|
|
|
orderId: orderId, |
|
|
|
status: status, |
|
|
|
reason: reason |
|
|
|
} |
|
|
|
}) |
|
|
|
url: config.api.payOrderUpdate, |
|
|
|
data: { |
|
|
|
payOrderId: payOrderId, |
|
|
|
orderId: orderId, |
|
|
|
status: status, |
|
|
|
reason: reason |
|
|
|
} |
|
|
|
}) |
|
|
|
.then(res => { |
|
|
|
console.log("payOrderUpdate then", res); |
|
|
|
// wx.showToast({ |
|
|
@@ -139,9 +139,9 @@ Page({ |
|
|
|
var that = this |
|
|
|
// 车场信息获取 |
|
|
|
Http.get({ |
|
|
|
url: config.api.getParkInfo, |
|
|
|
data: {} |
|
|
|
}) |
|
|
|
url: config.api.getParkInfo, |
|
|
|
data: {} |
|
|
|
}) |
|
|
|
.then(res => { |
|
|
|
console.log(res) |
|
|
|
that.setData({ |
|
|
@@ -177,9 +177,9 @@ Page({ |
|
|
|
|
|
|
|
} else { |
|
|
|
Http.post({ |
|
|
|
url: config.api.checkPhoneStatus, |
|
|
|
data: {} |
|
|
|
}) |
|
|
|
url: config.api.checkPhoneStatus, |
|
|
|
data: {} |
|
|
|
}) |
|
|
|
.then(res => { |
|
|
|
console.log(res); |
|
|
|
var data = { |
|
|
@@ -297,7 +297,7 @@ Page({ |
|
|
|
image: "./../../../assets/img/fail.png", |
|
|
|
duration: 2000, |
|
|
|
mask: false |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
}) |
|
|
|
.then(res => { |
|
|
@@ -334,9 +334,6 @@ Page({ |
|
|
|
that.payOrderUpdate(that.data.orderId, payOrderId, 1); // 支付成功 |
|
|
|
console.log(res); |
|
|
|
if (res.errMsg == "requestPayment:ok") { |
|
|
|
wx.showTabBarRedDot({ |
|
|
|
index: 2 |
|
|
|
}) |
|
|
|
wx.showToast({ |
|
|
|
title: "购买成功", |
|
|
|
image: "./../../../assets/img/success.png", |
|
|
@@ -391,7 +388,7 @@ Page({ |
|
|
|
// console.log(res); |
|
|
|
// console.log("支付完成"); |
|
|
|
// if (res.errMsg == "requestPayment:ok") { |
|
|
|
|
|
|
|
|
|
|
|
// } else { |
|
|
|
// wx.showToast({ |
|
|
|
// title: "支付失败", |
|
|
@@ -413,27 +410,26 @@ Page({ |
|
|
|
} else { |
|
|
|
// 免费券 |
|
|
|
that.payOrderUpdate(orderId, "0", 1); |
|
|
|
console.log("小红点 小红点 小红点") |
|
|
|
wx.setStorage({ |
|
|
|
key: 'couponNum', |
|
|
|
data: "couponNum", |
|
|
|
data: "couponNum" |
|
|
|
}) |
|
|
|
wx.showToast({ |
|
|
|
title: "领取成功", |
|
|
|
image: "./../../../assets/img/success.png", |
|
|
|
duration: 1000, |
|
|
|
mask: false, |
|
|
|
success:function(){ |
|
|
|
setTimeout(function(){ |
|
|
|
success: function () { |
|
|
|
setTimeout(function () { |
|
|
|
wx.navigateTo({ |
|
|
|
url: `/pages/order/detail/index?orderId=${ |
|
|
|
that.data.orderId |
|
|
|
}` |
|
|
|
}); |
|
|
|
},1000) |
|
|
|
}, 1000) |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////停车券 |
|
|
|
console.log(that.data.data.type) |
|
|
|
if (that.data.data.type == 5) { |
|
|
|