"use strict"; const common_vendor = require("../../common/vendor.js"); const components_TUILogin = require("../../components/TUILogin.js"); const components_request = require("../../components/request.js"); const components_formatDate = require("../../components/formatDate.js"); const stores_counter = require("../../stores/counter.js"); const common_assets = require("../../common/assets.js"); const topNavigation = () => "../../components/topNavigation/topNavigation.js"; const Advertisement = () => "../../components/Advertisement/Advertisement.js"; const tabBar = () => "../../components/tabBar/tabBar.js"; const counter = stores_counter.useCounterStore(); const _sfc_main = { inject: ["$global"], data() { return { info: {}, myuserSig: "", chatInfo: {}, page: 0, //页码 size: 10, //每页条数 list: [], // 列表数据 detailsdata: {}, //详情数据 triggered: false //下拉刷新标识 }; }, mounted() { this.pkList(); }, onLoad() { common_vendor.index.getStorage({ key: "userinfo", success: (res) => { this.info = res.data; counter.$patch({ myitem: this.info }); common_vendor.index.getStorage({ key: "myuserSig", success: (res2) => { this.myuserSig = res2.data; common_vendor.index.getStorage({ key: "chatInfo", success: (res3) => { this.chatInfo = res3.data; components_TUILogin.TUIlogin(this.chatInfo.appId, this.info.id, this.myuserSig.userSig); } }); } }); } }); }, methods: { goRealTimePk() { common_vendor.index.__f__("log", "at pages/Home/Home.vue:123", "goRealTimePk"); }, goMakeAppointmentPK() { common_vendor.index.__f__("log", "at pages/Home/Home.vue:126", "goMakeAppointmentPK"); }, goAdvertisement() { common_vendor.index.navigateTo({ url: "/pages/pkDetail/pkDetail" }); }, onRefresherRefresh() { this.page = 0; this.list = []; this.triggered = true; this.pkList(); }, async goDetail(item) { common_vendor.index.showLoading({ title: "加载中...", mask: true }); common_vendor.index.__f__("log", "at pages/Home/Home.vue:143", "id", item.id); const res = await components_request.request({ url: "pk/pkInfoDetail", method: "POST", data: { id: item.id }, userInfo: true }); common_vendor.index.__f__("log", "at pages/Home/Home.vue:152", "res", res); this.detailsdata = res.data; if (res.code === 200) { if (res.data.length !== 0) { common_vendor.index.hideLoading(); common_vendor.index.__f__("log", "at pages/Home/Home.vue:157", "res.data", res.data); common_vendor.index.navigateTo({ url: "/pages/pkDetail/pkDetail", success: (res2) => { res2.eventChannel.emit("itemDetail", { item: this.detailsdata }); } }); } else { common_vendor.index.hideLoading(); this.openPopupQuantity(); } } else { common_vendor.index.hideLoading(); common_vendor.index.showToast({ title: "加载失败", icon: "none", duration: 2e3 }); } }, formatDate: components_formatDate.formatDate, async pkList() { const res = await components_request.request({ url: "pk/pkList", method: "POST", data: { status: 0, page: this.page, size: this.size }, userInfo: false }); common_vendor.index.__f__("log", "at pages/Home/Home.vue:191", res); if (res.code === 200) { this.list.push(...res.data); common_vendor.index.__f__("log", "at pages/Home/Home.vue:194", this.list); this.triggered = false; } }, onScrollToLower() { this.page++; this.pkList(); } }, components: { topNavigation, Advertisement, tabBar } }; if (!Array) { const _component_top_navigation = common_vendor.resolveComponent("top-navigation"); const _component_advertisement = common_vendor.resolveComponent("advertisement"); const _component_uni_card = common_vendor.resolveComponent("uni-card"); const _easycom_tabBar2 = common_vendor.resolveComponent("tabBar"); (_component_top_navigation + _component_advertisement + _component_uni_card + _easycom_tabBar2)(); } const _easycom_tabBar = () => "../../components/tabBar/tabBar.js"; if (!Math) { _easycom_tabBar(); } function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { return { a: common_assets._imports_0$1, b: common_vendor.o$1($options.goRealTimePk), c: common_vendor.o$1($options.goMakeAppointmentPK), d: common_vendor.o$1((...args) => $options.goAdvertisement && $options.goAdvertisement(...args)), e: common_vendor.f($data.list, (item, index, i0) => { return common_vendor.e({ a: item.anchorIcon, b: common_vendor.t(item.anchorId), c: item.sex === "2" }, item.sex === "2" ? { d: common_assets._imports_3 } : { e: common_assets._imports_2 }, { f: common_vendor.t(item.sex === "1" ? "男" : "女"), g: item.sex === "1" ? 1 : "", h: item.sex === "2" ? 1 : "", i: common_vendor.t($options.formatDate(item.pkTime)), j: common_vendor.t(item.coin + "K"), k: common_vendor.o$1(($event) => $options.goDetail(item)), l: "7ffebbf4-2-" + i0 }); }), f: common_vendor.o$1((...args) => $options.onRefresherRefresh && $options.onRefresherRefresh(...args)), g: common_vendor.o$1((...args) => $options.onScrollToLower && $options.onScrollToLower(...args)), h: $data.triggered }; } const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-7ffebbf4"]]); wx.createPage(MiniProgramPage); //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/Home/Home.js.map