2025年02月01日 建站教程
问题描述:项目开发中需要利用crypto-js
实现加密解密,原先用的是crypto-js-4.1.1
版本,出现了Uncaught SyntaxError: Unexpected token
和Uncaught ReferenceError: CryptoJS is not defined
错误!
查找问题:原因是当前测试的浏览器是谷歌46版本,crypto-js
代码不兼容导致的!
解决流程:
1、下载了crypto-js-3.1.2
版本,原先错误没有了,但是报Uncaught TypeError: Cannot read property ' encrypt' of undefined
错误;
2、下载了crypto-js-4.0.0
版本,完美兼容!
本文链接:http://so.lmcjl.com/news/22438/