53 lines
1.6 KiB
JavaScript
53 lines
1.6 KiB
JavaScript
var a;
|
|
(a = getApp()),
|
|
Page({
|
|
data: {},
|
|
onLoad: function (a) {
|
|
wx.getStorageSync("uid") || getApp().wxlogin(), this.getDetail(a.orderid);
|
|
},
|
|
getDetail: function (t) {
|
|
var e = this,
|
|
r = { orderid: t };
|
|
a.getdata(r, "wxjlid").then((a) => {
|
|
console.log("回调数据:", a),
|
|
e.setData({ cardata: a.data, orderid: t }),
|
|
a.data.recordimgs &&
|
|
e.setData({ recordimgs: JSON.parse(a.data.recordimgs) });
|
|
var r = JSON.parse(a.data.record);
|
|
console.log(r), e.setData({ records: r.result });
|
|
});
|
|
},
|
|
imgPreview: function (t) {
|
|
console.log(t);
|
|
var e = t.currentTarget.dataset.src,
|
|
r = t.currentTarget.dataset.name;
|
|
e
|
|
? wx.previewImage({
|
|
current: e,
|
|
urls: this.data.recordimgs,
|
|
success: function (a) {},
|
|
fail: function () {},
|
|
complete: function () {},
|
|
})
|
|
: a.showToast(r + "未生成段位卡");
|
|
},
|
|
onReady: function () {},
|
|
onShow: function () {},
|
|
onHide: function () {},
|
|
onUnload: function () {},
|
|
onPullDownRefresh: function () {},
|
|
onReachBottom: function () {},
|
|
onShareAppMessage: function () {
|
|
return {
|
|
title: this.data.cardata.cars + "维修保养报告",
|
|
path: "/packageA/pages/carwbjzb/carwxjl?orderid=" + this.data.orderid,
|
|
};
|
|
},
|
|
onShareTimeline: function () {
|
|
return {
|
|
title: this.data.cardata.cars + "维修保养报告",
|
|
path: "/ packageA/pages/carwbjzb/carwxjl?orderid=" + this.data.orderid,
|
|
};
|
|
},
|
|
});
|