|
@@ -8,7 +8,7 @@
|
|
|
<!-- 左侧返回图标 -->
|
|
<!-- 左侧返回图标 -->
|
|
|
<div class="left-content-wrapper" @click="goToHomePage">
|
|
<div class="left-content-wrapper" @click="goToHomePage">
|
|
|
<!-- <el-icon class="left-icon"><ArrowLeftBold /></el-icon> -->
|
|
<!-- <el-icon class="left-icon"><ArrowLeftBold /></el-icon> -->
|
|
|
- <span class="left-text">人工智能通识课平台</span>
|
|
|
|
|
|
|
+ <span class="left-text">{{ platformTitle }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -104,6 +104,13 @@ const circleButtons = reactive([])
|
|
|
// 定义课程类别数据
|
|
// 定义课程类别数据
|
|
|
const courseCategories = reactive([])
|
|
const courseCategories = reactive([])
|
|
|
|
|
|
|
|
|
|
+// 平台标题响应式变量
|
|
|
|
|
+const platformTitle = ref(import.meta.env.VITE_APP_TITLE)
|
|
|
|
|
+// 更新平台标题
|
|
|
|
|
+const updatePlatformTitle = () => {
|
|
|
|
|
+ platformTitle.value = localStorage.getItem('tenantName') || import.meta.env.VITE_APP_DEFAULT_LOGIN_TENANT
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
|
|
|
// 获取主题列表
|
|
// 获取主题列表
|
|
|
const themeList = async () => {
|
|
const themeList = async () => {
|
|
@@ -221,8 +228,13 @@ const goToHomePage = () => {
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
// 获取主题列表
|
|
// 获取主题列表
|
|
|
themeList()
|
|
themeList()
|
|
|
|
|
+ // 初始化平台标题
|
|
|
|
|
+ updatePlatformTitle()
|
|
|
// storage事件监听器,监听其他标签页对localStorage的修改
|
|
// storage事件监听器,监听其他标签页对localStorage的修改
|
|
|
window.addEventListener('storage', (e) => {
|
|
window.addEventListener('storage', (e) => {
|
|
|
|
|
+ if (e.key === 'tenantName') {
|
|
|
|
|
+ updatePlatformTitle()
|
|
|
|
|
+ }
|
|
|
if (e.key === 'userName') {
|
|
if (e.key === 'userName') {
|
|
|
// updateUserName()
|
|
// updateUserName()
|
|
|
}
|
|
}
|