Skip to content

Commit

Permalink
Merge pull request #2684 from hLinx/hotfix_master
Browse files Browse the repository at this point in the history
feature: 对接蓝鲸消息通知中心 #2659
  • Loading branch information
hLinx authored Dec 20, 2023
2 parents 342ba20 + bc0c123 commit 4f33ba5
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions src/frontend/src/layout-new.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@

<template>
<div>
<notice-component :list="noticeList" />
<notice-component
v-if="isEnableBKNotice"
:list="noticeList" />
<site-frame
:side-fixed="isFrameSideFixed"
@on-side-expand="handleSideExpandChange"
Expand Down Expand Up @@ -309,6 +311,7 @@
const isAdmin = ref(false);
const routerTitle = ref('');
const isEnableFeatureFileManage = ref(false);
const isEnableBKNotice = ref(false);

const noticeList = ref([]);

Expand Down Expand Up @@ -345,15 +348,19 @@
*/
QueryGlobalSettingService.fetchJobConfig()
.then((data) => {
isEnableBKNotice.value = data.ENABLE_BK_NOTICE;
isEnableFeatureFileManage.value = data.ENABLE_FEATURE_FILE_MANAGE;
if (isEnableBKNotice.value) {
NoticeService.fetchAnnouncement()
.then((data) => {
noticeList.value = data.map((item, index) => ({
id: index,
...item,
}));
});
}
});
NoticeService.fetchAnnouncement()
.then((data) => {
noticeList.value = data.map((item, index) => ({
id: index,
...item,
}));
});

/**
* @desc 侧导航展开收起
*/
Expand Down

0 comments on commit 4f33ba5

Please sign in to comment.