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('第三方登录失败') - // } - // } - // } } }