...
|
...
|
@@ -14,6 +14,7 @@ export default class ImageSingle extends React.Component { |
|
|
|
|
|
constructor(props) {
|
|
|
super(props);
|
|
|
this._handleParamsJumpWithUrl = this._handleParamsJumpWithUrl.bind(this);
|
|
|
}
|
|
|
|
|
|
shouldComponentUpdate(nextProps) {
|
...
|
...
|
@@ -24,6 +25,23 @@ export default class ImageSingle extends React.Component { |
|
|
}
|
|
|
}
|
|
|
|
|
|
_handleParamsJumpWithUrl(id, name, url) {
|
|
|
// 为埋点提供参数组装
|
|
|
// 后期请将所有的点击事件由 resourceJumpWithUrl 修改为自己独有的事件
|
|
|
// 由于多数组件都使用的 resourceJumpWithUrl ,埋点传参无法正常进行
|
|
|
let params = {
|
|
|
F_ID: id,
|
|
|
F_NAME: name,
|
|
|
F_URL: url
|
|
|
};
|
|
|
if (this.props.messageResourceInfo) {
|
|
|
params = {
|
|
|
ID: id,
|
|
|
};
|
|
|
}
|
|
|
this.props.resourceJumpWithUrl && this.props.resourceJumpWithUrl(url, 'one', params);
|
|
|
}
|
|
|
|
|
|
render() {
|
|
|
|
|
|
let {resource} = this.props;
|
...
|
...
|
@@ -46,17 +64,7 @@ export default class ImageSingle extends React.Component { |
|
|
yh_exposureData={list[0].yh_exposureData}
|
|
|
style={[{width: sliderWidth, height: sliderHeight},this.props.style]}
|
|
|
onPress={() => {
|
|
|
let params = {
|
|
|
F_ID: resource.get('template_id'),
|
|
|
F_NAME: resource.get('template_name'),
|
|
|
F_URL: list[0].url
|
|
|
};
|
|
|
if (this.props.messageResourceInfo) {
|
|
|
params = {
|
|
|
ID: resource.get('template_id'),
|
|
|
};
|
|
|
}
|
|
|
this.props.resourceJumpWithUrl && this.props.resourceJumpWithUrl(list[0].url, 'one', params);
|
|
|
this._handleParamsJumpWithUrl(resource.get('template_id'), resource.get('template_name'), list[0].url);
|
|
|
}}
|
|
|
>
|
|
|
<YH_Image
|
...
|
...
|
|