Commit 7e7a0f42 by Joey

feat(@rbc/rbc-login): 按回车点击登录按钮

parent 408fcb95
...@@ -156,7 +156,22 @@ export default { ...@@ -156,7 +156,22 @@ export default {
}, },
watch: { watch: {
}, },
created() {
this.getLoginAssetsInfo();
},
mounted() {
document.addEventListener('keyup', this.onKeyUp)
this.getVerificationCode();
},
beforeUnmount() {
document.removeEventListener('keyup', this.onKeyUp)
},
methods: { methods: {
onKeyUp(event) {
if (event.keyCode == 13) {
this.submit()
}
},
getImgUrl(imgCode) { getImgUrl(imgCode) {
const time = Date.now() const time = Date.now()
return window.GMS.$http.get(`/homepage/downloadFile/${imgCode}`, { return window.GMS.$http.get(`/homepage/downloadFile/${imgCode}`, {
...@@ -277,12 +292,6 @@ export default { ...@@ -277,12 +292,6 @@ export default {
} }
}, },
}, },
mounted() {
this.getVerificationCode();
},
created() {
this.getLoginAssetsInfo();
},
}; };
</script> </script>
......
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