merge wsw into master
fix: bug Created-by: yfzmpj Commit-by: yfzmpj;汪少伟 Merged-by: yfzmpj Description: fix: bug See merge request: hk_openRepo/OpenRepo_Portal!50
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="g-user-drawer-info-list">
|
<div class="g-user-drawer-info-list">
|
||||||
<div class="g-user-drawer-info-list-name">
|
<div class="g-user-drawer-info-list-name">
|
||||||
<span class="break-all">{{ accountInfo.username?accountInfo.username[0]:'' }}</span>
|
<span class="break-all">{{ accountInfo.username ? accountInfo.username[0] : '' }}</span>
|
||||||
<GIcon class="close-icon" name="gt-close" size="12" @click="handleClose" />
|
<GIcon class="close-icon" name="gt-close" size="12" @click="handleClose" />
|
||||||
</div>
|
</div>
|
||||||
<div class="g-user-drawer-info-list-id break-all">@{{ accountInfo.username }}</div>
|
<div class="g-user-drawer-info-list-id break-all">@{{ accountInfo.username }}</div>
|
||||||
@@ -69,6 +69,10 @@ const logout = async () => {
|
|||||||
router.go(0);
|
router.go(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 退出系统刷新页面
|
||||||
|
setTimeout(() => {
|
||||||
|
location.reload();
|
||||||
|
}, 100);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleClick = (item) => {
|
const handleClick = (item) => {
|
||||||
@@ -107,9 +111,7 @@ const getRouterLink = (params) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const blockList = ref([
|
const blockList = ref([
|
||||||
[
|
[{ id: 'myPage', label: '个人中心', to: getRouterLink('PersonalCenter') }],
|
||||||
{ id: 'myPage', label: '个人中心', to: getRouterLink('PersonalCenter') }
|
|
||||||
],
|
|
||||||
// [
|
// [
|
||||||
// // { id: 'dashboard', label: '工作台', icon: 'gt-member-c', to: getRouterLink('dashboard') },
|
// // { id: 'dashboard', label: '工作台', icon: 'gt-member-c', to: getRouterLink('dashboard') },
|
||||||
// // { id: 'myIssues', label: '我的 Issue', icon: 'gt-issue-c', to: getRouterLink('issues') },
|
// // { id: 'myIssues', label: '我的 Issue', icon: 'gt-issue-c', to: getRouterLink('issues') },
|
||||||
@@ -126,9 +128,7 @@ const blockList = ref([
|
|||||||
// { id: 'personalSetting', label: '个人设置', icon: 'gt-setting-c', to: getRouterLink('setting') },
|
// { id: 'personalSetting', label: '个人设置', icon: 'gt-setting-c', to: getRouterLink('setting') },
|
||||||
// { id: 'help', label: '帮助文档', icon: 'gt-file-c', href: 'https://gitcode.com/Gitcode-offical-team/GitCode-Docs/wiki' }
|
// { id: 'help', label: '帮助文档', icon: 'gt-file-c', href: 'https://gitcode.com/Gitcode-offical-team/GitCode-Docs/wiki' }
|
||||||
// ],
|
// ],
|
||||||
[
|
[{ id: 'logout', label: '退出登录', icon: 'gt-exit', action: logout }]
|
||||||
{ id: 'logout', label: '退出登录', icon: 'gt-exit', action: logout }
|
|
||||||
]
|
|
||||||
]);
|
]);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -66,7 +66,11 @@
|
|||||||
<img src="@/assets/imgs/home/informIcon@2x.png" />
|
<img src="@/assets/imgs/home/informIcon@2x.png" />
|
||||||
<span>预警公告</span>
|
<span>预警公告</span>
|
||||||
</div>
|
</div>
|
||||||
<a v-if="isLogin" class="devui-link" @click="checkMore">更多 ></a>
|
|
||||||
|
<!-- <a v-if="accountInfo.access_token" class="devui-link" @click="checkMore"
|
||||||
|
>更多 <i class="icon icon-chevron-right-2"></i>
|
||||||
|
</a>
|
||||||
|
<span v-else class="text-blue-500">查看更多,请先登录</span> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="info-content">
|
<div class="info-content">
|
||||||
<d-timeline :direction="'vertical'" :time-position="'right'" :position="'right'">
|
<d-timeline :direction="'vertical'" :time-position="'right'" :position="'right'">
|
||||||
@@ -109,13 +113,14 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, onBeforeUnmount } from 'vue';
|
import { ref, onMounted, onBeforeUnmount } from 'vue';
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
|
import { useAccount } from '@/utils/hooks/useAccount';
|
||||||
import AdvanceSearch from '@/components/AdvanceSearch/index.vue';
|
import AdvanceSearch from '@/components/AdvanceSearch/index.vue';
|
||||||
import { getHomeNoticeList } from '@/api/jyh';
|
import { getHomeNoticeList } from '@/api/jyh';
|
||||||
import EarlyWarningDetail from '@/views/Jyh/PersonalCenter/Detail/EarlyWarningDetail.vue';
|
import EarlyWarningDetail from '@/views/Jyh/PersonalCenter/Detail/EarlyWarningDetail.vue';
|
||||||
import { useDiscussGetUserInfo } from '@/api/discussion/hook';
|
import { useDiscussGetUserInfo } from '@/api/discussion/hook';
|
||||||
|
|
||||||
// 获取当前用户信息 & 是否登录
|
const { accountInfo } = useAccount();
|
||||||
const { isLogin = false, userInfo = {}} = useDiscussGetUserInfo();
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const inputGlow = ref(false);
|
const inputGlow = ref(false);
|
||||||
@@ -241,7 +246,7 @@ onBeforeUnmount(() => {
|
|||||||
const getNoticeList = async () => {
|
const getNoticeList = async () => {
|
||||||
const res: any = await getHomeNoticeList();
|
const res: any = await getHomeNoticeList();
|
||||||
if (!res.error) {
|
if (!res.error) {
|
||||||
infoList.value = res.data.data;
|
infoList.value = res.data.data || [];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user