Authored by 孙凯

add 跳转 review by hongmo

... ... @@ -46,6 +46,7 @@ export default class Outlet extends Component {
getOutletHomeResource = {this.props.getOutletHomeResource}
getOutletActivityList = {this.props.getOutletActivityList}
onPressProduct = {this.props.onPressProduct}
onPressProductListProduct={this.props.onPressProductListProduct}
setActivityFliter = {this.props.setActivityFliter}
onPressFilter = {this.props.onPressFilter}
onEndReached = {this.props.onEndReached}
... ...
... ... @@ -136,7 +136,7 @@ export default class OutletPageListView extends Component {
key={'row' + rowID}
rowID={rowID}
data={rowData}
onPressProduct={this.props.onPressProduct}/>
onPressProduct={this.props.onPressProductListProduct}/>
);
}
return null;
... ...
... ... @@ -45,7 +45,7 @@ export default class OutletRecommendFive extends React.Component {
return (
<TouchableOpacity activeOpacity={0.5} onPress={() => {
this.props.onPressRecommendItem && this.props.onPressRecommendItem(rowData.get('url'));
this.props.onPressProduct && this.props.onPressProduct(rowData.get('url'));
}}>
<View style={styles.rowContainer}>
<Image
... ...
... ... @@ -42,6 +42,7 @@ class OutletContainer extends Component {
super(props);
this._getOutletHomeResource = this._getOutletHomeResource.bind(this);
this._onPressProduct = this._onPressProduct.bind(this);
this._onPressProductListProduct = this._onPressProductListProduct.bind(this);
this._onPressFilter = this._onPressFilter.bind(this);
this._getOutletActivityList = this._getOutletActivityList.bind(this);
this._onEndReached = this._onEndReached.bind(this);
... ... @@ -76,9 +77,19 @@ class OutletContainer extends Component {
}
_onPressProduct(url){
console.log('_onPressProduct = '+url);
ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
}
_onPressProductListProduct(product) {
let productSkn = product && product.get('product_skn', 0);
if (!productSkn) {
return;
}
let url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":"${productSkn}"}}`;
ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
}
_onPressFilter(content_code,value,categoryNavigationItem){
this.props.actions.onPressFilter(content_code,value);
let list = categoryNavigationItem.list;
... ... @@ -100,6 +111,7 @@ class OutletContainer extends Component {
setActivityFliter = {this._setActivityFliter}
getOutletActivityList = {this._getOutletActivityList}
onPressProduct = {this._onPressProduct}
onPressProductListProduct = {this._onPressProductListProduct}
onPressFilter = {this._onPressFilter}
onEndReached = {this._onEndReached}
/>
... ...