hldy_app/unpackage/dist/dev/mp-weixin/pages/index/index.js

124 lines
4.5 KiB
JavaScript
Raw Normal View History

2025-02-18 17:11:31 +08:00
"use strict";
const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.js");
2025-03-05 17:29:32 +08:00
if (!Math) {
(rightItemsfirst + rightItemssecond)();
}
const rightItemsfirst = () => "../../component/rightItemsindex/index.js";
const rightItemssecond = () => "../../component/rightItemssecond/index.js";
2025-02-18 17:11:31 +08:00
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "index",
setup(__props) {
const iconList = common_vendor.ref([
{ url: "/static/index/lefticon/index.png", targetUrl: "/static/index/lefticontarget/blueindex.png" },
{ url: "/static/index/lefticon/nurse.png", targetUrl: "/static/index/lefticontarget/bluenurse.png" },
{ url: "/static/index/lefticon/doctor.png", targetUrl: "/static/index/lefticontarget/bluedoctor.png" },
2025-02-27 17:15:17 +08:00
{ url: "/static/index/lefticon/give.png", targetUrl: "/static/index/lefticontarget/givedark.png" },
2025-02-18 17:11:31 +08:00
{ url: "/static/index/lefticon/wifi.png", targetUrl: "/static/index/lefticontarget/bluewifi.png" },
{ url: "/static/index/lefticon/back.png", targetUrl: "/static/index/lefticontarget/blueback.png" }
]);
2025-03-07 17:26:02 +08:00
const menuIndex = common_vendor.ref(1);
2025-03-05 17:29:32 +08:00
const menuIndexshow = common_vendor.ref(false);
const menuIndexshowsecond = common_vendor.ref(false);
2025-02-27 17:15:17 +08:00
const darkFans = common_vendor.ref(false);
2025-03-05 17:29:32 +08:00
common_vendor.ref([]);
2025-03-04 17:29:52 +08:00
common_vendor.ref(0);
2025-03-05 17:29:32 +08:00
common_vendor.ref(0);
common_vendor.ref(0);
common_vendor.ref(0);
common_vendor.ref(0);
const darkchange = (res) => {
darkFans.value = res;
2025-02-27 17:15:17 +08:00
};
2025-03-05 17:29:32 +08:00
const changeMenu = (index) => {
if (index === 3) {
menuIndexshow.value = false;
menuIndexshowsecond.value = false;
common_vendor.index.navigateTo({
url: `/pages/somethingmove/index?darkFans=${darkFans.value}`,
animationType: "slide-in-right",
animationDuration: 400
// 设置动画时长为300毫秒, // 动画持续时间,单位为毫秒
2025-02-27 17:15:17 +08:00
});
2025-03-05 17:29:32 +08:00
return;
2025-02-27 17:15:17 +08:00
}
2025-03-05 17:29:32 +08:00
menuIndex.value = index;
menuIndexshow.value = false;
menuIndexshowsecond.value = false;
2025-03-04 17:29:52 +08:00
setTimeout(() => {
2025-03-05 17:29:32 +08:00
switch (index) {
case 0:
menuIndexshow.value = true;
break;
case 1:
menuIndexshowsecond.value = true;
break;
}
}, 50);
2025-03-04 17:29:52 +08:00
};
2025-03-07 17:26:02 +08:00
const clientX = common_vendor.ref(0);
const clientY = common_vendor.ref(0);
const savename = common_vendor.ref("");
const canmove = common_vendor.ref(true);
const getxy = (event) => {
const touch = event.touches[0];
clientX.value = 2 * (Math.floor(touch.clientX) - 60);
clientY.value = 2 * (Math.floor(touch.clientY) - 55);
};
const openname = (res) => {
savename.value = res;
canmove.value = false;
};
const cleanall = () => {
savename.value = "";
clientX.value = 9999;
clientY.value = 9999;
canmove.value = true;
};
2025-03-05 17:29:32 +08:00
common_vendor.onShow(() => {
2025-03-04 17:29:52 +08:00
setTimeout(() => {
2025-03-05 17:29:32 +08:00
changeMenu(menuIndex.value);
}, 50);
2025-02-18 17:11:31 +08:00
});
return (_ctx, _cache) => {
2025-03-05 17:29:32 +08:00
return {
2025-03-07 17:26:02 +08:00
a: common_vendor.t(savename.value),
b: savename.value,
c: `${clientY.value}rpx`,
d: `${clientX.value}rpx`,
e: common_assets._imports_0,
f: common_vendor.n(darkFans.value ? `left-head-font-dark` : `left-head-font`),
g: common_vendor.f(iconList.value, (item, index, i0) => {
2025-02-18 17:11:31 +08:00
return {
a: index === menuIndex.value,
b: index === menuIndex.value ? item.targetUrl : item.url,
2025-02-27 17:15:17 +08:00
c: common_vendor.o(($event) => changeMenu(index), index),
d: index
};
}),
2025-03-07 17:26:02 +08:00
h: `/static/index/ray.png`,
i: !menuIndex.value,
j: common_vendor.o(darkchange),
k: common_vendor.p({
2025-03-05 17:29:32 +08:00
isshow: menuIndexshow.value,
darkFans: darkFans.value
2025-03-04 17:29:52 +08:00
}),
2025-03-07 17:26:02 +08:00
l: menuIndex.value == 1,
m: common_vendor.o(darkchange),
n: common_vendor.o(openname),
o: common_vendor.p({
2025-03-05 17:29:32 +08:00
isshow: menuIndexshowsecond.value,
2025-03-07 17:26:02 +08:00
canmove: canmove.value,
2025-03-05 17:29:32 +08:00
darkFans: darkFans.value
2025-03-04 17:29:52 +08:00
}),
2025-03-07 17:26:02 +08:00
p: common_vendor.n(darkFans.value ? `darkbackgroundContainer` : `backgroundContainer`),
q: common_vendor.o(getxy),
r: common_vendor.o(cleanall)
2025-03-05 17:29:32 +08:00
};
2025-02-18 17:11:31 +08:00
};
}
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-1cf27b2a"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/index/index.js.map