var a;
(a = getApp()),
  Page({
    data: { serviceSumCount: 0, serviceSumMoney: 0 },
    onLoad: function (t) {
      var e = this,
        n = { id: t.id };
      a.getdata(n, "dhid").then((a) => {
        console.log("页面回调数据:", a.data),
          a.data &&
            (e.setData({ dh: a.data, type: a.data.type }),
            e.getDetail(t.orderid));
      });
    },
    handleInput: function (a) {
      var t = a.split("\n").length,
        e = Math.max(130 * t, 100);
      this.setData({ textareaValue: a, textareaHeight: e });
    },
    imgPreview: function (t) {
      console.log(t);
      var e = t.currentTarget.dataset.src,
        n = t.currentTarget.dataset.name;
      e
        ? wx.previewImage({
            current: e,
            urls: this.data.cardata.recordimgs,
            success: function (a) {},
            fail: function () {},
            complete: function () {},
          })
        : a.showToast(n + "未生成段位卡");
    },
    getDetail: function (t) {
      var e = this,
        n = { orderid: t };
      a.getdata(n, "wannenid").then((a) => {
        console.log("回调数据:", a),
          a &&
            (e.setData({ cardata: a.data, orderid: t }),
            a.data.record && e.setData({ record: a.data.record }));
      });
    },
    onReady: function () {},
    onShow: function () {},
    onHide: function () {},
    onUnload: function () {},
    onPullDownRefresh: function () {},
    onReachBottom: function () {},
    onShareAppMessage: function () {
      return {
        title: this.data.cardata.cars + "查询报告",
        path: "/packageA/pages/wannen/incxjl?orderid=" + this.data.orderid,
      };
    },
    onShareTimeline: function () {
      return {
        title: this.data.cardata.cars + "查询报告",
        path: "/packageA/pages/wannen/incxjl?orderid=" + this.data.orderid,
      };
    },
  });