bug修复
Some checks failed
Node CI / build (14.x, macOS-latest) (push) Has been cancelled
Node CI / build (14.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (14.x, windows-latest) (push) Has been cancelled
Node CI / build (16.x, macOS-latest) (push) Has been cancelled
Node CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (16.x, windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
coverage CI / build (push) Has been cancelled
Node pnpm CI / build (16.x, macOS-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, windows-latest) (push) Has been cancelled
Some checks failed
Node CI / build (14.x, macOS-latest) (push) Has been cancelled
Node CI / build (14.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (14.x, windows-latest) (push) Has been cancelled
Node CI / build (16.x, macOS-latest) (push) Has been cancelled
Node CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (16.x, windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
coverage CI / build (push) Has been cancelled
Node pnpm CI / build (16.x, macOS-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, windows-latest) (push) Has been cancelled
This commit is contained in:
42
src/components/EnterpriseHeader/index.tsx
Normal file
42
src/components/EnterpriseHeader/index.tsx
Normal file
@@ -0,0 +1,42 @@
|
||||
import React, { useEffect } from 'react';
|
||||
import { createPortal } from 'react-dom';
|
||||
import { HomeOutlined } from '@ant-design/icons';
|
||||
import portalLogo from '@/assets/logo.png';
|
||||
import './index.less';
|
||||
|
||||
/** 人社门户首页地址 */
|
||||
const PORTAL_HOME_URL = 'http://218.31.252.15:9081/hrss-web-vue/home';
|
||||
|
||||
const EnterpriseHeader: React.FC = () => {
|
||||
useEffect(() => {
|
||||
document.body.classList.add('has-enterprise-header');
|
||||
return () => {
|
||||
document.body.classList.remove('has-enterprise-header');
|
||||
};
|
||||
}, []);
|
||||
|
||||
const handleGoHome = () => {
|
||||
window.open(PORTAL_HOME_URL, '_blank');
|
||||
};
|
||||
|
||||
const header = (
|
||||
<div className="enterprise-header">
|
||||
<div className="header-left">
|
||||
<img className="header-logo" src={portalLogo} alt="石城智慧就业" />
|
||||
<div className="header-divider" />
|
||||
<span className="header-system-name">石河子智慧就业 · 企业管理端</span>
|
||||
</div>
|
||||
|
||||
<div className="header-right">
|
||||
<div className="home-link-btn" onClick={handleGoHome}>
|
||||
<HomeOutlined />
|
||||
<span>返回首页</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
return createPortal(header, document.body);
|
||||
};
|
||||
|
||||
export default EnterpriseHeader;
|
||||
Reference in New Issue
Block a user