退出登录图标接入 ysch 单 svg+首页入口与登出路由修订:从 YschIcons/svg 复制 logout.svg、shouye.svg 进 src/assets/icons(雪碧图根目录文件即 #icon-{name}),退出与头部按钮改用现成 SvgIcon 渲染,不再依赖 index.html 引入的 bschload.min.js 平台 iconfont 字体(与 Notice 同形同尺寸:退出 18px、头部 22px,均白色);<svg> 默认 inline 带基线降部空隙,新增组件 scoped 补 display:block 与首页按钮 flex 居中(layout.css 的 .logout i/.icon-btn i 只命中 <i>,不改压缩产物);头部「常用应用」改「返回首页」(本项目 appList 实为 store.modules,menu.ts 无 url/icon 键,面板渲染 href="undefined" 属坏入口;面板 DOM 与 showPanel/isPanel 保留仅失去入口);linkHomePage 仅改独立 Web 分支 URL /BschHome→/userhome/front/index.html(线上 BschHome 实测 404),嵌入态 BschLoadUtil.goBackDesktop() 逻辑原样保留;登出路由 /cas/logout→/logout 与 Notice/UserhomeFront 统一(/cas/logout 在 SSO 侧无效);build 通过
This commit is contained in:
@@ -4,6 +4,7 @@ import { LayoutData } from "@/types/Basics";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { Message } from "view-ui-plus";
|
||||
import useCurrentInstance from "@/utils/hook/useCurrentInstance";
|
||||
import SvgIcon from "@/components/SvgIcon.vue";
|
||||
let props = defineProps<{ layoutData: LayoutData }>();
|
||||
const reload: Function = inject("reload") || new Function("console.error('empty')");
|
||||
|
||||
@@ -141,7 +142,7 @@ const linkUserInfo = () => {
|
||||
};
|
||||
const logout = () => {
|
||||
let url = window.location.href;
|
||||
url = "/cas/logout?service=" + url;
|
||||
url = "/logout?service=" + url;
|
||||
window.location.href = ssoHost + url;
|
||||
};
|
||||
const childChange = (index: number) => {
|
||||
@@ -155,7 +156,8 @@ function linkHomePage() {
|
||||
if (!bschUtil.getIsSelf()) {
|
||||
bschUtil.goBackDesktop();
|
||||
} else {
|
||||
window.location.href = baseHost + "/BschHome/front/index.html";
|
||||
// 旧 BschHome 已下线(线上 404),首页统一指向用户中心 userhome
|
||||
window.location.href = baseHost + "/userhome/front/index.html";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -164,8 +166,8 @@ function linkHomePage() {
|
||||
<div class="layout-wrap">
|
||||
<header class="header-container fix">
|
||||
<div class="fl align-middle icon-box">
|
||||
<div title="常用应用" :class="['icon-btn', isPanel ? 'active' : '']" @click="showPanel">
|
||||
<i class="iconfont icon-apps"></i>
|
||||
<div title="首页" class="icon-btn home-btn" @click="linkHomePage">
|
||||
<SvgIcon name="shouye" :size="22" color="#fff" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="delimiter fl align-middle"></div>
|
||||
@@ -178,7 +180,7 @@ function linkHomePage() {
|
||||
</a>
|
||||
<div class="delimiter fl align-middle"></div>
|
||||
<a href="javascript:;" @click="logout" class="logout fl align-middle" title="退出登陆">
|
||||
<i class="iconfont icon-logout"></i>
|
||||
<SvgIcon name="logout" :size="18" color="#fff" />
|
||||
</a>
|
||||
</div>
|
||||
</header>
|
||||
@@ -248,7 +250,7 @@ function linkHomePage() {
|
||||
</li>
|
||||
</ul>
|
||||
<div class="link-panel">
|
||||
<a :href="baseHost + '/BschHome/front/index.html#/apps'" target="_bank" rel="noopener noreferrer">
|
||||
<a :href="baseHost + '/userhome/front/index.html#/apps'" target="_bank" rel="noopener noreferrer">
|
||||
全部应用
|
||||
<i>→</i>
|
||||
</a>
|
||||
@@ -257,3 +259,22 @@ function linkHomePage() {
|
||||
</transition>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
/* 头部两个 ysch 单 svg 图标(SvgIcon):
|
||||
layout.css 的 .header-aside .logout i / .icon-btn i 只命中 <i>,换 <svg> 后不再命中,
|
||||
颜色与尺寸已由组件 props(#fff / 18、22)给出,此处只补布局——
|
||||
<svg> 默认 inline 会带基线降部空隙,改 block 后与 Notice 的 mask 图标观感一致。
|
||||
(Vue3 scoped 下子组件根节点会带父级 data-v,故 .logout svg 可命中) */
|
||||
.header-aside .logout svg {
|
||||
display: block;
|
||||
}
|
||||
.home-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.home-btn svg {
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user