From 89f0fc2105db242627e65bf892fbddf892db3c8b Mon Sep 17 00:00:00 2001 From: mukaiu Date: Tue, 25 Sep 2018 15:35:56 +0800 Subject: [PATCH] =?UTF-8?q?#70=20AUTH=20=E9=94=99=E8=AF=AF=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/templates/apps/chatbot/edit.html | 13 +++++++++++++ .../resources/templates/apps/chatbot/index.html | 14 ++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/contact-center/app/src/main/resources/templates/apps/chatbot/edit.html b/contact-center/app/src/main/resources/templates/apps/chatbot/edit.html index 22a9a8d5..adbe5be2 100644 --- a/contact-center/app/src/main/resources/templates/apps/chatbot/edit.html +++ b/contact-center/app/src/main/resources/templates/apps/chatbot/edit.html @@ -99,6 +99,19 @@ $.ajax(payload) .done(function (data) { console.log('Rest api 返回的值:', data); + if (data.status && data.status === "AUTH_ERROR") { + layer.confirm('会话过期,请重新登录!', { + btn: ['是', '否'], + icon: 2, + title: '提示' + }, function (index, layero) { + layer.close(index) + top.location.href = '/logout.html' + }, function (index) { + // 取消方法 + }); + return; + } if (data.rc == 0) { cb(null, data.data); } else { diff --git a/contact-center/app/src/main/resources/templates/apps/chatbot/index.html b/contact-center/app/src/main/resources/templates/apps/chatbot/index.html index c36e9904..8b67d65b 100644 --- a/contact-center/app/src/main/resources/templates/apps/chatbot/index.html +++ b/contact-center/app/src/main/resources/templates/apps/chatbot/index.html @@ -51,6 +51,20 @@ $.ajax(payload) .done(function (data) { console.log('Rest api 返回的值:', data); + if (data.status && data.status === "AUTH_ERROR") { + layer.confirm('会话过期,请重新登录!', { + btn: ['是', '否'], + icon: 2, + title: '提示' + }, function (index, layero) { + layer.close(index) + top.location.href = '/logout.html' + }, function (index) { + // 取消方法 + }); + return; + } + if (data.rc == 0) { resolve(data.data); } else {