Authored by 于良

Merge branch 'guang' of http://git.yoho.cn/mobile/YH_RNComponent into guang

  1 +/*
  2 + * 潮流优选、明星原创
  3 + */
  4 +
  5 +'use strict';
  6 +
  7 +import React, {Component} from 'react';
  8 +import ReactNative, {
  9 + View,
  10 + ScrollView,
  11 + Text,
  12 + NativeAppEventEmitter,
  13 + StyleSheet,
  14 +} from 'react-native';
  15 +
  16 +
  17 +export default class BrandIntro extends Component {
  18 +
  19 + constructor(props) {
  20 + super(props);
  21 + }
  22 +
  23 + componentDidMount() {
  24 +
  25 + }
  26 +
  27 + render() {
  28 +
  29 + return (
  30 + <View style={styles.container}>
  31 + <Text>
  32 + 明星原创详情页-头部简介
  33 + </Text>
  34 + </View>
  35 + );
  36 + }
  37 +}
  38 +
  39 +let styles = StyleSheet.create({
  40 + container: {
  41 + flex: 1,
  42 + backgroundColor: '#f0f0f0',
  43 + },
  44 +});
  1 +'use strict'
  2 +
  3 +import React, {Component} from 'react';
  4 +import ReactNative, {
  5 + StyleSheet,
  6 + Dimensions,
  7 + Platform,
  8 + View,
  9 + NativeModules,
  10 + InteractionManager,
  11 + NativeAppEventEmitter,
  12 +} from 'react-native'
  13 +
  14 +import {bindActionCreators} from 'redux';
  15 +import {connect} from 'react-redux';
  16 +import {Map} from 'immutable';
  17 +import * as detailActions from '../reducers/detail/detailActions';
  18 +import BrandIntro from '../components/detail/BrandIntro'
  19 +
  20 +const actions = [
  21 + detailActions,
  22 +];
  23 +
  24 +function mapStateToProps(state) {
  25 + return {
  26 + ...state
  27 + };
  28 +}
  29 +
  30 +function mapDispatchToProps(dispatch) {
  31 +
  32 + const creators = Map()
  33 + .merge(...actions)
  34 + .filter(value => typeof value === 'function')
  35 + .toObject();
  36 +
  37 + return {
  38 + actions: bindActionCreators(creators, dispatch),
  39 + dispatch
  40 + };
  41 +}
  42 +
  43 +class DetailContainer extends Component {
  44 + constructor(props) {
  45 + super(props);
  46 + }
  47 +
  48 + render() {
  49 + let {detail} = this.props;
  50 + return (
  51 + <View style={styles.container}>
  52 + <BrandIntro />
  53 + </View>
  54 + );
  55 + }
  56 +}
  57 +
  58 +let styles = StyleSheet.create({
  59 + container: {
  60 + flex: 1,
  61 + },
  62 +
  63 +});
  64 +
  65 +export default connect(mapStateToProps, mapDispatchToProps)(DetailContainer);
@@ -4,6 +4,7 @@ import ReactNative from 'react-native'; @@ -4,6 +4,7 @@ import ReactNative from 'react-native';
4 import PlustarService from '../../services/DetailService'; 4 import PlustarService from '../../services/DetailService';
5 5
6 const { 6 const {
  7 + JUMP_WITH_URL
7 } = require('../../constants/actionTypes').default; 8 } = require('../../constants/actionTypes').default;
8 9
9 export function jumpWithUrl(url) { 10 export function jumpWithUrl(url) {