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']({