@@ -61,12 +61,12 @@ const exitEvent = () => {
onMounted(function() {
const userInfo = useUserInfo();
userName.value = userInfo.nickName;
-
- // if (userInfo.userType != 1) {
- // router.push({
- // path: "/",
- // });
- // }
+ // 如果不是学生
+ if (userInfo.userType != 1) {
+ router.push({
+ path: "/",
+ });
+ }
});
</script>
@@ -93,6 +93,7 @@ onMounted(function() {
+ // 如果不是老师
if (userInfo.userType != 0) {
router.push({
path: "/",