diff --git a/public/Weboffice4Path.html b/public/Weboffice4Path.html index aa62682..22f6797 100644 --- a/public/Weboffice4Path.html +++ b/public/Weboffice4Path.html @@ -4,9 +4,9 @@ 招标采购中心 | 文档控件编辑器 - - - + + +
- +
diff --git a/public/ntkoStyle.css b/public/ntkoStyle.css deleted file mode 100644 index 7b6c2e4..0000000 --- a/public/ntkoStyle.css +++ /dev/null @@ -1,175 +0,0 @@ -body{ - text-align:center; - font-family:"微软雅黑"; - letter-spacing:0.05em; - color:#575757; - font-size:16px; - margin:0px; -} -a{ - text-decoration:none; - cursor:pointer; - color:#299ceb; -} -a:hover{ - text-decoration:underline; - color:#c60000; -} -hr{ - border:0px; - border-bottom:1px #b0b0b0 solid; - margin:50px 0px 30px 0px; -} -p{ - text-align:left; - line-height:1.6; - text-indent:2em; -} - -.divTop{ - width:100%; - height:70px; - text-align:center; - background-color:#000000; - top:0; -} -.divTopInner{ - width:1200px; - text-align:left; - color:#ffffff; - line-height:70px; - margin:auto; -} -.divTopInnerCaption{ - width:1150px; - font-size:20px; - float:left; -} -.divTopInnerNtko{ - width:50px; - font-size:14px; - text-align:center; - float:left; - cursor:pointer; -} -.divTopInnerNtko:hover{ - background-color:#c60000; -} -.divTopInner a{ - color:#ffffff; - text-decoration:none; -} - -.divTitle{ - width:100%; - height:80px; - line-height:80px; - border-bottom:1px #bababa solid; - margin-bottom:10px; -} -.divTitle_body{ - width:1200px; - text-align:left; - margin:auto; -} -.divTitle_caption{ - width:100%; - float:left; - color:#c60000; - font-size:36px; - font-weight:bold; - -} -.divTitle_caption_small{ - width:100%; - float:left; - color:#c60000; - font-size:24px; - font-weight:bold; - height:50px; - line-height:50px; -} -.divTitle_Information{ - width:100%; - float:left; - color:#999999; - font-size:14px; - height:auto; - line-height:24px; - margin:20px 0px 30px 0px; -} -.divTitle_Information_Left{ - width:40px; - height:40px; - line-height:40px; - background-color:#ffde00; - float:left; - text-align:center; - font-size:20px; - font-weight:bolder; - color:#ffffff; - margin:auto 20px auto auto; -} -.divTitle_Information_Right{ - width:1140px; - height:40px; - line-height:40px; - float:left; - font-size:16px; -} -.divTitle_introduction{ - width:100%; - float:left; - color:#999999; - font-size:14px; - height:auto; - line-height:24px; -} - -.divBody{ - width:1200px; - margin:10px auto; - text-align:left; -} -.divBody_Title{ - width:100%; - height:40px; - font-size:16px; - margin:40px 0px 0px 0px; -} -.divBody_Title_Flag{ - width:5px; - height:40px; - font-size:16px; - float:left; - background-color:#a10000; - margin:0px 20px 10px 0px; -} -.divBody_Table_Caption{ - width:1175px; - height:40px; - line-height:40px; - font-size:24px; - font-weight:bolder; - color:#999999; - float:left; -} -table{ - border-collapse:collapse; - width:100%; -} -td{ - border:1px #e0e0e0 solid; - height:60px; - text-align:center; - color:#999999; - font-size:14px; - padding:20px; -} -.divBody_Table_RowTitle{ - font-size:18px; - font-weight:bolder; - color:#ffffff; - background-color:#e0e0e0; -} - \ No newline at end of file diff --git a/public/ntkobackground_a.min.js b/public/ntkobackground_a.min.js deleted file mode 100644 index c2f1a16..0000000 --- a/public/ntkobackground_a.min.js +++ /dev/null @@ -1,667 +0,0 @@ -/** - * version: 2.3.2 - * - * 2020.07.10版本 跟随 招商银行股份有限公司20200730 产品发送 - * 2021.04.29版本 增加兼容Edge浏览器的判断逻辑 zhoujianlong - */ -"use strict"; -var varNtkoGUID = Math.random().toString(36); -var ntkoWinOpen; -var ntkoJsonIe; -var timer; -var ntkoSendDataToChildStrUrl; -var ntkoSendDataToChildSData; -var ntkowin; -var userAgent = navigator.userAgent, - rMsie = /(msie\s|trident.*rv:)([\w.]+)/, - rFirefox = /(firefox)\/([\w.]+)/, - rOpera = /(opera).+versi1on\/([\w.]+)/, - rChrome = /(chrome)\/([\w.]+)/, - rEdge = /(edg)\/([\w.]+)/, - rSafari = /version\/([\w.]+).*(safari)/; - var browser; - var version; - var ntkoextensionmainifest; - var ua = userAgent.toLowerCase(); - function uaMatch(ua) { - var match = rMsie.exec(ua); - if (match != null) { - return { browser : "IE", version : match[2] || "0" }; - } - var match = rFirefox.exec(ua); - if (match != null) { - return { browser : match[1] || "", version : match[2] || "0" }; - } - var match = rOpera.exec(ua); - if (match != null) { - return { browser : match[1] || "", version : match[2] || "0" }; - } - var match = rChrome.exec(ua); - if (match != null) { - var matchedge= rEdge.exec(ua); - if(matchedge!=null){ - return { browser : matchedge[1] || "", version : matchedge[2] || "0" }; - }else{ - return { browser : match[1] || "", version : match[2] || "0" }; - } - } - var match = rSafari.exec(ua); - if (match != null) { - return { browser : match[2] || "", version : match[1] || "0" }; - } - if (match != null) { - return { browser : "", version : "0" }; - } - } - var browserMatch = uaMatch(userAgent.toLowerCase()); - if (browserMatch.browser) { - browser = browserMatch.browser; - version = browserMatch.version; - } - var mimeTypes = navigator.mimeTypes; - var bChromeExtensionInstalled = false; - version=parseInt(version); - if( "chrome" === browserMatch.browser && version>="45") - { - - var img; - img = new Image(); - img.src = "chrome-extension://lppkeogbkjlmmbjenbogdndlgmpiddda/icons/ntko.png"; - img.onload = function() { - bChromeExtensionInstalled = true; - }; - img.onerror = function() { - bChromeExtensionInstalled = false; - }; - } - if("edg"===browserMatch.browser){ - - var img; - img = new Image(); - img.src = "chrome-extension://nldmejlecnngjgcfpinfkdhkfakjeail/icons/ntko.png"; - img.onload = function() { - bChromeExtensionInstalled = true; - }; - img.onload = function() { - bChromeExtensionInstalled = true; - }; - } - -var ntkoBrowser = { -ntkoSendDataToChild:function( strURL, data) -{ - if ( typeof data === 'undefined' ){ - return; - } - var strURL=ntkoBrowser.NtkoStrURL(strURL); - var jsonValue = '{"SendDataToChild":1,"GUID":"'; - jsonValue += varNtkoGUID; - jsonValue += '","URLMD5":"'; - jsonValue += b64_md5(strURL); - jsonValue += '","ChildValue":"'; - jsonValue += data; - jsonValue += '"}'; - var ntkobr=ntkoBrowser.NtkoBrower(); - if(ntkobr){ - window.postMessage({ type: "FROM_NTKO_PAGE", text: jsonValue }, "*"); - }else{ - ntkoWinOpen.ntkoGetParentData(data); - } -}, -ExtensionInstalled:function() -{ - var ntkobr=ntkoBrowser.NtkoBrower(); - if(!ntkobr){ - if(browser=="IE"){ - return true; - }else{ - var mimetype=navigator.mimeTypes["application/ntko-plug"]; - if(mimetype){ - var plugin=mimetype.enabledPlugin; - if(plugin){ - return true; - }else{ - return false; - } - }else{ - return false; - } - } - } - else - { - if( "firefox" === browserMatch.browser ) - { - var bInstalled = false; - if( "undefined" === typeof FirefoxInstalled ) - return ( bInstalled ); - else - return( window.FirefoxInstalled()); - } - else if( "chrome" === browserMatch.browser ) - { - if(localStorage["ntkoweb"]==="ntkoExtensionInstalled"){ - bChromeExtensionInstalled=true; - localStorage.clear(); - } - return (bChromeExtensionInstalled); - }else if("edg" === browserMatch.browser){ - if(( typeof ntkoextensionmainifest != 'undefined' ) && ( ( null != ntkoextensionmainifest ) && ( "" != ntkoextensionmainifest ))){ - return true; - }else{ - return( bChromeExtensionInstalled ); - } - } - } -}, - -ntkoClose:function( strURL ) -{ - var strURL=ntkoBrowser.NtkoStrURL(strURL); - var jsonValue = '{"Close":1,"GUID":"'; - jsonValue += varNtkoGUID; - jsonValue += '","URLMD5":"'; - jsonValue += b64_md5(strURL); - jsonValue += '"}'; - var ntkobr=ntkoBrowser.NtkoBrower(); - if(ntkobr){ - window.postMessage({ type: "FROM_NTKO_PAGE", text: jsonValue }, "*"); - }else{ - ntkoWinOpen.close(); - } -}, -openWindow:function( strURL,IsShowOnExtendMonitor,ProductCaption, ntkoBrowserProductKey, ntkoBrowserNoExpireKey, ntkoBrowserOptions,varUrlData,ntkowidth,ntkoheight ) -{ - - if(varUrlData!=null&&varUrlData!=""){ - ntkoSendDataToChildSData=varUrlData; - } - var ntkowinscr= ntkoBrowser.NtkoWidthAndHeightWinScr(ntkowidth,ntkoheight); - if(!ntkowinscr){ - alert("设置窗口大小格式不正确"); - return; - } - var strURL=ntkoBrowser.NtkoStrURL(strURL); - var jsonValue = '{"OpenWindow":1,"URL":"'; - jsonValue += strURL; - jsonValue += '","GUID":"'; - jsonValue += varNtkoGUID; - jsonValue += '","URLMD5":"'; - jsonValue +=b64_md5(strURL); - jsonValue += '","ntkobrowserMatch":"'; - jsonValue +=browserMatch.browser; - jsonValue += '","IsShowOnExtendMonitor":"'; - jsonValue += IsShowOnExtendMonitor; - jsonValue += '"'; - if( ( typeof ProductCaption != 'undefined' ) && ( ( null != ProductCaption ) && ( "" != ProductCaption ) ) ) - { - jsonValue += ',"ProductCaption":"'; - jsonValue += ProductCaption; - jsonValue += '"'; - } - - if( ( typeof ntkoBrowserProductKey != 'undefined' ) && ( ( null != ntkoBrowserProductKey ) && ( "" != ntkoBrowserProductKey ) ) ) - { - jsonValue += ',"ProductKey":"'; - jsonValue += ntkoBrowserProductKey; - jsonValue += '"'; - } - - if( ( typeof ntkoBrowserNoExpireKey != 'undefined' ) && ( ( null != ntkoBrowserNoExpireKey ) &&( "" != ntkoBrowserNoExpireKey ) ) ) - { - jsonValue += ',"NoExpireKey":"'; - jsonValue += ntkoBrowserNoExpireKey; - jsonValue += '"'; - } - - if( typeof ntkoBrowserOptions != 'undefined' && ( ( null != ntkoBrowserOptions ) && ( "" != ntkoBrowserOptions ) ) ) - { - jsonValue += ',"Options":"'; - jsonValue += ntkoBrowserOptions; - jsonValue += '"'; - } - var LocalStorge = window.localStorage; - if( typeof LocalStorge != 'undefined' && ( 0 != LocalStorge.length ) ) - { - var varLocalDataList = []; - for( var i = 0; i < LocalStorge.length; i++ ) - { - var varLocalData = {}; - varLocalData["StorageKey"] = LocalStorge.key(i); - varLocalData["StorageValue"] = LocalStorge.getItem(LocalStorge.key(i)); - varLocalDataList[i] = varLocalData; - } - jsonValue += ',"LocalStorge":'; - jsonValue += JSON.stringify(varLocalDataList);; - jsonValue += ''; - } - - var SessionStorge = window.sessionStorage; - if( typeof SessionStorge != 'undefined' && ( 0 != SessionStorge.length ) ) - { - var varSessionDataList = []; - for( var i = 0; i < SessionStorge.length; i++ ) - { - var varSessionData = {}; - varSessionData["StorageKey"] = SessionStorge.key(i); - varSessionData["StorageValue"] = SessionStorge.getItem(SessionStorge.key(i)); - varSessionDataList[i] = varSessionData; - } - - jsonValue += ',"SessionStorge":'; - jsonValue += JSON.stringify(varSessionDataList); - jsonValue += ''; - } - if( typeof ntkowidth != 'undefined' && ( ( null != ntkowidth ) && ( "" != ntkowidth ) ) ) - { - jsonValue += ',"NtkoWidth":'; - jsonValue += ntkowidth; - jsonValue += ''; - } - - if( typeof ntkoheight != 'undefined' && ( ( null != ntkoheight ) && ( "" != ntkoheight ) ) ) - { - jsonValue += ',"NtkoHeight":'; - jsonValue += ntkoheight; - jsonValue += ''; - } - - - jsonValue += '}'; - var ntkobr=ntkoBrowser.NtkoBrower(); - if(ntkobr){ - window.postMessage({type: "FROM_NTKO_PAGE", text: jsonValue}, "*"); - }else{ - ntkowin=b64_md5(strURL); - if(ntkowidth==null||ntkowidth=="" ||ntkowidth=="undefined"){ - ntkowidth=window.screen.width; - } - if(ntkoheight==null||ntkoheight==""||ntkoheight=="undefined"){ - ntkoheight=window.screen.height; - } - ntkoWinOpen=window.open(strURL+'&varNtkoGUID='+varNtkoGUID,ntkowin,"height="+ntkoheight+", width="+ntkowidth+", top=0,left=0,titlebar=no,toolbar =no, menubar=no, scrollbars=no, resizable=yes, location=no, status=no"); - ntkoWinOpen.resizeTo(ntkowidth,ntkoheight); - ntkoWinOpen.focus(); - } - }, - NtkoWShell:function(){ - - }, - NtkoiTop:function(){ - return (window.screen.height-30-300)/2; - }, - NtkoiLeft:function(){ - return (window.screen.width-10-400)/2; - }, - NtkoBrower:function(){ - if(browser=="IE"){ - return false; - } - if(browser=="firefox"){ - if(userAgent.indexOf("Windows NT 5.1") > -1){ - return false; - } - if(version>="50"){ - return true; - }else{ - return false; - } - } - if(browser=="chrome"){ - if(userAgent.indexOf("Windows NT 5.1") > -1){ - return false; - } - if(version>="45"){ - return true; - }else{ - return false; - } - } - if(browser=="edg"){ - return true; - } - }, -NtkoStrURL:function(strURL){ - var testurl =window.location.search; - var docUrl=document.location.toString(); - var wpathname= window.document.location.pathname; - var pos=docUrl.indexOf(wpathname); - var relUrl= docUrl.substring(0,pos); - if( ( null === strURL ) || ( "" === strURL ) ) - { - alert("打开路径的url为null"); - return; - } - var strLowser = strURL.toLowerCase(); - if( '/' != strURL.charAt(0) ) - { - if( ( "http://" === strLowser.substr(0,7) ) || ( "https://" === strLowser.substr(0,8) ) ) - {} - else - { - if(strURL.indexOf("../")==-1) - { - var pathName = window.location.href; - var varLength = pathName.lastIndexOf("/"); - strURL = pathName.substr( 0, varLength + 1 ) + strURL; - } - else - { - var strURLlen=strURL.length; - strURL=strURL.substring(2,strURLlen); - strURL = relUrl +strURL; - } - if(strURL.indexOf(testurl)==-1) - { - if(strURL.indexOf("?")==-1) - { - strURL=strURL+testurl - } - else - { - var docof= strURL.indexOf("?"); - var docend=strURL.length; - var docs=strURL.substring(0,docof); - var docsurl=strURL.substring(docof+1,docend); - strURL=docs+testurl+"&"+docsurl; - } - } - } - } - else - { - var strURLlen=strURL.length; - strURL=strURL.substring(0,strURLlen); - strURL = relUrl+ strURL; - } - return strURL; - }, -NtkoWidthAndHeightWinScr:function(ntkowidth,ntkoheight){ - - var regNtko=/^\s*$/; - if(typeof(ntkowidth)=="undefined"&&typeof(ntkoheight)=="undefined"){ - return true; - }else{ - if(regNtko.test(ntkowidth)||typeof(ntkowidth)!="number"){ - return false; - }else{ - if(regNtko.test(ntkoheight)||typeof(ntkoheight)!="number"){ - return false; - }else{ - return true; - } - } - } - }, - thisNTKOGUID:varNtkoGUID, -}; - -if(browser!="IE") -{ - window.addEventListener("message", function(event) - { - if ( event.source != window ) - return; - if (event.data.type && (event.data.type == "FROM_NTKO_CONTEXT_PAGE")) - { - var vJsonData = JSON.parse( event.data.text ); - var jsonData = vJsonData["ntkoData"]; - if( typeof jsonData !== "undefined" ) - { - if( varNtkoGUID === jsonData["ntkoGUID"] ) - { - if( "ntkoClose" === jsonData["functionName"] ) - { - // 调用关闭事件 - try - { - eval('ntkoCloseEvent()'); - } - catch(e) - {} - } - else if( "ntkoReturnValueToParentPage" === jsonData["functionName"] ) - { - // 调用返回值事件,解析值 - var varFunctionName = jsonData["parentExecutionFunction"]; // 要执行的函数名 - if( typeof varFunctionName != 'undefined' && ( ( null != varFunctionName ) && ( "" != varFunctionName ) ) ) - { - var varFunctionAgrvs = jsonData["FunctionArgs"]; // 传递过来的参数值 - if( typeof varFunctionAgrvs != 'undefined' && ( ( null != varFunctionAgrvs ) && ( "" != varFunctionAgrvs ) ) ) - { - // 调用eval执行函数 - eval( varFunctionName + "( varFunctionAgrvs[0], varFunctionAgrvs[1], varFunctionAgrvs[2], varFunctionAgrvs[3]," + - "varFunctionAgrvs[4],varFunctionAgrvs[5],varFunctionAgrvs[6],varFunctionAgrvs[7],varFunctionAgrvs[8]);" ); - } - } - } - } - } - } - if(event.data.type && (event.data.type == "FROM_NTKO_MANIFEST")){ - var ntkojsontext = JSON.parse( event.data.text ); - ntkoextensionmainifest=ntkojsontext['ntkoversion']; - } - }, false); -} -function ieattachEventntko(data,varFunctionAgrvs) -{ - if( typeof data !== "undefined" ) - { - if( typeof varFunctionAgrvs != 'undefined' && ( ( null != varFunctionAgrvs ) && ( "" != varFunctionAgrvs ) ) ) - { - eval( data + "( varFunctionAgrvs[0], varFunctionAgrvs[1], varFunctionAgrvs[2], varFunctionAgrvs[3]," + - "varFunctionAgrvs[4],varFunctionAgrvs[5],varFunctionAgrvs[6],varFunctionAgrvs[7],varFunctionAgrvs[8]);" ); - } - } -} -function ntkoSendDataToChildtext(ntkoDataSendUrl) -{ - if(ntkoSendDataToChildSData!=null&&ntkoSendDataToChildSData!="") - { - ntkoBrowser.ntkoSendDataToChild(ntkoDataSendUrl,ntkoSendDataToChildSData); - } -} -/*___md5___*/ - -var hexcase = 0; -var b64pad = ""; -var chrsz = 8; -function hex_md5(s){ return binl2hex(core_md5(str2binl(s), s.length * chrsz));} -function b64_md5(s){ return binl2b64(core_md5(str2binl(s), s.length * chrsz));} -function str_md5(s){ return binl2str(core_md5(str2binl(s), s.length * chrsz));} -function hex_hmac_md5(key, data) { return binl2hex(core_hmac_md5(key, data)); } -function b64_hmac_md5(key, data) { return binl2b64(core_hmac_md5(key, data)); } -function str_hmac_md5(key, data) { return binl2str(core_hmac_md5(key, data)); } -function md5_vm_test() -{ - return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72"; -} -function core_md5(x, len) -{ - x[len >> 5] |= 0x80 << ((len) % 32); - x[(((len + 64) >>> 9) << 4) + 14] = len; - var a = 1732584193; - var b = -271733879; - var c = -1732584194; - var d = 271733878; - for(var i = 0; i < x.length; i += 16) - { - var olda = a; - var oldb = b; - var oldc = c; - var oldd = d; - a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936); - d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586); - c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819); - b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330); - a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897); - d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426); - c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341); - b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983); - a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416); - d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417); - c = md5_ff(c, d, a, b, x[i+10], 17, -42063); - b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162); - a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682); - d = md5_ff(d, a, b, c, x[i+13], 12, -40341101); - c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290); - b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329); - a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510); - d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632); - c = md5_gg(c, d, a, b, x[i+11], 14, 643717713); - b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302); - a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691); - d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083); - c = md5_gg(c, d, a, b, x[i+15], 14, -660478335); - b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848); - a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438); - d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690); - c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961); - b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501); - a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467); - d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784); - c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473); - b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734); - a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558); - d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463); - c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562); - b = md5_hh(b, c, d, a, x[i+14], 23, -35309556); - a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060); - d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353); - c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632); - b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640); - a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174); - d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222); - c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979); - b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189); - a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487); - d = md5_hh(d, a, b, c, x[i+12], 11, -421815835); - c = md5_hh(c, d, a, b, x[i+15], 16, 530742520); - b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651); - a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844); - d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415); - c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905); - b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055); - a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571); - d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606); - c = md5_ii(c, d, a, b, x[i+10], 15, -1051523); - b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799); - a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359); - d = md5_ii(d, a, b, c, x[i+15], 10, -30611744); - c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380); - b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649); - a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070); - d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379); - c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259); - b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551); - a = safe_add(a, olda); - b = safe_add(b, oldb); - c = safe_add(c, oldc); - d = safe_add(d, oldd); - } - return Array(a, b, c, d); -} -function md5_cmn(q, a, b, x, s, t) -{ - return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b); -} -function md5_ff(a, b, c, d, x, s, t) -{ - return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t); -} -function md5_gg(a, b, c, d, x, s, t) -{ - return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t); -} -function md5_hh(a, b, c, d, x, s, t) -{ - return md5_cmn(b ^ c ^ d, a, b, x, s, t); -} -function md5_ii(a, b, c, d, x, s, t) -{ - return md5_cmn(c ^ (b | (~d)), a, b, x, s, t); -} - -function core_hmac_md5(key, data) -{ - var bkey = str2binl(key); - if(bkey.length > 16) bkey = core_md5(bkey, key.length * chrsz); - var ipad = Array(16), opad = Array(16); - for(var i = 0; i < 16; i++) - { - ipad[i] = bkey[i] ^ 0x36363636; - opad[i] = bkey[i] ^ 0x5C5C5C5C; - } - var hash = core_md5(ipad.concat(str2binl(data)), 512 + data.length * chrsz); - return core_md5(opad.concat(hash), 512 + 128); -} -function safe_add(x, y) -{ - var lsw = (x & 0xFFFF) + (y & 0xFFFF); - var msw = (x >> 16) + (y >> 16) + (lsw >> 16); - return (msw << 16) | (lsw & 0xFFFF); -} -function bit_rol(num, cnt) -{ - return (num << cnt) | (num >>> (32 - cnt)); -} -function str2binl(str) -{ - var bin = Array(); - var mask = (1 << chrsz) - 1; - for(var i = 0; i < str.length * chrsz; i += chrsz) - bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (i%32); - return bin; -} -function binl2str(bin) -{ - var str = ""; - var mask = (1 << chrsz) - 1; - for(var i = 0; i < bin.length * 32; i += chrsz) - str += String.fromCharCode((bin[i>>5] >>> (i % 32)) & mask); - return str; -} -function binl2hex(binarray) -{ - var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; - var str = ""; - for(var i = 0; i < binarray.length * 4; i++) - { - str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) + - hex_tab.charAt((binarray[i>>2] >> ((i%4)*8 )) & 0xF); - } - return str; -} -function binl2b64(binarray) -{ - - var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; - var str = ""; - for(var i = 0; i < binarray.length * 4; i += 3) - { - var triplet = (((binarray[i >> 2] >> 8 * ( i %4)) & 0xFF) << 16) - | (((binarray[i+1 >> 2] >> 8 * ((i+1)%4)) & 0xFF) << 8 ) - | ((binarray[i+2 >> 2] >> 8 * ((i+2)%4)) & 0xFF); - for(var j = 0; j < 4; j++) - { - if(i * 8 + j * 6 > binarray.length * 32) str += b64pad; - else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F); - } - } - return str; -} - -/*接收 子页面数据*/ -function NTKO_DOC_PostMessage(param){ - window.postMessage({type: 'FROM_RETURN_DOC',text: param}, "*") -} -function NTKO_PDF_PostMessage(param){ - window.postMessage({type: 'FROM_RETURN_PDF',text: param}, "*") -} -function NTKO_HTML_PostMessage(param){ - window.postMessage({type: 'FROM_RETURN_HTML',text: param}, "*") -} -function ntkoCloseEvent(){ - window.postMessage({type: 'FROM_NTKO_CLOSE',text: varNtkoGUID}, "*") -} diff --git a/public/ntkocreatnew.docx b/public/ntkocreatnew.docx new file mode 100644 index 0000000..e69de29 diff --git a/public/ntkoofficecontrol.min.js b/public/ntkoofficecontrol.min.js deleted file mode 100644 index 099c722..0000000 --- a/public/ntkoofficecontrol.min.js +++ /dev/null @@ -1,207 +0,0 @@ -/*------------------------------------------------------*/ -/* 修改控件的配置信息 */ -/* version:2.5.1 */ -/* 2020.09.07版本 跟随 联通数字科技有限公司20210105 产品发送 */ -/* */ -/*------------------------------------------------------*/ -//64位控件的calssid -var classidx64="A64E3073-2016-4baf-A89D-FFE1FAA10EF1"; -//32位控件的classid -var classid="A64E3073-2016-4baf-A89D-FFE1FAA10ED1"; -//32位控件包的路径 -var codebase="officecontrol/ofctnewclsid.cab#version=6,0,1,0"; -//64位控件包的路径 -var codebase64="officecontrol/ofctnewclsidx64.cab#version=6,0,1,0"; -//设置高度 -var height="800px"; -//设置宽度 -var width="100%"; -//买断授权密钥如果不是买断可以不用写 -var MakerCaption="联通数字科技有限公司"; -//买断授权密钥如果不是买断可以不用写 -var MakerKey="C1AB790358ECC36C0F26DB985E43769912D15699"; -//密钥 -var ProductCaption="联通数字科技有限公司"; -//密钥 -var ProductKey="46839E48E0B10E99B17E82F35A3E5371F2C07BC0"; -//解除时间密钥 -var NoExpireKey=""; -/* -谷歌浏览器事件接管但此接管事件只支持低版本的谷歌(45以下版本不包含45)和火狐(52以下版本不包含52) -*/ -function ntkosavetourl(type,code,html) -{ - //alert("SaveToURL成功回调"); -} - - -function ntkopublishashtml(type,code,html){ - //alert("Onpublishashtmltourl成功回调"); -} -function ntkopublishaspdf(type,code,html){ -//alert("Onpublishaspdftourl成功回调"); -} -function ntkosaveasotherurl(type,code,html){ -//alert("SaveAsOtherformattourl成功回调"); -} - -function ntkoondocumentopened(type,code){ - //alert("Ondocumentopened成功回调"); - if(cmd==5){ - if(datavalue==1){ - ntko.ShowTipMessage("注意","已经接收到父页面传过来的值,请注意文档中内容的变化"); - ntkoDataToChild(datatext); - } - } -} - - - - -/*------------------------------------------------------*/ -/* 以下内容 请勿修改,否则可能出错 */ -/*------------------------------------------------------*/ - -var userAgent = navigator.userAgent, - rMsie = /(msie\s|trident.*rv:)([\w.]+)/, - rFirefox = /(firefox)\/([\w.]+)/, - rOpera = /(opera).+version\/([\w.]+)/, - rChrome = /(chrome)\/([\w.]+)/, - rSafari = /version\/([\w.]+).*(safari)/; -var browser; -var version; -var ua = userAgent.toLowerCase(); -function uaMatch(ua) { - var match = rMsie.exec(ua); - if (match != null) { - return { browser : "IE", version : match[2] || "0" }; - } - var match = rFirefox.exec(ua); - if (match != null) { - return { browser : match[1] || "", version : match[2] || "0" }; - } - var match = rOpera.exec(ua); - if (match != null) { - return { browser : match[1] || "", version : match[2] || "0" }; - } - var match = rChrome.exec(ua); - if (match != null) { - return { browser : match[1] || "", version : match[2] || "0" }; - } - var match = rSafari.exec(ua); - if (match != null) { - return { browser : match[2] || "", version : match[1] || "0" }; - } - if (match != null) { - return { browser : "", version : "0" }; - } -} -var browserMatch = uaMatch(userAgent.toLowerCase()); -if (browserMatch.browser) { - browser = browserMatch.browser; - version = browserMatch.version; -} - - -if (browser=="IE"){ - if(window.navigator.platform=="Win32"){ - - document.write(' '); - document.write(' '); - document.write(' '); - document.write(' '); - document.write(' '); - document.write(' '); - document.write(' '); - document.write(' '); - document.write(' '); - document.write(' '); - // document.write(' '); - document.write('不能装载文档控件。请在检查浏览器的选项中检查浏览器的安全设置。 '); - document.write(''); - } - if(window.navigator.platform=="Win64"){ - - document.write(' '); - document.write(' '); - document.write(' '); - document.write(' '); - document.write(' '); - document.write(' '); - document.write(' '); - document.write(' '); - document.write(' '); - document.write(' '); - // document.write(' '); - document.write('不能装载文档控件。请在检查浏览器的选项中检查浏览器的安全设置。 '); - document.write(''); - } -} -else if (browser=="firefox"){ - document.write(''); - document.write('尚未安装NTKO Web FireFox跨浏览器插件 '); - document.write(' '); -}else if(browser=="chrome"){ - document.write('尚未安装NTKO Web Chrome跨浏览器插件 '); - document.write(''); -}else if (Sys.opera){ - alert("sorry,ntko web印章暂时不支持opera!"); -}else if (Sys.safari){ - alert("sorry,ntko web印章暂时不支持safari!"); -} -// window.onunload =function(){ -// var ntkojb= ntkoBrowser.NtkoJudgingBrowsers(); -// if(ntkojb){ -// window.opener.ntkoCloseEvent(); -// } -// } - -//ie,谷歌,火狐传值 -var ntkoBrowser={ - ntkoSetReturnValueToParentPage:function(data1,text1){ - var ntkojb= ntkoBrowser.NtkoJudgingBrowsers(); - if(ntkojb){ - window.opener.ieattachEventntko(data1,text1); - }else{ - window.external.SetReturnValueToParentPage(data1,text1); - } - }, - NtkoJudgingBrowsers:function(){ - try{ - var ntkobtop=window.opener.top.browser; - return true; - }catch(err){ - return false; - } - }, -} -//触发父页面传值的功能 -var NtkoUrlTest = window.location.href; -if(NtkoUrlTest!=null&&NtkoUrlTest!=""){ - var ntkoarry=new Array(); - ntkoarry.push(NtkoUrlTest); - ntkoBrowser.ntkoSetReturnValueToParentPage("ntkoSendDataToChildtext",ntkoarry); -} diff --git a/public/officecontrol/NTKO控件安装程序-联通数字科技有限公司.exe b/public/officecontrol/NTKO控件安装程序-联通数字科技有限公司.exe index 1feb127..30608a3 100644 Binary files a/public/officecontrol/NTKO控件安装程序-联通数字科技有限公司.exe and b/public/officecontrol/NTKO控件安装程序-联通数字科技有限公司.exe differ diff --git a/public/jquery.js b/public/officecontrol/jquery.js similarity index 100% rename from public/jquery.js rename to public/officecontrol/jquery.js diff --git a/public/ntko.js b/public/officecontrol/ntko.20220624.js similarity index 91% rename from public/ntko.js rename to public/officecontrol/ntko.20220624.js index d1a84ce..11d3d2c 100644 --- a/public/ntko.js +++ b/public/officecontrol/ntko.20220624.js @@ -11,10 +11,11 @@ function init(readonly, DocfileCode) { contentType: "application/json;charset=UTF-8", data: JSON.stringify([DocfileCode]), success: function (result) { + if (window.navigator.platform == "Win32") { + ntko.AddDocTypePlugin(".pdf", "PDF.NtkoDocument", "4.0.1.0", "officecontrol/ntkooledocall.cab", 51, true); + } if (window.navigator.platform == "Win64") { - ntko.AddDocTypePlugin(".pdf", "PDF.NtkoDocument", "4.0.2.0", "officecontrol/ntkooledocallx64.cab", 51, true); - } else { - ntko.AddDocTypePlugin(".pdf", "PDF.NtkoDocument", "4.0.2.0", "officecontrol/ntkooledocall.cab", 51, true);//版增加对于PDF文件的支持 + ntko.AddDocTypePlugin(".pdf", "PDF.NtkoDocument", "4.0.1.0", "officecontrol/ntkooledocallx64.cab", 51, true);//PDF支持 } if (result.success) { if (result.data.length > 0) { @@ -27,7 +28,7 @@ function init(readonly, DocfileCode) { } }) } else { - ntko.CreateNew("Word.Document"); + ntko.OpenFromURL("ntkocreatnew.docx"); } } else { alert(JSON.stringify(result)); diff --git a/public/officecontrol/ntko.js b/public/officecontrol/ntko.js deleted file mode 100644 index 7218f17..0000000 --- a/public/officecontrol/ntko.js +++ /dev/null @@ -1,23 +0,0 @@ -var ntko;//控件对象 - -//初始化去打开文档 -function init(cmd){ - ntko = document.getElementById("TANGER_OCX"); - if(window.navigator.platform=="Win64"){ - //alert("平台版文档控件,请使用32位浏览器如IE"); - //TANGER_OCX_OBJ.AddDocTypePlugin(".tif","tif.NtkoDocument","4.0.1.0","officecontrol/ntkooledocallx64.cab",51,true); - ntko.AddDocTypePlugin(".pdf","PDF.NtkoDocument","4.0.2.0","officecontrol/ntkooledocallx64.cab",51,true); - - }else{ - ntko.AddDocTypePlugin(".pdf","PDF.NtkoDocument","4.0.2.0","officecontrol/ntkooledocall.cab",51,true);//版增加对于PDF文件的支持 - //TANGER_OCX_OBJ.AddDocTypePlugin(".tif","tif.NtkoDocument","4.0.1.0","officecontrol/ntkooledocallx64.cab",51,true); - } - if (cmd == 1) - { - ntko.OpenFromURL("ntkocreatnew.docx"); - } - else - { - ntko.OpenFromURL("aboutus.docx"); - } -} \ No newline at end of file diff --git a/public/ntko4Path.js b/public/officecontrol/ntko4Path.20220624.js similarity index 100% rename from public/ntko4Path.js rename to public/officecontrol/ntko4Path.20220624.js diff --git a/public/officecontrol/ntkobackground.min.js b/public/officecontrol/ntkobackground.min.20220624.js similarity index 84% rename from public/officecontrol/ntkobackground.min.js rename to public/officecontrol/ntkobackground.min.20220624.js index c874533..9a2d153 100644 --- a/public/officecontrol/ntkobackground.min.js +++ b/public/officecontrol/ntkobackground.min.20220624.js @@ -1,7 +1,7 @@ /** - * version: 2.5.1 + * version: 3.6.2 * - * 2020.09.07版本 跟随 联通系统集成有限公司20201229 产品发送 + * 2022.04.01版本 跟随 联通数字科技有限公司20220523 产品发送 */ "use strict"; var varNtkoGUID = Math.random().toString(36); @@ -11,6 +11,8 @@ var timer; var ntkoSendDataToChildStrUrl; var ntkoSendDataToChildSData; var ntkowin; +var ntkoextensionmainifest; +var strURL1; var userAgent = navigator.userAgent, rMsie = /(msie\s|trident.*rv:)([\w.]+)/, rFirefox = /(firefox)\/([\w.]+)/, @@ -56,38 +58,38 @@ var userAgent = navigator.userAgent, browser = browserMatch.browser; version = browserMatch.version; } - var mimeTypes = navigator.mimeTypes; + var mimeTypes = navigator.mimeTypes; var bChromeExtensionInstalled = false; + version=parseInt(version); + if( "chrome" === browserMatch.browser && version>=45) + { + var img; + img = new Image(); + img.src = "chrome-extension://lppkeogbkjlmmbjenbogdndlgmpiddda/icons/ntko.png"; + img.onload = function() { + bChromeExtensionInstalled = true; + } + img.onerror = function() { + bChromeExtensionInstalled = false; + } + } + if("edg"===browserMatch.browser){ + + var img; + img = new Image(); + img.src = "chrome-extension://miogdolpaknhgnfoghcmnooafkiafkcc/icons/ntko.png"; + img.onload = function() { + bChromeExtensionInstalled = true; + } + img.onerror = function() { + bChromeExtensionInstalled = false; + } + } - if( "chrome" === browserMatch.browser && version>="45") - { - - var img; - img = new Image(); - img.src = "chrome-extension://lppkeogbkjlmmbjenbogdndlgmpiddda/icons/ntko.png"; - img.onload = function() { - bChromeExtensionInstalled = true; - }; - img.onerror = function() { - bChromeExtensionInstalled = false; - }; - } - if("edg"===browserMatch.browser){ - - var img; - img = new Image(); - img.src = "chrome-extension://miogdolpaknhgnfoghcmnooafkiafkcc/icons/ntko.png"; - img.onload = function() { - bChromeExtensionInstalled = true; - }; - img.onload = function() { - bChromeExtensionInstalled = true; - }; - } - var ntkoBrowser = { ntkoSendDataToChild:function( strURL, data) { + console.log(strURL); if ( typeof data === 'undefined' ){ return; } @@ -103,8 +105,8 @@ ntkoSendDataToChild:function( strURL, data) if(ntkobr){ window.postMessage({ type: "FROM_NTKO_PAGE", text: jsonValue }, "*"); }else{ - ntkoWinOpen.ntkoGetParentData(data); - } + ntkoWinOpen.ntkoGetParentData(data); + } }, ExtensionInstalled:function() { @@ -130,27 +132,34 @@ ExtensionInstalled:function() { if( "firefox" === browserMatch.browser ) { + if(( typeof ntkoextensionmainifest != 'undefined' ) && ( ( null != ntkoextensionmainifest ) && ( "" != ntkoextensionmainifest ))){ + + return true; + }else{ var bInstalled = false; if( "undefined" === typeof FirefoxInstalled ) return ( bInstalled ); else return( window.FirefoxInstalled()); + } } else if( "chrome" === browserMatch.browser ) - { - if(localStorage["ntkoweb"]==="ntkoExtensionInstalled"){ - bChromeExtensionInstalled=true; - localStorage.clear(); - } + { + + if(( typeof ntkoextensionmainifest != 'undefined' ) && ( ( null != ntkoextensionmainifest ) && ( "" != ntkoextensionmainifest ))){ + + return true; + }else{ return (bChromeExtensionInstalled); - } else if("edg" === browserMatch.browser){ - if(localStorage["ntkoweb"]==="ntkoExtensionInstalled"){ - bChromeExtensionInstalled=true; - localStorage.clear(); - } - return( bChromeExtensionInstalled ); - } - } + } + } else if("edg" === browserMatch.browser){ + if(( typeof ntkoextensionmainifest != 'undefined' ) && ( ( null != ntkoextensionmainifest ) && ( "" != ntkoextensionmainifest ))){ + return true; + }else{ + return( bChromeExtensionInstalled ); + } + } + } }, ntkoClose:function( strURL ) @@ -168,18 +177,16 @@ ntkoClose:function( strURL ) ntkoWinOpen.close(); } }, -openWindow:function( strURL,IsShowOnExtendMonitor,ProductCaption, ntkoBrowserProductKey, ntkoBrowserNoExpireKey, ntkoBrowserOptions,varUrlData,ntkowidth,ntkoheight ) -{ - - if(varUrlData!=null&&varUrlData!=""){ - ntkoSendDataToChildSData=varUrlData; - } +openWindow:function( strURL,IsShowOnExtendMonitor,ProductCaption, ntkoBrowserProductKey, ntkoBrowserNoExpireKey, ntkoBrowserOptions,varUrlData,ntkowidth,ntkoheight,cookiesDomainPath ) +{ var ntkowinscr= ntkoBrowser.NtkoWidthAndHeightWinScr(ntkowidth,ntkoheight); if(!ntkowinscr){ alert("设置窗口大小格式不正确"); return; - } + } + var strURL=ntkoBrowser.NtkoStrURL(strURL); + strURL1=strURL; var ntkoSessionURL=""; var jsonValue = '{"OpenWindow":1,"URL":"'; jsonValue += strURL; @@ -187,6 +194,8 @@ openWindow:function( strURL,IsShowOnExtendMonitor,ProductCaption, ntkoBrowserPro jsonValue += varNtkoGUID; jsonValue += '","URLMD5":"'; jsonValue +=b64_md5(strURL); + jsonValue += '","ntkobrowserMatch":"'; + jsonValue +=browserMatch.browser; jsonValue += '","IsShowOnExtendMonitor":"'; jsonValue += IsShowOnExtendMonitor; jsonValue += '"'; @@ -225,7 +234,6 @@ openWindow:function( strURL,IsShowOnExtendMonitor,ProductCaption, ntkoBrowserPro } - var LocalStorge = window.localStorage; if( typeof LocalStorge != 'undefined' && ( 0 != LocalStorge.length ) ) { @@ -241,7 +249,12 @@ openWindow:function( strURL,IsShowOnExtendMonitor,ProductCaption, ntkoBrowserPro jsonValue += JSON.stringify(varLocalDataList);; jsonValue += ''; } + if(varUrlData!=null&&varUrlData!=""){ + ntkoSendDataToChildSData=varUrlData; + LocalStorge['ntkoSendDataToChildSData']=varUrlData; + } + var SessionStorge = window.sessionStorage; if( typeof SessionStorge != 'undefined' && ( 0 != SessionStorge.length ) ) { @@ -271,12 +284,16 @@ openWindow:function( strURL,IsShowOnExtendMonitor,ProductCaption, ntkoBrowserPro jsonValue += ntkoheight; jsonValue += ''; } - - + if( typeof cookiesDomainPath != 'undefined' && ( ( null != cookiesDomainPath ) && ( "" != cookiesDomainPath ) ) ) + { + jsonValue += ',"CookiesDomainPath":'; + jsonValue += cookiesDomainPath; + jsonValue += ''; + } jsonValue += '}'; var ntkobr=ntkoBrowser.NtkoBrower(); if(ntkobr){ - window.postMessage({type: "FROM_NTKO_PAGE", text: jsonValue}, "*"); + window.postMessage({type: "FROM_NTKO_PAGE", text: jsonValue}, "*"); }else{ ntkowin=b64_md5(strURL); if(ntkowidth==null||ntkowidth=="" ||ntkowidth=="undefined"){ @@ -307,7 +324,7 @@ openWindow:function( strURL,IsShowOnExtendMonitor,ProductCaption, ntkoBrowserPro if(userAgent.indexOf("Windows NT 5.1") > -1){ return false; } - if(version>="50"){ + if(version>=50){ return true; }else{ return false; @@ -317,7 +334,7 @@ openWindow:function( strURL,IsShowOnExtendMonitor,ProductCaption, ntkoBrowserPro if(userAgent.indexOf("Windows NT 5.1") > -1){ return false; } - if(version>="45"){ + if(version>=45){ return true; }else{ return false; @@ -398,13 +415,23 @@ NtkoWidthAndHeightWinScr:function(ntkowidth,ntkoheight){ } } } - }, + }, + thisNTKOGUID:varNtkoGUID,/**20220609 zhoujianlong 新版插件更新*/ +NtkoExtensionVersion:function(){ + if(browser=="firefox"){ + var ntkojsontext = JSON.parse(window.NtkoFireFoxVersion()); + var ntkofireforversion=ntkojsontext['ntkoversion']; + return ntkofireforversion; + }else{ + return ntkoextensionmainifest; + } +} }; if(browser!="IE") { window.addEventListener("message", function(event) - { + { if ( event.source != window ) return; if (event.data.type && (event.data.type == "FROM_NTKO_CONTEXT_PAGE")) @@ -439,10 +466,18 @@ if(browser!="IE") "varFunctionAgrvs[4],varFunctionAgrvs[5],varFunctionAgrvs[6],varFunctionAgrvs[7],varFunctionAgrvs[8]);" ); } } + }else if("NtkoError" === jsonData["functionName"]){ + //启动扩展报错信息 + alert(jsonData["NtkoReason"]) + } } } - } + } + if(event.data.type && (event.data.type == "FROM_NTKO_MANIFEST")){ + var ntkojsontext = JSON.parse( event.data.text ); + ntkoextensionmainifest=ntkojsontext['ntkoversion']; + } }, false); } function ieattachEventntko(data,varFunctionAgrvs) @@ -456,13 +491,7 @@ function ieattachEventntko(data,varFunctionAgrvs) } } } -function ntkoSendDataToChildtext(ntkoDataSendUrl) -{ - if(ntkoSendDataToChildSData!=null&&ntkoSendDataToChildSData!="") - { - ntkoBrowser.ntkoSendDataToChild(ntkoDataSendUrl,ntkoSendDataToChildSData); - } -} + /*___md5___*/ var hexcase = 0; @@ -652,3 +681,17 @@ function binl2b64(binarray) } return str; } +/*接收 子页面数据*/ +/**20220609 zhoujianlong 新版插件更新*/ +function NTKO_DOC_PostMessage(param){ + window.postMessage({type: 'FROM_RETURN_DOC',text: param}, "*") +} +function NTKO_PDF_PostMessage(param){ + window.postMessage({type: 'FROM_RETURN_PDF',text: param}, "*") +} +function NTKO_HTML_PostMessage(param){ + window.postMessage({type: 'FROM_RETURN_HTML',text: param}, "*") +} +function ntkoCloseEvent(){ + window.postMessage({type: 'FROM_NTKO_CLOSE',text: varNtkoGUID}, "*") +} \ No newline at end of file diff --git a/public/officecontrol/ntkoofficecontrol.min.js b/public/officecontrol/ntkoofficecontrol.min.20220624.js similarity index 85% rename from public/officecontrol/ntkoofficecontrol.min.js rename to public/officecontrol/ntkoofficecontrol.min.20220624.js index 54251cb..7ec4ffd 100644 --- a/public/officecontrol/ntkoofficecontrol.min.js +++ b/public/officecontrol/ntkoofficecontrol.min.20220624.js @@ -1,29 +1,28 @@ /*------------------------------------------------------*/ /* 修改控件的配置信息 */ -/* version:2.5.1 */ -/* 2020.09.07版本 跟随 联通系统集成有限公司20201229 产品发送 */ -/* */ +/* version:3.6.2 */ +/* 2022.04.01版本 跟随 联通数字科技有限公司20220523 产品发送 */ /*------------------------------------------------------*/ //64位控件的calssid var classidx64="A64E3073-2016-4baf-A89D-FFE1FAA10EF1"; //32位控件的classid var classid="A64E3073-2016-4baf-A89D-FFE1FAA10ED1"; //32位控件包的路径 -var codebase="officecontrol/ofctnewclsid.cab#version=6,0,1,0"; +var codebase="officecontrol/ofctnewclsid.cab#version=6.0.2.0"; //64位控件包的路径 -var codebase64="officecontrol/ofctnewclsidx64.cab#version=6,0,1,0"; +var codebase64="officecontrol/ofctnewclsidx64.cab#version=6.0.2.0"; //设置高度 var height="800px"; //设置宽度 var width="100%"; //买断授权密钥如果不是买断可以不用写 -var MakerCaption="联通系统集成有限公司"; +var MakerCaption="联通数字科技有限公司"; //买断授权密钥如果不是买断可以不用写 -var MakerKey="D130003CD231496EBD17D6DAC22DEFC6BD8F4E17"; +var MakerKey="C1AB790358ECC36C0F26DB985E43769912D15699"; //密钥 -var ProductCaption="联通系统集成有限公司某某测试用户"; +var ProductCaption="联通数字科技有限公司"; //密钥 -var ProductKey="F6C911699ECD29CC0D2E47822CF1775B3A80C13F"; +var ProductKey="46839E48E0B10E99B17E82F35A3E5371F2C07BC0"; //解除时间密钥 var NoExpireKey=""; @@ -49,10 +48,9 @@ function ntkosaveasotherurl(type,code,html){ function ntkoondocumentopened(type,code){ //alert("Ondocumentopened成功回调"); if(cmd==5){ - if(datavalue==1){ ntko.ShowTipMessage("注意","已经接收到父页面传过来的值,请注意文档中内容的变化"); - ntkoDataToChild(datatext); - } + var datext=localStorage.getItem('ntkoSendDataToChildSData') + ntkoDataToChild(datext); } } @@ -118,7 +116,7 @@ if (browser=="IE"){ document.write(' '); document.write(' '); document.write(' '); - document.write(' '); + // document.write(' ');/**20220609 zhoujianlong 新版插件更新*/ document.write('不能装载文档控件。请在检查浏览器的选项中检查浏览器的安全设置。 '); document.write(''); } @@ -135,7 +133,7 @@ if (browser=="IE"){ document.write(' '); document.write(' '); document.write(' '); - document.write(' '); + // document.write(' ');/**20220609 zhoujianlong 新版插件更新*/ document.write('不能装载文档控件。请在检查浏览器的选项中检查浏览器的安全设置。 '); document.write(''); } @@ -165,7 +163,7 @@ else if (browser=="firefox"){ document.write('_ProductCaption="'+ProductCaption+'" '); document.write('_NoExpireKey="'+NoExpireKey+'" '); document.write('_ProductKey="'+ProductKey+'" '); - document.write('codebase="'+codebase+'" width="'+width+'" height="'+height+'" type="application/ntko-plug" '); + document.write('codebase="'+codebase+'" width="'+width+'" height="'+height+'" type="application/ntko-plug" >'); document.write('尚未安装NTKO Web Chrome跨浏览器插件 '); document.write(''); }else if (Sys.opera){ @@ -173,12 +171,12 @@ else if (browser=="firefox"){ }else if (Sys.safari){ alert("sorry,ntko web印章暂时不支持safari!"); } -window.onunload =function(){ - var ntkojb= ntkoBrowser.NtkoJudgingBrowsers(); - if(ntkojb){ - window.opener.ntkoCloseEvent(); - } -} +// window.onunload =function(){/**20220609 zhoujianlong 新版插件更新*/ +// var ntkojb= ntkoBrowser.NtkoJudgingBrowsers(); +// if(ntkojb){ +// window.opener.ntkoCloseEvent(); +// } +// } //ie,谷歌,火狐传值 var ntkoBrowser={ @@ -186,6 +184,7 @@ var ntkoBrowser={ var ntkojb= ntkoBrowser.NtkoJudgingBrowsers(); if(ntkojb){ window.opener.ieattachEventntko(data1,text1); + }else{ window.external.SetReturnValueToParentPage(data1,text1); } @@ -197,12 +196,5 @@ var ntkoBrowser={ }catch(err){ return false; } - }, -} -//触发父页面传值的功能 -var NtkoUrlTest = window.location.href; -if(NtkoUrlTest!=null&&NtkoUrlTest!=""){ - var ntkoarry=new Array(); - ntkoarry.push(NtkoUrlTest); - ntkoBrowser.ntkoSetReturnValueToParentPage("ntkoSendDataToChildtext",ntkoarry); + } } \ No newline at end of file diff --git a/public/officecontrol/ntkooledocall.cab b/public/officecontrol/ntkooledocall.cab index 7ca6558..961603e 100644 Binary files a/public/officecontrol/ntkooledocall.cab and b/public/officecontrol/ntkooledocall.cab differ diff --git a/public/officecontrol/ntkooledocallx64.cab b/public/officecontrol/ntkooledocallx64.cab index 7838213..ab24d57 100644 Binary files a/public/officecontrol/ntkooledocallx64.cab and b/public/officecontrol/ntkooledocallx64.cab differ diff --git a/public/officecontrol/ofctnewclsid.cab b/public/officecontrol/ofctnewclsid.cab index fc9da50..271a1d1 100644 Binary files a/public/officecontrol/ofctnewclsid.cab and b/public/officecontrol/ofctnewclsid.cab differ diff --git a/public/officecontrol/ofctnewclsidx64.cab b/public/officecontrol/ofctnewclsidx64.cab index 5d27c65..c7e92cd 100644 Binary files a/public/officecontrol/ofctnewclsidx64.cab and b/public/officecontrol/ofctnewclsidx64.cab differ diff --git a/public/webofficeComponent.html b/public/webofficeComponent.html index 5352053..1a1d680 100644 --- a/public/webofficeComponent.html +++ b/public/webofficeComponent.html @@ -4,9 +4,9 @@ 招标采购中心 | 文档控件编辑器 - - - + + +
- +
diff --git a/public/webofficeIeComponent.html b/public/webofficeIeComponent.html index 3c7d241..05b5a8e 100644 --- a/public/webofficeIeComponent.html +++ b/public/webofficeIeComponent.html @@ -4,9 +4,9 @@ 招标采购中心 | 文档控件编辑器 - - - + + +
- +
diff --git a/src/pages/document.ejs b/src/pages/document.ejs index eff06a4..fd601b2 100644 --- a/src/pages/document.ejs +++ b/src/pages/document.ejs @@ -12,7 +12,7 @@ --> 中国联通电子招投标系统 - + diff --git a/src/typings.d.ts b/src/typings.d.ts index 86fb366..f851f58 100644 --- a/src/typings.d.ts +++ b/src/typings.d.ts @@ -31,6 +31,10 @@ interface Window { declare let ga: Function; +declare interface Window { + ntkoBrowser: any; +} + // preview.pro.ant.design only do not use in your production ; // preview.pro.ant.design 专用环境变量,请不要在你的项目中使用它。 declare let ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: 'site' | undefined;