2024-01-22 18:48:00 +08:00
|
|
|
|
!(function () {
|
|
|
|
|
!(function (a) {
|
|
|
|
|
a && a.__esModule;
|
|
|
|
|
})(require("../../utils/apis.js"));
|
|
|
|
|
var a = getApp(),
|
|
|
|
|
t = getApp();
|
|
|
|
|
Page({
|
|
|
|
|
data: { orderInfo: null },
|
|
|
|
|
onLoad: function (t) {
|
|
|
|
|
var e = wx.getStorageSync("orderInfo"),
|
|
|
|
|
n = wx.getStorageSync("cardatawx");
|
|
|
|
|
this.setData({ orderInfo: e, cardatawx: n });
|
|
|
|
|
var d = this,
|
|
|
|
|
o = { id: t.id };
|
|
|
|
|
a.getdata(o, "dhid").then((a) => {
|
|
|
|
|
console.log("页面回调数据:", a.data),
|
|
|
|
|
a.data &&
|
|
|
|
|
d.setData({
|
|
|
|
|
dh: a.data,
|
|
|
|
|
type: a.data.type,
|
|
|
|
|
moneytype: a.data.type,
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getmoney: function () {
|
|
|
|
|
var t = this,
|
|
|
|
|
e = { type: t.data.moneytype, uid: wx.getStorageSync("uid") };
|
|
|
|
|
a.getdata(e, "getcarmoney").then((a) => {
|
|
|
|
|
console.log("money", a.data), a.data && t.setData({ fee: a.data });
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
orderid: function () {
|
|
|
|
|
let a = "";
|
|
|
|
|
for (var t = 0; t < 8; t++) a += Math.floor(10 * Math.random());
|
|
|
|
|
(a = "D" + new Date().getTime() + a), this.setData({ orderid: a });
|
|
|
|
|
},
|
|
|
|
|
queryVin: function () {
|
|
|
|
|
var a = this;
|
|
|
|
|
a.orderid(),
|
|
|
|
|
console.log(wx.getStorageSync("uid")),
|
|
|
|
|
wx.getStorageSync("uid")
|
|
|
|
|
? (console.log(wx.getStorageSync("uid")),
|
|
|
|
|
t.util.request({
|
|
|
|
|
url: "entry/wxapp/paynum",
|
|
|
|
|
method: "post",
|
|
|
|
|
dataType: "json",
|
|
|
|
|
data: {
|
|
|
|
|
m: "monai_market",
|
|
|
|
|
type: a.data.moneytype,
|
|
|
|
|
dhid: a.data.dh.id,
|
|
|
|
|
orderid: a.data.orderid,
|
|
|
|
|
uid: wx.getStorageSync("uid"),
|
|
|
|
|
vin: a.data.cardatawx.vin,
|
|
|
|
|
chepai: a.data.cardatawx.chepai,
|
|
|
|
|
engine: a.data.cardatawx.engine,
|
|
|
|
|
cpimg: a.data.cardatawx.imageUrl,
|
|
|
|
|
postcardata: JSON.stringify(a.data),
|
|
|
|
|
},
|
|
|
|
|
success: function (e) {
|
|
|
|
|
e.data && e.data.data && 1e3 == e.data.message
|
|
|
|
|
? t.util.request({
|
|
|
|
|
url: "entry/wxapp/Api",
|
|
|
|
|
data: {
|
|
|
|
|
m: "monai_market",
|
|
|
|
|
uid: wx.getStorageSync("uid"),
|
|
|
|
|
r: "home.weizhang.paynum",
|
|
|
|
|
orderid: e.data.data.orderid,
|
|
|
|
|
},
|
|
|
|
|
success: function (t) {
|
|
|
|
|
wx.showModal({ content: t.data.message }),
|
|
|
|
|
a.setData({
|
|
|
|
|
weizhang_num: 1 * a.data.weizhang_num + 10,
|
|
|
|
|
}),
|
|
|
|
|
a.getDetail();
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
: e.data &&
|
|
|
|
|
e.data.data &&
|
2024-01-22 23:40:19 +08:00
|
|
|
|
e.data.code!=200 &&
|
2024-01-22 18:48:00 +08:00
|
|
|
|
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 (n) {
|
|
|
|
|
t.util.request({
|
|
|
|
|
url: "entry/wxapp/Api",
|
|
|
|
|
data: {
|
|
|
|
|
m: "monai_market",
|
|
|
|
|
uid: wx.getStorageSync("uid"),
|
|
|
|
|
r: "home.weizhang.paynum",
|
|
|
|
|
orderid: e.data.data.orderid,
|
|
|
|
|
},
|
|
|
|
|
success: function (t) {
|
|
|
|
|
a.setData({
|
|
|
|
|
weizhang_num: 1 * a.data.weizhang_num + 10,
|
|
|
|
|
}),
|
|
|
|
|
wx.showModal({ content: t.data.message }),
|
|
|
|
|
a.getDetail();
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
}))
|
|
|
|
|
: wx.showModal({
|
|
|
|
|
title: "温馨提醒",
|
|
|
|
|
content: "使用本功能请先登录后在使用~",
|
|
|
|
|
showCancel: !1,
|
|
|
|
|
success: function (a) {
|
|
|
|
|
a.confirm && wx.reLaunch({ url: "/pages/mine/index" });
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getDetail: function () {
|
|
|
|
|
var a = this;
|
|
|
|
|
wx.showModal({
|
|
|
|
|
title: "温馨提醒",
|
|
|
|
|
content: "恭喜下单成功,人工查询早上8点-晚上10点20分钟内出结果~",
|
|
|
|
|
showCancel: !1,
|
|
|
|
|
success: function (t) {
|
|
|
|
|
t.confirm &&
|
|
|
|
|
wx.reLaunch({
|
|
|
|
|
url: "/packageA/pages/wannen/incxjl?id=" + a.data.id,
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
toDisclaimers: function () {
|
|
|
|
|
wx.navigateTo({ url: "/pages/disclaimers/disclaimers" });
|
|
|
|
|
},
|
|
|
|
|
onReady: function () {},
|
|
|
|
|
onShow: function () {},
|
|
|
|
|
onHide: function () {},
|
|
|
|
|
onUnload: function () {},
|
|
|
|
|
onPullDownRefresh: function () {},
|
|
|
|
|
onReachBottom: function () {},
|
|
|
|
|
onShareAppMessage: function () {},
|
|
|
|
|
});
|
|
|
|
|
})();
|