var t;
(t = getApp()),
  Page({
    data: {
      winHeight: 0,
      tHeight: 0,
      bHeight: 0,
      startPageY: 0,
      scrollTop: 0,
      two_none: "none",
      hasback: "none",
      prov_list: [],
      city_list: [],
    },
    onLoad: function () {
      var a = this;
      wx.showLoading({ title: "请求中" }),
        t.getdata("", "carcity").then((t) => {
          var e = t.data;
          console.log("回调数据汽车：", e),
            (e = JSON.parse(e)),
            a.setData({ prov_list: e.data });
        });
      var e = wx.getSystemInfoSync().windowHeight;
      a.setData({ winHeight: e });
    },
    btn_pinpai: function (a) {
      var e = this,
        n = a.currentTarget.dataset.item;
      wx.setStorageSync("carprov", n);
      var o = { provinceId: n.id };
      t.getdata(o, "carprovinceId").then((t) => {
        var a = t.data;
        console.log("回调数据汽车：", a),
          (a = JSON.parse(a)),
          e.setData({ two_none: "block", hasback: "block", city_list: a.data });
      });
    },
    btn_sel_name: function (t) {
      var a = t.currentTarget.dataset.item;
      console.log(a),
        wx.setStorageSync("carcity", a),
        wx.navigateBack({ delta: 1 });
    },
    goback: function () {
      "block" == this.data.three_none
        ? this.setData({ three_none: "none" })
        : "block" == this.data.two_none
        ? this.setData({ two_none: "none", hasback: "none" })
        : this.setData({ hasback: "none" });
    },
  });
