Authored by 盖剑秋

逛详情埋点。

... ... @@ -75,7 +75,7 @@ class BrandContainer extends Component {
}
componentWillUnmount() {
}
//原生跳转
... ...
... ... @@ -48,6 +48,7 @@ export default class List extends Component {
<ListCell
resource={rowData}
type={type}
rowID={rowID}
onPressCell={this.props.onPressCell}
onPressShare={this.props.onPressShare}
onPressLike={this.props.onPressLike}
... ... @@ -66,7 +67,7 @@ export default class List extends Component {
isVisible={isFetching}
/>;
}
return (
<View style={styles.container}>
<ListView
... ... @@ -91,7 +92,6 @@ export default class List extends Component {
}
}}
/>
</View>
);
}
... ...
... ... @@ -96,7 +96,7 @@ export default class List extends Component {
let isLike = isPraise == 'N';
return (
<TouchableOpacity activeOpacity={0.5} onPress={() => {
this.props.onPressCell&&this.props.onPressCell(url);
this.props.onPressCell&&this.props.onPressCell(url, this.props.rowID, id);
}}>
<View style={styles.container}>
<View style={styles.sapatorView}/>
... ...
... ... @@ -54,7 +54,7 @@ class ListContainer extends Component {
this._onPressShare = this._onPressShare.bind(this);
this._onPressLike = this._onPressLike.bind(this);
this._onPressHeader = this._onPressHeader.bind(this);
}
componentDidMount() {
... ... @@ -63,11 +63,26 @@ class ListContainer extends Component {
}
componentWillUnmount() {
}
_onPressCell(url) {
_onPressCell(url, index, article_id) {
ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
let {list} = this.props;
let type = list.type;
let name = 'YB_STROLL_AUTHOR_FLR_C'
if (type == 'editor') {
name = 'YB_STROLL_AUTHOR_FLR_C'
} else {
name = 'YB_STROLL_TAG_FLR_C'
}
let params = {
CONTENT_INDEX: parseInt(index) + 1 + '',
CONTENT_ID: article_id,
};
NativeModules.YH_CommonHelper.logEvent(name, params);
}
_onPressHeader(url) {
... ... @@ -87,6 +102,21 @@ class ListContainer extends Component {
_onPressLike(article_id, isLike) {
this.props.actions.onPressLike(article_id, isLike);
let {list} = this.props;
let type = list.type;
let name = 'YB_STROLL_AUTHOR_LIKE_C'
if (type == 'editor') {
name = 'YB_STROLL_AUTHOR_LIKE_C'
} else {
name = 'YB_STROLL_TAG_LIKE_C'
}
let params = {
C_TYPE: isLike ? '1' : '2' ,
CONTENT_ID: article_id,
};
NativeModules.YH_CommonHelper.logEvent(name, params);
}
_onEndReached() {
... ...