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
Plain Diff
Browse Files
Authored by
于良
8 years ago
Commit
b46a228ea166dd1740a9ad4d98c61d1b0746ecf7
2 parents
141de5f6
03b9101e
Merge branch '5.4' of
http://git.yoho.cn/mobile/YH_RNComponent
into 5.4
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
24 deletions
js/guang/components/detail/Detail.js
js/message/components/list/MessageList.js
js/plustar/components/detail/BrandArticleList.js
js/plustar/containers/DetailContainer.js
js/plustar/reducers/detail/detailActions.js
js/plustar/services/DetailService.js
js/guang/components/detail/Detail.js
View file @
b46a228
...
...
@@ -175,7 +175,8 @@ let {width, height} = Dimensions.get('window');
let
styles
=
StyleSheet
.
create
({
container
:
{
flex
:
1
,
width
:
width
,
height
:
height
,
},
contentContainer
:{
backgroundColor
:
'white'
,
...
...
js/message/components/list/MessageList.js
View file @
b46a228
...
...
@@ -194,6 +194,8 @@ export default class MessageList extends Component {
let
{
isFetching
,
endReached
,
list
,
listId
,
shouldShowEmpty
}
=
this
.
props
.
data
;
let
isLoadingMore
=
list
.
size
!=
0
&&
isFetching
;
let
isShowLoading
=
list
.
size
==
0
&&
isFetching
;
if
(
shouldShowEmpty
)
{
return
(
<
View
style
=
{
styles
.
container
}
>
...
...
@@ -234,7 +236,7 @@ export default class MessageList extends Component {
}}
/
>
<
LoadingIndicator
isVisible
=
{
is
Fetch
ing
}
isVisible
=
{
is
ShowLoad
ing
}
/
>
<
/View
>
);
...
...
js/plustar/components/detail/BrandArticleList.js
View file @
b46a228
...
...
@@ -36,7 +36,9 @@ export default class BrandArticleList extends Component {
_renderHeader
(){
return
(
<
View
style
=
{
styles
.
headerContainer
}
>
<
Text
style
=
{
styles
.
headerText
}
>
相关资讯
<
/Text
>
<
View
style
=
{
styles
.
headerContainerWithoutBorder
}
>
<
Text
style
=
{
styles
.
headerText
}
>
相关资讯
<
/Text
>
<
/View
>
<
/View
>
);
}
...
...
@@ -51,7 +53,7 @@ export default class BrandArticleList extends Component {
onPressArticle
=
{
this
.
props
.
onPressArticle
}
onPressArticleLike
=
{
this
.
props
.
onPressArticleLike
}
/
>
);
}
...
...
@@ -114,13 +116,17 @@ let styles = StyleSheet.create({
height
:
36
*
DEVICE_WIDTH_RATIO
,
marginLeft
:
30
*
DEVICE_WIDTH_RATIO
,
marginRight
:
30
*
DEVICE_WIDTH_RATIO
,
borderColor
:
'#e0e0e0'
,
backgroundColor
:
"#e0e0e0"
,
},
headerContainerWithoutBorder
:
{
marginTop
:
0.5
*
DEVICE_WIDTH_RATIO
,
height
:
35.5
*
DEVICE_WIDTH_RATIO
,
marginLeft
:
0.5
*
DEVICE_WIDTH_RATIO
,
marginRight
:
0.5
*
DEVICE_WIDTH_RATIO
,
flex
:
1
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
borderColor
:
'#e0e0e0'
,
borderTopWidth
:
0.5
,
borderLeftWidth
:
0.5
,
borderRightWidth
:
0.5
,
borderBottomWidth
:
0
,
backgroundColor
:
"#ffffff"
,
},
headerText
:{
...
...
js/plustar/containers/DetailContainer.js
View file @
b46a228
...
...
@@ -44,7 +44,6 @@ function mapDispatchToProps(dispatch) {
class
DetailContainer
extends
Component
{
componentDidMount
()
{
this
.
props
.
actions
.
uidBrandFav
();
this
.
props
.
actions
.
brandInfo
();
}
...
...
js/plustar/reducers/detail/detailActions.js
View file @
b46a228
...
...
@@ -115,7 +115,8 @@ export function brandInfo(reload = false) {
dispatch
(
brandInfoSuccess
(
json
));
dispatch
(
setBrandId
(
json
.
brand_id
));
dispatch
(
newArrive
());
dispatch
(
articleByBrand
());
dispatch
(
uidBrandFav
(
json
.
brand_id
))
dispatch
(
articleByBrand
(
json
.
brand_id
));
let
isDifferent
=
json
.
is_different
;
let
url
=
'?openby:yohobuy={"action":"go.brand","params":{"brand_id":"'
+
json
.
brand_id
+
'","is_different":"'
+
isDifferent
+
'"}}'
;
dispatch
(
setMoreProductUrl
(
url
));
...
...
@@ -187,14 +188,9 @@ export function uidBrandFavFailure(){
};
}
export
function
uidBrandFav
(){
export
function
uidBrandFav
(
brandId
){
return
(
dispatch
,
getState
)
=>
{
let
{
app
,
detail
}
=
getState
();
let
{
brandId
}
=
detail
;
if
(
!
brandId
)
{
return
;
}
let
fetchUidBrandFav
=
(
brandId
,
uid
)
=>
{
dispatch
(
uidBrandFavRequest
());
return
new
DetailService
(
app
.
servicehost
).
getUidBrandFav
(
brandId
,
uid
)
...
...
@@ -272,14 +268,9 @@ export function articleByBrandFailure(){
type
:
ARTICLE_BY_BRAND_FAILURE
,
};
}
export
function
articleByBrand
(){
export
function
articleByBrand
(
brandId
){
return
(
dispatch
,
getState
)
=>
{
let
{
detail
,
app
}
=
getState
();
let
{
brandId
}
=
detail
;
if
(
!
brandId
)
{
return
;
}
let
fetchUidBrandFav
=
(
brandId
,
uid
)
=>
{
dispatch
(
articleByBrandRequest
());
return
new
DetailService
(
app
.
servicehost
).
getArticleByBrand
(
brandId
,
uid
)
...
...
js/plustar/services/DetailService.js
View file @
b46a228
...
...
@@ -104,7 +104,7 @@ export default class DetailService {
url
:
''
,
body
:
{
method
:
'app.favorite.cancel'
,
id
,
fav_id
:
id
,
uid
,
type
,
}
...
...
Please
register
or
login
to post a comment