Authored by 朱小军

提交vip等级商品列表页 review by days

... ... @@ -48,6 +48,7 @@ import {
setOriginParams,
setSaleType,
setActivityId,
setBannerUrl
} from './reducers/app/appActions';
import {
... ... @@ -91,7 +92,8 @@ export default function native(platform) {
dictParams,
saleType,
activityId,
filterSubMap
filterSubMap,
bannerUrl,
} = this.props;
store.dispatch(setHost(host));
... ... @@ -103,6 +105,7 @@ export default function native(platform) {
store.dispatch(setOriginParams(dictParams));
store.dispatch(setSaleType(saleType));
store.dispatch(setActivityId(activityId));
store.dispatch(setBannerUrl(bannerUrl));
if (type == 'YH_ScreenCategoryView' ) {
return (
... ... @@ -143,7 +146,8 @@ export default function native(platform) {
type == 'YH_InstalmentView' ||
type == 'YH_NewUserView' ||
type == 'YH_ActivityProListVC' ||
type == 'YH_LatestView') {
type == 'YH_LatestView' ||
type == 'YH_FilterProListVC'){
return (
<Provider store={store}>
<ProductListPoolContainer />
... ...
... ... @@ -19,6 +19,7 @@ import BannerSwiper from '../cell/BannerSwiper';
import ActivityCell from '../../../outlet/components/outlet/ActivityCell';
import LatestHeader from '../cell/LatestHeader';
import ActivityHeader from '../cell/ActivityHeader';
import YH_Image from '../../../common/components/YH_Image';
export default class ProductListPool extends Component {
constructor(props) {
... ... @@ -76,6 +77,14 @@ export default class ProductListPool extends Component {
renderRow(rowData, sectionID, rowID, highlightRow) {
switch(sectionID) {
case 'singleImage': {
let {bannerUrl} = this.props;
if (bannerUrl.length == 0) {
return null;
}
let url = YH_Image.getSlicedUrl(bannerUrl, width, vipBannerHeight, 2)
return(<YH_Image style={styles.vipBanner} url={url}/>)
}
case 'bannerInfo':
return(<BannerSwiper resource={rowData} row_ID={rowID} onPressProduct={this.props.onPressBanner}/>);
case 'activity':
... ... @@ -181,6 +190,11 @@ export default class ProductListPool extends Component {
LatestHeader: ['1'],
newUserProductList: productList.list.toArray(),
};
}else if (type == 'YH_FilterProListVC') {
dataSource = {
singleImage: ['1'],
productList: productList.list.toArray(),
};
}
let isLoadingMore = productList.isFetching && productList.currentPage > 0;
... ... @@ -224,6 +238,9 @@ let rowMarginTop = Math.ceil(10 * width / 320);
let rowMarginHorizontal = (width - rowWidth * 2) / 3;
let yPosition = 0;
let vipBannerHeight = Math.ceil((200 / 640) * width);
let styles = StyleSheet.create({
container: {
flex: 1,
... ... @@ -256,5 +273,9 @@ let styles = StyleSheet.create({
fontSize: 16,
fontWeight: 'bold',
color: '#444',
},
vipBanner: {
height: vipBannerHeight,
width
}
});
... ...
... ... @@ -20,6 +20,7 @@ export default keyMirror({
SET_SALETYPE: null,
SET_SERVICE_HOST: null,
SET_ACTIVITY_ID: null,
SET_BANNER_URL: null,
CANCEL_SELECT: null,
GET_BRAND_BANNER_INFO_REQUEST: null,
... ...
... ... @@ -85,6 +85,8 @@ class ProductListPoolContainer extends Component {
}else if (type == 'YH_LatestView') {
this.props.actions.getBannerListWithContentCode();
this.props.actions.getProductList();
}else if (type == 'YH_FilterProListVC') {
this.props.actions.getProductList();
}
}
... ... @@ -153,6 +155,7 @@ class ProductListPoolContainer extends Component {
let {
type,
originParams,
bannerUrl
} = this.props.app;
return (
... ... @@ -166,6 +169,7 @@ class ProductListPoolContainer extends Component {
filterFactors={filterFactors}
filterNameFactors={filterNameFactors}
latestTabs={latestTabs}
bannerUrl={bannerUrl}
selectLatestItem={selectLatestItem}
onEndReached={this._onEndReached}
onPressProductCell={this._onPressProductCell}
... ...
... ... @@ -13,6 +13,7 @@ const {
SET_SALETYPE,
SET_SERVICE_HOST,
SET_ACTIVITY_ID,
SET_BANNER_URL,
} = require('../../constants/actionTypes').default;
export function setPlatform(platform) {
... ... @@ -84,3 +85,10 @@ export function setActivityId(activityId) {
payload: activityId
};
}
export function setBannerUrl(bannerUrl) {
return {
type: SET_BANNER_URL,
payload: bannerUrl
};
}
... ...
... ... @@ -13,6 +13,7 @@ let InitialState = Record({
originParams: Map(),
saleType: 0,//参数名为saleType:0:普通折扣,1为断码区,2为会员专享,3为折扣专场,4为Outlets
activityId: 0,
bannerUrl: ''
});
export default InitialState;
... ...
... ... @@ -13,7 +13,7 @@ const {
SET_SALETYPE,
SET_SERVICE_HOST,
SET_ACTIVITY_ID,
SET_BANNER_URL,
} = require('../../constants/actionTypes').default;
const initialState = new InitialState;
... ... @@ -42,6 +42,8 @@ export default function appReducer(state = initialState, action) {
return state.set('saleType', action.payload);
case SET_ACTIVITY_ID:
return state.set('activityId', action.payload);
case SET_BANNER_URL:
return state.set('bannerUrl', action.payload);
}
return state;
... ...
... ... @@ -128,6 +128,10 @@ export function getProductList(reload=false) {
fromPage: 'iFP_LatestProList',
dayLimit: dayLimit
}
}else if (type == 'YH_FilterProListVC') {
params = {
method: 'app.product.vip',
}
}
let bSelectedFilterFactor,allFilterFactors;
... ...