|
@@ -5,7 +5,7 @@
|
|
|
<div class="fcc headerBox">
|
|
<div class="fcc headerBox">
|
|
|
<div class="fcbc box-width">
|
|
<div class="fcbc box-width">
|
|
|
<div class="headerBtn">
|
|
<div class="headerBtn">
|
|
|
- <a-menu v-model:selectedKeys="current" mode="horizontal" @select="menuSelect">
|
|
|
|
|
|
|
+ <a-menu v-model:selectedKeys="current" mode="horizontal" @click="menuSelect">
|
|
|
<a-menu-item key="student/resourceCenter">资源中心</a-menu-item>
|
|
<a-menu-item key="student/resourceCenter">资源中心</a-menu-item>
|
|
|
<a-menu-item key="student/courseCenter">课程中心</a-menu-item>
|
|
<a-menu-item key="student/courseCenter">课程中心</a-menu-item>
|
|
|
<a-sub-menu key="myList">
|
|
<a-sub-menu key="myList">
|
|
@@ -29,17 +29,17 @@
|
|
|
<DownOutlined />
|
|
<DownOutlined />
|
|
|
</div>
|
|
</div>
|
|
|
<template #overlay>
|
|
<template #overlay>
|
|
|
- <a-menu>
|
|
|
|
|
- <a-menu-item key="1" @click="jump('/userInfo')">个人中心</a-menu-item>
|
|
|
|
|
- <a-menu-item key="2">
|
|
|
|
|
|
|
+ <a-menu v-model:selectedKeys="current" @click="menuSelect">
|
|
|
|
|
+ <a-menu-item key="userInfo">个人中心</a-menu-item>
|
|
|
|
|
+ <a-menu-item key="1">
|
|
|
<router-link :to="{ path: '/forum' }" target="_blank">论坛</router-link>
|
|
<router-link :to="{ path: '/forum' }" target="_blank">论坛</router-link>
|
|
|
</a-menu-item>
|
|
</a-menu-item>
|
|
|
- <a-menu-item key="3" @click="jump('/inSsiteMessage')">站内信</a-menu-item>
|
|
|
|
|
- <a-menu-item key="4" @click="jump('/classNotice')">课程公告</a-menu-item>
|
|
|
|
|
- <a-menu-item key="5" @click="jump('/learningFootprint')">学习足迹</a-menu-item>
|
|
|
|
|
- <a-menu-item key="7" @click="jump('/passwordRetrieve')">密码找回</a-menu-item>
|
|
|
|
|
- <a-menu-item key="7" @click="jump('/activate')">激活</a-menu-item>
|
|
|
|
|
- <a-menu-item key="8" @click="outLogin()">退出登录</a-menu-item>
|
|
|
|
|
|
|
+ <a-menu-item key="inSsiteMessage">站内信</a-menu-item>
|
|
|
|
|
+ <a-menu-item key="classNotice">课程公告</a-menu-item>
|
|
|
|
|
+ <a-menu-item key="learningFootprint">学习足迹</a-menu-item>
|
|
|
|
|
+ <a-menu-item key="passwordRetrieve">密码找回</a-menu-item>
|
|
|
|
|
+ <a-menu-item key="activate">激活</a-menu-item>
|
|
|
|
|
+ <a-menu-item key="1" @click="outLogin()">退出登录</a-menu-item>
|
|
|
</a-menu>
|
|
</a-menu>
|
|
|
</template>
|
|
</template>
|
|
|
</a-dropdown>
|
|
</a-dropdown>
|
|
@@ -72,22 +72,29 @@
|
|
|
return store.userInfo
|
|
return store.userInfo
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
- watch(route, (newValue) => {
|
|
|
|
|
- current.value = []
|
|
|
|
|
- nextTick(() => {
|
|
|
|
|
- current.value = [newValue.path.slice(1)]
|
|
|
|
|
- })
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ watch(
|
|
|
|
|
+ route,
|
|
|
|
|
+ (newValue) => {
|
|
|
|
|
+ current.value = []
|
|
|
|
|
+ nextTick(() => {
|
|
|
|
|
+ current.value = [newValue.path.slice(1)]
|
|
|
|
|
+ if (newValue.path == '/student/resourceDetails') {
|
|
|
|
|
+ current.value = ['student/resourceCenter']
|
|
|
|
|
+ }
|
|
|
|
|
+ if (newValue.path == '/student/classCentre') {
|
|
|
|
|
+ current.value = ['student/courseCenter']
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ { immediate: true, deep: true }
|
|
|
|
|
+ )
|
|
|
const menuSelect = (obj) => {
|
|
const menuSelect = (obj) => {
|
|
|
- const pathLength = obj.keyPath.length
|
|
|
|
|
- const path = '/' + obj.keyPath[pathLength - 1]
|
|
|
|
|
- router.push({ path })
|
|
|
|
|
- current.value = obj.selectedKeys
|
|
|
|
|
- }
|
|
|
|
|
- const jump = (url) => {
|
|
|
|
|
- router.push({
|
|
|
|
|
- path: url
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ if (obj.key != '1') {
|
|
|
|
|
+ const pathLength = obj.keyPath.length
|
|
|
|
|
+ const path = '/' + obj.keyPath[pathLength - 1]
|
|
|
|
|
+ router.push({ path })
|
|
|
|
|
+ current.value = obj.selectedKeys
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
const outLogin = () => {
|
|
const outLogin = () => {
|
|
|
Modal.confirm({
|
|
Modal.confirm({
|