From 0661a53d7997aaf3f890cf7a4c7998710285285d Mon Sep 17 00:00:00 2001 From: guoyue Date: Tue, 13 Sep 2022 18:04:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=BA=E5=88=B6=E4=BD=BF=E7=94=A8=E8=B0=B7?= =?UTF-8?q?=E6=AD=8C=E6=88=96=E8=80=85=E7=81=AB=E7=8B=90=E6=B5=8F=E8=A7=88?= =?UTF-8?q?=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/views/login/index.vue | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/front/src/views/login/index.vue b/front/src/views/login/index.vue index d1699397..7e481975 100644 --- a/front/src/views/login/index.vue +++ b/front/src/views/login/index.vue @@ -22,9 +22,9 @@ - + + :disabled="form.username === '' || form.password === '' || !canOpen.includes(judgeAgent())"> 登录 @@ -57,6 +57,9 @@ export default { redirect: undefined, dependencies: dependencies, devDependencies: devDependencies, + is360: false, + isIE: false, + canOpen: ['FF', 'Chrome'] } }, computed: { @@ -76,13 +79,11 @@ export default { mounted() { this.form.username = '' this.form.password = '' - /* setTimeout(() => { - this.handleSubmit() - }, 3000) */ - if (this.judgeAgent() !== 'Chrome') { + + if (!this.canOpen.includes(this.judgeAgent())) { Modal.warning({ title: '提示', - content: '请使用谷歌浏览器!', + content: '请使用谷歌或火狐浏览器!', }); } }, @@ -93,6 +94,7 @@ export default { // 判断浏览器 judgeAgent() { let userAgent = navigator.userAgent // 取得浏览器的userAgent字符串 + console.log('userAgent------------>', userAgent); let isOpera = userAgent.indexOf('Opera') > -1 //判断是否Opera浏览器 if (isOpera) {