fix:修复初次登录系统后回车刷新页面的问题

This commit is contained in:
wangwenrui
2020-08-20 10:23:29 +08:00
parent 186297cd95
commit 23dfce7e25

View File

@@ -46,7 +46,7 @@ export default {
},
methods: {
login() {
if (this.validateLogin()) {
if (this.validateLogin()&&(this.$route.path=='/'||this.$route.path=='/login')) {
this.$post('sys/login', (this.loginData)).then(res => {
if (res.code == 200) {
//登录成功记录用户名、token和lang