Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
InvestCustomer
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
1
Merge Requests
1
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
Giang Tran
InvestCustomer
Commits
a7c661dd
Commit
a7c661dd
authored
Mar 27, 2021
by
Giang Tran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
upload image on android
parent
d29b6433
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
27 deletions
+18
-27
RootView.js
src/RootView.js
+0
-15
BankInfor.js
src/Screens/AccountVerification/Tab/BankInfor.js
+17
-10
Home.js
src/Screens/Home/Home.js
+0
-1
helpers.js
src/apis/helpers.js
+1
-1
No files found.
src/RootView.js
View file @
a7c661dd
...
@@ -30,20 +30,5 @@ const mapStateToProps = (state) => {
...
@@ -30,20 +30,5 @@ const mapStateToProps = (state) => {
loadingModal
:
state
.
ModalLoadingReducer
,
loadingModal
:
state
.
ModalLoadingReducer
,
};
};
};
};
const
styles
=
StyleSheet
.
create
({
container
:
{
height
:
HEIGHT
(
65
),
paddingHorizontal
:
10
,
flexDirection
:
'row'
,
paddingTop
:
15
,
backgroundColor
:
R
.
colors
.
red
,
},
img
:
{
height
:
HEIGHTXD
(
788
),
width
:
'100%'
,
justifyContent
:
'center'
,
},
});
export
default
connect
(
mapStateToProps
,
{})(
RootView
);
export
default
connect
(
mapStateToProps
,
{})(
RootView
);
src/Screens/AccountVerification/Tab/BankInfor.js
View file @
a7c661dd
...
@@ -19,6 +19,9 @@ import R from '../../../assets/R';
...
@@ -19,6 +19,9 @@ import R from '../../../assets/R';
import
Button
from
'../../../components/Button'
;
import
Button
from
'../../../components/Button'
;
import
PickerItem
from
'../../../components/Picker/PickerItem'
;
import
PickerItem
from
'../../../components/Picker/PickerItem'
;
import
{
verifyAccountApi
}
from
'../../../apis/Functions/users'
;
import
{
verifyAccountApi
}
from
'../../../apis/Functions/users'
;
import
{
connect
}
from
'react-redux'
;
import
{
showLoading
,
hideLoading
}
from
'../../../actions/loadingAction'
;
const
{
width
}
=
Dimensions
.
get
(
'window'
);
const
{
width
}
=
Dimensions
.
get
(
'window'
);
const
dataType
=
[
const
dataType
=
[
{
{
...
@@ -32,13 +35,12 @@ const dataType = [
...
@@ -32,13 +35,12 @@ const dataType = [
];
];
const
BankInfor
=
(
props
)
=>
{
const
BankInfor
=
(
props
)
=>
{
const
[
type
,
set
Type
]
=
useState
();
const
[
acc_type
,
setAcc
Type
]
=
useState
();
const
[
acc_type
,
setAccType
]
=
useState
(
''
);
const
[
bank_no
,
setBackNo
]
=
useState
(
''
);
const
[
account_no
,
setAccountNo
]
=
useState
(
''
);
const
[
account_no
,
setAccountNo
]
=
useState
(
''
);
const
createFormData
=
(
identity_after
,
identity_before
,
sign_img
,
body
)
=>
{
const
createFormData
=
(
identity_after
,
identity_before
,
sign_img
,
body
)
=>
{
const
data
=
new
FormData
();
const
data
=
new
FormData
();
console
.
log
(
identity_after
);
data
.
append
(
'identity_after'
,
{
data
.
append
(
'identity_after'
,
{
name
:
'identity_after.jpg'
,
name
:
'identity_after.jpg'
,
...
@@ -73,7 +75,7 @@ const BankInfor = (props) => {
...
@@ -73,7 +75,7 @@ const BankInfor = (props) => {
const
onPress
=
async
()
=>
{
const
onPress
=
async
()
=>
{
const
titles
=
[
'loại thẻ'
,
'mã ngân hàng'
,
'số thẻ/tài khoản'
];
const
titles
=
[
'loại thẻ'
,
'mã ngân hàng'
,
'số thẻ/tài khoản'
];
const
index
=
checkFormatArray
([
type
,
acc_type
,
account_no
]);
const
index
=
checkFormatArray
([
acc_type
,
bank_no
,
account_no
]);
console
.
log
(
props
.
route
.
params
.
body
);
console
.
log
(
props
.
route
.
params
.
body
);
if
(
index
===
true
)
{
if
(
index
===
true
)
{
const
data
=
createFormData
(
const
data
=
createFormData
(
...
@@ -81,10 +83,10 @@ const BankInfor = (props) => {
...
@@ -81,10 +83,10 @@ const BankInfor = (props) => {
props
.
route
.
params
.
img
.
urlFont
,
props
.
route
.
params
.
img
.
urlFont
,
props
.
route
.
params
.
img
.
urlSign
,
props
.
route
.
params
.
img
.
urlSign
,
{
{
uid
:
17
,
uid
:
props
.
user
.
uid
,
acc_type
:
0
,
acc_type
:
0
,
account_no
:
'123465789'
,
bank_no
,
bank_no
:
'970423'
,
account_no
,
...
props
.
route
.
params
.
body
,
...
props
.
route
.
params
.
body
,
},
},
);
);
...
@@ -119,13 +121,13 @@ const BankInfor = (props) => {
...
@@ -119,13 +121,13 @@ const BankInfor = (props) => {
width
=
{
width
-
20
}
width
=
{
width
-
20
}
data
=
{
dataType
}
data
=
{
dataType
}
onValueChange
=
{(
value
,
items
)
=>
{
onValueChange
=
{(
value
,
items
)
=>
{
setType
(
items
);
set
Acc
Type
(
items
);
}}
}}
/
>
/
>
<
TextField
<
TextField
isNumber
=
{
true
}
isNumber
=
{
true
}
title
=
{
'Mã ngân hàng'
}
title
=
{
'Mã ngân hàng'
}
onChangeText
=
{(
val
)
=>
set
AccType
(
val
)}
onChangeText
=
{(
val
)
=>
set
BackNo
(
val
)}
/
>
/
>
<
TextField
<
TextField
title
=
{
'Số thẻ/tài khoản'
}
title
=
{
'Số thẻ/tài khoản'
}
...
@@ -149,4 +151,9 @@ const styles = StyleSheet.create({
...
@@ -149,4 +151,9 @@ const styles = StyleSheet.create({
},
},
});
});
export
default
BankInfor
;
const
mapStateToProps
=
(
state
)
=>
{
return
{
user
:
state
.
userReducer
,
};
};
export
default
connect
(
mapStateToProps
,
{
showLoading
,
hideLoading
})(
BankInfor
);
src/Screens/Home/Home.js
View file @
a7c661dd
...
@@ -4,7 +4,6 @@ import {connect} from 'react-redux';
...
@@ -4,7 +4,6 @@ import {connect} from 'react-redux';
import
HomeView
from
'./HomeView'
;
import
HomeView
from
'./HomeView'
;
const
Home
=
(
props
)
=>
{
const
Home
=
(
props
)
=>
{
console
.
log
(
'Information in home'
,
props
.
user
);
return
<
HomeView
/>
;
return
<
HomeView
/>
;
};
};
...
...
src/apis/helpers.js
View file @
a7c661dd
...
@@ -103,7 +103,7 @@ export async function PostFormData(url, data) {
...
@@ -103,7 +103,7 @@ export async function PostFormData(url, data) {
.
then
((
response
)
=>
response
)
.
then
((
response
)
=>
response
)
.
then
((
response
)
=>
response
)
.
then
((
response
)
=>
response
)
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
console
.
log
(
error
.
request
);
console
.
log
(
error
);
const
err
=
{
const
err
=
{
message
:
'error'
,
message
:
'error'
,
status
:
error
.
request
.
status
,
status
:
error
.
request
.
status
,
...
...
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