1.安装jwt npm install jsonwebtoken 2.在需要的文件引用 var jwt = require(“jsonwebtoken”) 3.需要的地方解码 jwt.decode(“需要解码的token”)