去掉首页,根据不同角色默认打开首页

dev
许宏杰 2 years ago
parent 8a39702ed3
commit 71f09d8a60

@ -69,6 +69,7 @@ export const constantRoutes = [
{
path: "index",
component: () => import("@/views/index"),
hidden: true,
name: "Index",
meta: { title: "首页", icon: "dashboard", affix: true },
},

@ -3,7 +3,16 @@
</template>
<script>
export default {};
export default {
created() {
let roles = this.$store.getters.roles;
if (roles.includes("zyzgly") || roles.includes("admin")) {
this.$router.replace("/volunteer/userbq/bqhsj");
} else {
this.$router.replace("/volunteer/hdtj/hdtjChild");
}
},
};
</script>
<style></style>

Loading…
Cancel
Save