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
5d003629
Commit
5d003629
authored
Nov 20, 2020
by
Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改app.tsx dev环境也需要登录,不然首页因没有用户信息而报错
parent
c58ddae0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
app.tsx
src/app.tsx
+3
-3
RightContent.tsx
src/layouts/components/RightContent.tsx
+1
-1
index.tsx
src/pages/home/components/UserCenter/index.tsx
+2
-2
No files found.
src/app.tsx
View file @
5d003629
...
...
@@ -172,9 +172,9 @@ export function onRouteChange({ routes, matchedRoutes, location, action }) {
recent
.
put
(
breadCrumb
,
location
.
pathname
+
location
.
search
);
}
if
(
isDev
)
{
return
;
}
//
if (isDev) {
//
return;
//
}
if
(
whiteLists
.
includes
(
location
.
pathname
))
{
return
...
...
src/layouts/components/RightContent.tsx
View file @
5d003629
...
...
@@ -30,7 +30,7 @@ const GlobalHeaderRight: React.FC<{}> = (props) => {
const
ws
=
useRef
<
WebSocket
|
null
>
(
null
);
const
webSocketInit
=
useCallback
(()
=>
{
console
.
log
(
ws
.
current
)
if
(
!
ws
.
current
||
ws
.
current
.
readyState
===
3
)
{
if
(
(
!
ws
.
current
||
ws
.
current
.
readyState
===
3
)
&&
userInfo
)
{
ws
.
current
=
new
WebSocket
(
`
${
SOCKET_URL
}
/report/websocket?memberId=
${
userInfo
.
memberId
}
&roleId=
${
userInfo
.
memberRoleId
}
`
);
ws
.
current
.
onopen
=
(
e
)
=>
{
console
.
log
(
e
)
...
...
src/pages/home/components/UserCenter/index.tsx
View file @
5d003629
...
...
@@ -27,7 +27,7 @@ const UserCenter: React.FC<Iprops> = () => {
<
div
className=
{
styles
.
header
}
>
<
div
className=
{
styles
.
infos
}
>
<
div
className=
{
styles
.
hi
}
>
{
`Hi, ${userAuth.name}! 欢迎来到数商云瓴犀业务中台能力中心`
}
{
`Hi, ${userAuth
?
.name}! 欢迎来到数商云瓴犀业务中台能力中心`
}
</
div
>
<
div
className=
{
styles
.
date
}
>
{
today
.
format
(
'YYYY年MM月DD日'
)
}
星期
{
WEEKDAYS
[
today
.
day
()]
}
...
...
@@ -40,7 +40,7 @@ const UserCenter: React.FC<Iprops> = () => {
<
div
className=
{
styles
.
content
}
>
<
Row
className=
{
styles
.
row
}
>
<
Col
span=
{
11
}
className=
{
styles
.
user
}
>
<
div
className=
{
styles
.
pic
}
style=
{
!
userAuth
.
logo
?
{
display
:
'none'
}
:
{}
}
>
<
div
className=
{
styles
.
pic
}
style=
{
!
userAuth
?
.
logo
?
{
display
:
'none'
}
:
{}
}
>
<
img
src=
{
userAuth
.
logo
}
/>
</
div
>
<
div
className=
{
styles
.
wrapper
}
>
...
...
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