Authored by hongyong.zhao

bug fix -- reviewed by 傲哲

... ... @@ -25,7 +25,7 @@ import RecommendContainer from './containers/RecommendContainer';
import TalentRankContainer from './containers/TalentRankContainer';
import ShareDetailContainer from './containers/ShareDetailContainer';
import {setChannel, setHost, setPlatform, setServiceHost, setproductPool} from './reducers/app/appActions';
import {setChannel, setHost, setPlatform, setServiceHost, setproductPool, setSkns} from './reducers/app/appActions';
import {setOrderCode, setActivityId, setSrc, setJumpUrl} from './reducers/alliance/allianceActions';
... ... @@ -118,6 +118,7 @@ export default function native(platform) {
store.dispatch(setSrc(this.props.src));
store.dispatch(setJumpUrl(this.props.jumpUrl));
this.props.productPool && store.dispatch(setproductPool(this.props.productPool))
this.props.skns && store.dispatch(setSkns(this.props.skns))
return (
<Provider store={store}>
<RecommendContainer/>
... ...
... ... @@ -50,7 +50,7 @@ export default class MineCell extends React.Component {
</View>
{/*<View style={{height: 10, backgroundColor: '#f0f0f0'}}/>*/}
</TouchableOpacity>
<View style={{height: 10, backgroundColor: '#f0f0f0'}}/>
<View style={{height: 1, backgroundColor: '#f0f0f0'}}/>
</View>
);
}
... ...
... ... @@ -135,7 +135,7 @@ class HomeContainer extends Component {
pageName = 'aFP_Alliance';
}
let url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.minealliance","params":{"type":"shareDetail", "product_skn":"${productSkn}", "product_id": "${product_id}" ,"from_page_name":"${pageName}"}}`;
let url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.minealliance","params":{"type":"shareDetail","title":"有赚商品详情", "product_skn":"${productSkn}", "product_id": "${product_id}" ,"from_page_name":"${pageName}"}}`;
ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
... ... @@ -154,6 +154,8 @@ class HomeContainer extends Component {
skns,
} = this.props.app;
console.log(data.get('sort_id'));
console.log('------->Skns')
console.log(skns);
this.props.actions.setAppSelectedCategory(productPool, skns, data.get('sort_id'), data.get('sort_name'), index);
let params = {
... ...
... ... @@ -27,14 +27,14 @@ const {
} = require('../../constants/actionTypes').default;
export function setAppSelectedCategory(productPool, sort_id, sort_name, index) {
export function setAppSelectedCategory(productPool, skns, sort_id, sort_name, index) {
return (dispatch, getState) => {
dispatch({
type: APP_SET_SELECTED_CATEGORY,
payload: {index, sort_id, sort_name}
});
dispatch(getProductList(productPool,sort_id));
dispatch(getProductList(productPool,skns,sort_id));
};
}
... ...
... ... @@ -9,6 +9,7 @@ const {
SET_HOST,
SET_SERVICE_HOST,
SET_PRODUCT_POOL,
SET_SKNS,
PRODUCT_LIST_REQUEST,
PRODUCT_LIST_SUCCESS,
PRODUCT_LIST_FAILURE,
... ... @@ -35,6 +36,9 @@ export default function appReducer(state = initialState, action) {
case SET_PRODUCT_POOL: {
return state.set('productPool', action.payload);
}
case SET_SKNS: {
return state.set('skns', action.payload);
}
case PRODUCT_LIST_REQUEST: {
return state.setIn(['productList', 'isFetching'], true)
.setIn(['productList', 'error'], null);
... ...