| | |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.userPhone != '' && row.userPhone != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.userPhone + '" onfocus="TUser.tooltip()">' + row.userPhone + '</p>'] |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + decryptAES(row.userPhone) + '" onfocus="TUser.tooltip()">' + decryptAES(row.userPhone) + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | |
| | | } |
| | | }; |
| | | |
| | | var key = CryptoJS.enc.Utf8.parse("xqT86jictTPpHMem"); |
| | | var iv = CryptoJS.enc.Utf8.parse("xqT86jicxqT86jic"); |
| | | |
| | | //aes加密 |
| | | function encryptAES(context) { |
| | | if(null == context || '' == context){ |
| | | return 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 decryptAES(context) { |
| | | if(null == context || '' == context){ |
| | | return 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(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询用户留言管理列表 |
| | | */ |