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
997d0fe8
Commit
997d0fe8
authored
Apr 06, 2021
by
Giang Tran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update code
parent
a583e366
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
90 additions
and
18 deletions
+90
-18
Functions.js
src/Config/Functions.js
+6
-1
AccountVerificationView.js
src/Screens/AccountVerification/AccountVerificationView.js
+2
-2
Profile.js
src/Screens/AccountVerification/Tab/Profile.js
+0
-1
WalletWithdraw.js
src/Screens/Action/Wallet/WalletWithdraw.js
+1
-1
GeneralInfor.js
src/Screens/Menu/Profile/Tab/GeneralInfor.js
+8
-3
Calendar.js
src/Screens/NewFeed/Calendar/Calendar.js
+52
-0
item.js
src/Screens/NewFeed/Calendar/item.js
+4
-3
NewFeed.js
src/Screens/NewFeed/NewFeed.js
+7
-3
Tab2.js
src/Screens/NewFeed/Tab2/Tab2.js
+0
-1
NewFeed.js
src/apis/Functions/NewFeed.js
+5
-0
url.js
src/apis/url.js
+1
-0
HeaderHome.js
src/components/Header/HeaderHome.js
+2
-1
PlussModal.js
src/routers/PlussModal.js
+2
-2
No files found.
src/Config/Functions.js
View file @
997d0fe8
...
@@ -267,13 +267,18 @@ export const shortFullname = (text) => {
...
@@ -267,13 +267,18 @@ export const shortFullname = (text) => {
return
name
;
return
name
;
};
};
export
const
convertTimeApi
=
(
date
)
=>
{
const
time
=
moment
(
date
).
format
(
'YYYY-MM-DD'
);
return
time
;
};
export
const
convertDate
=
(
date
)
=>
{
export
const
convertDate
=
(
date
)
=>
{
const
time
=
moment
(
date
).
format
(
'DD/MM/YYYY'
);
const
time
=
moment
(
date
).
format
(
'DD/MM/YYYY'
);
return
time
;
return
time
;
};
};
export
const
convertTime
=
(
date
)
=>
{
export
const
convertTime
=
(
date
)
=>
{
const
temp
=
new
Date
(
moment
(
date
));
const
temp
=
new
Date
(
moment
(
date
,
'DD/MM/YYYY'
));
const
time
=
moment
(
temp
).
format
(
'YYYY-MM-DD'
);
const
time
=
moment
(
temp
).
format
(
'YYYY-MM-DD'
);
return
time
;
return
time
;
};
};
...
...
src/Screens/AccountVerification/AccountVerificationView.js
View file @
997d0fe8
...
@@ -31,12 +31,12 @@ const AccountVerificationView = (props) => {
...
@@ -31,12 +31,12 @@ const AccountVerificationView = (props) => {
}}
>
}}
>
<
Tab
.
Screen
<
Tab
.
Screen
name
=
"GeneralInfor"
name
=
"GeneralInfor"
component
=
{
props
.
user
.
status
==
2
?
GeneralInfor
:
GeneralView
}
component
=
{
props
.
user
.
status
==
3
?
GeneralInfor
:
GeneralView
}
options
=
{{
tabBarLabel
:
'Thông tin chung'
}}
options
=
{{
tabBarLabel
:
'Thông tin chung'
}}
/
>
/
>
<
Tab
.
Screen
<
Tab
.
Screen
name
=
"Profile"
name
=
"Profile"
component
=
{
props
.
user
.
status
==
2
?
Profile
:
ProfileView
}
component
=
{
props
.
user
.
status
==
3
?
Profile
:
ProfileView
}
options
=
{{
tabBarLabel
:
'Hồ sơ'
}}
options
=
{{
tabBarLabel
:
'Hồ sơ'
}}
/
>
/
>
<
/Tab.Navigator
>
<
/Tab.Navigator
>
...
...
src/Screens/AccountVerification/Tab/Profile.js
View file @
997d0fe8
...
@@ -95,7 +95,6 @@ const Profile = (props) => {
...
@@ -95,7 +95,6 @@ const Profile = (props) => {
];
];
const
index
=
checkFormatArray
([
type
,
urlFont
,
urlBack
,
urlSign
]);
const
index
=
checkFormatArray
([
type
,
urlFont
,
urlBack
,
urlSign
]);
if
(
index
===
true
)
{
if
(
index
===
true
)
{
console
.
log
(
'Data date'
,
props
.
route
.
params
);
const
data
=
createFormData
(
urlFont
,
urlBack
,
urlSign
,
{
const
data
=
createFormData
(
urlFont
,
urlBack
,
urlSign
,
{
card_type
:
type
.
value
,
card_type
:
type
.
value
,
uid
:
props
.
user
.
uid
,
uid
:
props
.
user
.
uid
,
...
...
src/Screens/Action/Wallet/WalletWithdraw.js
View file @
997d0fe8
...
@@ -39,7 +39,7 @@ const WalletDeposit = (props) => {
...
@@ -39,7 +39,7 @@ const WalletDeposit = (props) => {
const
[
type
,
setType
]
=
useState
();
const
[
type
,
setType
]
=
useState
();
return
(
return
(
<
View
style
=
{{
flex
:
1
}}
>
<
View
style
=
{{
flex
:
1
}}
>
<
HeaderBack
title
=
{
'
Nạp tiền đầu tư
'
}
/
>
<
HeaderBack
title
=
{
'
Rút tiền
'
}
/
>
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
wrapTop
}
>
<
View
style
=
{
styles
.
wrapTop
}
>
<
View
style
=
{
styles
.
itemTop
}
>
<
View
style
=
{
styles
.
itemTop
}
>
...
...
src/Screens/Menu/Profile/Tab/GeneralInfor.js
View file @
997d0fe8
...
@@ -53,16 +53,19 @@ const GeneralInfor = (props) => {
...
@@ -53,16 +53,19 @@ const GeneralInfor = (props) => {
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
container
}
>
<
TextField
<
TextField
value
=
{
props
.
user
.
fullname
}
value
=
{
props
.
user
.
fullname
}
editable
=
{
false
}
title
=
{
'Họ và tên'
}
title
=
{
'Họ và tên'
}
onChangeText
=
{(
val
)
=>
console
.
log
(
val
)}
onChangeText
=
{(
val
)
=>
console
.
log
(
val
)}
/
>
/
>
<
TextField
<
TextField
title
=
{
'Điện thoại'
}
title
=
{
'Điện thoại'
}
editable
=
{
false
}
value
=
{
props
.
user
.
phone
}
value
=
{
props
.
user
.
phone
}
onChangeText
=
{(
val
)
=>
console
.
log
(
val
)}
onChangeText
=
{(
val
)
=>
console
.
log
(
val
)}
/
>
/
>
<
TextField
<
TextField
editable
=
{
false
}
title
=
{
'Email'
}
title
=
{
'Email'
}
value
=
{
props
.
user
.
email
}
value
=
{
props
.
user
.
email
}
onChangeText
=
{(
val
)
=>
console
.
log
(
val
)}
onChangeText
=
{(
val
)
=>
console
.
log
(
val
)}
...
@@ -93,23 +96,25 @@ const GeneralInfor = (props) => {
...
@@ -93,23 +96,25 @@ const GeneralInfor = (props) => {
<
/View
>
<
/View
>
<
PickerDate
<
PickerDate
value
=
{
converStringToDate
(
props
.
user
.
birthday
)}
value
String
=
{
converStringToDate
(
props
.
user
.
birthday
)}
title
=
{
'Ngày sinh'
}
title
=
{
'Ngày sinh'
}
disabled
=
{
true
}
/
>
/
>
<
TextMulti
<
TextMulti
onChangeText
=
{(
val
)
=>
consoele
.
log
(
val
)}
onChangeText
=
{(
val
)
=>
consoele
.
log
(
val
)}
value
=
{
props
.
user
.
address
}
value
=
{
props
.
user
.
address
}
editable
=
{
false
}
title
=
{
'Địa chỉ'
}
title
=
{
'Địa chỉ'
}
/
>
/
>
<
View
style
=
{{
height
:
40
}}
/
>
<
View
style
=
{{
height
:
40
}}
/
>
<
View
style
=
{{
justifyContent
:
'center'
,
alignItems
:
'center'
}}
>
<
View
style
=
{{
justifyContent
:
'center'
,
alignItems
:
'center'
}}
>
<
TouchableOpacity
{
/*
<TouchableOpacity
onPress={() => console.log('Hello')}
onPress={() => console.log('Hello')}
style={styles.btn}>
style={styles.btn}>
<Text style={styles.txtBtn}>Cập nhật</Text>
<Text style={styles.txtBtn}>Cập nhật</Text>
<
/TouchableOpacity
>
</TouchableOpacity>
*/
}
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/ScrollView
>
<
/ScrollView
>
...
...
src/Screens/NewFeed/Calendar/Calendar.js
0 → 100644
View file @
997d0fe8
import
React
,
{
Component
,
useState
,
useEffect
}
from
'react'
;
import
{
View
,
Text
,
Platform
,
FlatList
}
from
'react-native'
;
import
{
getListCalendar
}
from
'../../../apis/Functions/NewFeed'
;
import
{
convertTimeApi
}
from
'../../../Config/Functions'
;
import
Item
from
'./item'
;
const
NewFeed
=
(
props
)
=>
{
const
[
data
,
setData
]
=
useState
([]);
useEffect
(()
=>
{
getData
();
},
[]);
const
getData
=
async
()
=>
{
var
date
=
new
Date
(),
y
=
date
.
getFullYear
(),
m
=
date
.
getMonth
();
var
firstDay
=
new
Date
(
y
,
m
,
1
);
var
lastDay
=
new
Date
(
y
,
m
+
1
,
0
);
const
res
=
await
getListCalendar
({
platform
:
Platform
.
OS
,
start_date
:
convertTimeApi
(
firstDay
),
end_date
:
convertTimeApi
(
lastDay
),
keyword
:
''
,
});
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
setData
(
res
.
data
.
data
);
}
else
{
Alert
.
alert
(
'Thông báo'
,
'Không lấy được dữ liệu!'
);
}
};
return
(
<
View
style
=
{{
flex
:
1
,
backgroundColor
:
'white'
,
paddingLeft
:
10
,
paddingRight
:
20
,
paddingTop
:
10
,
}}
>
<
FlatList
data
=
{
data
}
showsVerticalScrollIndicator
=
{
false
}
keyExtractor
=
{(
item
)
=>
item
.
id
}
renderItem
=
{({
item
,
index
})
=>
<
Item
item
=
{
item
}
index
=
{
index
}
/>
}
/>
<
/View
>
);
};
export
default
NewFeed
;
src/Screens/NewFeed/
Tab2
/item.js
→
src/Screens/NewFeed/
Calendar
/item.js
View file @
997d0fe8
...
@@ -3,8 +3,9 @@ import {View, Text, StyleSheet, TouchableOpacity} from 'react-native';
...
@@ -3,8 +3,9 @@ import {View, Text, StyleSheet, TouchableOpacity} from 'react-native';
import
R
from
'../../../assets/R'
;
import
R
from
'../../../assets/R'
;
import
Block
from
'../../../components/Block'
;
import
Block
from
'../../../components/Block'
;
import
{
getFontXD
}
from
'../../../Config/Functions'
;
import
{
getFontXD
}
from
'../../../Config/Functions'
;
import
{
convertDate
}
from
'../../../Config/Functions'
;
const
Item
=
(
props
)
=>
{
const
Item
=
(
props
)
=>
{
const
{
title
,
date
,
time
}
=
props
.
item
;
const
{
title
,
date
,
time
,
start_date
}
=
props
.
item
;
return
(
return
(
<
TouchableOpacity
<
TouchableOpacity
onPress
=
{()
=>
console
.
log
(
'hello'
)}
onPress
=
{()
=>
console
.
log
(
'hello'
)}
...
@@ -14,8 +15,8 @@ const Item = (props) => {
...
@@ -14,8 +15,8 @@ const Item = (props) => {
<
/View
>
<
/View
>
<
View
style
=
{[
styles
.
right
,
props
.
index
==
0
?
{
borderTopWidth
:
0
}
:
{}]}
>
<
View
style
=
{[
styles
.
right
,
props
.
index
==
0
?
{
borderTopWidth
:
0
}
:
{}]}
>
<
View
style
=
{
styles
.
row
}
>
<
View
style
=
{
styles
.
row
}
>
<
Text
style
=
{
styles
.
txtTime
}
>
{
time
}
<
/Text
>
<
Text
style
=
{
styles
.
txtTime
}
>
{
convertDate
(
start_date
)
}
<
/Text
>
<
Text
style
=
{
styles
.
txtDate
}
>
{
date
}
<
/Text
>
<
Text
style
=
{
styles
.
txtDate
}
>
{
start_date
.
substring
(
10
,
16
)
}
<
/Text
>
<
/View
>
<
/View
>
<
Text
style
=
{
styles
.
txtTitle
}
>
<
Text
style
=
{
styles
.
txtTitle
}
>
{
title
}
+
{
props
.
index
}
{
title
}
+
{
props
.
index
}
...
...
src/Screens/NewFeed/NewFeed.js
View file @
997d0fe8
...
@@ -5,6 +5,7 @@ import Tab1 from './Tab1/Tab1';
...
@@ -5,6 +5,7 @@ import Tab1 from './Tab1/Tab1';
import
Tab2
from
'./Tab2/Tab2'
;
import
Tab2
from
'./Tab2/Tab2'
;
import
Media
from
'./Media/Media'
;
import
Media
from
'./Media/Media'
;
import
Trading
from
'./Tradding/Tradding'
;
import
Trading
from
'./Tradding/Tradding'
;
import
Calendar
from
'./Calendar/Calendar'
;
import
{
createMaterialTopTabNavigator
}
from
'@react-navigation/material-top-tabs'
;
import
{
createMaterialTopTabNavigator
}
from
'@react-navigation/material-top-tabs'
;
const
Tab
=
createMaterialTopTabNavigator
();
const
Tab
=
createMaterialTopTabNavigator
();
...
@@ -15,18 +16,21 @@ const NewFeed = (props) => {
...
@@ -15,18 +16,21 @@ const NewFeed = (props) => {
<
View
style
=
{{
flex
:
1
}}
>
<
View
style
=
{{
flex
:
1
}}
>
<
HeaderDrawer
title
=
{
'Tin tức'
}
isWhite
=
{
true
}
/
>
<
HeaderDrawer
title
=
{
'Tin tức'
}
isWhite
=
{
true
}
/
>
<
View
style
=
{{
flex
:
1
,
backgroundColor
:
'white'
}}
>
<
View
style
=
{{
flex
:
1
,
backgroundColor
:
'white'
}}
>
{
/* <Tab1 /> */
}
<
Tab
.
Navigator
<
Tab
.
Navigator
initialRouteName
=
"GeneralInfor"
initialRouteName
=
"GeneralInfor"
swipeEnabled
=
{
true
}
tabBarOptions
=
{{
tabBarOptions
=
{{
scrollEnabled
:
true
,
inactiveTintColor
:
'#929292'
,
inactiveTintColor
:
'#929292'
,
activeTintColor
:
'#1473E6'
,
activeTintColor
:
'#1473E6'
,
labelStyle
:
{
fontSize
:
getFontXD
(
36
),
fontWeight
:
'700'
},
labelStyle
:
{
fontSize
:
getFontXD
(
36
),
fontWeight
:
'700'
},
style
:
{
backgroundColor
:
'white'
},
style
:
{
backgroundColor
:
'white'
},
}}
>
}}
>
<
Tab
.
Screen
<
Tab
.
Screen
name
=
"CALENDAR"
component
=
{
Calendar
}
options
=
{{
tabBarLabel
:
'Lịch thị trường'
}}
/
>
<
Tab
.
Screen
name
=
"Tab1"
name
=
"Tab1"
component
=
{
Tab1
}
component
=
{
Tab1
}
options
=
{{
tabBarLabel
:
'Tin tức'
}}
options
=
{{
tabBarLabel
:
'Tin tức'
}}
...
...
src/Screens/NewFeed/Tab2/Tab2.js
View file @
997d0fe8
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
{
View
,
Text
,
FlatList
}
from
'react-native'
;
import
{
View
,
Text
,
FlatList
}
from
'react-native'
;
import
{
WebView
}
from
'react-native-webview'
;
import
{
WebView
}
from
'react-native-webview'
;
import
Item
from
'./item'
;
const
NewFeed
=
(
props
)
=>
{
const
NewFeed
=
(
props
)
=>
{
return
(
return
(
...
...
src/apis/Functions/NewFeed.js
View file @
997d0fe8
...
@@ -21,3 +21,8 @@ export const getDetailMedia = async (id) =>
...
@@ -21,3 +21,8 @@ export const getDetailMedia = async (id) =>
GetData
(
url
.
urlMediaDetail
+
'/'
+
id
)
GetData
(
url
.
urlMediaDetail
+
'/'
+
id
)
.
then
((
res
)
=>
res
)
.
then
((
res
)
=>
res
)
.
catch
((
err
)
=>
err
);
.
catch
((
err
)
=>
err
);
export
const
getListCalendar
=
async
(
body
)
=>
GetData
(
url
.
urlGetListCalendar
,
body
)
.
then
((
res
)
=>
res
)
.
catch
((
err
)
=>
err
);
src/apis/url.js
View file @
997d0fe8
...
@@ -13,4 +13,5 @@ export default {
...
@@ -13,4 +13,5 @@ export default {
urlGetCategoryNew
:
root
+
'api/v1/news/categories'
,
urlGetCategoryNew
:
root
+
'api/v1/news/categories'
,
urlGetListMedia
:
root
+
'api/v1/news/videos'
,
urlGetListMedia
:
root
+
'api/v1/news/videos'
,
urlMediaDetail
:
root
+
'api/v1/videos/detail'
,
urlMediaDetail
:
root
+
'api/v1/videos/detail'
,
urlGetListCalendar
:
root
+
'api/v1/news/calendar'
,
};
};
src/components/Header/HeaderHome.js
View file @
997d0fe8
...
@@ -27,6 +27,7 @@ import {
...
@@ -27,6 +27,7 @@ import {
HISTORY
,
HISTORY
,
PROFILE
,
PROFILE
,
AccountVerification
,
AccountVerification
,
WALLETWITHDRAW
,
}
from
'../../routers/ScreenNames'
;
}
from
'../../routers/ScreenNames'
;
const
renderWallet
=
(
status
)
=>
{
const
renderWallet
=
(
status
)
=>
{
...
@@ -161,7 +162,7 @@ const HeaderHome = (props) => {
...
@@ -161,7 +162,7 @@ const HeaderHome = (props) => {
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
TouchableOpacity
<
TouchableOpacity
onPress
=
{()
=>
navigate
.
navigate
(
WITHDRAW
)}
onPress
=
{()
=>
navigate
.
navigate
(
W
ALLETW
ITHDRAW
)}
style
=
{
styles
.
wraper
}
>
style
=
{
styles
.
wraper
}
>
<
Image
style
=
{
styles
.
imgIcon
}
source
=
{
R
.
images
.
iconWithdrawal
}
/
>
<
Image
style
=
{
styles
.
imgIcon
}
source
=
{
R
.
images
.
iconWithdrawal
}
/
>
<
Text
style
=
{
styles
.
txt
}
>
R
ú
t
ti
ề
n
<
/Text
>
<
Text
style
=
{
styles
.
txt
}
>
R
ú
t
ti
ề
n
<
/Text
>
...
...
src/routers/PlussModal.js
View file @
997d0fe8
...
@@ -20,6 +20,7 @@ import {
...
@@ -20,6 +20,7 @@ import {
TRANSFER
,
TRANSFER
,
CHOOSEMETHOD
,
CHOOSEMETHOD
,
WALLET
,
WALLET
,
WALLETWITHDRAW
,
}
from
'../routers/ScreenNames'
;
}
from
'../routers/ScreenNames'
;
const
PlussModal
=
(
props
)
=>
{
const
PlussModal
=
(
props
)
=>
{
...
@@ -63,10 +64,9 @@ const PlussModal = (props) => {
...
@@ -63,10 +64,9 @@ const PlussModal = (props) => {
<
Image
style
=
{
styles
.
imgIcon
}
source
=
{
R
.
images
.
iconRecharge
}
/
>
<
Image
style
=
{
styles
.
imgIcon
}
source
=
{
R
.
images
.
iconRecharge
}
/
>
<
Text
style
=
{
styles
.
txt
}
>
N
ạ
p
ti
ề
n
<
/Text
>
<
Text
style
=
{
styles
.
txt
}
>
N
ạ
p
ti
ề
n
<
/Text
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
TouchableOpacity
<
TouchableOpacity
onPress
=
{()
=>
{
onPress
=
{()
=>
{
navigate
.
navigate
(
WITHDRAW
);
navigate
.
navigate
(
W
ALLETW
ITHDRAW
);
toggleModal
();
toggleModal
();
}}
}}
style
=
{
styles
.
wraper1
}
>
style
=
{
styles
.
wraper1
}
>
...
...
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