| | |
| | | <script type="text/javascript" charset="utf-8" src="${ctxPath}/djadmin/static/js/ueditor/jsp/ueditor.config.js"></script> |
| | | <script type="text/javascript" charset="utf-8" src="${ctxPath}/djadmin/static/js/ueditor/jsp/ueditor.all.js"></script> |
| | | <script type="text/javascript" charset="utf-8" src="${ctxPath}/djadmin/static/js/ueditor/jsp/lang/zh-cn/zh-cn.js"></script> |
| | | <script src="${ctxPath}/djadmin/static/crypto-js/crypto-js.js"></script> |
| | | <!--<style type="text/css"> |
| | | table{ |
| | | width:100px; |
| | |
| | | } |
| | | }); |
| | | } |
| | | var key = CryptoJS.enc.Utf8.parse("xqT86jictTPpHMem"); |
| | | var iv = CryptoJS.enc.Utf8.parse("xqT86jicxqT86jic"); |
| | | |
| | | //aes加密 |
| | | function encrypt(context) { |
| | | var encrypted = ''; |
| | | if (typeof(context) == 'string') { |
| | | |
| | | }else if(typeof(context) == 'object'){ |
| | | context = JSON.stringify(context); |
| | | } |
| | | var srcs = CryptoJS.enc.Utf8.parse(context); |
| | | encrypted = CryptoJS.AES.encrypt(srcs, key, { |
| | | iv: iv, |
| | | mode: CryptoJS.mode.CBC, |
| | | padding: CryptoJS.pad.Pkcs7 |
| | | }); |
| | | return encrypted.toString(); |
| | | } |
| | | // aes解密 |
| | | function decrypt(context) { |
| | | var decrypt = CryptoJS.AES.decrypt(context, key, { |
| | | iv: iv, |
| | | mode: CryptoJS.mode.CBC, |
| | | padding: CryptoJS.pad.Pkcs7 |
| | | }); |
| | | var decryptedStr = decrypt.toString(CryptoJS.enc.Utf8); |
| | | return decryptedStr.toString(); |
| | | } |
| | | // 页面加载完成后启动轮询 |
| | | $(document).ready(function() { |
| | | // 延迟5秒后开始轮询,避免页面加载时的性能影响 |