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
shenshaokai
jinfa-platform
Commits
37624bd4
Commit
37624bd4
authored
Dec 07, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into dev
parents
6f321ec5
e18c97d4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
package.json
package.json
+3
-3
index.ts
src/constants/index.ts
+1
-1
RightContent.tsx
src/layouts/components/RightContent.tsx
+2
-2
No files found.
package.json
View file @
37624bd4
...
@@ -17,15 +17,15 @@
...
@@ -17,15 +17,15 @@
"build:dev"
:
"pm2 start scripts/devServer.js"
,
"build:dev"
:
"pm2 start scripts/devServer.js"
,
"build:clean"
:
"cross-env NODE_OPTIONS=--max_old_space_size=4096 umi build"
,
"build:clean"
:
"cross-env NODE_OPTIONS=--max_old_space_size=4096 umi build"
,
"build:scm"
:
"cross-env SITE_ID=1 BACK_GATEWAY=http://lingxi-scm.wg.shushangyun.com USE_ROUTE_CONFIG=false SOCKET_URL=ws://lingxi-scm.wg.shushangyun.com yarn build"
,
"build:scm"
:
"cross-env SITE_ID=1 BACK_GATEWAY=http://lingxi-scm.wg.shushangyun.com USE_ROUTE_CONFIG=false SOCKET_URL=ws://lingxi-scm.wg.shushangyun.com yarn build"
,
"build:10"
:
"cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.0.10:8100 USE_ROUTE_CONFIG=false SOCKET_URL=ws://10.0.0.10
:8100
yarn build"
,
"build:10"
:
"cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.0.10:8100 USE_ROUTE_CONFIG=false SOCKET_URL=ws://10.0.0.10 yarn build"
,
"postinstall"
:
"umi generate tmp"
,
"postinstall"
:
"umi generate tmp"
,
"prettier"
:
"prettier --write '**/*.{js,jsx,tsx,ts,less,md,json}'"
,
"prettier"
:
"prettier --write '**/*.{js,jsx,tsx,ts,less,md,json}'"
,
"test"
:
"umi-test"
,
"test"
:
"umi-test"
,
"test:coverage"
:
"umi-test --coverage"
,
"test:coverage"
:
"umi-test --coverage"
,
"start:cross"
:
"cross-env SITE_ID=352 USE_ROUTE_CONFIG=false SOCKET_URL=ws://10.0.0.25
:9400
yarn start"
,
"start:cross"
:
"cross-env SITE_ID=352 USE_ROUTE_CONFIG=false SOCKET_URL=ws://10.0.0.25 yarn start"
,
"start:scm"
:
"cross-env SITE_ID=1 BACK_GATEWAY=http://lingxi-scm.wg.shushangyun.com USE_ROUTE_CONFIG=false SOCKET_URL=ws://lingxi-scm.wg.shushangyun.com yarn start"
,
"start:scm"
:
"cross-env SITE_ID=1 BACK_GATEWAY=http://lingxi-scm.wg.shushangyun.com USE_ROUTE_CONFIG=false SOCKET_URL=ws://lingxi-scm.wg.shushangyun.com yarn start"
,
"start:url"
:
"cross-env SITE_ID=1 BACK_GATEWAY=http://lingxi-all.wg.shushangyun.com USE_ROUTE_CONFIG=true SOCKET_URL=ws://lingxi-all.wg.shushangyun.com yarn start"
,
"start:url"
:
"cross-env SITE_ID=1 BACK_GATEWAY=http://lingxi-all.wg.shushangyun.com USE_ROUTE_CONFIG=true SOCKET_URL=ws://lingxi-all.wg.shushangyun.com yarn start"
,
"start:10"
:
"cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.0.10:8100 USE_ROUTE_CONFIG=true SOCKET_URL=ws://10.0.0.10
:8100
yarn start"
"start:10"
:
"cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.0.10:8100 USE_ROUTE_CONFIG=true SOCKET_URL=ws://10.0.0.10 yarn start"
},
},
"lint-staged"
:
{
"lint-staged"
:
{
"*.{js,jsx,less,md,json}"
:
[
"*.{js,jsx,less,md,json}"
:
[
...
...
src/constants/index.ts
View file @
37624bd4
export
const
NOT_CHANGE_VALUE
=
'hello, world'
export
const
NOT_CHANGE_VALUE
=
'hello, world'
// socket的链接地址, 默认会使用后端接口网关地址
// socket的链接地址, 默认会使用后端接口网关地址
export
const
SOCKET_URL
=
process
.
env
.
SOCKET_URL
?.
replace
(
'http|https'
,
'ws'
)
||
process
.
env
.
BACK_GATEWAY
?.
replace
(
'http|https'
,
'ws'
)
||
"ws://10.0.0.25:9400"
export
const
SOCKET_URL
=
process
.
env
.
SOCKET_URL
?.
replace
(
'http|https'
,
'ws'
)
||
process
.
env
.
BACK_GATEWAY
?.
replace
(
'http|https'
,
'ws'
)
console
.
log
(
SOCKET_URL
);
console
.
log
(
SOCKET_URL
);
export
const
MALL_TYPE
=
{
export
const
MALL_TYPE
=
{
...
...
src/layouts/components/RightContent.tsx
View file @
37624bd4
...
@@ -31,8 +31,8 @@ const GlobalHeaderRight: React.FC<{}> = (props) => {
...
@@ -31,8 +31,8 @@ const GlobalHeaderRight: React.FC<{}> = (props) => {
const
ws
=
useRef
<
WebSocket
|
null
>
(
null
);
const
ws
=
useRef
<
WebSocket
|
null
>
(
null
);
const
webSocketInit
=
useCallback
(()
=>
{
const
webSocketInit
=
useCallback
(()
=>
{
console
.
log
(
ws
.
current
)
console
.
log
(
ws
.
current
)
if
((
!
ws
.
current
||
ws
.
current
.
readyState
===
3
)
&&
userInfo
)
{
if
(
SOCKET_URL
&&
(
!
ws
.
current
||
ws
.
current
.
readyState
===
3
)
&&
userInfo
)
{
const
url
=
`
${
SOCKET_URL
}
/report/websocket?memberId=
${
userInfo
.
memberId
}
&roleId=
${
userInfo
.
memberRoleId
}
&token=
${
userInfo
.
token
}
`
;
const
url
=
`
${
SOCKET_URL
}
/report/websocket?memberId=
${
userInfo
.
memberId
}
&roleId=
${
userInfo
.
memberRoleId
}
&token=
${
userInfo
.
token
}
&source=
${
1
}
`
;
ws
.
current
=
new
WebSocket
(
url
);
ws
.
current
=
new
WebSocket
(
url
);
ws
.
current
.
onopen
=
(
e
)
=>
{
ws
.
current
.
onopen
=
(
e
)
=>
{
console
.
log
(
e
)
console
.
log
(
e
)
...
...
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