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
fb0f1c10
Commit
fb0f1c10
authored
Jun 10, 2021
by
Giang Tran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit moment
parent
75bb4dfc
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
22 deletions
+31
-22
ConfirmOTPSmart.js
src/Screens/SmartOTP/ConfirmOTPSmart.js
+16
-7
SettingSmartOTP.js
src/Screens/SmartOTP/SettingSmartOTP.js
+12
-2
SmartOTPConfig.js
src/Screens/SmartOTP/SmartOTPConfig.js
+1
-11
FAQs.js
src/Screens/SmartOTP/WebView/FAQs.js
+1
-1
RulesSmartOTP.js
src/Screens/SmartOTP/WebView/RulesSmartOTP.js
+1
-1
No files found.
src/Screens/SmartOTP/ConfirmOTPSmart.js
View file @
fb0f1c10
...
...
@@ -28,7 +28,12 @@ import {showLoading, hideLoading} from '../../actions/loadingAction';
import
{
connect
}
from
'react-redux'
;
import
{
showAlert
,
TYPE
}
from
'../../components/DropdownAlert'
;
import
CountDown
from
'../../components/CountDown'
;
import
{
verifyOTPApiSmart
}
from
'../../apis/Functions/users'
;
import
{
verifyOTPApiSmart
,
getOTPApi
,
verifyStoreOTPApiSmart
,
getOTPApiSmartOTP
,
}
from
'../../apis/Functions/users'
;
const
CELL_COUNT
=
4
;
...
...
@@ -45,10 +50,11 @@ const ConfirmOTPSmart = (propsa) => {
const
getOTP
=
async
()
=>
{
propsa
.
showLoading
();
const
res
=
await
getOTPApi
({
const
res
=
await
getOTPApi
SmartOTP
({
platform
:
Platform
.
OS
,
otp_by
:
propsa
.
route
.
params
.
email
,
type
:
'FORGOT_PASSWORD'
,
otp_by
:
propsa
.
user
.
email
,
otp_password
:
'1234'
,
type
:
'CREATE_OTP_PASSWORD'
,
});
propsa
.
hideLoading
();
if
(
res
.
data
.
code
==
200
)
{
...
...
@@ -66,13 +72,14 @@ const ConfirmOTPSmart = (propsa) => {
showAlert
(
TYPE
.
WARN
,
I18n
.
t
(
'Notification'
),
I18n
.
t
(
'OTPInvalid'
));
}
else
{
propsa
.
showLoading
();
const
res
=
await
verifyOTPApiSmart
({
const
res
=
await
verify
Store
OTPApiSmart
({
platform
:
Platform
.
OS
,
password
:
propsa
.
route
.
params
.
password
,
password_confirmation
:
propsa
.
route
.
params
.
password_confirmation
,
otp
:
value
,
type
:
'
FORGOT
_PASSWORD'
,
type
:
'
CREATE_OTP
_PASSWORD'
,
});
showAlert
(
TYPE
.
SUCCESS
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
propsa
.
hideLoading
();
if
(
res
.
data
.
code
==
200
)
{
navigate
.
navigate
(
TABNAVIGATOR
);
...
...
@@ -212,7 +219,9 @@ const styles = StyleSheet.create({
});
const
mapStateToProps
=
(
state
)
=>
{
return
{};
return
{
user
:
state
.
userReducer
,
};
};
export
default
connect
(
mapStateToProps
,
{
showLoading
,
hideLoading
})(
...
...
src/Screens/SmartOTP/SettingSmartOTP.js
View file @
fb0f1c10
...
...
@@ -43,6 +43,7 @@ const SettingOTP = (props) => {
});
props
.
hideLoading
();
if
(
res
.
data
.
code
==
200
)
{
showAlert
(
TYPE
.
SUCCESS
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
navigatiton
.
navigate
(
CONFIRMOTPSMART
,
{
password
,
password_confirmation
,
...
...
@@ -75,7 +76,11 @@ const SettingOTP = (props) => {
onChangeText
=
{(
val
)
=>
setPassword
(
val
)}
maxLength
=
{
4
}
isNumber
=
{
true
}
title
=
{
I18n
.
t
(
'PassGetSmartOTP'
)}
title
=
{
props
.
language
.
language
==
'vi'
?
'Mật khẩu lấy Smart OTP'
:
I18n
.
t
(
'PassGetSmartOTP'
)
}
isPassWord
=
{
true
}
/
>
<
TextField
...
...
@@ -83,7 +88,11 @@ const SettingOTP = (props) => {
isNumber
=
{
true
}
isPassWord
=
{
true
}
onChangeText
=
{(
val
)
=>
setPassword_confirmation
(
val
)}
title
=
{
I18n
.
t
(
'ConfirmPassGetSmartOTP'
)}
title
=
{
props
.
language
.
language
==
'vi'
?
'Xác nhận mật khẩu lấy Smart OTP'
:
I18n
.
t
(
'ConfirmPassGetSmartOTP'
)
}
/
>
<
/View
>
<
View
>
...
...
@@ -97,6 +106,7 @@ const SettingOTP = (props) => {
const
mapStateToProps
=
(
state
)
=>
{
return
{
user
:
state
.
userReducer
,
language
:
state
.
languageReducer
,
};
};
...
...
src/Screens/SmartOTP/SmartOTPConfig.js
View file @
fb0f1c10
...
...
@@ -38,17 +38,7 @@ const SmartOTPConfig = (props) => {
<
/View
>
<
Icon
name
=
{
'right'
}
size
=
{
20
}
color
=
{
R
.
colors
.
color777
}
/
>
<
/TouchableOpacity
>
)
:
(
<
TouchableOpacity
onPress
=
{()
=>
navigation
.
navigate
(
SETTINGOTP
)}
style
=
{
styles
.
container
}
>
<
Image
style
=
{
styles
.
imgIcon
}
source
=
{
R
.
images
.
changeSmart
}
/
>
<
View
style
=
{{
flex
:
1
,
justifyContent
:
'center'
}}
>
<
AppText
i18nKey
=
{
'AddSmartOTP'
}
/
>
<
/View
>
<
Icon
name
=
{
'right'
}
size
=
{
20
}
color
=
{
R
.
colors
.
color777
}
/
>
<
/TouchableOpacity
>
)}
)
:
null
}
<
TouchableOpacity
onPress
=
{()
=>
navigation
.
navigate
(
RULESSMARTOTP
)}
...
...
src/Screens/SmartOTP/WebView/FAQs.js
View file @
fb0f1c10
...
...
@@ -7,7 +7,7 @@ const FAQs = (props) => {
<
View
style
=
{{
flex
:
1
}}
>
<
HeaderBack
isWhite
=
{
true
}
title
=
{
'FAQs'
}
/
>
<
WebView
androidHardwareAccelerationDisabled
=
{
true
}
//
androidHardwareAccelerationDisabled={true}
source
=
{{
uri
:
'http://api.dcvinvest.com/webview/smart-otp/faqs'
,
}}
...
...
src/Screens/SmartOTP/WebView/RulesSmartOTP.js
View file @
fb0f1c10
...
...
@@ -8,7 +8,7 @@ const RulesSmartOTP = (props) => {
<
View
style
=
{{
flex
:
1
}}
>
<
HeaderBack
isWhite
=
{
true
}
title
=
{
'Rules'
}
/
>
<
WebView
androidHardwareAccelerationDisabled
=
{
true
}
//
androidHardwareAccelerationDisabled={true}
source
=
{{
uri
:
'http://api.dcvinvest.com/webview/smart-otp/term-and-condition'
,
}}
...
...
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