From 5898656227e8fc64f941fbf354281b99c453be0c Mon Sep 17 00:00:00 2001 From: JEECG <445654970@qq.com> Date: Fri, 19 Jul 2024 11:42:18 +0800 Subject: [PATCH] =?UTF-8?q?mac=E7=B3=BB=E7=BB=9F=E8=B0=B7=E6=AD=8C?= =?UTF-8?q?=E6=B5=8F=E8=A7=88=E5=99=A8=E4=BC=81=E4=B8=9A=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E7=AC=AC=E4=B8=89=E6=96=B9=E7=99=BB=E5=BD=95=E6=88=90=E5=8A=9F?= =?UTF-8?q?=E5=90=8E=E6=B2=A1=E6=9C=89=E5=BC=B9=E5=87=BA=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E6=89=8B=E6=9C=BA=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jeecgboot-vue3/src/hooks/system/useThirdLogin.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/jeecgboot-vue3/src/hooks/system/useThirdLogin.ts b/jeecgboot-vue3/src/hooks/system/useThirdLogin.ts index 388a220d..5c2ba1b7 100644 --- a/jeecgboot-vue3/src/hooks/system/useThirdLogin.ts +++ b/jeecgboot-vue3/src/hooks/system/useThirdLogin.ts @@ -38,7 +38,7 @@ export function useThirdLogin() { //第三方登录 function onThirdLogin(source) { let url = `${glob.uploadUrl}/sys/thirdLogin/render/${source}`; - window.open( + const openWin = window.open( url, `login ${source}`, 'height=500, width=500, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=n o, status=no' @@ -68,10 +68,15 @@ export function useThirdLogin() { } else { createMessage.warning('不识别的信息传递'); } - //update-begin---author:wangshuai---date:2024-02-20---for:【QQYUN-8156】连续登录失败,导致失败提醒累加--- - window.removeEventListener('message', unref(receiveMessage),false); - //update-end---author:wangshuai---date:2024-02-20---for:【QQYUN-8156】连续登录失败,导致失败提醒累加--- + // update-begin--author:liaozhiyang---date:20240717---for:【TV360X-1827】mac系统谷歌浏览器企业微信第三方登录成功后没有弹出绑定手机弹窗 + if (openWin?.closed) { + window.removeEventListener('message', receiveMessage, false); + } + // update-end--author:liaozhiyang---date:20240717---for:【TV360X-1827】mac系统谷歌浏览器企业微信第三方登录成功后没有弹出绑定手机弹窗 }; + // update-begin--author:liaozhiyang---date:20240717---for:【TV360X-1827】mac系统谷歌浏览器企业微信第三方登录成功后没有弹出绑定手机弹窗 + window.removeEventListener('message', receiveMessage, false); + // update-end--author:liaozhiyang---date:20240717---for:【TV360X-1827】mac系统谷歌浏览器企业微信第三方登录成功后没有弹出绑定手机弹窗 window.addEventListener('message', receiveMessage, false); } // 根据token执行登录