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
ce0ba6ce
Commit
ce0ba6ce
authored
Nov 13, 2020
by
Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改socket
parent
56b98e4f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
12 deletions
+8
-12
package.json
package.json
+4
-4
index.ts
src/constants/index.ts
+1
-1
RightContent.tsx
src/layouts/components/RightContent.tsx
+3
-3
index.tsx
...Order/orderCollect/components/productModalTable/index.tsx
+0
-4
No files found.
package.json
View file @
ce0ba6ce
...
...
@@ -5,7 +5,7 @@
"api"
:
"god-ytt"
,
"scripts:build"
:
"node scripts/run"
,
"scripts:build-yxc"
:
"node scripts/run http://yxc-web-demo.shushangyun.com/api"
,
"start:dev"
:
"umi dev"
,
"start:dev"
:
"umi dev
"
,
"start:analyze"
:
"ANALYZE=1 umi dev"
,
"clean"
:
"rimraf node_modules"
,
"start"
:
"yarn api && yarn scripts:build && umi dev"
,
...
...
@@ -18,9 +18,9 @@
"prettier"
:
"prettier --write '**/*.{js,jsx,tsx,ts,less,md,json}'"
,
"test"
:
"umi-test"
,
"test:coverage"
:
"umi-test --coverage"
,
"start:cross"
:
"cross-env SITE_ID=352 USE_ROUTE_CONFIG=false SOCKET_URL=
http
://10.0.0.25:8100 yarn start"
,
"start:url"
:
"cross-env SITE_ID=1 BACK_GATEWAY=http://lingxi-all.wg.shushangyun.com USE_ROUTE_CONFIG=true SOCKET_URL=
http
://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=
http
://10.0.0.10:8100 yarn start"
"start:cross"
:
"cross-env SITE_ID=352 USE_ROUTE_CONFIG=false SOCKET_URL=
ws
://10.0.0.25:8100 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"
},
"lint-staged"
:
{
"*.{js,jsx,less,md,json}"
:
[
...
...
src/constants/index.ts
View file @
ce0ba6ce
export
const
NOT_CHANGE_VALUE
=
'hello, world'
// socket的链接地址, 默认会使用后端接口网关地址
export
const
SOCKET_URL
=
process
.
env
.
SOCKET_URL
||
process
.
env
.
BACK_GATEWAY
export
const
SOCKET_URL
=
process
.
env
.
SOCKET_URL
||
process
.
env
.
BACK_GATEWAY
||
"ws://10.0.0.25:8000"
export
const
MALL_TYPE
=
{
1
:
'企业商城'
,
...
...
src/layouts/components/RightContent.tsx
View file @
ce0ba6ce
...
...
@@ -7,7 +7,8 @@ import Location from './Location';
import
Roles
from
'./Roles'
;
import
styles
from
'../styles/RightContent.less'
;
import
{
Link
}
from
'umi'
;
import
{
getAuth
}
from
'@/utils/auth'
import
{
getAuth
}
from
'@/utils/auth'
;
import
{
SOCKET_URL
}
from
'@/constants'
;
// export type SiderTheme = 'light' | 'dark';
// export interface GlobalHeaderRightProps extends Partial<ConnectProps> {
...
...
@@ -15,7 +16,6 @@ import { getAuth } from '@/utils/auth'
// layout: 'sidemenu' | 'topmenu';
// }
const
GlobalHeaderRight
:
React
.
FC
<
{}
>
=
(
props
)
=>
{
// const { theme, layout } = props;
let
className
=
styles
.
right
;
...
...
@@ -30,7 +30,7 @@ const GlobalHeaderRight: React.FC<{}> = (props) => {
const
webSocketInit
=
useCallback
(()
=>
{
console
.
log
(
ws
.
current
)
if
(
!
ws
.
current
||
ws
.
current
.
readyState
===
3
)
{
ws
.
current
=
new
WebSocket
(
`
ws://10.0.0.25:8100
/report/websocket?memberId=
${
userInfo
.
memberId
}
&roleId=
${
userInfo
.
memberRoleId
}
`
);
ws
.
current
=
new
WebSocket
(
`
${
SOCKET_URL
}
/report/websocket?memberId=
${
userInfo
.
memberId
}
&roleId=
${
userInfo
.
memberRoleId
}
`
);
ws
.
current
.
onopen
=
(
e
)
=>
{
console
.
log
(
e
)
}
...
...
src/pages/transaction/purchaseOrder/orderCollect/components/productModalTable/index.tsx
View file @
ce0ba6ce
...
...
@@ -138,11 +138,7 @@ const ProductModalTable:React.FC<ProductModalTableProps> = (props) => {
const
handleConfirmProduct
=
async
()
=>
{
// 判断所选择的商品是否属于同一个工作流
<<
<
<<<<
HEAD
const
{
code
,
data
}
=
await
PublicApi
.
postOrderIsWorkFlow
({
memberId
:
rowSelectionCtl
.
selectRow
[0]
.
memberId
,
productIds
:
rowSelectionCtl
.
selectedRowKeys
},
{
ctlType
:
'
none
'
})
=======
const
res
=
await
PublicApi
.
postOrderIsWorkFlow
({
memberId
:
rowSelectionCtl
.
selectRow
[
0
].
memberId
,
productIds
:
rowSelectionCtl
.
selectedRowKeys
},
{
ctlType
:
'none'
})
>
>>>>>>
4d959facff1bbb3a2ebd1328ff93729394559ba4
if
(
res
.
code
===
1000
)
{
const
productData
=
schemaAction
.
getFieldValue
(
'orderProductRequests'
)
...
...
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