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

190 lines
7.1 KiB
JavaScript
Raw Normal View History

2025-06-27 08:56:14 +08:00
"use strict";
const common_vendor = require("../../common/vendor.js");
const pages_addjigou_api_addjigou = require("../addjigou/api/addjigou.js");
if (!Math) {
2025-07-01 17:29:13 +08:00
(model + downMenu)();
2025-06-27 08:56:14 +08:00
}
const downMenu = () => "../../compontent/public/downmenu.js";
2025-07-01 17:29:13 +08:00
const model = () => "../../compontent/public/model.js";
2025-06-27 08:56:14 +08:00
const _sfc_main = {
__name: "index",
setup(__props) {
2025-06-30 17:33:35 +08:00
const show = common_vendor.ref(false);
const content = common_vendor.ref("");
const hong = common_vendor.ref(0);
const buttonArray = common_vendor.ref(["办公室", "员工", "机构维护"]);
const imgArray = common_vendor.ref(["https://www.focusnu.com/media/directive/index/jigouindex/bangong.png", "https://www.focusnu.com/media/directive/index/jigouindex/yuangong.png", "https://www.focusnu.com/media/directive/index/jigouindex/weihu.png"]);
2025-06-30 17:33:35 +08:00
const statusarray = ["loading", "success", "fail"];
2025-06-27 08:56:14 +08:00
const which = common_vendor.ref(0);
2025-10-13 14:58:45 +08:00
const ceshi = () => {
};
2025-06-27 08:56:14 +08:00
const changecard = (e) => {
which.value = e;
whichMenu.value = which.value;
};
const clickSmallball = () => {
common_vendor.index.setStorageSync("jumpIndex", 1);
common_vendor.index.navigateTo({
url: "/pages/yuangongindex/message"
});
};
2025-06-27 08:56:14 +08:00
const moveend = () => {
which.value = menuArray.value.length;
whichMenu.value = which.value;
};
const addjigou = () => {
common_vendor.index.setStorageSync("specicalid", "");
common_vendor.index.setStorageSync("baddata", "");
common_vendor.index.setStorageSync("backhuancun", {});
common_vendor.index.navigateTo({
url: `/pages/addjigou/name`
});
};
const look = (element) => {
common_vendor.index.navigateTo({
url: `/pages/addjigou/all?element=${JSON.stringify(element)}`
});
};
2025-06-30 17:33:35 +08:00
const jumptolist = (res) => {
if (res) {
content.value = res;
show.value = true;
}
2025-06-27 08:56:14 +08:00
};
const again = (item) => {
common_vendor.index.__f__("log", "at pages/index/index.vue:342", "????", item);
2025-06-27 08:56:14 +08:00
common_vendor.index.setStorageSync("baddata", item);
common_vendor.index.setStorageSync("specicalid", item.id);
common_vendor.index.setStorageSync("backhuancun", {});
common_vendor.index.navigateTo({
url: `/pages/addjigou/name`
});
};
const whichMenu = common_vendor.ref(0);
const swiperchange = (res) => {
whichMenu.value = res.detail.current;
which.value = res.detail.current;
};
2025-10-13 14:58:45 +08:00
const moveHeight = common_vendor.ref(0);
common_vendor.onMounted(() => {
let capsule = null;
if (typeof common_vendor.index.getMenuButtonBoundingClientRect === "function") {
try {
capsule = common_vendor.index.getMenuButtonBoundingClientRect();
} catch (e) {
capsule = null;
}
moveHeight.value = capsule.top;
common_vendor.index.setStorageSync("moveHeight", moveHeight.value);
}
2025-06-27 08:56:14 +08:00
});
common_vendor.onUnmounted(() => {
});
const menuArray = common_vendor.ref([]);
2025-07-03 17:27:42 +08:00
const loadingData = () => {
2025-06-27 08:56:14 +08:00
common_vendor.index.getStorage({
key: "openid",
success: function(res) {
pages_addjigou_api_addjigou.getMessageList(res.data).then((res2) => {
menuArray.value = res2.result;
2025-06-30 17:33:35 +08:00
menuArray.value.push({
status: `-1`
});
2025-06-27 08:56:14 +08:00
});
}
});
2025-07-03 17:27:42 +08:00
};
common_vendor.onLoad(() => {
loadingData();
2025-06-27 08:56:14 +08:00
});
return (_ctx, _cache) => {
2025-10-13 14:58:45 +08:00
var _a;
return common_vendor.e({
a: hong.value
}, hong.value ? {
b: common_vendor.t(hong.value)
} : {}, {
c: `${moveHeight.value}px`,
d: common_vendor.o(clickSmallball),
e: common_vendor.o(($event) => show.value = false),
f: common_vendor.p({
2025-07-01 17:29:13 +08:00
show: show.value,
content: content.value
2025-06-30 17:33:35 +08:00
}),
g: common_vendor.f(menuArray.value, (item, index, i0) => {
2025-06-27 08:56:14 +08:00
return common_vendor.e({
2025-07-31 17:23:36 +08:00
a: item.status == `1`
2025-07-03 17:27:42 +08:00
}, item.status == `1` ? {
2025-07-31 17:23:36 +08:00
b: `https://www.focusnu.com/media/directive/index/refresh.png`,
c: common_vendor.o(loadingData, index)
2025-06-30 17:33:35 +08:00
} : {}, {
2025-07-31 17:23:36 +08:00
d: item.status == `1`
2025-06-27 08:56:14 +08:00
}, item.status == `1` ? {
2025-07-31 17:23:36 +08:00
e: `https://www.focusnu.com/media/directive/index/${statusarray[Number(item.status) - 1]}.png`,
f: common_vendor.t(item.comName),
g: common_vendor.o(($event) => look(item), index)
2025-06-27 08:56:14 +08:00
} : {}, {
2025-07-31 17:23:36 +08:00
h: item.status == `3`
2025-06-27 08:56:14 +08:00
}, item.status == `3` ? {
2025-07-31 17:23:36 +08:00
i: `https://www.focusnu.com/media/directive/index/${statusarray[Number(item.status) - 1]}.png`,
j: common_vendor.t(item.comName),
k: common_vendor.o(($event) => again(item), index),
l: common_vendor.o(($event) => jumptolist(item.content), index)
2025-06-27 08:56:14 +08:00
} : {}, {
2025-07-31 17:23:36 +08:00
m: item.status == `2`
2025-06-27 08:56:14 +08:00
}, item.status == `2` ? {
n: `https://www.focusnu.com/media/directive/index/jigouindex/canku.png`,
o: `https://www.focusnu.com/media/directive/index/addstaff/more.png`,
p: `https://www.focusnu.com/media/directive/index/jigouindex/danyuan.png`,
q: `https://www.focusnu.com/media/directive/index/addstaff/more.png`,
r: `https://www.focusnu.com/media/directive/index/jigouindex/houqin.png`,
s: `https://www.focusnu.com/media/directive/index/jigouindex/gongqu.png`,
t: common_vendor.f(buttonArray.value, (item0, index2, i1) => {
2025-06-27 08:56:14 +08:00
return {
a: imgArray.value[index2],
b: common_vendor.t(item0),
c: index2,
d: common_vendor.o(() => {
}, index2)
2025-06-27 08:56:14 +08:00
};
}),
v: `https://www.focusnu.com/media/directive/index/oldmanphoto/more.png`
2025-06-27 08:56:14 +08:00
} : {}, {
w: item.status == `-1`
2025-06-30 17:33:35 +08:00
}, item.status == `-1` ? {
x: common_vendor.o(addjigou, index)
2025-06-30 17:33:35 +08:00
} : {}, {
y: index
2025-06-27 08:56:14 +08:00
});
}),
h: `100vh`,
i: which.value,
j: common_vendor.o(swiperchange),
k: common_vendor.f(menuArray.value, (item, index, i0) => {
2025-06-30 17:33:35 +08:00
return common_vendor.e({
a: index != menuArray.value.length - 1
}, index != menuArray.value.length - 1 ? {
b: common_vendor.n(whichMenu.value == index ? `black-box` : `gray-box`)
} : {}, {
c: index == menuArray.value.length - 1
}, index == menuArray.value.length - 1 ? {
d: `https://www.focusnu.com/media/directive/index/bluejia.png`,
e: common_vendor.o(moveend, index)
} : {}, {
f: index,
g: common_vendor.o(($event) => changecard(index), index)
});
2025-06-27 08:56:14 +08:00
}),
l: common_vendor.t((_a = menuArray.value[which.value]) == null ? void 0 : _a.comName),
m: common_vendor.p({
2025-06-27 08:56:14 +08:00
itemTarget: 0
2025-10-13 14:58:45 +08:00
}),
n: common_vendor.o(ceshi)
});
2025-06-27 08:56:14 +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