Toggle navigation
Toggle navigation
This project
Loading...
Sign in
mobile
/
YH_RNComponent
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
张文文
6 years ago
Commit
88516650b4636f1f0421019964bf5931396acb5b
1 parent
c4445954
我的页面添加粉丝数和邀请好友数
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
44 deletions
js/alliance/components/Data.js
js/alliance/components/Mine.js
js/alliance/containers/DataContainer.js
js/alliance/containers/MineContainer.js
js/alliance/components/Data.js
View file @
8851665
...
...
@@ -52,16 +52,8 @@ export default class Data extends Component {
let
settlementAmount
=
this
.
props
.
settlementInfo
.
settlementInfoData
.
settlementAmount
;
settlementAmount
=
settlementAmount
?
settlementAmount
:
'0'
;
//当前粉丝数空值判断
let
fansAmount
=
this
.
props
.
shareTotalInfo
.
shareTotalInfoData
.
fans
;
fansAmount
=
fansAmount
?
fansAmount
:
'0'
;
//邀请好友数空值判断
let
invitesAmount
=
this
.
props
.
shareTotalInfo
.
shareTotalInfoData
.
inviteNum
;
invitesAmount
=
invitesAmount
?
invitesAmount
:
'0'
;
return
(
<
ScrollView
style
=
{
styles
.
container
}
scrollEnabled
=
{
true
}
>
<
ScrollView
style
=
{
styles
.
container
}
scrollEnabled
=
{
scrollEnabled
}
>
<
TipsAlert
tips
=
{
this
.
props
.
tips
}
isShow
=
{
isShowTipsAlert
}
...
...
@@ -146,19 +138,6 @@ export default class Data extends Component {
<
/ScrollableTabView
>
<
View
style
=
{{
height
:
10
,
backgroundColor
:
'#f0f0f0'
}}
/
>
<
View
style
=
{
styles
.
statisticsView
}
>
<
View
style
=
{
styles
.
attentionView
}
>
<
Text
style
=
{[
styles
.
hasWithDrawText
,{
marginLeft
:
10
}]}
>
当前粉丝数
<
/Text
>
<
Text
style
=
{[
styles
.
hasWithDrawText
,
{
marginRight
:
10
}]}
>
{
fansAmount
}
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
spaceView
}
/
>
<
TouchableOpacity
activeOpacity
=
{
1
}
style
=
{
styles
.
attentionView
}
onPress
=
{()
=>
{
this
.
props
.
jumpWithUrl
&&
this
.
props
.
jumpWithUrl
(
'邀请好友'
,
'invitedFriends'
);
}}
>
<
Text
style
=
{[
styles
.
hasWithDrawText
],{
marginLeft
:
10
}}
>
邀请好友数
<
/Text
>
<
Text
style
=
{[
styles
.
hasWithDrawText
],{
marginRight
:
10
}}
>
{
invitesAmount
}
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
/ScrollView
>
);
}
...
...
@@ -270,26 +249,6 @@ let styles = StyleSheet.create({
width
:
width
,
height
:
0.5
,
backgroundColor
:
'#e0e0e0'
},
statisticsView
:
{
width
:
width
,
height
:
50
,
backgroundColor
:
'white'
,
flexDirection
:
'row'
,
alignItems
:
'center'
,
},
attentionView
:
{
width
:
width
/
2
,
height
:
50
,
backgroundColor
:
'white'
,
flexDirection
:
'row'
,
alignItems
:
'center'
,
justifyContent
:
'space-between'
},
spaceView
:
{
width
:
0.5
,
height
:
50
,
backgroundColor
:
'#e0e0e0'
},
}
})
;
...
...
js/alliance/components/Mine.js
View file @
8851665
...
...
@@ -38,6 +38,18 @@ export default class Mine extends Component {
let
ico
=
this
.
props
.
profile
.
head_ico
;
let
imageUrl
=
YH_Image
.
getSlicedUrl
(
ico
,
50
,
50
,
2
);
let
nickname
=
this
.
props
.
profile
.
nickname
;
//当前粉丝数空值判断
let
fansAmount
=
this
.
props
.
shareTotalInfo
.
shareTotalInfoData
.
fans
;
fansAmount
=
fansAmount
?
fansAmount
:
'0'
;
let
fansShow
=
this
.
props
.
shareTotalInfo
.
shareTotalInfoData
.
showFans
;
let
fansShowStyle
=
fansShow
?
{
height
:
50
}
:
{
height
:
0
};
//邀请好友数空值判断
let
invitesAmount
=
this
.
props
.
shareTotalInfo
.
shareTotalInfoData
.
inviteNum
;
invitesAmount
=
invitesAmount
?
invitesAmount
:
'0'
;
return
(
<
View
>
<
View
style
=
{
styles
.
headerBackground
}
>
...
...
@@ -57,6 +69,27 @@ export default class Mine extends Component {
<
/View
>
<
/TouchableOpacity
>
<
View
style
=
{{
height
:
10
,
backgroundColor
:
'#f0f0f0'
}}
/
>
<
TouchableOpacity
activeOpacity
=
{
1
}
style
=
{
styles
.
withdrawView
}
onPress
=
{()
=>
{
this
.
props
.
jumpWithUrl
&&
this
.
props
.
jumpWithUrl
(
'邀请好友'
,
'invitedFriends'
);
}}
>
<
Text
style
=
{
styles
.
hasWithDrawText
}
>
邀请好友数
<
/Text
>
<
View
style
=
{[
styles
.
textView
,
{
flexDirection
:
'row'
,
paddingRight
:
15
}]}
>
<
Text
style
=
{[
styles
.
hasWithDrawText
]}
>
{
invitesAmount
}
<
/Text
>
<
Image
style
=
{
styles
.
arrowImage
}
source
=
{
require
(
'../images/arrow.png'
)}
/
>
<
/View
>
<
/TouchableOpacity
>
<
TouchableOpacity
activeOpacity
=
{
1
}
style
=
{
styles
.
withdrawView
,
fansShowStyle
}
onPress
=
{()
=>
{
}}
>
<
Text
style
=
{
styles
.
hasWithDrawText
}
>
当前粉丝数
<
/Text
>
<
View
style
=
{[
styles
.
textView
,
{
flexDirection
:
'row'
,
paddingRight
:
15
}]}
>
<
Text
style
=
{[
styles
.
hasWithDrawText
]}
>
{
fansAmount
}
<
/Text
>
<
Image
style
=
{
styles
.
arrowImage
}
source
=
{
require
(
'../images/arrow.png'
)}
/
>
<
/View
>
<
/TouchableOpacity
>
<
View
style
=
{{
height
:
10
,
backgroundColor
:
'#f0f0f0'
}}
/
>
<
/View
>
);
}
...
...
js/alliance/containers/DataContainer.js
View file @
8851665
...
...
@@ -60,7 +60,6 @@ class DataContainer extends Component {
componentDidMount
()
{
this
.
props
.
actions
.
getSettlementInfo
();
this
.
props
.
actions
.
getStatisticsInfo
(
1
);
this
.
props
.
actions
.
getShareTotalInfo
();
}
componentWillUnmount
()
{
...
...
js/alliance/containers/MineContainer.js
View file @
8851665
...
...
@@ -45,6 +45,7 @@ class MineContainer extends Component {
this
.
props
.
actions
.
getMineUserInfo
();
this
.
props
.
actions
.
getSettlementInfo
();
this
.
props
.
actions
.
getMineResourceInfo
();
this
.
props
.
actions
.
getShareTotalInfo
();
}
componentWillUnmount
()
{
...
...
@@ -73,6 +74,7 @@ class MineContainer extends Component {
profile
,
settlementInfo
,
mineResourceInfo
,
shareTotalInfo
,
}
=
this
.
props
.
alliance
;
let
isFetching
=
settlementInfo
.
isFetching
;
return
(
...
...
@@ -81,6 +83,7 @@ class MineContainer extends Component {
profile
=
{
profile
}
settlementInfo
=
{
settlementInfo
}
mineResourceInfo
=
{
mineResourceInfo
}
shareTotalInfo
=
{
shareTotalInfo
}
jumpWithUrl
=
{
this
.
_jumpWithUrl
}
resourceJumpWithUrl
=
{
this
.
_resourceJumpWithUrl
}
refreshSettlementInfo
=
{
this
.
_refreshSettlementInfo
}
...
...
Please
register
or
login
to post a comment