Authored by chenl

增加了我的个人中心资源位获取。review by liben。

... ... @@ -80,6 +80,7 @@ export default class MineList extends React.Component {
globalOrderData={this.props.globalOrderData}
iconAll={this.props.iconAll}
instalmentStatus={this.props.instalmentStatus}
mineResource={this.props.mineResource}
/>
);
}
... ...
... ... @@ -22,6 +22,7 @@ export default class MineListHeader extends React.Component {
this._renderMineOrderNumberPoint = this._renderMineOrderNumberPoint.bind(this);
this._renderMinePropertyNumberPoint = this._renderMinePropertyNumberPoint.bind(this);
this._renderVip = this._renderVip.bind(this);
this._renderBannerResource = this._renderBannerResource.bind(this);
}
/**
... ... @@ -110,6 +111,22 @@ export default class MineListHeader extends React.Component {
);
}
_renderBannerResource(){
let mineResource = this.props.mineResource;
if(!mineResource)
return;
//
return(
<View style={{width:width,height:25, backgroundColor:'red'}}>
</View>
);
}
render() {
let fontFamilyStyle = {};
... ... @@ -658,6 +675,7 @@ export default class MineListHeader extends React.Component {
<Image style={styles.arrow} source={require('../../image/arrow_gray.png')}/>
</View>
</TouchableOpacity>
{this._renderBannerResource()}
<View style={{
width: width,
height: 10,
... ...
... ... @@ -308,6 +308,7 @@ class MineContainer extends Component {
iconAll,
instalmentStatus,
showSimilarGuider,
mineResource,
} = this.props.mine;
return (
<MineList
... ... @@ -327,6 +328,7 @@ class MineContainer extends Component {
globalOrderData={globalOrderData}
iconAll={iconAll}
instalmentStatus={instalmentStatus}
mineResource={mineResource}
onPressItem={this._onPressItem}
onPressProductListProduct={this._onPressProductListProduct}
... ...
... ... @@ -644,7 +644,6 @@ export function getMineResource() {
.then(content_code => {
return new MineService(app.serviceHost).getMineResource(content_code)
.then(json => {
console.log("chenlin", JSON.stringify(json));
dispatch(getMineResourceSuccess(json));
})
.catch(error => {
... ...
... ... @@ -220,6 +220,9 @@ let InitialState = Record({
isExist: false,
})),
})),
// 我的个人中心资源位
mineResource: List(),
});
export default InitialState;
\ No newline at end of file
... ...
... ... @@ -494,8 +494,9 @@ export default function appReducer(state = initialState, action) {
}
case GET_MINERESOURCE_SUCCESS: {
return state;
let {data} = action.payload;
let mineResource = (data && data.list) ? data.list : [];
return state.set("mineResource", Immutable.fromJS(mineResource));
}
}
return state;
... ...