From ad3d67480c073ac4c2afce744a5de81f08776595 Mon Sep 17 00:00:00 2001 From: Kevin Dyer Date: Wed, 8 Nov 2023 14:30:49 -0800 Subject: [PATCH] chore: remove comments/empty lifecycle methods We can always bring this stuff back if we need it. Since they're not being used, cleaning it up seems like a better option than keeping it --- src/views/login/index.vue | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 36dc2801..509d2b11 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -99,9 +99,6 @@ export default { immediate: true } }, - created() { - // window.addEventListener('storage', this.afterQRScan) - }, mounted() { if (this.loginForm.username === '') { this.$refs.username.focus() @@ -109,9 +106,6 @@ export default { this.$refs.password.focus() } }, - destroyed() { - // window.removeEventListener('storage', this.afterQRScan) - }, methods: { checkCapslock(e) { const { key } = e @@ -153,31 +147,11 @@ export default { return acc }, {}) } - // afterQRScan() { - // if (e.key === 'x-admin-oauth-code') { - // const code = getQueryObject(e.newValue) - // const codeMap = { - // wechat: 'code', - // tencent: 'code' - // } - // const type = codeMap[this.auth_type] - // const codeName = code[type] - // if (codeName) { - // this.$store.dispatch('LoginByThirdparty', codeName).then(() => { - // this.$router.push({ path: this.redirect || '/' }) - // }) - // } else { - // alert('第三方登录失败') - // } - // } - // } } }