Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linweijiong
jinfa-platform
Commits
51e3c2b5
Commit
51e3c2b5
authored
Aug 05, 2021
by
Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 首页logo
parent
9abd92e2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
79 additions
and
36 deletions
+79
-36
index.ts
config/routes/index.ts
+1
-0
report.20210804.155111.26372.0.001.json
report.20210804.155111.26372.0.001.json
+0
-0
app.tsx
src/app.tsx
+1
-0
BasicLayout.tsx
src/layouts/BasicLayout.tsx
+4
-4
MenuSlider.tsx
src/layouts/components/MenuSlider.tsx
+3
-1
RightContent.tsx
src/layouts/components/RightContent.tsx
+48
-29
RightContent.less
src/layouts/styles/RightContent.less
+22
-2
No files found.
config/routes/index.ts
View file @
51e3c2b5
...
@@ -83,6 +83,7 @@ const memberCenterRoute = {
...
@@ -83,6 +83,7 @@ const memberCenterRoute = {
path
:
'/memberCenter/noAuth'
,
path
:
'/memberCenter/noAuth'
,
auth
:
false
,
auth
:
false
,
hideInMenu
:
true
,
hideInMenu
:
true
,
name
:
'无权限'
,
component
:
'@/pages/403'
,
component
:
'@/pages/403'
,
},
},
// 能力中心的404页
// 能力中心的404页
...
...
report.20210804.155111.26372.0.001.json
deleted
100644 → 0
View file @
9abd92e2
This diff is collapsed.
Click to expand it.
src/app.tsx
View file @
51e3c2b5
...
@@ -120,6 +120,7 @@ export function onRouteChange({ routes, matchedRoutes, location, action }) {
...
@@ -120,6 +120,7 @@ export function onRouteChange({ routes, matchedRoutes, location, action }) {
const
breadCrumb
=
matchedRoutes
.
slice
(
2
).
reduce
((
prev
,
current
)
=>
{
const
breadCrumb
=
matchedRoutes
.
slice
(
2
).
reduce
((
prev
,
current
)
=>
{
return
prev
+=
"."
+
current
.
route
.
name
return
prev
+=
"."
+
current
.
route
.
name
},
'menu'
)
},
'menu'
)
console
.
log
(
breadCrumb
);
recent
.
put
(
breadCrumb
,
location
.
pathname
+
location
.
search
);
recent
.
put
(
breadCrumb
,
location
.
pathname
+
location
.
search
);
}
}
...
...
src/layouts/BasicLayout.tsx
View file @
51e3c2b5
...
@@ -6,7 +6,7 @@ import ProLayout, {
...
@@ -6,7 +6,7 @@ import ProLayout, {
getMenuData
,
getMenuData
,
getPageTitle
getPageTitle
}
from
'@ant-design/pro-layout'
;
}
from
'@ant-design/pro-layout'
;
import
React
,
{
useState
,
useEffect
,
useLayoutEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useLayoutEffect
,
useMemo
}
from
'react'
;
import
{
Link
,
useIntl
,
Helmet
}
from
'umi'
;
import
{
Link
,
useIntl
,
Helmet
}
from
'umi'
;
import
RightContent
from
'./components/RightContent'
;
import
RightContent
from
'./components/RightContent'
;
import
{
GlobalConfig
}
from
'@/global/config'
;
import
{
GlobalConfig
}
from
'@/global/config'
;
...
@@ -149,7 +149,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
...
@@ -149,7 +149,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
const
prolayoutStyle
=
isHome
const
prolayoutStyle
=
isHome
?
{
?
{
minHeight
:
'100vh'
,
minHeight
:
'100vh'
,
minWidth
:
'1280px'
minWidth
:
'1280px'
,
}
}
:
{}
:
{}
...
@@ -162,7 +162,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
...
@@ -162,7 +162,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
// formatMessage={formatMessage}
// formatMessage={formatMessage}
menuHeaderRender=
{
(
logoDom
,
titleDom
)
=>
(
menuHeaderRender=
{
(
logoDom
,
titleDom
)
=>
(
<
Link
to=
"/"
>
<
Link
to=
"/"
>
{
logoDom
}
{
/* {logoDom} */
}
{
titleDom
}
{
titleDom
}
</
Link
>
</
Link
>
)
}
)
}
...
@@ -182,7 +182,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
...
@@ -182,7 +182,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
changeOpenKeys=
{
(
keys
:
string
[])
=>
setOpenKeys
(
keys
)
}
changeOpenKeys=
{
(
keys
:
string
[])
=>
setOpenKeys
(
keys
)
}
/>
}
/>
}
footerRender=
{
()
=>
defaultFooterDom
}
footerRender=
{
()
=>
defaultFooterDom
}
rightContentRender=
{
()
=>
<
RightContent
/>
}
rightContentRender=
{
()
=>
<
RightContent
isHome=
{
isHome
}
/>
}
{
...
props
}
{
...
props
}
{
...
settings
}
{
...
settings
}
>
>
...
...
src/layouts/components/MenuSlider.tsx
View file @
51e3c2b5
...
@@ -91,7 +91,9 @@ const MenuSlider: React.FC<MenuSliderProps> = (props) => {
...
@@ -91,7 +91,9 @@ const MenuSlider: React.FC<MenuSliderProps> = (props) => {
return
<>
return
<>
<
OuterSider
{
...
props
}
/>
<
OuterSider
{
...
props
}
/>
<
Sider
theme=
"light"
className=
"menu_sider"
collapsed=
{
props
.
collapseState
}
>
<
Sider
theme=
"light"
className=
"menu_sider"
collapsed=
{
props
.
collapseState
}
>
<
div
className=
{
styles
.
logo
}
><
img
src=
{
GlobalConfig
.
global
.
siteInfo
.
logo
}
/></
div
>
<
Link
to=
{
`/`
}
className=
{
styles
.
logo
}
>
<
img
src=
{
GlobalConfig
.
global
.
siteInfo
.
logo
}
/>
</
Link
>
<
div
className=
{
styles
.
menuTitle
}
>
<
div
className=
{
styles
.
menuTitle
}
>
{
menuRouter
?.
name
}
{
menuRouter
?.
name
}
</
div
>
</
div
>
...
...
src/layouts/components/RightContent.tsx
View file @
51e3c2b5
import
{
Tooltip
,
Badge
}
from
'antd'
;
import
{
Tooltip
,
Badge
}
from
'antd'
;
import
{
BellOutlined
,
CustomerServiceOutlined
}
from
'@ant-design/icons'
;
import
{
BellOutlined
,
CustomerServiceOutlined
}
from
'@ant-design/icons'
;
import
React
,
{
useCallback
,
useRef
,
useLayoutEffect
,
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useCallback
,
useRef
,
useLayoutEffect
,
useState
,
useEffect
,
useMemo
}
from
'react'
;
import
Avatar
from
'./AvatarDropdown'
;
import
Avatar
from
'./AvatarDropdown'
;
import
SelectLang
from
'./SelectLang'
;
import
SelectLang
from
'./SelectLang'
;
import
Location
from
'./Location'
;
import
Location
from
'./Location'
;
...
@@ -12,6 +12,7 @@ import { getAuth } from '@/utils/auth';
...
@@ -12,6 +12,7 @@ import { getAuth } from '@/utils/auth';
import
{
getCookie
}
from
'@/utils/cookie'
import
{
getCookie
}
from
'@/utils/cookie'
import
{
notificationChatRoom
}
from
'@/utils/im'
import
{
notificationChatRoom
}
from
'@/utils/im'
import
{
SOCKET_URL
,
PLATFORM_DOMAIN
}
from
'@/constants'
;
import
{
SOCKET_URL
,
PLATFORM_DOMAIN
}
from
'@/constants'
;
import
{
GlobalConfig
}
from
'@/global/config'
;
import
{
usePurchaseBidStore
}
from
'@/store/purchaseBid'
;
import
{
usePurchaseBidStore
}
from
'@/store/purchaseBid'
;
...
@@ -38,8 +39,8 @@ type WsMessage = {
...
@@ -38,8 +39,8 @@ type WsMessage = {
timestamp
:
number
timestamp
:
number
}
}
const
GlobalHeaderRight
:
React
.
FC
<
{
SiteStore
?:
any
}
>
=
(
props
)
=>
{
const
GlobalHeaderRight
:
React
.
FC
<
{
SiteStore
?:
any
,
isHome
:
boolean
}
>
=
(
props
)
=>
{
const
{
SiteStore
:
{
currentLayoutInfo
}
}
=
props
;
const
{
SiteStore
:
{
currentLayoutInfo
}
,
isHome
}
=
props
;
const
[
message
,
setMessage
]
=
useState
<
number
>
(
0
);
const
[
message
,
setMessage
]
=
useState
<
number
>
(
0
);
const
className
=
styles
.
right
;
const
className
=
styles
.
right
;
...
@@ -73,7 +74,7 @@ const GlobalHeaderRight: React.FC<{ SiteStore?: any }> = (props) => {
...
@@ -73,7 +74,7 @@ const GlobalHeaderRight: React.FC<{ SiteStore?: any }> = (props) => {
if
(
data
.
action
===
'msg_no_read_message'
)
{
if
(
data
.
action
===
'msg_no_read_message'
)
{
setMessage
(
+
data
.
data
);
setMessage
(
+
data
.
data
);
}
}
};
};
ws
.
current
.
onclose
=
(
e
)
=>
{
ws
.
current
.
onclose
=
(
e
)
=>
{
console
.
log
(
"关闭连接"
)
console
.
log
(
"关闭连接"
)
...
@@ -82,7 +83,7 @@ const GlobalHeaderRight: React.FC<{ SiteStore?: any }> = (props) => {
...
@@ -82,7 +83,7 @@ const GlobalHeaderRight: React.FC<{ SiteStore?: any }> = (props) => {
console
.
log
(
"socket 出错"
)
console
.
log
(
"socket 出错"
)
}
}
}
}
},
[
ws
]);
},
[
ws
,
userInfo
]);
useEffect
(()
=>
{
useEffect
(()
=>
{
webSocketInit
();
webSocketInit
();
...
@@ -99,34 +100,52 @@ const GlobalHeaderRight: React.FC<{ SiteStore?: any }> = (props) => {
...
@@ -99,34 +100,52 @@ const GlobalHeaderRight: React.FC<{ SiteStore?: any }> = (props) => {
window
.
location
.
href
=
PLATFORM_DOMAIN
window
.
location
.
href
=
PLATFORM_DOMAIN
}
}
}
}
const
cacheStyle
=
useMemo
(()
=>
{
return
{
isHome
:
{
marginLeft
:
'-40px'
},
iamge
:
{
height
:
"30px"
,
marginRight
:
'12px'
}
}
},
[])
return
(
return
(
<
div
className=
{
className
}
>
<
div
className=
{
className
}
>
<
span
style=
{
{
color
:
'rgba(0, 0, 0, 0.85)'
,
cursor
:
"pointer"
}
}
onClick=
{
handleBackMall
}
>
返回商城
</
span
>
<
div
>
<
Roles
/>
<
Link
to=
{
"/"
}
className=
{
styles
.
container
}
style=
{
isHome
?
cacheStyle
.
isHome
:
{}
}
>
{
/* <Location /> */
}
{
<
SelectLang
/>
isHome
&&
(
<
Tooltip
title=
"消息"
>
<
img
src=
{
GlobalConfig
.
global
.
siteInfo
.
logo
}
style=
{
cacheStyle
.
iamge
}
/>
<
Link
)
to=
"/memberCenter/systemSetting/message"
}
className=
{
styles
.
action
}
数商云瓴犀业务中台能力中心
>
<
Badge
count=
{
message
}
size=
{
"small"
}
>
<
BellOutlined
/>
</
Badge
>
</
Link
>
</
Link
>
</
Tooltip
>
</
div
>
{
/* <Tooltip title="服务">
<
div
className=
{
styles
.
rightContent
}
>
<a
<
span
style=
{
{
color
:
'rgba(0, 0, 0, 0.85)'
,
cursor
:
"pointer"
}
}
onClick=
{
handleBackMall
}
>
返回商城
</
span
>
target="_blank"
<
Roles
/>
href=""
{
/* <Location /> */
}
rel="noopener noreferrer"
<
SelectLang
/>
className={styles.action}
<
Tooltip
title=
"消息"
>
>
<
Link
<CustomerServiceOutlined />
to=
"/memberCenter/systemSetting/message"
</a>
className=
{
styles
.
action
}
</Tooltip> */
}
>
<
Avatar
/>
<
Badge
count=
{
message
}
size=
{
"small"
}
>
<
BellOutlined
/>
</
Badge
>
</
Link
>
</
Tooltip
>
{
/* <Tooltip title="服务">
<a
target="_blank"
href=""
rel="noopener noreferrer"
className={styles.action}
>
<CustomerServiceOutlined />
</a>
</Tooltip> */
}
<
Avatar
/>
</
div
>
</
div
>
</
div
>
);
);
};
};
...
...
src/layouts/styles/RightContent.less
View file @
51e3c2b5
...
@@ -14,12 +14,32 @@
...
@@ -14,12 +14,32 @@
.right {
.right {
display: flex;
display: flex;
float: right;
flex-direction: row;
align-items: center;
width: 100%;
// float: right;
height: @layout-header-height;
height: @layout-header-height;
margin-left: auto;
margin-left: auto;
overflow: hidden;
//
overflow: hidden;
font-size: 12px;
font-size: 12px;
padding: 0 16px;
padding: 0 16px;
position: relative;
justify-content: space-between;
.container {
font-size: 16px;
display: flex;
flex-direction: row;
align-items: center;
color: #000;
}
.rightContent {
display: flex;
flex-direction: row;
align-items: center;
}
.action {
.action {
display: flex;
display: flex;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment