63 lines
1.9 KiB
JavaScript
63 lines
1.9 KiB
JavaScript
var a;
|
|
(a = getApp()),
|
|
Page({
|
|
data: { serviceSumCount: 0, serviceSumMoney: 0 },
|
|
onLoad: function (a) {
|
|
this.getDetail(a.orderid);
|
|
},
|
|
imgPreview: function (e) {
|
|
console.log(e);
|
|
var t = e.currentTarget.dataset.src,
|
|
r = e.currentTarget.dataset.name;
|
|
t
|
|
? wx.previewImage({
|
|
current: t,
|
|
urls: this.data.recordimgs,
|
|
success: function (a) {},
|
|
fail: function () {},
|
|
complete: function () {},
|
|
})
|
|
: a.showToast(r + "未生成段位卡");
|
|
},
|
|
getDetail: function (e) {
|
|
var t = this,
|
|
r = { orderid: e };
|
|
a.getdata(r, "cxjlid").then((a) => {
|
|
if (
|
|
(console.log("回调数据:", a),
|
|
a &&
|
|
(t.setData({ cardata: a.data, orderid: e }),
|
|
a.data.recordimgs &&
|
|
t.setData({ recordimgs: JSON.parse(a.data.recordimgs) }),
|
|
a.data.record))
|
|
) {
|
|
var r = JSON.parse(a.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/carcx/carcxjl?orderid=" + this.data.orderid,
|
|
};
|
|
},
|
|
onShareTimeline: function () {
|
|
return {
|
|
title: this.data.cardata.cars + "出险碰撞查询报告",
|
|
path: "/packageA/pages/carcx/carcxjl?orderid=" + this.data.orderid,
|
|
};
|
|
},
|
|
});
|