微信小程序使用 Crypto-js MD5加密
如果小程序从未构建npm
1. 在项目目录 npm init
2. 安装包 npm install crypto-js
3. 在微信开发者工具上, 工具 -> 构建NPM
----- 使用 ----------
const CryptoJS = require(\'crypto-js\')
CryptoJS.MD5(\'想加加密的字符串\').toString()
如果小程序从未构建npm
1. 在项目目录 npm init
2. 安装包 npm install crypto-js
3. 在微信开发者工具上, 工具 -> 构建NPM
----- 使用 ----------
const CryptoJS = require(\'crypto-js\')
CryptoJS.MD5(\'想加加密的字符串\').toString()