chache/packageA/pages/carjqx/carInfob.js
2024-01-22 18:48:00 +08:00

146 lines
5.2 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

!(function () {
!(function (a) {
a && a.__esModule;
})(require("../../utils/apis.js"));
var a = getApp(),
t = getApp();
Page({
data: { orderInfo: null },
onLoad: function (a) {
var t = wx.getStorageSync("orderInfo"),
e = wx.getStorageSync("cardatawx");
this.setData({ orderInfo: t, cardatawx: e }), this.getmoney();
},
getmoney: function () {
var t = this,
e = { type: "jiaoqianxian_money", 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: "jiaoqianxian_money",
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 &&
!e.data.errno &&
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 () {
wx.showModal({
title: "温馨提醒",
content:
"恭喜下单成功人工查询早上8点-晚上10点20分钟内出结果点击确定后进入订单列表~",
showCancel: !1,
success: function (a) {
a.confirm &&
wx.reLaunch({ url: "/pages/reporlist/reporlist?type=5" });
},
});
},
getDetailb: function () {
var t = this,
e = {
uid: wx.getStorageSync("uid"),
vin: t.data.orderInfo.vin,
logo: t.data.orderInfo.logo,
car: t.data.orderInfo.brand,
cars: t.data.orderInfo.typeName,
orderid: t.data.orderid,
};
a.getdata(e, "carjqxb").then((a) => {
console.log("回调数据:", a.data),
wx.navigateTo({
url: "/packageA/pages/carjqx/carcxjl?orderid=" + t.data.orderid,
}),
(a = a.data).data && t.setData({ order: a.data.result });
});
},
toDisclaimers: function () {
wx.navigateTo({ url: "/pages/disclaimers/disclaimers" });
},
onReady: function () {},
onShow: function () {},
onHide: function () {},
onUnload: function () {},
onPullDownRefresh: function () {},
onReachBottom: function () {},
onShareAppMessage: function () {},
});
})();