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 {