退出登录图标接入 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:
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 1024 1024" width="1em" height="1em"><path transform="translate(-56.6 -56.8) scale(1.11111)" d="M555 427Q555 444 542.5 456.5Q530 469 512.0 469.0Q494 469 481.5 456.5Q469 444 469 427V128Q469 117 475.0 107.0Q481 97 491.0 91.0Q501 85 512.0 85.0Q523 85 533.0 91.0Q543 97 549.0 107.0Q555 117 555 128ZM657 293Q646 287 640.0 275.5Q634 264 635.5 251.5Q637 239 645.5 229.0Q654 219 666 216Q683 211 698 219Q783 266 835.0 347.5Q887 429 894.5 525.5Q902 622 863.0 710.5Q824 799 747 858Q679 911 595.5 929.5Q512 948 428.5 929.5Q345 911 276.5 858.0Q208 805 169.5 729.0Q131 653 128.0 567.5Q125 482 159 403Q184 344 227.0 297.0Q270 250 326 219Q341 211 357.5 216.0Q374 221 382.5 236.0Q391 251 386.5 267.5Q382 284 367 293Q308 326 269.5 380.0Q231 434 218.5 499.0Q206 564 223.0 629.0Q240 694 282.5 745.0Q325 796 385.0 824.5Q445 853 512.0 853.0Q579 853 639.0 824.5Q699 796 741.5 745.0Q784 694 801.0 629.0Q818 564 805.5 499.0Q793 434 754.5 380.0Q716 326 657 293Z"/></svg>
|
||||
|
After Width: | Height: | Size: 1017 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 1024 1024" width="1em" height="1em"><path d="M802.5 946H603.8C575 945.9 551.7 922.6 551.6 893.8V694.2H472.8V893.8C472.8 922.5 449.3 946 420.6 946H219.1C190.4 945.9 167.1 922.6 167.1 893.8V566.4H77.8C55.9 566.6 36.3 553 28.8 532.4C21.2 512.1 27 489.2 43.4 475L468.2 95.9L468.5 95.7C496.5 71.5 538.3 72.3 565.4 97.5L981.9 476.2L982 476.5C997.7 491.2 1002.8 513.7 994.7 533.6C986.9 553.5 967.7 566.6 946.3 566.5L854.6 566.5V893.8C854.6 922.5 831.2 946 802.5 946ZM615.2 882.4H791V503H916.7L522.3 144.3L522.2 144.2C518.9 141.1 513.8 140.9 510.3 143.7L107.8 502.8H230.6V882.4H409.2V682.8C409.2 654.2 432.6 630.8 461.4 630.8H563C591.7 630.8 615.2 654.2 615.2 682.8V882.4L615.2 882.4Z" ></path></svg>
|
||||
|
After Width: | Height: | Size: 766 B |
@@ -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