{"remainingRequest":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\eslint-loader\\index.js??ref--13-0!D:\\jenkins\\workspace\\yhxt-web\\public\\hotent.helper.js","dependencies":[{"path":"D:\\jenkins\\workspace\\yhxt-web\\public\\hotent.helper.js","mtime":1667326390044},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\eslint-loader\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.regexp.match\";\n\n/*! Copyright (c) 2019 Hotent(http://www.hotent.com)\r\n * \r\n * Version: 1.0.0\r\n */\n;\n\n(function () {\n var hotent = {};\n window.hotent = hotent; // 是否现代浏览器\n\n hotent.isModern = function () {\n return window.addEventListener ? true : false;\n }; // 添加事件监听\n\n\n hotent.addListener = function (name, fn) {\n if (!name || name.constructor != String) {\n throw \"name could not be empty and must be String.\";\n }\n\n if (!fn || fn.constructor != Function) {\n throw \"fn could not be empty and must be Function.\";\n }\n\n var eventMethod = hotent.isModern ? \"addEventListener\" : \"attachEvent\",\n eventer = window[eventMethod];\n var match = name.match(/^on(\\w+)$/);\n\n if (match && match.length == 2) {\n name = match[1];\n }\n\n eventer(hotent.isModern ? name : \"on\" + name, fn);\n }; // 发送消息给父页面\n\n\n hotent.sendMessage = function (params) {\n window.parent && window.parent.postMessage(params, \"*\");\n }; // 监听父页面发送过来的message\n\n\n hotent.addListener(\"message\", function (e) {\n var type = e.data || 0; // 子页面先回复父页面:收到消息\n\n hotent.sendMessage({\n type: \"roger\"\n });\n\n switch (type) {\n case \"getHeight\":\n /*获取页面高度*/\n hotent.getHeight();\n break;\n\n case \"saveData\":\n /*保存页面数据*/\n\n case \"modifyForm\":\n /*打开新页面编辑数据*/\n\n case \"printForm\":\n /*打印*/\n\n case \"validForm\":\n /*验证数据*/\n hotent.invoke(type);\n break;\n }\n }, false); // 调用页面定义的方法\n\n hotent.invoke = function (methodName) {\n var r = window[methodName];\n\n if (!r || r.constructor != Function) {\n throw \"页面未提供方法:\" + methodName;\n } else {\n r.apply();\n }\n }; // 获取页面高度\n\n\n hotent.getHeight = function () {\n var height = document.getElementsByTagName(\"body\")[0].scrollHeight,\n params = {\n type: \"height\",\n height: height\n };\n hotent.sendMessage(params);\n }; // 监听鼠标滚动事件\n\n\n hotent.addListener(\"wheel\", function (e) {\n var params = {\n type: \"wheel\",\n wheelDeltaY: -e.deltaY\n };\n hotent.sendMessage(params);\n });\n})();",null]}