注册结束之后自动跳转登录界面,带上账号
This commit is contained in:
@@ -20,7 +20,7 @@
|
|||||||
type="password"
|
type="password"
|
||||||
@mouseover="initWeixin"
|
@mouseover="initWeixin"
|
||||||
autocomplete="false"
|
autocomplete="false"
|
||||||
placeholder="密码">
|
placeholder="请输入密码">
|
||||||
<a-icon slot="prefix" type="lock" :style="{ color: 'rgba(0,0,0,.25)' }"/>
|
<a-icon slot="prefix" type="lock" :style="{ color: 'rgba(0,0,0,.25)' }"/>
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -120,6 +120,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
|
this.loadInfo()
|
||||||
this.checkScreen()
|
this.checkScreen()
|
||||||
this.currdatetime = new Date().getTime();
|
this.currdatetime = new Date().getTime();
|
||||||
Vue.ls.remove(ACCESS_TOKEN)
|
Vue.ls.remove(ACCESS_TOKEN)
|
||||||
@@ -129,6 +130,13 @@
|
|||||||
methods: {
|
methods: {
|
||||||
...mapActions([ "Login", "Logout" ]),
|
...mapActions([ "Login", "Logout" ]),
|
||||||
// handler
|
// handler
|
||||||
|
loadInfo() {
|
||||||
|
if(this.$route.params.loginName) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.form.setFieldsValue({'loginName':this.$route.params.loginName})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
handleLoginName (rule, value, callback) {
|
handleLoginName (rule, value, callback) {
|
||||||
const regex = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/;
|
const regex = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/;
|
||||||
if (regex.test(value)) {
|
if (regex.test(value)) {
|
||||||
|
|||||||
@@ -240,7 +240,10 @@
|
|||||||
});
|
});
|
||||||
let that = this;
|
let that = this;
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
that.form.resetFields();
|
that.$router.push({ name: "login", params:{
|
||||||
|
loginName: register.loginName
|
||||||
|
}
|
||||||
|
})
|
||||||
},2000);
|
},2000);
|
||||||
} else {
|
} else {
|
||||||
this.$notification['error']({
|
this.$notification['error']({
|
||||||
|
|||||||
Reference in New Issue
Block a user