Authored by hongyong.zhao

修改埋点

... ... @@ -30,7 +30,7 @@ export default class BrandCell extends Component {
shop_logo = YH_Image.getSlicedUrl(shop_logo, 70, 35, 2);
let yh_exposureData = data.get('yh_exposureData');
return (
<TouchableOpacity style={styles.container} yh_exposureData={yh_exposureData} onPress={()=>{this.props.onPressShop&&this.props.onPressShop(data, index);}}>
<TouchableOpacity style={styles.container} yh_exposureData={yh_exposureData} onPress={()=>{this.props.onPressShop&&this.props.onPressShop(data, index, yh_exposureData);}}>
<View style={{flex:1}}>
<Image style={styles.image} source={{uri:shop_logo}}/>
<View style={[styles.footerContainer, {marginTop: shop_logo.length > 0 ? 12 : 52}]}>
... ... @@ -60,7 +60,7 @@ let styles = StyleSheet.create({
resizeMode: 'contain',
},
footerContainer: {
// marginTop: 12,
// marginTop: 12,
marginBottom: 8,
width: 80,
height: 16,
... ...
... ... @@ -88,6 +88,7 @@ export default class NewArrivalHeader extends Component {
<JointCell
key={'key23_'+i}
data={item.get('data')}
yh_exposedata={item.get('yh_exposureData')}
contentCode={contentCode}
isExtends={item.get('is_extend')}
imageWidth={item.get('image_width')}
... ...
... ... @@ -37,7 +37,7 @@ export default class JointCell extends React.Component {
}
render() {
let {data, isExtends, imageWidth, imageHeight, floorId, floorName, fIndex, contentCode} = this.props;
let {data, isExtends, imageWidth, imageHeight, floorId, floorName, fIndex, contentCode, yh_exposedata} = this.props;
let source = this.props.data.toJS();
if (!source) {
return null;
... ... @@ -48,7 +48,7 @@ export default class JointCell extends React.Component {
let list = source.urls;
let touchWidth = (width-marginLeft*2) / list.length;
let pageName = Platform.OS === 'android' ? 'aFP_NewArrival': 'iFP_NewArrival';
let exposedata =yh_exposedata && yh_exposedata.toJS()
let ratioHeight = Math.ceil(width * imageHeight / imageWidth);
return (
... ... @@ -56,14 +56,15 @@ export default class JointCell extends React.Component {
<YH_Image url={YH_Image.getSlicedUrl(source.src, width-marginLeft*2, ratioHeight, 2)} resizeMode={'contain'} style={{ width: width-marginLeft*2, height: ratioHeight, marginLeft: marginLeft}} />
<View style={{flexDirection: 'row', position: 'absolute', top: 0, left: marginLeft, bottom: 0, right: marginLeft}}>{
list.map((item, i) => {
let exposureData = {
let exposureData = {
...exposedata,
F_ID: floorId,
P_NAME: pageName,
F_NAME: floorName,
F_URL: item,
F_INDEX: fIndex,
I_INDEX: parseInt(i) + 1 + "",
CONTENT_CODE: contentCode,
CODE: contentCode,
exposureEnd: 1,
}
... ...
... ... @@ -304,7 +304,7 @@ class NewArrivalContainer extends Component {
}
_onPressShop(data, index=0) {
_onPressShop(data, index=0, yh_exposureData) {
let {
shop_name,
shops_id,
... ... @@ -317,15 +317,18 @@ class NewArrivalContainer extends Component {
if (!shops_id||!shop_name) {
return;
}
let url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.shop","params":{"shop_id":"${shops_id}","shop_template_type":"${shop_template_type}","shop_name":"${shop_name}","is_red_shop":"${is_red_shop}","brand_id":"${brand_id}"}}`;
ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
let param = {
let param = {}
param = yh_exposureData ? yh_exposureData.toJS() : {
F_ID: this.state.shopFloorId,
F_URL: url,
SHOP_ID: shops_id,
CONTENT_CODE: contentCode,
CODE: contentCode,
}
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_NEW_ARRIVAL_FLR_C', param);
}
... ... @@ -347,7 +350,7 @@ class NewArrivalContainer extends Component {
PRD_SKN: productSkn,
TAB_ID: selectedTabIndex,
TAB_NAME: selectedTabName,
CONTENT_CODE: contentCode,
CODE: contentCode,
}
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_NEW_ARRIVAL_FLR_C', param);
}
... ...