var e;
(e = getApp()),
  Page({
    data: { curs: 1 },
    onLoad: function (a) {
      this.getDetail(a.orderid);
    },
    getDetail: function (a) {
      var t = this,
        o = { orderid: a };
      e.getdata(o, "escgzid").then((e) => {
        if ((console.log("回调数据：", e), e)) {
          t.setData({
            orderid: a,
            cardata: e.data,
            salesdesc: e.data.carName,
            makeyear: e.data.regdate,
            carjson: JSON.parse(e.data.cardata),
          }),
            console.log("回调数据jsion：", JSON.parse(e.data.cardata));
          var o = JSON.parse(e.data.record);
          console.log(o);
          var d = o;
          t.setData({
            bad: d.retdata.car_normal,
            good: d.retdata.car_excellent,
            normal: d.retdata.car_good,
          }),
            t.data.cardata.carId;
        }
      });
    },
    getData: function (e) {
      var t = this;
      a.default.getValuation({ appType: "WECHAT", id: e }).then(function (a) {
        console.log(a),
          "1000" === a.error_code
            ? t.setData({
                salesdesc: a.data.vehicle.salesdesc,
                brandname: a.data.vehicle.brandname,
                familyname: a.data.vehicle.familyname,
                factoryname: a.data.vehicle.factoryname,
                makeyear: a.data.vehicle.makeyear,
                geartype: a.data.vehicle.geartype,
                emission: a.data.vehicle.emission,
                output: a.data.vehicle.output,
                prov: a.data.bloBs.prov,
                city: a.data.bloBs.city,
                regdate: a.data.bloBs.regdate,
                mileage: a.data.bloBs.mileage,
                price: a.data.bloBs.price,
                bad: JSON.parse(a.data.bloBs.bad),
                good: JSON.parse(a.data.bloBs.good),
                normal: JSON.parse(a.data.bloBs.normal),
              })
            : wx.showToast({ title: a.message, icon: "none", duration: 3e3 });
      });
    },
    chenagestatus: function (a) {
      var e = a.currentTarget.dataset.status;
      this.setData({ curs: e });
    },
    onReady: function () {},
    onShow: function () {},
    onHide: function () {},
    onUnload: function () {},
    onPullDownRefresh: function () {},
    onReachBottom: function () {},
    onShareAppMessage: function () {
      return {
        title: this.data.salesdesc + "汽车估值报告",
        path: "/packageA/pages/caresgz/carpg/carpg?id=" + this.data.id,
      };
    },
    onShareTimeline: function () {
      return {
        title: this.data.salesdesc + "汽车估值报告",
        path: "/packageA/pages/caresgz/carpg/carpg?id=" + this.data.id,
      };
    },
  });
