Files
zhxg_pc/src/views/index.vue

70 lines
1.4 KiB
Vue
Raw Normal View History

2025-07-28 15:52:07 +08:00
<template>
<div id="main">
<indexNew />
<!-- <Index1 v-if="showRole == 1" />
<Index2 v-else-if="showRole == 2" />
<Index3 v-else-if="showRole == 3" />
<Index4 v-else-if="showRole == 4" />
<Index1 v-else/> -->
</div>
</template>
<script>
import Index1 from "@/views/Home/index-1.vue";
import Index2 from "@/views/Home/index-2.vue";
import Index3 from "@/views/Home/index-3.vue";
import Index4 from "@/views/Home/index-4.vue";
import indexNew from "./Home/index-new-blue.vue";
export default {
name: "index",
components: {
Index1,
Index2,
Index3,
Index4,
indexNew
},
data() {
return {
showRole: 0,
}
},
created() {
let temp = this.$store.getters.roles;
let role = 0;
temp.map(x => {
if (x == "admin") {
this.showRole = 1;
}
if (x == "test") { //学工
this.showRole = 1;
}
if (x == "stumanger") { //学务
this.showRole = 2;
}
if (x == "testteacher") { //辅导员
this.showRole = 3;
}
if (x == "teststu") { //学生
this.showRole = 4;
}
});
},
watch: {
},
methods: {
}
}
</script>
<style lang="scss" scoped></style>