From c8886bebd31e323d337273024223e4df8f0fc258 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 01 七月 2020 14:28:20 +0800
Subject: [PATCH] #
---
src/main/webapp/static/js/common.js | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/main/webapp/static/js/common.js b/src/main/webapp/static/js/common.js
index 3e2e453..d3d2813 100644
--- a/src/main/webapp/static/js/common.js
+++ b/src/main/webapp/static/js/common.js
@@ -104,11 +104,17 @@
url: url,
data: data,
dataType: 'json',
- header: {'Content-Type': 'application/json'},
+ header: {'token': localStorage.getItem('token')},
timeout: 10000,
cache: false,
- success: function (result) {
- callback(result);
+ success: function (res) {
+ if (res.code === 200){
+ callback(res);
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ } else {
+ layer.msg(res.msg);
+ }
},
error: function (res, type) {
--
Gitblit v1.9.1