Commit e5dc601a authored by 罗超's avatar 罗超

1

parent 110fbd31
...@@ -838,7 +838,6 @@ export default { ...@@ -838,7 +838,6 @@ export default {
data.CoverImg = this.currentPriceInfo.CoverImg; data.CoverImg = this.currentPriceInfo.CoverImg;
let myData = JSON.stringify(data); let myData = JSON.stringify(data);
this.orderData = encodeURIComponent(myData); this.orderData = encodeURIComponent(myData);
console.log(841, data);
this.querenAli(data); this.querenAli(data);
OrderId; OrderId;
} else { } else {
...@@ -868,15 +867,7 @@ export default { ...@@ -868,15 +867,7 @@ export default {
(res) => { (res) => {
this.orderInfo = JSON.parse(res.data); this.orderInfo = JSON.parse(res.data);
if (res.data) { if (res.data) {
let cbObj = { that.PayAli(res.data, data);
TradeNo: res.data,
OrderNo: data.OrderNo,
OrderId: data.OrderId,
preferPrice: data.PreferPrice,
};
console.log(891, cbObj);
that.payAliCallback(cbObj);
// this.PayAli(res.data, data);
} else { } else {
uni.showToast({ uni.showToast({
title: "获取交易号失败", title: "获取交易号失败",
...@@ -899,7 +890,6 @@ export default { ...@@ -899,7 +890,6 @@ export default {
OrderId: data.OrderId, OrderId: data.OrderId,
preferPrice: data.PreferPrice, preferPrice: data.PreferPrice,
}; };
console.log(893, cbObj);
that.payAliCallback(cbObj); that.payAliCallback(cbObj);
} else if (res.resultCode == "6001") { } else if (res.resultCode == "6001") {
uni.showToast({ uni.showToast({
...@@ -917,7 +907,7 @@ export default { ...@@ -917,7 +907,7 @@ export default {
}); });
}, },
payAliCallback(obj) { payAliCallback(obj) {
console.log("919", obj); console.log(893, Obj);
this.request2( this.request2(
{ {
url: "/api/AliPay/ALiPayCallBackDmcNotify", url: "/api/AliPay/ALiPayCallBackDmcNotify",
...@@ -933,7 +923,7 @@ export default { ...@@ -933,7 +923,7 @@ export default {
(res) => { (res) => {
console.log("cb", res); console.log("cb", res);
uni.redirectTo({ uni.redirectTo({
url: "/pages/jiuzhai/paysuccess", url: "/pages/jiuzhai/paysuccess?PreferPrice=" + obj.PreferPrice,
}); });
// setTimeout(() => { // setTimeout(() => {
// uni.redirectTo({ // uni.redirectTo({
...@@ -943,9 +933,13 @@ export default { ...@@ -943,9 +933,13 @@ export default {
}, },
(err) => { (err) => {
console.log("cb2", err); console.log("cb2", err);
uni.redirectTo({ uni.showToast({
url: "/pages/jiuzhai/paysuccess", title: "支付失败",
icon: "none",
}); });
// uni.redirectTo({
// url: "/pages/jiuzhai/paysuccess?PreferPrice=" + obj.PreferPrice,
// });
} }
); );
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment