@@ -7,6 +7,9 @@ import {
const publickey = getPubKey()
export function encrypt(txt) {
+ if(!publickey){
+ return "";
+ }
const encryptor = new JSEncrypt()
// 设置公钥
encryptor.setPublicKey(publickey)