var a;
(a = getApp()),
  Page({
    data: { serviceSumCount: 0, serviceSumMoney: 0 },
    onLoad: function (a) {
      this.getDetail(a.orderid);
    },
    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 + "未生成段位卡");
    },
    getDetail: function (t) {
      var e = this,
        r = { orderid: t };
      a.getdata(r, "carclztid").then((a) => {
        if (
          (console.log("回调数据：", a),
          a &&
            (e.setData({ cardata: a.data, orderid: t }),
            a.data.recordimgs &&
              e.setData({ recordimgs: JSON.parse(a.data.recordimgs) }),
            a.data.record))
        ) {
          var r = JSON.parse(a.data.record);
          console.log(r), e.setData({ records: r });
        }
      });
    },
    onReady: function () {},
    onShow: function () {},
    onHide: function () {},
    onUnload: function () {},
    onPullDownRefresh: function () {},
    onReachBottom: function () {},
    onShareAppMessage: function () {
      return {
        title: this.data.cardata.cars + "车辆状态报告",
        path: "/packageA/pages/carclzt/carcxjl?orderid=" + this.data.orderid,
      };
    },
    onShareTimeline: function () {
      return {
        title: this.data.cardata.cars + "车辆状态报告",
        path: "/packageA/pages/carclzt/carcxjl?orderid=" + this.data.orderid,
      };
    },
  });
