From bea02ebfed171f080696990cb07f11ddcda03152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com> Date: Fri, 26 May 2023 20:02:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E7=BB=93=E6=9D=9F=E4=B9=8B?= =?UTF-8?q?=E5=90=8E=E8=87=AA=E5=8A=A8=E8=B7=B3=E8=BD=AC=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=EF=BC=8C=E5=B8=A6=E4=B8=8A=E8=B4=A6=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jshERP-web/src/views/user/Login.vue | 10 +++++++++- jshERP-web/src/views/user/Register.vue | 5 ++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/jshERP-web/src/views/user/Login.vue b/jshERP-web/src/views/user/Login.vue index 5139c78f..7a519d98 100644 --- a/jshERP-web/src/views/user/Login.vue +++ b/jshERP-web/src/views/user/Login.vue @@ -20,7 +20,7 @@ type="password" @mouseover="initWeixin" autocomplete="false" - placeholder="密码"> + placeholder="请输入密码"> @@ -120,6 +120,7 @@ } }, created () { + this.loadInfo() this.checkScreen() this.currdatetime = new Date().getTime(); Vue.ls.remove(ACCESS_TOKEN) @@ -129,6 +130,13 @@ methods: { ...mapActions([ "Login", "Logout" ]), // handler + loadInfo() { + if(this.$route.params.loginName) { + this.$nextTick(() => { + this.form.setFieldsValue({'loginName':this.$route.params.loginName}) + }) + } + }, handleLoginName (rule, value, callback) { const regex = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/; if (regex.test(value)) { diff --git a/jshERP-web/src/views/user/Register.vue b/jshERP-web/src/views/user/Register.vue index 2cbb37a9..79530a0f 100644 --- a/jshERP-web/src/views/user/Register.vue +++ b/jshERP-web/src/views/user/Register.vue @@ -240,7 +240,10 @@ }); let that = this; setTimeout(function () { - that.form.resetFields(); + that.$router.push({ name: "login", params:{ + loginName: register.loginName + } + }) },2000); } else { this.$notification['error']({