Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wx-school-app
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
姜雷
wx-school-app
Commits
44e0c90b
Commit
44e0c90b
authored
Jul 05, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改授信保证金展示
parent
ad44709f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
4 deletions
+22
-4
account.ts
src/api/account.ts
+12
-0
useCreditDeposits.ts
src/hooks/useCreditDeposits.ts
+10
-4
No files found.
src/api/account.ts
View file @
44e0c90b
...
...
@@ -72,3 +72,15 @@ export const fetchCreditDeposites = (params: {
url
:
'/dcxy/api/creditDeposits'
,
data
:
params
,
});
export
const
fetchOperationMode
=
(
params
:
{
areaId
:
number
;
}):
Promise
<
ResponseDataEntity
<
{
mode
:
string
;
}
>
>
=>
baseFetch
({
url
:
'/dcxy/api/operationModeConf'
,
data
:
params
,
});
src/hooks/useCreditDeposits.ts
View file @
44e0c90b
import
{
fetchCreditDeposites
}
from
'@/api/account'
;
import
{
fetchCreditDeposites
,
fetchOperationMode
}
from
'@/api/account'
;
import
{
useEffect
,
useReducer
}
from
'@tarojs/taro'
;
import
Actions
from
'@/types/Store/Actions'
;
...
...
@@ -31,11 +31,17 @@ const useCreditDeposits = (areaId: number): CreditDepositsState => {
const
[
state
,
dispatch
]
=
useReducer
(
reducer
,
initState
);
useEffect
(()
=>
{
fetch
CreditDeposites
({
fetch
OperationMode
({
areaId
:
areaId
,
}).
then
(
res
=>
{
if
(
res
.
data
)
{
dispatch
({
type
:
'updateCreditInfo'
,
payload
:
res
.
data
});
if
(
res
.
data
.
mode
===
'1'
||
res
.
data
.
mode
===
'2'
)
{
fetchCreditDeposites
({
areaId
:
areaId
,
}).
then
(
res
=>
{
if
(
res
.
data
)
{
dispatch
({
type
:
'updateCreditInfo'
,
payload
:
res
.
data
});
}
});
}
});
},
[
areaId
]);
...
...
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