Authored by 鹿亮亮

添加新人专享楼层

... ... @@ -24,7 +24,7 @@ import Immutable, {
Map
} from 'immutable';
import HeadTitleCell from './HeadTitleCell';
import HeadTitleCell from '../cell/HeadTitleCell';
export default class KidsBrandCell extends Component {
constructor(props) {
... ... @@ -51,7 +51,6 @@ export default class KidsBrandCell extends Component {
}
_renderRow(rowData,sectionID,rowID,highlightRow){
console.log(sectionID+',' + rowID);
return (
<TouchableOpacity activeOpacity={0.5}>
<View style={styles.row}>
... ... @@ -86,6 +85,7 @@ export default class KidsBrandCell extends Component {
}
}
let {width, height} = Dimensions.get('window');
let itemWidth = width / 4;
let itemHeight = 70;
... ...
/**
* Description:
* <p> new_user_floor:新人专享
* Author: Bruce.Lu
* Version: 1.0
* Created on 2017/2/9.
*/
import React,{Component} from 'react';
import ReactNative,{
Image,
Text,
StyleSheet,
ListView,
View,
TouchableOpacity,
} from 'react-native';
import Swiper from 'react-native-swiper';
import ImmutablePropTypes from 'react-immutable-proptypes';
import SlicedImage from '../../../common/components/SlicedImage';
import HeadTitleCell from '../cell/HeadTitleCell';
import Banner from '../../../common/components/Banner'
export default class NewUserFloor extends Component{
constructor(props){
super(props);
}
render(){
return(
<View style={styles.container}>
<HeadTitleCell title={'新人专享'} />
<
</View>);
}
}
const styles = StyleSheet.create({
container:{
backgroundColor:'white',
flex:1
}
});
... ...
... ... @@ -18,7 +18,8 @@ import Focus from './Focus';
import AppIconList from './AppIconList'
import AppHotBrands from './AppHotBrands'
import TrendsetterCollocation from '../floor/TrendsetterCollocation'
import KidsBrandCell from '../cell/KidsBrandsCell';
import KidsBrandCell from '../floor/KidsBrandsCell';
import NewUserFloor from '../floor/NewUserFloor';
export default class Home extends Component {
... ... @@ -75,6 +76,7 @@ export default class Home extends Component {
_floorCellRender(rowData) {
let template_name = rowData.get('template_name');
console.log('template_name=' + template_name);
switch (template_name) {
case 'focus': {
let data = rowData.get('data');
... ... @@ -107,7 +109,7 @@ export default class Home extends Component {
)
}
break;
case 'kidsBrands':{
case 'kids_brands':{
return (
<KidsBrandCell />
)
... ... @@ -129,7 +131,7 @@ export default class Home extends Component {
}
render() {
let kids = Immutable.fromJS({template_name:"kids_brands",data:{}});
let channel = this.props.channel;
let data = this.props.data.boy;
if (channel == 1) {
... ... @@ -144,6 +146,7 @@ export default class Home extends Component {
let {list, isFetching, isFirstLoad, favorite} = data;
let floorList = list.toArray();
let favoriteList = favorite.toJS().list;
let dataSource = {
... ...
... ... @@ -19,6 +19,8 @@ import * as homeActions from '../reducers/home/homeActions';
import * as appActions from '../reducers/app/appActions';
import Home from '../components/home/Home';
import KidsBrandsCell from '../components/floor/KidsBrandsCell';
import NewUserFloor from '../components/floor/NewUserFloor';
const actions = [
homeActions,
... ... @@ -87,17 +89,18 @@ class HomeContainer extends Component {
render() {
let {app, home} = this.props;
return (
<View style={styles.container}>
<Home
ref={(c) => {
this.home = c;
}}
data={home}
onRefresh={this._onRefresh}
onEndReached={this._onEndReached}
channel={app.channel}
/>
</View>
// <View style={styles.container}>
<NewUserFloor />
// <Home
// ref={(c) => {
// this.home = c;
// }}
// data={home}
// onRefresh={this._onRefresh}
// onEndReached={this._onEndReached}
// channel={app.channel}
// />
// </View>
);
}
}
... ...
... ... @@ -62,7 +62,6 @@ export function fetchFloor() {
}
let fetchFloorRequest = (sourcePage, contentCode, gender, new_device) => {
console.log("new_device=" + new_device + "contentCode=" + contentCode);
return new HomeService(app.serviceHost).fetchHomeFloorRequest(contentCode, channel, gender, sourcePage, new_device)
.then(json => {
let payload = parseHomeFloor(json)
... ...