Update console.js

修复前端更新Token逻辑
This commit is contained in:
t924417424 2020-12-17 15:15:23 +08:00 committed by GitHub
parent 7deb10638d
commit 697143ea99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,7 +65,7 @@ getinfo = function () {
} }
, parseData: function (res) { //将原始数据解析成 table 组件所规定的数据 , parseData: function (res) { //将原始数据解析成 table 组件所规定的数据
if (res.token) { if (res.token) {
window.localStorage.setItem("token", result.token) //更新token window.localStorage.setItem("token", res.token) //更新token
} }
if (res.code == 301 || res.code == 302) { //Token校验失败或过期 if (res.code == 301 || res.code == 302) { //Token校验失败或过期
layer.msg(res.msg, function () { layer.msg(res.msg, function () {