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

97 lines
3.6 KiB
JavaScript

"use strict";
const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.js");
if (!Math) {
(rightItemsfirst + rightItemssecond)();
}
const rightItemsfirst = () => "../../component/rightItemsindex/index.js";
const rightItemssecond = () => "../../component/rightItemssecond/index.js";
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" },
{ url: "/static/index/lefticon/give.png", targetUrl: "/static/index/lefticontarget/givedark.png" },
{ url: "/static/index/lefticon/wifi.png", targetUrl: "/static/index/lefticontarget/bluewifi.png" },
{ url: "/static/index/lefticon/back.png", targetUrl: "/static/index/lefticontarget/blueback.png" }
]);
const menuIndex = common_vendor.ref(0);
const menuIndexshow = common_vendor.ref(false);
const menuIndexshowsecond = common_vendor.ref(false);
const darkFans = common_vendor.ref(false);
common_vendor.ref([]);
common_vendor.ref(0);
common_vendor.ref(0);
common_vendor.ref(0);
common_vendor.ref(0);
common_vendor.ref(0);
const darkchange = (res) => {
darkFans.value = res;
};
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毫秒, // 动画持续时间,单位为毫秒
});
return;
}
menuIndex.value = index;
menuIndexshow.value = false;
menuIndexshowsecond.value = false;
setTimeout(() => {
switch (index) {
case 0:
menuIndexshow.value = true;
break;
case 1:
menuIndexshowsecond.value = true;
break;
}
}, 50);
};
common_vendor.onShow(() => {
setTimeout(() => {
changeMenu(menuIndex.value);
}, 50);
});
return (_ctx, _cache) => {
return {
a: common_assets._imports_0,
b: common_vendor.n(darkFans.value ? `left-head-font-dark` : `left-head-font`),
c: common_vendor.f(iconList.value, (item, index, i0) => {
return {
a: index === menuIndex.value,
b: index === menuIndex.value ? item.targetUrl : item.url,
c: common_vendor.o(($event) => changeMenu(index), index),
d: index
};
}),
d: `/static/index/ray.png`,
e: !menuIndex.value,
f: common_vendor.o(darkchange),
g: common_vendor.p({
isshow: menuIndexshow.value,
darkFans: darkFans.value
}),
h: menuIndex.value == 1,
i: common_vendor.o(darkchange),
j: common_vendor.p({
isshow: menuIndexshowsecond.value,
darkFans: darkFans.value
}),
k: common_vendor.n(darkFans.value ? `darkbackgroundContainer` : `backgroundContainer`)
};
};
}
});
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