2025-08-12 15:38:25 +08:00
|
|
|
|
"use strict";
|
|
|
|
|
|
const common_vendor = require("../../common/vendor.js");
|
2025-08-12 16:39:15 +08:00
|
|
|
|
const enum_commonEnum = require("../../enum/commonEnum.js");
|
2025-08-12 15:38:25 +08:00
|
|
|
|
const _sfc_main = {
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
2025-08-12 16:39:15 +08:00
|
|
|
|
commonEnum: enum_commonEnum.commonEnum,
|
2025-08-12 15:38:25 +08:00
|
|
|
|
title: "设备租赁",
|
|
|
|
|
|
currentBannerIndex: 0,
|
|
|
|
|
|
bannerList: [
|
|
|
|
|
|
{
|
|
|
|
|
|
id: 1,
|
|
|
|
|
|
name: "渝锦汇",
|
|
|
|
|
|
desc: "商用节能灶燃烧器",
|
|
|
|
|
|
features: "商用节能灶燃烧器,高效节能,安全可靠,适用于各类餐饮场所。采用先进燃烧技术,热效率高,节能环保。",
|
|
|
|
|
|
image: "/static/stove.svg"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
id: 2,
|
|
|
|
|
|
name: "节能燃烧器",
|
|
|
|
|
|
desc: "高效节能设备",
|
|
|
|
|
|
features: "新一代节能燃烧器,热效率提升30%,节能环保,安全可靠。",
|
|
|
|
|
|
image: "/static/burner.svg"
|
2025-08-12 18:00:36 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
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"
|
2025-08-12 15:38:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
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;
|
|
|
|
|
|
},
|
2025-08-12 18:00:36 +08:00
|
|
|
|
// 点击轮播图
|
|
|
|
|
|
onBannerClick(index) {
|
|
|
|
|
|
this.currentBannerIndex = index;
|
|
|
|
|
|
},
|
2025-08-12 15:38:25 +08:00
|
|
|
|
// 去续费
|
|
|
|
|
|
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 {
|
2025-08-12 16:39:15 +08:00
|
|
|
|
a: $data.commonEnum.LOCATION,
|
2025-08-12 17:49:16 +08:00
|
|
|
|
b: $data.commonEnum.ANNOUNCEMENT_ICON,
|
|
|
|
|
|
c: common_vendor.f($data.bannerList, (banner, index, i0) => {
|
2025-08-12 15:38:25 +08:00
|
|
|
|
return {
|
2025-08-12 18:06:04 +08:00
|
|
|
|
a: banner.id,
|
|
|
|
|
|
b: $data.currentBannerIndex === index ? 1 : "",
|
|
|
|
|
|
c: common_vendor.o(($event) => $options.onBannerClick(index), banner.id)
|
2025-08-12 15:38:25 +08:00
|
|
|
|
};
|
|
|
|
|
|
}),
|
2025-08-12 18:06:04 +08:00
|
|
|
|
d: $data.commonEnum.TEMP1,
|
|
|
|
|
|
e: common_vendor.f($data.bannerList, (banner, index, i0) => {
|
2025-08-12 15:38:25 +08:00
|
|
|
|
return {
|
|
|
|
|
|
a: index,
|
|
|
|
|
|
b: $data.currentBannerIndex === index ? 1 : "",
|
|
|
|
|
|
c: common_vendor.o(($event) => $options.onDotClick(index), index)
|
|
|
|
|
|
};
|
|
|
|
|
|
}),
|
2025-08-12 18:06:04 +08:00
|
|
|
|
f: common_vendor.f($data.equipmentList, (equipment, k0, i0) => {
|
2025-08-12 15:38:25 +08:00
|
|
|
|
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)
|
|
|
|
|
|
};
|
|
|
|
|
|
}),
|
2025-08-12 18:06:04 +08:00
|
|
|
|
g: common_vendor.f(["首页", "申请租赁", "个人中心"], (nav, index, i0) => {
|
2025-08-12 15:38:25 +08:00
|
|
|
|
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
|