src/page/login/userlogin.vue
@@ -132,7 +132,7 @@ }, mounted() {}, computed: { ...mapGetters(["tagWel"]), ...mapGetters(["tagWel","userInfo"]), }, props: [], methods: { @@ -159,7 +159,13 @@ this.$store .dispatch("LoginByUsername", this.loginForm) .then(() => { this.$router.push({ path: this.tagWel.value }); console.log(this.userInfo) let path = this.tagWel.value if (this.userInfo.role_name.indexOf("考勤管理员")>-1){ path = "check/record" } this.$router.push({ path: path }); loading.close(); }) .catch(() => {