Commit 89551314 authored by GuanHua's avatar GuanHua

fix: 登录页面logo跳转路径问题

parent d118f91e
import React, { useState, useEffect } from 'react';
import styles from '../styles/UserLayouts.less'
import { Row, Col } from 'antd';
import { PLATFORM_DOMAIN } from '@/constants'
import { isString } from '@/utils/type';
import { getCookie } from '@/utils/cookie'
import HeaderDropdown from './HeaderDropdown';
......@@ -36,12 +38,21 @@ const UserHeader: React.FC<UserHeaderProps> = (props) => {
}
}
const getBackMallUrl = (): string => {
const mallLink: string = getCookie('currentMallLink', 'string') as unknown as string
if (mallLink) {
return mallLink
} else {
return PLATFORM_DOMAIN
}
}
return (
<div className={styles.lingxiBusinessUserHeader}>
<Row className={styles.lingxiBusinessMarginContent} justify='space-between' align='middle' style={{ height: '100%' }}>
<Col>
<div className={styles.lingxiBusinessLogoWrap}>
{isString(props.logo) ? <a href="/"><img src={props.logo} className={styles.lingxiBusinessLogo} /> </a> : props.logo}
{isString(props.logo) ? <a href={getBackMallUrl()}><img src={props.logo} className={styles.lingxiBusinessLogo} /> </a> : props.logo}
{
title && <div className={styles.lingxiBusinessUserHeaderSplit}></div>
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment