JumpThirdLink.js 866 Bytes
import React, { useEffect } from 'react';
import { Button } from 'antd';
import BgImg from '@/assets/images/commonMenu/背景.jpg';
import styles from './index.less';
const JumpThirdLink = props => {
  const linkUrl = props.params.linkUrl || '';
  const jumpLink = () => {
    let url = linkUrl.replaceAll('@','#').replaceAll('*','?');
    window.open(url, '_blank');
  };

  useEffect(() => {
    if (linkUrl) {
      jumpLink();
    }
  }, []);

  return (
    <div
      className={styles['jump-panel']}
      style={{
        background: `url(${BgImg}) center/100% 100% no-repeat`,
      }}
    >
      <div className={styles['jump-text']}>当前已打开跳转页,点击按钮打开</div>
      <Button className={styles['jump-button']} type="primary" onClick={jumpLink}>
        立即前往
      </Button>
    </div>
  );
};

export default JumpThirdLink;