52 lines
2.4 KiB
JavaScript

"use strict";
const common_vendor = require("../../common/vendor.js");
require("../../common/libraries/request.js");
const common_store_useWeAppAuthStore = require("../../common/store/useWeAppAuthStore.js");
require("../../common/store/useWorkStore.js");
const pages_index_model = require("./model.js");
require("../../gen/Apis.js");
require("../../common/libraries/apiLoading.js");
if (!Math) {
(MyPageHeadTitle + MyPageBanner + MyClassification + MyNewsList + MyAiInput + MyEventList + MyModalServer)();
}
const MyNewsList = () => "./components/NewsList.js";
const MyPageHeadTitle = () => "./components/PageHeadTitle.js";
const MyPageBanner = () => "./components/PageBanner.js";
const MyClassification = () => "./components/Classification.js";
const MyAiInput = () => "./components/AiInput.js";
const MyEventList = () => "./components/EventList.js";
const MyModalServer = () => "./components/ModalServer.js";
const _sfc_defineComponent = /* @__PURE__ */ common_vendor.defineComponent({
__name: "index",
setup(__props) {
const auth = common_store_useWeAppAuthStore.useWeAppAuthStore();
common_vendor.onLoad(async (e) => {
var _a;
await ((_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$onLaunched);
console.log("页面加载", auth == null ? void 0 : auth.data);
});
common_vendor.onPageScroll((e) => {
pages_index_model.useModel.scrollTop.value = e.scrollTop;
});
common_vendor.onShow(async (e) => {
var _a, _b;
const curPages = getCurrentPages()[0];
if (typeof curPages.getTabBar === "function" && curPages.getTabBar()) {
curPages.getTabBar().setData({
selected: 0
// 表示当前菜单的索引,该值在不同的页面表示不同
});
}
await ((_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$onLaunched);
pages_index_model.useModel.user.value = (_b = auth == null ? void 0 : auth.data) == null ? void 0 : _b.user;
console.log("页面显示");
});
return (_ctx, _cache) => {
return {};
};
}
});
_sfc_defineComponent.__runtimeHooks = 1;
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_defineComponent, [["__file", "/Users/zsq/Sources/github/2025property-pay/pay-customer/src/pages/index/index.vue"]]);
wx.createPage(MiniProgramPage);