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
张丽霞
8 years ago
Commit
079a9b52757864cc7c2747c3da430307510de067
1 parent
2a468889
店铺模块化埋点,review by 孙凯
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
20 deletions
js/brandStore/components/brandStore/brandStoreSubView/Cells/BrandProductFilter.js
js/brandStore/components/brandStore/brandStoreSubView/Cells/BrandProductMoreFilter.js
js/redPersonBrand/components/redBrand/RedBrand.js
js/redPersonBrand/containers/RedPersonBrandContainer.js
js/redPersonBrand/reducers/redBrand/redBrandActions.js
js/redPersonBrand/reducers/redBrand/redBrandInitialState.js
js/brandStore/components/brandStore/brandStoreSubView/Cells/BrandProductFilter.js
View file @
079a9b5
...
...
@@ -160,7 +160,7 @@ export default class BrandProductFilter extends React.Component {
});
let
value
=
filter
.
isAsc
?
filter
.
value
[
'asc'
]
:
filter
.
value
[
'desc'
];
this
.
props
.
onPressFilter
&&
this
.
props
.
onPressFilter
(
value
,
filter
.
name
);
this
.
props
.
onPressFilter
&&
this
.
props
.
onPressFilter
(
value
);
}}
>
<
View
key
=
{
'row'
+
rowID
}
style
=
{
styles
.
rowContainer
}
>
<
Text
style
=
{[
styles
.
name
,
colorStyle
]}
>
{
rowData
.
name
}
<
/Text
>
...
...
js/brandStore/components/brandStore/brandStoreSubView/Cells/BrandProductMoreFilter.js
View file @
079a9b5
...
...
@@ -80,7 +80,7 @@ export default class BrandProductMoreFilter extends React.Component {
render
()
{
let
{
style
}
=
this
.
props
;
return
(
<
View
style
=
{[
styles
.
container
,
style
]}
>
<
View
style
=
{
styles
.
line
}
/
>
...
...
js/redPersonBrand/components/redBrand/RedBrand.js
View file @
079a9b5
...
...
@@ -62,9 +62,9 @@ export default class RedBrand extends Component {
this
.
props
.
onPressLaunchProfile
&&
this
.
props
.
onPressLaunchProfile
(
value
);
}
_onPressProductFilter
(
value
,
name
){
_onPressProductFilter
(
value
){
this
.
refs
.
redBrandList
&&
this
.
refs
.
redBrandList
.
scrollTo
({
x
:
0
,
y
:
yPosition
,
animated
:
false
});
this
.
props
.
onPressProductFilter
&&
this
.
props
.
onPressProductFilter
(
value
,
name
);
this
.
props
.
onPressProductFilter
&&
this
.
props
.
onPressProductFilter
(
value
);
}
_onPressFilter
(
value
){
...
...
js/redPersonBrand/containers/RedPersonBrandContainer.js
View file @
079a9b5
...
...
@@ -37,6 +37,24 @@ function mapDispatchToProps(dispatch) {
};
}
function
orderWithString
(
str
)
{
if
(
str
.
indexOf
(
's_w'
)
>=
0
)
{
return
0
;
}
if
(
str
.
indexOf
(
's_t'
)
>=
0
)
{
return
2
;
}
if
(
str
.
indexOf
(
's_p'
)
>=
0
)
{
return
3
;
}
if
(
str
.
indexOf
(
'p_d'
)
>=
0
)
{
return
4
;
}
return
0
;
}
class
RedPersonBrandContainer
extends
Component
{
constructor
(
props
)
{
super
(
props
);
...
...
@@ -188,15 +206,6 @@ class RedPersonBrandContainer extends Component {
}
else
if
(
tabID
==
'2'
)
{
tabName
=
'全部商品'
;
}
let
orderName
=
this
.
props
.
redBrand
.
productList
.
orderName
;
let
sortType
=
0
;
if
(
orderName
==
'最新'
)
{
sortType
=
1
;
}
else
if
(
orderName
==
'价格'
)
{
sortType
=
2
;
}
else
if
(
orderName
==
'折扣'
)
{
sortType
=
3
;
}
let
param
=
{
SHOP_ID
:
this
.
props
.
redBrand
.
shopId
,
TAB_ID
:
tabID
,
...
...
@@ -208,11 +217,11 @@ class RedPersonBrandContainer extends Component {
}
if
(
tabID
!=
'1'
)
{
param
.
FILTER_VALUE
=
this
.
props
.
redBrand
.
filterNameFactors
.
toJS
();
param
.
SORT_TYPE
=
sortType
;
param
.
SORT_TYPE
=
orderWithString
(
this
.
props
.
redBrand
.
productList
.
order
)
;
}
console
.
log
(
'------点击品牌店铺页中全部TAB中的商品列表时---red---'
);
console
.
log
(
param
);
ReactNative
.
NativeModules
.
YH_CommonHelper
.
logEvent
(
'YB_BRAND_SHOP_
HOME_FLR
_C'
,
param
);
ReactNative
.
NativeModules
.
YH_CommonHelper
.
logEvent
(
'YB_BRAND_SHOP_
GOODS_LIST
_C'
,
param
);
}
_onPressProduct
(
linkType
,
linkReource
,
moduleOrder
,
moduleType
,
i_index
){
...
...
@@ -243,7 +252,7 @@ class RedPersonBrandContainer extends Component {
ReactNative
.
NativeModules
.
YH_CommonHelper
.
logEvent
(
'YB_BRAND_SHOP_HOME_FLR_C'
,
param
);
}
_onPressProductFilter
(
value
,
name
)
{
_onPressProductFilter
(
value
)
{
if
(
value
===
'filter'
)
{
this
.
props
.
actions
.
setFilterView
(
!
this
.
props
.
redBrand
.
productList
.
isFilter
);
...
...
@@ -255,7 +264,7 @@ class RedPersonBrandContainer extends Component {
this
.
props
.
actions
.
setFilterMoreView
(
false
);
this
.
props
.
actions
.
setFilterView
(
false
);
this
.
props
.
actions
.
resetListPageInfo
();
this
.
props
.
actions
.
setProductListFilter
(
value
,
name
);
this
.
props
.
actions
.
setProductListFilter
(
value
);
this
.
props
.
actions
.
getProductList
(
true
);
}
}
...
...
js/redPersonBrand/reducers/redBrand/redBrandActions.js
View file @
079a9b5
...
...
@@ -111,10 +111,10 @@ export function setFilter(value) {
};
}
export
function
setProductListFilter
(
value
,
name
)
{
export
function
setProductListFilter
(
value
)
{
return
{
type
:
SET_PRODUCT_LIST_FILTER
,
payload
:
{
value
,
name
}
payload
:
value
}
}
...
...
js/redPersonBrand/reducers/redBrand/redBrandInitialState.js
View file @
079a9b5
...
...
@@ -43,7 +43,6 @@ let InitialState = Record({
error
:
null
,
list
:
List
(),
order
:
's_n_desc'
,
orderName
:
'默认'
,
currentPage
:
0
,
pageCount
:
0
,
pageSize
:
60
,
//60,
...
...
Please
register
or
login
to post a comment