2024-01-22 18:48:00 +08:00
|
|
|
|
var a, e, t;
|
|
|
|
|
(a = (function (a) {
|
|
|
|
|
return a && a.__esModule ? a : { default: a };
|
|
|
|
|
})(require("../../utils/apis.js"))),
|
|
|
|
|
(e = getApp()),
|
|
|
|
|
(t = getApp()),
|
|
|
|
|
Page({
|
|
|
|
|
data: { orderInfo: null, phone: e.getSystemPlatform() },
|
|
|
|
|
onLoad: function (a) {
|
|
|
|
|
var e = wx.getStorageSync("orderInfo"),
|
|
|
|
|
t = wx.getStorageSync("cardatawx");
|
|
|
|
|
this.setData({ orderInfo: e, cardatawx: t }), this.getmoney();
|
|
|
|
|
},
|
|
|
|
|
getmoney: function () {
|
|
|
|
|
var a = this,
|
|
|
|
|
t = { type: "carclzt_money", uid: wx.getStorageSync("uid") };
|
|
|
|
|
e.getdata(t, "getcarmoney").then((e) => {
|
|
|
|
|
console.log("money", e.data), e.data && a.setData({ fee: e.data });
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
orderid: function () {
|
|
|
|
|
let a = "";
|
|
|
|
|
for (var e = 0; e < 8; e++) 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: "carclzt_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 (e) {
|
|
|
|
|
wx.showModal({ content: e.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 (e) {
|
|
|
|
|
a.setData({
|
|
|
|
|
weizhang_num: 1 * a.data.weizhang_num + 10,
|
|
|
|
|
}),
|
|
|
|
|
wx.showModal({ content: e.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:
|
|
|
|
|
"在早上9-下午11点查询结果将在10-30分钟查到,其他时间需要到次日早上统一出结果,不成功自动退款~",
|
|
|
|
|
showCancel: !1,
|
|
|
|
|
success: function (a) {
|
|
|
|
|
a.confirm &&
|
|
|
|
|
wx.reLaunch({ url: "/pages/reporlist/reporlist?type=9" });
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getDetailb: function () {
|
|
|
|
|
var a = this,
|
|
|
|
|
t = {
|
|
|
|
|
uid: wx.getStorageSync("uid"),
|
|
|
|
|
frameno: a.data.orderInfo.vin,
|
|
|
|
|
logo: a.data.orderInfo.logo,
|
|
|
|
|
car: a.data.orderInfo.brand,
|
|
|
|
|
cars: a.data.orderInfo.typeName,
|
|
|
|
|
orderid: a.data.orderid,
|
|
|
|
|
chepai: a.data.cardatawx.chepai,
|
|
|
|
|
engine: a.data.cardatawx.engine,
|
|
|
|
|
xszimg: a.data.cardatawx.imageUrl,
|
|
|
|
|
money: a.data.fee,
|
|
|
|
|
type: 1,
|
|
|
|
|
};
|
|
|
|
|
e.getdata(t, "carclztcx").then((e) => {
|
|
|
|
|
console.log("回调数据:", e.data),
|
|
|
|
|
wx.reLaunch({ url: "/pages/reporlist/reporlist?type=9" }),
|
|
|
|
|
(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 () {},
|
|
|
|
|
});
|