Commit 6eb25324 by Joey

fix(@rbc/rbc-login): 登陆成功后键盘事件没有取消监听

parent ac567757
...@@ -163,9 +163,6 @@ export default { ...@@ -163,9 +163,6 @@ export default {
document.addEventListener('keyup', this.onKeyUp) document.addEventListener('keyup', this.onKeyUp)
this.getVerificationCode(); this.getVerificationCode();
}, },
beforeUnmount() {
document.removeEventListener('keyup', this.onKeyUp)
},
methods: { methods: {
onKeyUp(event) { onKeyUp(event) {
if (event.keyCode == 13) { if (event.keyCode == 13) {
...@@ -252,6 +249,8 @@ export default { ...@@ -252,6 +249,8 @@ export default {
.then(res => { .then(res => {
this.loginLoading = false; this.loginLoading = false;
GMS.routerManager.afterLogin().then(() => { GMS.routerManager.afterLogin().then(() => {
document.removeEventListener('keyup', this.onKeyUp)
this.$router.push({ this.$router.push({
path: "/", path: "/",
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment