|
@@ -3,6 +3,8 @@
|
|
|
import { computed, onMounted, onUnmounted, watch, ref } from "vue";
|
|
|
import { useRouter } from 'vue-router';
|
|
|
const router = useRouter();
|
|
|
+import { useUserInfo } from '@/stores/userInfo';
|
|
|
+let userName = ref("未知用户");
|
|
|
|
|
|
// 接收参数
|
|
|
const props = defineProps({
|
|
@@ -57,7 +59,14 @@ const exitEvent = () => {
|
|
|
|
|
|
|
|
|
onMounted(function() {
|
|
|
-
|
|
|
+ const userInfo = useUserInfo();
|
|
|
+ userName.value = userInfo.nickName;
|
|
|
+
|
|
|
+ // if (userInfo.userType != 1) {
|
|
|
+ // router.push({
|
|
|
+ // path: "/",
|
|
|
+ // });
|
|
|
+ // }
|
|
|
});
|
|
|
|
|
|
</script>
|
|
@@ -75,7 +84,8 @@ onMounted(function() {
|
|
|
|
|
|
<div class="user" v-on:mousemove="windowsEvent()" v-on:mouseout="windowsExitEvent()" >
|
|
|
<img class="imgUser" src="../../assets/res/img/user/user.svg" />
|
|
|
- 高老师
|
|
|
+ <!-- 高老师 -->
|
|
|
+ {{ userName }}
|
|
|
<img class="imgDown" src="../../assets/res/img/user/down.png" />
|
|
|
</div>
|
|
|
|