63 lines
1.9 KiB
JavaScript
63 lines
1.9 KiB
JavaScript
var e;
|
|
(e = getApp()),
|
|
Page({
|
|
data: { serviceSumCount: 0, serviceSumMoney: 0 },
|
|
onLoad: function (e) {
|
|
this.getDetail(e.orderid);
|
|
},
|
|
imgPreview: function (a) {
|
|
console.log(a);
|
|
var t = a.currentTarget.dataset.src,
|
|
r = a.currentTarget.dataset.name;
|
|
t
|
|
? wx.previewImage({
|
|
current: t,
|
|
urls: this.data.recordimgs,
|
|
success: function (e) {},
|
|
fail: function () {},
|
|
complete: function () {},
|
|
})
|
|
: e.showToast(r + "未生成段位卡");
|
|
},
|
|
getDetail: function (a) {
|
|
var t = this,
|
|
r = { orderid: a };
|
|
e.getdata(r, "dcbgid").then((e) => {
|
|
if (
|
|
(console.log("回调数据:", e),
|
|
e &&
|
|
(t.setData({ cardata: e.data, orderid: a }),
|
|
e.data.recordimgs &&
|
|
t.setData({ recordimgs: JSON.parse(e.data.recordimgs) }),
|
|
e.data.record))
|
|
) {
|
|
var r = JSON.parse(e.data.record);
|
|
console.log(r),
|
|
t.setData({
|
|
records: r.result.data.details.records,
|
|
serviceSumCount: r.result.data.details.serviceSumCount,
|
|
serviceSumMoney: r.result.data.details.serviceSumMoney,
|
|
});
|
|
}
|
|
});
|
|
},
|
|
onReady: function () {},
|
|
onShow: function () {},
|
|
onHide: function () {},
|
|
onUnload: function () {},
|
|
onPullDownRefresh: function () {},
|
|
onReachBottom: function () {},
|
|
onShareAppMessage: function () {
|
|
return {
|
|
title: this.data.cardata.cars + "电车电池查询报告",
|
|
path: "/packageA/pages/dcbg/carcxjl?orderid=" + this.data.orderid,
|
|
};
|
|
},
|
|
onShareTimeline: function () {
|
|
return {
|
|
title: this.data.cardata.cars + "电车电池查询报告",
|
|
path: "/packageA/pages/dcbg/carcxjl?orderid=" + this.data.orderid,
|
|
};
|
|
},
|
|
});
|