浏览代码

登陆修改

lrf402788946 5 年之前
父节点
当前提交
dbefcf5e64
共有 1 个文件被更改,包括 11 次插入1 次删除
  1. 11 1
      src/views/login/login.vue

+ 11 - 1
src/views/login/login.vue

@@ -48,7 +48,7 @@
                       </el-form-item>
                       <el-form-item prop="mobile" class="firmRightName">
                         <el-col :span="16">
-                          <el-input placeholder="验证码" prefix-icon="el-icon-lock" v-model="verifyForm.code" @keyup.enter="toSubmit"></el-input>
+                          <el-input placeholder="验证码" prefix-icon="el-icon-lock" v-model="verifyForm.code"></el-input>
                         </el-col>
                         <el-col :span="8" class="firmRightImg">
                           <!-- <img :src="pic3" /> -->
@@ -112,6 +112,7 @@ export default {
   }),
   created() {
     this.initQrcode();
+    this.enterListen();
   },
   computed: {},
   methods: {
@@ -163,6 +164,15 @@ export default {
       let result = await this.getWxtoken(this.qrcode);
       this.submit(result);
     },
+    enterListen() {
+      var _this = this;
+      document.onkeydown = function(e) {
+        var key = window.event.keyCode;
+        if (key == 13) {
+          _this.toSubmit();
+        }
+      };
+    },
   },
 };
 </script>