"use strict"; const common_vendor = require("../../common/vendor.js"); const enum_commonEnum = require("../../enum/commonEnum.js"); const _sfc_main = { data() { return { commonEnum: enum_commonEnum.commonEnum, title: "设备租赁", currentBannerIndex: 0, bannerList: [ { id: 1, name: "渝锦汇", desc: "商用节能灶燃烧器", features: "商用节能灶燃烧器,高效节能,安全可靠,适用于各类餐饮场所。采用先进燃烧技术,热效率高,节能环保。", image: "/static/stove.svg" }, { id: 2, name: "节能燃烧器", desc: "高效节能设备", features: "新一代节能燃烧器,热效率提升30%,节能环保,安全可靠。", image: "/static/burner.svg" }, { id: 3, name: "商用炉具", desc: "专业厨房设备", features: "专业商用炉具,采用不锈钢材质,耐高温,易清洁,适合大型餐饮场所使用。", image: "/static/stove.svg" }, { id: 4, name: "燃气灶具", desc: "高效燃气设备", features: "高效燃气灶具,燃烧充分,热效率高,节能环保,安全可靠。", image: "/static/burner.svg" }, { id: 5, name: "厨房设备", desc: "一体化解决方案", features: "提供完整的厨房设备解决方案,从设计到安装,一站式服务。", image: "/static/stove.svg" } ], equipmentList: [ { id: 1, name: "商用节能灶", status: "normal", startTime: "2025-07-25 13:23:59", endTime: "2026-07-25 13:23:59", image: "/static/stove.svg" }, { id: 2, name: "节能燃烧器", status: "normal", startTime: "2025-07-25 13:23:59", endTime: "2026-07-25 13:23:59", image: "/static/burner.svg" } ] }; }, onLoad() { this.startBannerAutoPlay(); }, methods: { // 轮播图自动播放 startBannerAutoPlay() { setInterval(() => { this.currentBannerIndex = (this.currentBannerIndex + 1) % this.bannerList.length; }, 3e3); }, // 点击轮播指示器 onDotClick(index) { this.currentBannerIndex = index; }, // 点击轮播图 onBannerClick(index) { this.currentBannerIndex = index; }, // 去续费 onRenew(equipment) { common_vendor.index.showToast({ title: `正在处理${equipment.name}的续费`, icon: "none" }); }, // 点击设备项 onEquipmentClick(equipment) { common_vendor.index.showToast({ title: `查看${equipment.name}详情`, icon: "none" }); }, // 点击底部导航 onNavClick(index) { const navItems = ["首页", "申请租赁", "个人中心"]; common_vendor.index.showToast({ title: `切换到${navItems[index]}`, icon: "none" }); } } }; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { return { a: $data.commonEnum.LOCATION, b: $data.commonEnum.ANNOUNCEMENT_ICON, c: common_vendor.f($data.bannerList, (banner, index, i0) => { return { a: common_vendor.t(banner.name), b: common_vendor.t(banner.desc), c: banner.image, d: common_vendor.t(banner.features), e: banner.id, f: $data.currentBannerIndex === index ? 1 : "", g: common_vendor.o(($event) => $options.onBannerClick(index), banner.id) }; }), d: common_vendor.f($data.bannerList, (banner, index, i0) => { return { a: index, b: $data.currentBannerIndex === index ? 1 : "", c: common_vendor.o(($event) => $options.onDotClick(index), index) }; }), e: common_vendor.f($data.equipmentList, (equipment, k0, i0) => { return { a: equipment.image, b: common_vendor.t(equipment.name), c: common_vendor.t(equipment.status === "normal" ? "正常" : "异常"), d: common_vendor.n(equipment.status), e: common_vendor.t(equipment.startTime), f: common_vendor.t(equipment.endTime), g: common_vendor.o(($event) => $options.onRenew(equipment), equipment.id), h: equipment.id, i: common_vendor.o(($event) => $options.onEquipmentClick(equipment), equipment.id) }; }), f: common_vendor.f(["首页", "申请租赁", "个人中心"], (nav, index, i0) => { return { a: common_vendor.t(index === 0 ? "🏠" : index === 1 ? "➕" : "😊"), b: common_vendor.t(nav), c: index, d: index === 0 ? 1 : "", e: common_vendor.o(($event) => $options.onNavClick(index), index) }; }) }; } const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-1cf27b2a"]]); wx.createPage(MiniProgramPage); //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/index/index.js.map