"use strict"; const common_vendor = require("../../common/vendor.js"); const pages_addjigou_api_addjigou = require("../addjigou/api/addjigou.js"); if (!Math) { (model + downMenu)(); } const downMenu = () => "../../compontent/public/downmenu.js"; const model = () => "../../compontent/public/model.js"; const _sfc_main = { __name: "index", setup(__props) { 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"]); const statusarray = ["loading", "success", "fail"]; const which = common_vendor.ref(0); const ceshi = () => { }; 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" }); }; 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)}` }); }; const jumptolist = (res) => { if (res) { content.value = res; show.value = true; } }; const again = (item) => { common_vendor.index.__f__("log", "at pages/index/index.vue:342", "????", item); 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; }; 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); } }); common_vendor.onUnmounted(() => { }); const menuArray = common_vendor.ref([]); const loadingData = () => { common_vendor.index.getStorage({ key: "openid", success: function(res) { pages_addjigou_api_addjigou.getMessageList(res.data).then((res2) => { menuArray.value = res2.result; menuArray.value.push({ status: `-1` }); }); } }); }; common_vendor.onLoad(() => { loadingData(); }); return (_ctx, _cache) => { 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({ show: show.value, content: content.value }), g: common_vendor.f(menuArray.value, (item, index, i0) => { return common_vendor.e({ a: item.status == `1` }, item.status == `1` ? { b: `https://www.focusnu.com/media/directive/index/refresh.png`, c: common_vendor.o(loadingData, index) } : {}, { d: item.status == `1` }, item.status == `1` ? { 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) } : {}, { h: item.status == `3` }, item.status == `3` ? { 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) } : {}, { m: item.status == `2` }, 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) => { return { a: imgArray.value[index2], b: common_vendor.t(item0), c: index2, d: common_vendor.o(() => { }, index2) }; }), v: `https://www.focusnu.com/media/directive/index/oldmanphoto/more.png` } : {}, { w: item.status == `-1` }, item.status == `-1` ? { x: common_vendor.o(addjigou, index) } : {}, { y: index }); }), h: `100vh`, i: which.value, j: common_vendor.o(swiperchange), k: common_vendor.f(menuArray.value, (item, index, i0) => { 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) }); }), l: common_vendor.t((_a = menuArray.value[which.value]) == null ? void 0 : _a.comName), m: common_vendor.p({ itemTarget: 0 }), n: common_vendor.o(ceshi) }); }; } }; 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