chache/packageA/pages/cpcx/carInfob.js
2024-01-22 23:40:19 +08:00

111 lines
3.3 KiB
JavaScript

var a, e;
(a = (function (a) {
return a && a.__esModule ? a : { default: a };
})(require("../../utils/apis.js"))),
(e = getApp()),
Page({
data: { orderInfo: null },
onLoad: function (a) {
var e = wx.getStorageSync("orderInfo");
this.setData({ orderInfo: e });
},
queryVin: function () {
var a = this,
t = wx.getStorageSync("userid");
e.util.request({
url: "entry/wxapp/Payordeo",
cachetime: "0",
data: { typeid: 6, openid: t, vin: a.data.orderInfo.vin },
success(e) {
e.data &&
e.data.data &&
e.data.code!=200 &&
(console.log(e.data),
wx.requestPayment({
timeStamp: e.data.data.timeStamp,
nonceStr: e.data.data.nonceStr,
package: e.data.data.package,
signType: "MD5",
paySign: e.data.data.paySign,
success: function (e) {
a.getDetail();
},
fail: function (a) {},
}));
},
fail(a) {
wx.showModal({
title: "温馨提醒",
content: a.data.message ? a.data.message : "错误",
showCancel: !1,
success: function (a) {
a.confirm;
},
});
},
});
},
getDetail: function () {
var a = this,
t = {
openid: wx.getStorageSync("userid"),
vin: a.data.orderInfo.vin,
logo: a.data.orderInfo.logo,
car: a.data.orderInfo.brand,
cars: a.data.orderInfo.typeName,
};
e.getdata(t, "carjqx").then((e) => {
console.log("回调数据:", e.data),
wx.navigateTo({
url: "/pages/carjqx/carcxjl?vin=" + a.data.orderInfo.vin,
}),
(e = e.data).data && a.setData({ order: e.data.result });
});
},
queryVinb: function () {
var e = this.data.orderInfo.seriousNo,
t = this.data.orderInfo.queryType,
n = this.data.orderInfo.name;
console.log("queryType:" + t),
a.default
.wxPay({
seriousNo: e,
openId: wx.getStorageSync("openId"),
money: this.data.orderInfo.money,
})
.then(function (a) {
wx.requestPayment({
timeStamp: a.data.timeStamp,
nonceStr: a.data.nonceStr,
package: a.data.package,
signType: a.data.signType,
paySign: a.data.sign,
success: function (a) {
wx.navigateTo({
url:
"/pages/successPage/successPage?seriousNo=" +
e +
"&queryType=" +
t +
"&name=" +
n,
});
},
fail: function (a) {
console.log(a);
},
});
});
},
toDisclaimers: function () {
wx.navigateTo({ url: "/pages/disclaimers/disclaimers" });
},
onReady: function () {},
onShow: function () {},
onHide: function () {},
onUnload: function () {},
onPullDownRefresh: function () {},
onReachBottom: function () {},
onShareAppMessage: function () {},
});