Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
new_excelso
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Prasetya Saputra
new_excelso
Commits
3150c4e7
Commit
3150c4e7
authored
May 18, 2020
by
Wahyu Adjie Prasetyo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://repo.cs.co.id:2222/wahyu/bahanoprek
parents
6951cc5b
4d782529
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
102 additions
and
95 deletions
+102
-95
Auth.js
view/Auth.js
+1
-1
NewsDetail.js
view/NewsDetail.js
+0
-2
TopUpInfo.js
view/TopUpInfo.js
+101
-92
No files found.
view/Auth.js
View file @
3150c4e7
...
@@ -419,7 +419,7 @@ class Auth extends React.Component {
...
@@ -419,7 +419,7 @@ class Auth extends React.Component {
},
},
title
:
'REGISTER'
title
:
'REGISTER'
}}
/
>
}}
/
>
<
Stack
.
Screen
name
=
"TopUpInfo"
component
=
{
TopUpInfo
}
/
>
<
Stack
.
Screen
name
=
"TopUpInfo"
component
=
{
TopUpInfo
}
options
=
{{
headerShown
:
false
}}
/
>
<
Stack
.
Screen
name
=
"Reward Detail"
component
=
{
RewardDetail
}
/
>
<
Stack
.
Screen
name
=
"Reward Detail"
component
=
{
RewardDetail
}
/
>
<
Stack
.
Screen
name
=
"Reward Select"
component
=
{
RewardSelect
}
<
Stack
.
Screen
name
=
"Reward Select"
component
=
{
RewardSelect
}
options
=
{{
options
=
{{
...
...
view/NewsDetail.js
View file @
3150c4e7
...
@@ -30,7 +30,6 @@ export default class NewsDetail extends React.Component {
...
@@ -30,7 +30,6 @@ export default class NewsDetail extends React.Component {
get_news_detail
(
slug
)
{
get_news_detail
(
slug
)
{
Axios
.
get
(
'https://excelsocrm.ravintoladev.com/cms/v2/detail/'
+
slug
).
then
(
res
=>
{
Axios
.
get
(
'https://excelsocrm.ravintoladev.com/cms/v2/detail/'
+
slug
).
then
(
res
=>
{
// console.log(JSON.stringify(res.data))
const
detail
=
res
.
data
;
const
detail
=
res
.
data
;
this
.
setState
({
this
.
setState
({
title
:
detail
.
title
,
title
:
detail
.
title
,
...
@@ -43,7 +42,6 @@ export default class NewsDetail extends React.Component {
...
@@ -43,7 +42,6 @@ export default class NewsDetail extends React.Component {
}
}
render
()
{
render
()
{
console
.
log
(
'Image : '
+
this
.
state
.
image
)
return
(
return
(
<
View
style
=
{
styles
.
container
(
this
.
state
.
statusbar_height
)}
>
<
View
style
=
{
styles
.
container
(
this
.
state
.
statusbar_height
)}
>
<
View
style
=
{
styles
.
header
}
>
<
View
style
=
{
styles
.
header
}
>
...
...
view/TopUpInfo.js
View file @
3150c4e7
import
React
from
'react'
;
import
{
View
,
StyleSheet
,
Text
,
StatusBar
,
Image
,
ScrollView
,
TouchableOpacity
,
Alert
,
ImageBackground
,
}
from
'react-native'
;
import
{
CheckBox
,
Separator
,
Grid
,
Row
,
Card
,
Button
,
Icon
,
CardItem
,
Body
}
from
'native-base'
;
import
{
Collapse
,
CollapseHeader
,
CollapseBody
,
AccordionList
}
from
'accordion-collapse-react-native'
import
Axios
from
'axios'
;
import
Axios
from
'axios'
;
import
React
from
'react'
;
import
{
ScrollView
,
StyleSheet
,
Text
,
View
,
Image
}
from
'react-native'
;
import
{
TouchableOpacity
}
from
'react-native-gesture-handler'
;
import
HTML
from
'react-native-render-html'
;
import
HTML
from
'react-native-render-html'
;
import
{
getStatusBarHeight
}
from
'react-native-status-bar-height'
;
export
default
class
TopUpInfo
extends
React
.
Component
{
export
default
class
TopUpInfo
extends
React
.
Component
{
constructor
(
props
){
constructor
(
props
)
{
super
(
props
);
super
(
props
);
this
.
state
=
{
this
.
state
=
{
content
:
""
topup_info
:
[],
statusbar_height
:
50
}
}
}
}
componentDidMount
(){
componentDidMount
()
{
Axios
.
get
(
'https://excelsocrm.ravintoladev.com/cms/v2/detail/topup-info'
).
then
(
res
=>
{
const
statusBarHeight
=
getStatusBarHeight
();
this
.
setState
({
let
data
=
res
.
data
statusbar_height
:
statusBarHeight
let
contents
=
data
.
content
})
Axios
.
get
(
'https://excelsocrm.ravintoladev.com/cms/v2/list/topup-info'
).
then
(
res
=>
{
let
data
=
res
.
data
;
this
.
setState
({
this
.
setState
({
topup_info
:
data
.
contents
content
:
contents
})
})
}).
catch
(
error
=>
{
let
response
=
error
.
response
.
data
;
// console.log(response.msg)
Alert
.
alert
(
response
.
msg
);
})
})
}
}
render
()
{
render
()
{
const
htmlContent
=
this
.
state
.
content
;
return
(
return
(
<
ScrollView
style
=
{{
backgroundColor
:
'white'
}}
>
<
View
style
=
{
styles
.
container
(
this
.
state
.
statusbar_height
)}
>
<
View
style
=
{{
flex
:
1
}}
>
<
View
style
=
{
styles
.
header
}
>
<
Text
style
=
{
styles
.
headerTitle
}
>
TOPUP
INFO
<
/Text
>
<
Collapse
>
<
/View
>
<
CollapseHeader
>
<
ScrollView
>
<
Separator
bordered
style
=
{{
backgroundColor
:
'white'
}}
>
<
View
style
=
{
styles
.
content
}
>
<
Text
style
=
{{
fontSize
:
12
,
fontWeight
:
'bold'
}}
>
Bank
BCA
<
/Text
>
{
<
/Separator
>
this
.
state
.
topup_info
.
map
((
item
,
i
)
=>
{
<
/CollapseHeader
>
return
(
<
CollapseBody
>
<
View
style
=
{
styles
.
item_container
}
key
=
{
i
}
>
<
Card
style
=
{{
marginLeft
:
10
,
marginRight
:
10
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
height
:
24
,
marginBottom
:
16
}}
>
<
CardItem
>
<
Text
style
=
{
styles
.
item_title
}
>
{
item
.
title
}
<
/Text
>
<
Body
style
=
{{
marginLeft
:
5
}}
>
<
Image
style
=
{
styles
.
item_image
}
source
=
{
item
.
title_thumb
?
{
uri
:
item
.
title_thumb
}
:
null
}
/
>
<
HTML
html
=
{
this
.
state
.
content
}
/
>
<
/View
>
<
/Body
>
<
HTML
html
=
{
item
.
content
}
tagsStyles
=
{{
p
:
{
fontFamily
:
'Gotham-Light'
,
marginTop
:
8
,
marginBottom
:
8
,
color
:
'#adadad'
},
blockquote
:
{
backgroundColor
:
"#f1f1f1"
,
padding
:
12
,
paddingBottom
:
0
,
marginTop
:
6
,
color
:
'#adadad'
},
ul
:
{
fontFamily
:
'Gotham-Light'
,
marginLeft
:
0
,
color
:
'#adadad'
,
paddingLeft
:
0
},
li
:
{
fontFamily
:
'Gotham-Light'
,
marginLeft
:
0
,
color
:
'#adadad'
,
paddingLeft
:
0
}
}}
/
>
<
/CardItem
>
<
/View
>
<
/Card
>
)
<
/CollapseBody
>
})
<
/Collapse
>
}
<
Collapse
>
<
CollapseHeader
>
<
Separator
bordered
style
=
{{
backgroundColor
:
'white'
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontWeight
:
'bold'
}}
>
Bank
BNI
<
/Text
>
<
/Separator
>
<
/CollapseHeader
>
<
CollapseBody
>
<
Card
style
=
{{
marginLeft
:
10
,
marginRight
:
10
}}
>
<
CardItem
>
<
Body
style
=
{{
marginLeft
:
5
}}
>
<
HTML
html
=
{
this
.
state
.
content
}
/
>
<
/Body
>
<
/CardItem
>
<
/Card
>
<
/CollapseBody
>
<
/Collapse
>
<
Collapse
>
<
CollapseHeader
>
<
Separator
bordered
style
=
{{
backgroundColor
:
'white'
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontWeight
:
'bold'
}}
>
Bank
MANDIRI
<
/Text
>
<
/Separator
>
<
/CollapseHeader
>
<
CollapseBody
>
<
Card
style
=
{{
marginLeft
:
10
,
marginRight
:
10
}}
>
<
CardItem
>
<
Body
style
=
{{
marginLeft
:
5
}}
>
<
HTML
html
=
{
this
.
state
.
content
}
/
>
<
/Body
>
<
/CardItem
>
<
/Card
>
<
/CollapseBody
>
<
/Collapse
>
<
/View
>
<
/View
>
<
/ScrollView
>
<
/
Scroll
View
>
<
/View
>
)
)
}
}
}
}
\ No newline at end of file
const
styles
=
StyleSheet
.
create
({
container
:
(
marginTop
)
=>
({
flex
:
1
,
marginTop
:
marginTop
,
backgroundColor
:
'white'
,
}),
header
:
{
height
:
60
,
paddingHorizontal
:
10
,
flexDirection
:
'row'
,
backgroundColor
:
'#CFB368'
,
alignItems
:
'center'
},
headerTitle
:
{
flex
:
1
,
textAlign
:
'center'
,
margin
:
20
,
fontSize
:
23
,
alignSelf
:
'center'
,
color
:
'white'
,
fontFamily
:
'Gotham-Black'
},
image_container
:
(
height
)
=>
({
height
:
height
,
backgroundColor
:
'gray'
}),
image
:
(
height
)
=>
({
width
:
'100%'
,
height
:
height
}),
title
:
{
textAlign
:
'center'
,
fontFamily
:
'Gotham-Black'
,
fontSize
:
22
,
marginBottom
:
10
,
color
:
'#CFB368'
},
content
:
{
paddingHorizontal
:
20
,
paddingVertical
:
25
},
item_container
:
{
borderColor
:
'gray'
,
borderWidth
:
1
,
borderRadius
:
10
,
padding
:
20
,
marginBottom
:
20
,
color
:
'#adadad'
},
item_title
:
{
fontSize
:
18
,
color
:
'#adadad'
,
fontFamily
:
'Gotham-Black'
,
flex
:
1
,
alignSelf
:
'center'
,
},
item_image
:
{
width
:
96
,
height
:
24
,
alignItems
:
'flex-end'
}
})
\ No newline at end of file
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