src/utils/sm2.js
@@ -1,5 +1,5 @@ import website from '@/config/website'; import smCrypto from 'sm-crypto'; import website from '@/config/website' import smCrypto from 'sm-crypto' /** * sm2 加密方法 @@ -7,9 +7,9 @@ * @returns {*} */ export function encrypt(data) { try { return smCrypto.sm2.doEncrypt(data, website.oauth2.publicKey, 0); } catch { return ''; } try { return smCrypto.sm2.doEncrypt(data, website.oauth2.publicKey, 0) } catch { return '' } }