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
b7768815
Commit
b7768815
authored
May 05, 2021
by
Giang Tran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update deeep link
parent
e7ab62e4
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
214 additions
and
124 deletions
+214
-124
app-release.aab
android/app/release/app-release.aab
+0
-0
AndroidManifest.xml
android/app/src/main/AndroidManifest.xml
+9
-6
colors.xml
android/app/src/main/res/values/colors.xml
+1
-1
AppDelegate.m
ios/Invest/AppDelegate.m
+29
-1
Info.plist
ios/Invest/Info.plist
+1
-1
PacketCQG.js
src/Screens/Account/PacrtCQG/PacketCQG.js
+1
-0
WalletDeposit.js
src/Screens/Action/Wallet/WalletDeposit.js
+65
-41
WalletWithdraw.js
src/Screens/Action/Wallet/WalletWithdraw.js
+82
-73
TabNavigation.js
src/routers/TabNavigation.js
+26
-1
No files found.
android/app/release/app-release.aab
0 → 100644
View file @
b7768815
File added
android/app/src/main/AndroidManifest.xml
View file @
b7768815
...
...
@@ -32,6 +32,14 @@
android:exported=
"true"
android:launchMode=
"singleTask"
android:windowSoftInputMode=
"adjustResize"
>
<intent-filter>
<action
android:name=
"android.intent.action.VIEW"
/>
<category
android:name=
"android.intent.category.DEFAULT"
/>
<category
android:name=
"android.intent.category.BROWSABLE"
/>
<data
android:scheme=
"appdcvinvest"
android:host=
"screen"
android:pathPrefix=
"/"
/>
</intent-filter>
</activity>
<activity
android:name=
"com.zoontek.rnbootsplash.RNBootSplashActivity"
...
...
@@ -43,12 +51,7 @@
</intent-filter>
<intent-filter>
<action
android:name=
"android.intent.action.VIEW"
/>
<category
android:name=
"android.intent.category.DEFAULT"
/>
<category
android:name=
"android.intent.category.BROWSABLE"
/>
<data
android:scheme=
"dcvinvest"
/>
</intent-filter>
</activity>
...
...
android/app/src/main/res/values/colors.xml
View file @
b7768815
<resources>
<color
name=
"bootsplash_background"
>
#1C6AF6
</color>
<color
name=
"white"
>
#
1C6AF6
</color>
<color
name=
"white"
>
#
fff
</color>
</resources>
ios/Invest/AppDelegate.m
View file @
b7768815
...
...
@@ -5,7 +5,7 @@
#import <React/RCTRootView.h>
@import
Firebase
;
#import <React/RCTLinkingManager.h>
#import <AVFoundation/AVFoundation.h>
#import "RNBootSplash.h"
#if DEBUG
...
...
@@ -17,6 +17,7 @@
#import <FlipperKitReactPlugin/FlipperKitReactPlugin.h>
//#import <CallAppSDK/CallAppInterface.h>
static
void
InitializeFlipper
(
UIApplication
*
application
)
{
FlipperClient
*
client
=
[
FlipperClient
sharedClient
];
SKDescriptorMapper
*
layoutDescriptorMapper
=
[[
SKDescriptorMapper
alloc
]
initWithDefaults
];
...
...
@@ -55,6 +56,33 @@ static void InitializeFlipper(UIApplication *application) {
return
YES
;
}
#import <React/RCTLinkingManager.h>
// - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
// sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
// {
// return [RCTLinkingManager application:application openURL:url
// sourceApplication:sourceApplication annotation:annotation];
// }
-
(
BOOL
)
application
:(
UIApplication
*
)
application
openURL
:(
NSURL
*
)
url
options
:(
NSDictionary
<
UIApplicationOpenURLOptionsKey
,
id
>
*
)
options
{
return
[
RCTLinkingManager
application
:
application
openURL
:
url
options
:
options
];
}
-
(
BOOL
)
application
:(
UIApplication
*
)
application
continueUserActivity
:(
NSUserActivity
*
)
userActivity
restorationHandler
:(
void
(
^
)(
NSArray
*
_Nullable
))
restorationHandler
{
return
[
RCTLinkingManager
application
:
application
continueUserActivity
:
userActivity
restorationHandler:
restorationHandler
];
}
-
(
NSURL
*
)
sourceURLForBridge
:(
RCTBridge
*
)
bridge
{
#if DEBUG
...
...
ios/Invest/Info.plist
View file @
b7768815
...
...
@@ -33,7 +33,7 @@
<
string
>
dcv.investcustomer.vn.
linking
<
/string
>
<
k
e
y
>
CFBundleURLSchemes
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
dcvinvest
<
/string
>
<
string
>
app
dcvinvest
<
/string
>
<
/
a
rr
a
y
>
<
/
d
i
c
t
>
<
/
a
rr
a
y
>
...
...
src/Screens/Account/PacrtCQG/PacketCQG.js
View file @
b7768815
...
...
@@ -37,6 +37,7 @@ const PacketCQG = (props) => {
props
.
showLoading
();
const
res
=
await
openCQG
({
packages
:
newList
});
props
.
hideLoading
();
console
.
log
(
res
);
if
(
res
.
data
.
code
==
200
)
{
props
.
saveUserToRedux
(
res
.
data
.
data
);
setTimeout
(()
=>
{
...
...
src/Screens/Action/Wallet/WalletDeposit.js
View file @
b7768815
...
...
@@ -6,6 +6,11 @@ import {
Dimensions
,
TouchableOpacity
,
Alert
,
TouchableWithoutFeedback
,
Keyboard
,
KeyboardAvoidingView
,
Platform
,
ScrollView
,
}
from
'react-native'
;
import
R
from
'../../../assets/R'
;
import
HeaderBack
from
'../../../components/Header/HeaderBack'
;
...
...
@@ -32,7 +37,10 @@ const WalletDeposit = (props) => {
const
navigate
=
useNavigation
();
const
onClick
=
async
()
=>
{
const
titles
=
[
I18n
.
t
(
'AmountOfMoney'
).
toLowerCase
(),
I18n
.
t
(
'Note'
).
toLowerCase
()];
const
titles
=
[
I18n
.
t
(
'AmountOfMoney'
).
toLowerCase
(),
I18n
.
t
(
'Note'
).
toLowerCase
(),
];
const
index
=
checkFormatArray
([
amount
,
notes
]);
if
(
index
===
true
)
{
...
...
@@ -63,45 +71,64 @@ const WalletDeposit = (props) => {
}
};
return
(
<
View
style
=
{{
flex
:
1
}}
>
<
HeaderBack
title
=
{
'InvestmentDeposit'
}
/
>
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
wrapTop
}
>
<
View
style
=
{
styles
.
itemTop
}
>
<
Text
style
=
{
styles
.
txtTitle
}
>
{
I18n
.
t
(
'Wallet'
)}
<
/Text
>
<
Text
style
=
{
styles
.
txtMoney
}
>
{
' '
}
{
props
.
user
.
current_money
!=
0
?
toPriceVnd
(
props
.
user
.
current_money
)
:
0
}{
' '
}
<
/Text
>
<
KeyboardAvoidingView
behavior
=
{
Platform
.
Os
===
'ios'
?
'padding'
:
'height'
}
style
=
{{
flex
:
1
,
backgroundColor
:
'white'
}}
keyboardVerticalOffset
=
{
-
50
}
>
<
TouchableWithoutFeedback
onPress
=
{
Keyboard
.
dismiss
}
>
<
View
style
=
{{
flex
:
1
}}
>
<
HeaderBack
title
=
{
'InvestmentDeposit'
}
/
>
<
ScrollView
showsVerticalScrollIndicator
=
{
false
}
>
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
wrapTop
}
>
<
View
style
=
{
styles
.
itemTop
}
>
<
Text
style
=
{
styles
.
txtTitle
}
>
{
I18n
.
t
(
'Wallet'
)}
<
/Text
>
<
Text
style
=
{
styles
.
txtMoney
}
>
{
' '
}
{
props
.
user
.
current_money
!=
0
?
toPriceVnd
(
props
.
user
.
current_money
)
:
0
}{
' '
}
<
/Text
>
<
/View
>
<
View
style
=
{{
width
:
1
,
backgroundColor
:
'#DBDBDB'
}}
/
>
<
View
style
=
{
styles
.
itemTop
}
>
<
Text
style
=
{
styles
.
txtTitle
}
>
CQG
<
/Text
>
<
Text
style
=
{
styles
.
txtMoney
}
>
{
' '
}
{
props
.
user
.
current_cqg_money
!=
0
?
toPriceVnd
(
props
.
user
.
current_cqg_money
)
:
0
}{
' '
}
đ
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
wrapBody
}
>
{
/* <TextDisable value={'10010101'} title={'Số tài khoản CQG'} /> */
}
<
TextMoney
onChangeText
=
{(
val
)
=>
setAmount
(
val
)}
title
=
{
I18n
.
t
(
'AmountOfMoney'
)}
value
=
{
amount
}
/
>
<
TextMulti
onChangeText
=
{(
val
)
=>
setNotes
(
val
)}
title
=
{
I18n
.
t
(
'Note'
)}
/
>
<
/View
>
<
/View
>
<
/ScrollView
>
<
View
style
=
{{
paddingVertical
:
10
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
}}
>
<
TouchableOpacity
onPress
=
{
onClick
}
style
=
{
styles
.
btnSend
}
>
<
Text
style
=
{
styles
.
txtSend
}
>
{
I18n
.
t
(
'Deposit'
)}
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
View
style
=
{{
width
:
1
,
backgroundColor
:
'#DBDBDB'
}}
/
>
<
View
style
=
{
styles
.
itemTop
}
>
<
Text
style
=
{
styles
.
txtTitle
}
>
CQG
<
/Text
>
<
Text
style
=
{
styles
.
txtMoney
}
>
{
' '
}
{
props
.
user
.
current_cqg_money
!=
0
?
toPriceVnd
(
props
.
user
.
current_cqg_money
)
:
0
}{
' '
}
đ
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
wrapBody
}
>
{
/* <TextDisable value={'10010101'} title={'Số tài khoản CQG'} /> */
}
<
TextMoney
onChangeText
=
{(
val
)
=>
setAmount
(
val
)}
title
=
{
I18n
.
t
(
'AmountOfMoney'
)}
value
=
{
amount
}
/
>
<
TextMulti
onChangeText
=
{(
val
)
=>
setNotes
(
val
)}
title
=
{
I18n
.
t
(
'Note'
)}
/
>
<
/View
>
<
/View
>
<
TouchableOpacity
onPress
=
{
onClick
}
style
=
{
styles
.
btnSend
}
>
<
Text
style
=
{
styles
.
txtSend
}
>
{
I18n
.
t
(
'Deposit'
)}
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
/TouchableWithoutFeedback
>
<
/KeyboardAvoidingView
>
);
};
...
...
@@ -147,9 +174,6 @@ const styles = StyleSheet.create({
fontWeight
:
'bold'
,
},
btnSend
:
{
position
:
'absolute'
,
bottom
:
30
,
right
:
width
/
2
-
70
,
width
:
140
,
height
:
40
,
backgroundColor
:
R
.
colors
.
main
,
...
...
src/Screens/Action/Wallet/WalletWithdraw.js
View file @
b7768815
...
...
@@ -10,6 +10,7 @@ import {
TouchableWithoutFeedback
,
Keyboard
,
KeyboardAvoidingView
,
ScrollView
,
}
from
'react-native'
;
import
R
from
'../../../assets/R'
;
import
HeaderBack
from
'../../../components/Header/HeaderBack'
;
...
...
@@ -61,9 +62,8 @@ const WalletWithdraw = (props) => {
});
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
if
(
res
.
data
.
data
.
length
==
0
)
{
confirmAlert
(
I18n
.
t
(
'SettingPaymentMethodConfirm'
),
()
=>
navigate
.
navigate
(
ADDMETHODPAY
),
confirmAlert
(
I18n
.
t
(
'SettingPaymentMethodConfirm'
),
()
=>
navigate
.
navigate
(
ADDMETHODPAY
),
);
}
else
{
const
newList
=
res
.
data
.
data
.
map
((
e
)
=>
{
...
...
@@ -77,7 +77,10 @@ const WalletWithdraw = (props) => {
};
const
onPressWithdraw
=
async
()
=>
{
const
titles
=
[
I18n
.
t
(
'BeneficiaryAccount'
),
I18n
.
t
(
'AmountOfMoney'
).
toLowerCase
()];
const
titles
=
[
I18n
.
t
(
'BeneficiaryAccount'
),
I18n
.
t
(
'AmountOfMoney'
).
toLowerCase
(),
];
const
index
=
checkFormatArray
([
type
,
amount
]);
...
...
@@ -120,78 +123,87 @@ const WalletWithdraw = (props) => {
<
TouchableWithoutFeedback
onPress
=
{
Keyboard
.
dismiss
}
>
<
View
style
=
{{
flex
:
1
}}
>
<
HeaderBack
title
=
{
'Withdraw'
}
/
>
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
wrapTop
}
>
<
View
style
=
{
styles
.
itemTop
}
>
<
Text
style
=
{
styles
.
txtTitle
}
>
{
I18n
.
t
(
'Wallet'
)}
<
/Text
>
<
Text
style
=
{
styles
.
txtMoney
}
>
{
' '
}
{
props
.
user
.
current_money
!=
0
?
toPriceVnd
(
props
.
user
.
current_money
)
:
0
}{
' '
}
<
/Text
>
<
/View
>
<
ScrollView
showsVerticalScrollIndicator
=
{
false
}
>
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
wrapTop
}
>
<
View
style
=
{
styles
.
itemTop
}
>
<
Text
style
=
{
styles
.
txtTitle
}
>
{
I18n
.
t
(
'Wallet'
)}
<
/Text
>
<
Text
style
=
{
styles
.
txtMoney
}
>
{
' '
}
{
props
.
user
.
current_money
!=
0
?
toPriceVnd
(
props
.
user
.
current_money
)
:
0
}{
' '
}
<
/Text
>
<
/View
>
<
View
style
=
{{
width
:
1
,
backgroundColor
:
'#DBDBDB'
}}
/
>
<
View
style
=
{{
width
:
1
,
backgroundColor
:
'#DBDBDB'
}}
/
>
<
View
style
=
{
styles
.
itemTop
}
>
<
Text
style
=
{
styles
.
txtTitle
}
>
CQG
<
/Text
>
<
Text
style
=
{
styles
.
txtMoney
}
>
{
props
.
user
.
current_cqg_money
!=
0
?
toPriceVnd
(
props
.
user
.
current_cqg_money
)
:
0
}{
' '
}
đ
<
View
style
=
{
styles
.
itemTop
}
>
<
Text
style
=
{
styles
.
txtTitle
}
>
CQG
<
/Text
>
<
Text
style
=
{
styles
.
txtMoney
}
>
{
props
.
user
.
current_cqg_money
!=
0
?
toPriceVnd
(
props
.
user
.
current_cqg_money
)
:
0
}{
' '
}
đ
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
wrapBody
}
>
<
Text
style
=
{{
fontSize
:
getFontXD
(
42
),
color
:
R
.
colors
.
color777
,
}}
>
{
I18n
.
t
(
'SourceAccount'
)}
<
/Text
>
{
/* <View style={styles.row}> */
}
<
RadioForm
radio_props
=
{
radio_props
}
labelStyle
=
{{
fontSize
:
getFontXD
(
42
)}}
formHorizontal
=
{
true
}
style
=
{
styles
.
row
}
initial
=
{
0
}
onPress
=
{(
value
)
=>
{
setSrc
(
value
);
}}
/
>
{
/* </View> */
}
<
Text
style
=
{{
fontSize
:
getFontXD
(
42
),
color
:
R
.
colors
.
color777
,
}}
>
{
I18n
.
t
(
'ChooseBeneficiaryAccount'
)}
<
/Text
>
<
PickerItem
width
=
{
width
-
20
}
data
=
{
data
}
onValueChange
=
{(
value
,
items
)
=>
{
setType
(
items
);
}}
/
>
<
TextMoney
onChangeText
=
{(
val
)
=>
setAmount
(
val
)}
title
=
{
I18n
.
t
(
'AmountOfMoney'
)}
value
=
{
amount
}
/
>
<
TextMulti
onChangeText
=
{(
val
)
=>
setNotes
(
val
)}
title
=
{
I18n
.
t
(
'Note'
)}
/
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
wrapBody
}
>
<
Text
style
=
{{
fontSize
:
getFontXD
(
42
),
color
:
R
.
colors
.
color777
,
}}
>
{
I18n
.
t
(
'SourceAccount'
)}
<
/Text
>
{
/* <View style={styles.row}> */
}
<
RadioForm
radio_props
=
{
radio_props
}
labelStyle
=
{{
fontSize
:
getFontXD
(
42
)}}
formHorizontal
=
{
true
}
style
=
{
styles
.
row
}
initial
=
{
0
}
onPress
=
{(
value
)
=>
{
setSrc
(
value
);
}}
/
>
{
/* </View> */
}
<
Text
style
=
{{
fontSize
:
getFontXD
(
42
),
color
:
R
.
colors
.
color777
,
}}
>
{
I18n
.
t
(
'ChooseBeneficiaryAccount'
)}
<
/Text
>
<
PickerItem
width
=
{
width
-
20
}
data
=
{
data
}
onValueChange
=
{(
value
,
items
)
=>
{
setType
(
items
);
}}
/
>
<
TextMoney
onChangeText
=
{(
val
)
=>
setAmount
(
val
)}
title
=
{
I18n
.
t
(
'AmountOfMoney'
)}
value
=
{
amount
}
/
>
<
TextMulti
onChangeText
=
{(
val
)
=>
setNotes
(
val
)}
title
=
{
I18n
.
t
(
'Note'
)}
/
>
<
/View
>
<
/ScrollView
>
<
View
style
=
{{
paddingVertical
:
10
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
}}
>
<
TouchableOpacity
onPress
=
{
onPressWithdraw
}
style
=
{
styles
.
btnSend
}
>
<
Text
style
=
{
styles
.
txtSend
}
>
{
I18n
.
t
(
'Withdraw'
)}
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
TouchableOpacity
onPress
=
{
onPressWithdraw
}
style
=
{
styles
.
btnSend
}
>
<
Text
style
=
{
styles
.
txtSend
}
>
{
I18n
.
t
(
'Withdraw'
)}
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
/TouchableWithoutFeedback
>
<
/KeyboardAvoidingView
>
...
...
@@ -240,9 +252,6 @@ const styles = StyleSheet.create({
fontWeight
:
'bold'
,
},
btnSend
:
{
position
:
'absolute'
,
bottom
:
30
,
right
:
width
/
2
-
70
,
width
:
140
,
height
:
40
,
backgroundColor
:
R
.
colors
.
main
,
...
...
src/routers/TabNavigation.js
View file @
b7768815
import
React
,
{
useEffect
}
from
'react'
;
import
{
View
,
Text
}
from
'react-native'
;
import
{
View
,
Text
,
Linking
}
from
'react-native'
;
import
{
createBottomTabNavigator
}
from
'@react-navigation/bottom-tabs'
;
import
Icon
from
'react-native-vector-icons/FontAwesome5'
;
import
Ionicons
from
'react-native-vector-icons/Ionicons'
;
...
...
@@ -22,6 +22,7 @@ import I18n from '../helper/i18/i18n';
import
{
changeLanguage
}
from
'../actions/language'
;
import
KEY
from
'../assets/AsynStorage'
;
import
AsyncStorage
from
'@react-native-community/async-storage'
;
import
{
DETAILNEW
}
from
'../routers/ScreenNames'
;
const
Tab
=
createBottomTabNavigator
();
...
...
@@ -33,11 +34,35 @@ const TabNavigator = (props) => {
const
navigate
=
useNavigation
();
useEffect
(()
=>
{
setInitLanguage
();
checkDeepking
();
setTimeout
(()
=>
{
showPopUp
();
},
3000
);
},
[]);
const
checkDeepking
=
()
=>
{
Linking
.
getInitialURL
().
then
((
url
)
=>
{
deeplinkScreen
(
url
);
});
Linking
.
addEventListener
(
'url'
,
(
url
)
=>
{
handleOpenURL
(
url
);
});
};
const
handleOpenURL
=
(
event
)
=>
{
deeplinkScreen
(
event
.
url
);
};
const
deeplinkScreen
=
(
url
)
=>
{
const
route
=
url
.
replace
(
/.*
?
:
\/\/
/g
,
''
);
const
id
=
route
.
match
(
/
\/([^\/]
+
)\/?
$/
)[
1
];
const
root
=
route
.
split
(
'/'
)[
0
];
// const routeName = route.split('/')[1];
if
(
root
==
'screen'
)
{
navigate
.
navigate
(
DETAILNEW
,
{
id
});
}
};
useEffect
(()
=>
{
checkScreenInit
();
},
[
props
.
screenInit
]);
...
...
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