From f6212662918a4d63dffee49e2797da10f1a91344 Mon Sep 17 00:00:00 2001 From: taoshihan <630892807@qq.com> Date: Tue, 7 Jun 2022 22:41:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E7=82=B9=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/js/chat-main.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/static/js/chat-main.js b/static/js/chat-main.js index 09092d6..21da004 100644 --- a/static/js/chat-main.js +++ b/static/js/chat-main.js @@ -96,12 +96,15 @@ var app=new Vue({ const redata = JSON.parse(e.data); switch (redata.type){ case "close": - this.$message({ - message: "客服在其他地方登录,当前登录状态退出", - type: 'error' - }); - localStorage.removeItem("token"); this.socket.close(); + this.$alert('客服在其他地方登录,当前登录状态退出', '通知', { + confirmButtonText: '确定', + callback:function () { + localStorage.removeItem("token"); + window.location.href="/login"; + } + }); + break; case "inputing": this.handleInputing(redata.data);