Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
admin-trade
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haojie
admin-trade
Commits
c5ce61ee
Commit
c5ce61ee
authored
Jun 09, 2023
by
haojie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
77dccf9e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
14 deletions
+9
-14
resources/js/Pages/Home/components/ContractTrade/index.tsx
+0
-14
resources/js/redux/store.ts
+9
-0
No files found.
resources/js/Pages/Home/components/ContractTrade/index.tsx
View file @
c5ce61ee
...
...
@@ -13,7 +13,6 @@ import CustomButton from '@/js/components/Button';
import
{
getContractHelpList
}
from
'@/js/utils/local'
;
import
{
ClosePosition
}
from
'@/js/utils/api/multipleUse'
;
import
StartTrade
from
"../StartTrade"
;
// import CustomDialog from '../TradeDialog/index';
// 定义常量
const
dom_id
=
'contract-trade'
;
...
...
@@ -23,8 +22,6 @@ class ContractTrade extends Component<any, any> {
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
// 弹窗状态
dialog_visible
:
false
,
minHeight
:
''
,
// 当前委托数量
currentEntrustNum
:
0
,
...
...
@@ -115,17 +112,8 @@ class ContractTrade extends Component<any, any> {
}
}
storeChange
=
()
=>
{
store
.
dispatch
({
type
:
'count'
,
data
:
1
,});
}
async
componentDidMount
()
{
this
.
getTableHeight
();
// store.subscribe(() => {
// this.setState({
// num: store.getState().count,
// })
// })
// 获取辅助列表
const
data
=
await
getContractHelpList
();
if
(
data
)
{
...
...
@@ -159,7 +147,6 @@ class ContractTrade extends Component<any, any> {
case
table_HoldingPosition
:
return
(
<
div
className=
'hold-position-extension'
>
{
/*<CustomButton onClick={this.openDialog}>开始交易</CustomButton>*/
}
<
CustomButton
onClick=
{
this
.
onClosePosition
}
>
一键平仓
</
CustomButton
>
</
div
>
)
...
...
@@ -271,7 +258,6 @@ class ContractTrade extends Component<any, any> {
}
}
></
HistoryTransaction
>
</
div
>
{
/*<CustomDialog visible={this.state.dialog_visible} onClose={this.closeDialog}></CustomDialog>*/
}
</
div
>
)
}
...
...
resources/js/redux/store.ts
View file @
c5ce61ee
...
...
@@ -4,4 +4,13 @@ import allReducer from "./reducers"//将多个reducer合并为一个
import
thunk
from
"redux-thunk"
//引入异步模块
import
{
composeWithDevTools
}
from
"redux-devtools-extension"
// store.dispatch({type: 'count', data: 1,}); // 提交
// 监听
// store.subscribe(() => {
// this.setState({
// num: store.getState().count,
// })
// })
export
default
createStore
(
allReducer
,
composeWithDevTools
(
applyMiddleware
(
thunk
)))
//创建并导出store对象
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