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
Hide 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';
...
@@ -28,7 +28,12 @@ import {showLoading, hideLoading} from '../../actions/loadingAction';
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
{
showAlert
,
TYPE
}
from
'../../components/DropdownAlert'
;
import
{
showAlert
,
TYPE
}
from
'../../components/DropdownAlert'
;
import
CountDown
from
'../../components/CountDown'
;
import
CountDown
from
'../../components/CountDown'
;
import
{
verifyOTPApiSmart
}
from
'../../apis/Functions/users'
;
import
{
verifyOTPApiSmart
,
getOTPApi
,
verifyStoreOTPApiSmart
,
getOTPApiSmartOTP
,
}
from
'../../apis/Functions/users'
;
const
CELL_COUNT
=
4
;
const
CELL_COUNT
=
4
;
...
@@ -45,10 +50,11 @@ const ConfirmOTPSmart = (propsa) => {
...
@@ -45,10 +50,11 @@ const ConfirmOTPSmart = (propsa) => {
const
getOTP
=
async
()
=>
{
const
getOTP
=
async
()
=>
{
propsa
.
showLoading
();
propsa
.
showLoading
();
const
res
=
await
getOTPApi
({
const
res
=
await
getOTPApi
SmartOTP
({
platform
:
Platform
.
OS
,
platform
:
Platform
.
OS
,
otp_by
:
propsa
.
route
.
params
.
email
,
otp_by
:
propsa
.
user
.
email
,
type
:
'FORGOT_PASSWORD'
,
otp_password
:
'1234'
,
type
:
'CREATE_OTP_PASSWORD'
,
});
});
propsa
.
hideLoading
();
propsa
.
hideLoading
();
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
...
@@ -66,13 +72,14 @@ const ConfirmOTPSmart = (propsa) => {
...
@@ -66,13 +72,14 @@ const ConfirmOTPSmart = (propsa) => {
showAlert
(
TYPE
.
WARN
,
I18n
.
t
(
'Notification'
),
I18n
.
t
(
'OTPInvalid'
));
showAlert
(
TYPE
.
WARN
,
I18n
.
t
(
'Notification'
),
I18n
.
t
(
'OTPInvalid'
));
}
else
{
}
else
{
propsa
.
showLoading
();
propsa
.
showLoading
();
const
res
=
await
verifyOTPApiSmart
({
const
res
=
await
verify
Store
OTPApiSmart
({
platform
:
Platform
.
OS
,
platform
:
Platform
.
OS
,
password
:
propsa
.
route
.
params
.
password
,
password
:
propsa
.
route
.
params
.
password
,
password_confirmation
:
propsa
.
route
.
params
.
password_confirmation
,
password_confirmation
:
propsa
.
route
.
params
.
password_confirmation
,
otp
:
value
,
otp
:
value
,
type
:
'
FORGOT
_PASSWORD'
,
type
:
'
CREATE_OTP
_PASSWORD'
,
});
});
showAlert
(
TYPE
.
SUCCESS
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
propsa
.
hideLoading
();
propsa
.
hideLoading
();
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
navigate
.
navigate
(
TABNAVIGATOR
);
navigate
.
navigate
(
TABNAVIGATOR
);
...
@@ -212,7 +219,9 @@ const styles = StyleSheet.create({
...
@@ -212,7 +219,9 @@ const styles = StyleSheet.create({
});
});
const
mapStateToProps
=
(
state
)
=>
{
const
mapStateToProps
=
(
state
)
=>
{
return
{};
return
{
user
:
state
.
userReducer
,
};
};
};
export
default
connect
(
mapStateToProps
,
{
showLoading
,
hideLoading
})(
export
default
connect
(
mapStateToProps
,
{
showLoading
,
hideLoading
})(
...
...
src/Screens/SmartOTP/SettingSmartOTP.js
View file @
fb0f1c10
...
@@ -43,6 +43,7 @@ const SettingOTP = (props) => {
...
@@ -43,6 +43,7 @@ const SettingOTP = (props) => {
});
});
props
.
hideLoading
();
props
.
hideLoading
();
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
showAlert
(
TYPE
.
SUCCESS
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
navigatiton
.
navigate
(
CONFIRMOTPSMART
,
{
navigatiton
.
navigate
(
CONFIRMOTPSMART
,
{
password
,
password
,
password_confirmation
,
password_confirmation
,
...
@@ -75,7 +76,11 @@ const SettingOTP = (props) => {
...
@@ -75,7 +76,11 @@ const SettingOTP = (props) => {
onChangeText
=
{(
val
)
=>
setPassword
(
val
)}
onChangeText
=
{(
val
)
=>
setPassword
(
val
)}
maxLength
=
{
4
}
maxLength
=
{
4
}
isNumber
=
{
true
}
isNumber
=
{
true
}
title
=
{
I18n
.
t
(
'PassGetSmartOTP'
)}
title
=
{
props
.
language
.
language
==
'vi'
?
'Mật khẩu lấy Smart OTP'
:
I18n
.
t
(
'PassGetSmartOTP'
)
}
isPassWord
=
{
true
}
isPassWord
=
{
true
}
/
>
/
>
<
TextField
<
TextField
...
@@ -83,7 +88,11 @@ const SettingOTP = (props) => {
...
@@ -83,7 +88,11 @@ const SettingOTP = (props) => {
isNumber
=
{
true
}
isNumber
=
{
true
}
isPassWord
=
{
true
}
isPassWord
=
{
true
}
onChangeText
=
{(
val
)
=>
setPassword_confirmation
(
val
)}
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
>
<
View
>
<
View
>
...
@@ -97,6 +106,7 @@ const SettingOTP = (props) => {
...
@@ -97,6 +106,7 @@ const SettingOTP = (props) => {
const
mapStateToProps
=
(
state
)
=>
{
const
mapStateToProps
=
(
state
)
=>
{
return
{
return
{
user
:
state
.
userReducer
,
user
:
state
.
userReducer
,
language
:
state
.
languageReducer
,
};
};
};
};
...
...
src/Screens/SmartOTP/SmartOTPConfig.js
View file @
fb0f1c10
...
@@ -38,17 +38,7 @@ const SmartOTPConfig = (props) => {
...
@@ -38,17 +38,7 @@ const SmartOTPConfig = (props) => {
<
/View
>
<
/View
>
<
Icon
name
=
{
'right'
}
size
=
{
20
}
color
=
{
R
.
colors
.
color777
}
/
>
<
Icon
name
=
{
'right'
}
size
=
{
20
}
color
=
{
R
.
colors
.
color777
}
/
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
)
:
(
)
:
null
}
<
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
>
)}
<
TouchableOpacity
<
TouchableOpacity
onPress
=
{()
=>
navigation
.
navigate
(
RULESSMARTOTP
)}
onPress
=
{()
=>
navigation
.
navigate
(
RULESSMARTOTP
)}
...
...
src/Screens/SmartOTP/WebView/FAQs.js
View file @
fb0f1c10
...
@@ -7,7 +7,7 @@ const FAQs = (props) => {
...
@@ -7,7 +7,7 @@ const FAQs = (props) => {
<
View
style
=
{{
flex
:
1
}}
>
<
View
style
=
{{
flex
:
1
}}
>
<
HeaderBack
isWhite
=
{
true
}
title
=
{
'FAQs'
}
/
>
<
HeaderBack
isWhite
=
{
true
}
title
=
{
'FAQs'
}
/
>
<
WebView
<
WebView
androidHardwareAccelerationDisabled
=
{
true
}
//
androidHardwareAccelerationDisabled={true}
source
=
{{
source
=
{{
uri
:
'http://api.dcvinvest.com/webview/smart-otp/faqs'
,
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) => {
...
@@ -8,7 +8,7 @@ const RulesSmartOTP = (props) => {
<
View
style
=
{{
flex
:
1
}}
>
<
View
style
=
{{
flex
:
1
}}
>
<
HeaderBack
isWhite
=
{
true
}
title
=
{
'Rules'
}
/
>
<
HeaderBack
isWhite
=
{
true
}
title
=
{
'Rules'
}
/
>
<
WebView
<
WebView
androidHardwareAccelerationDisabled
=
{
true
}
//
androidHardwareAccelerationDisabled={true}
source
=
{{
source
=
{{
uri
:
'http://api.dcvinvest.com/webview/smart-otp/term-and-condition'
,
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