"use strict";
const common_vendor = require("../../common/vendor.js");
if (!Array) {
  const _easycom_u_avatar2 = common_vendor.resolveComponent("u-avatar");
  const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon");
  (_easycom_u_avatar2 + _easycom_u_icon2)();
}
const _easycom_u_avatar = () => "../../node-modules/uview-plus/components/u-avatar/u-avatar.js";
const _easycom_u_icon = () => "../../node-modules/uview-plus/components/u-icon/u-icon.js";
if (!Math) {
  (_easycom_u_avatar + _easycom_u_icon)();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "index",
  setup(__props) {
    var _a, _b;
    (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$api;
    const $config = (_b = common_vendor.getCurrentInstance()) == null ? void 0 : _b.appContext.config.globalProperties.$config;
    const config = common_vendor.ref({});
    common_vendor.ref({});
    common_vendor.onLoad(async () => {
      await searchConfig();
      await search();
    });
    const searchConfig = async () => {
      config.value = common_vendor.index.getStorageSync("config");
    };
    const search = async () => {
    };
    const toLogin = () => {
      common_vendor.index.navigateTo({
        url: `/pagesHome/login/index`
      });
    };
    const toCommon = (e) => {
      if (e) {
        common_vendor.index.navigateTo({
          url: `/${e}`
        });
      } else {
        try {
          common_vendor.index.clearStorage();
          common_vendor.index.reLaunch({
            url: "/pages/index/index"
          });
        } catch (e2) {
        }
      }
    };
    return (_ctx, _cache) => {
      return {
        a: common_vendor.p({
          text: "车",
          fontSize: "20",
          randomBgColor: true,
          colorIndex: 0
        }),
        b: common_vendor.p({
          bold: true,
          color: "#000",
          name: "arrow-right",
          size: "16"
        }),
        c: common_vendor.o(toLogin),
        d: common_vendor.f(common_vendor.unref($config).menuList, (item, index, i0) => {
          return {
            a: "f97bc692-2-" + i0,
            b: common_vendor.p({
              name: item.icon,
              size: "22"
            }),
            c: common_vendor.t(item.title || "暂无"),
            d: "f97bc692-3-" + i0,
            e: index,
            f: common_vendor.o(($event) => toCommon(item.route), index)
          };
        }),
        e: common_vendor.p({
          name: "arrow-right",
          size: "20"
        })
      };
    };
  }
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-f97bc692"], ["__file", "D:/project/赋强公证/notarization_applet/pages/my/index.vue"]]);
wx.createPage(MiniProgramPage);
