...
|
...
|
@@ -6,6 +6,7 @@ import LoadingIndicator from '../../../common/components/LoadingIndicator'; |
|
|
import GoodGoodsImagesView from './GoodGoodsImagesView'
|
|
|
import ContentCell from './ContentCell'
|
|
|
import BrandProductListCell from '../../../common/components/ListCell/ProductListCell';
|
|
|
import Footer from './Footer'
|
|
|
|
|
|
import ReactNative, {
|
|
|
View,
|
...
|
...
|
@@ -109,8 +110,7 @@ export default class Detail extends Component { |
|
|
// //Test
|
|
|
// product_skn = '51148345';
|
|
|
// //
|
|
|
let fav_image = favorite?require('../../image/love_tab_ic_h.png'):require('../../image/love_tab_ic.png');
|
|
|
let fav_title = favorite?'已收藏':'收藏';
|
|
|
|
|
|
return (
|
|
|
<View style={styles.container}>
|
|
|
{!isFetching?
|
...
|
...
|
@@ -122,20 +122,12 @@ export default class Detail extends Component { |
|
|
dataSource={this.dataSource.cloneWithRowsAndSections(dataSource)}
|
|
|
renderRow={this.renderRow}
|
|
|
/>
|
|
|
<View style={styles.footer}>
|
|
|
<TouchableOpacity style={styles.favoriteButton} onPress={() => {this.props.onPressFavorite&&this.props.onPressFavorite(favorite)}}>
|
|
|
<View style={{flex: 1, flexDirection: 'row', alignItems: 'center'}}>
|
|
|
<Image style={styles.favIcon} source={fav_image}/>
|
|
|
<Text style={styles.favText}>{fav_title}</Text>
|
|
|
</View>
|
|
|
</TouchableOpacity>
|
|
|
<View style={styles.detailButton}>
|
|
|
<Text
|
|
|
style={styles.detailButtonText}
|
|
|
onPress={() => {this.props.onPressProduct&& this.props.onPressProduct(Immutable.fromJS({product_skn}))}}
|
|
|
>查看详情</Text>
|
|
|
</View>
|
|
|
</View>
|
|
|
<Footer
|
|
|
favorite={favorite}
|
|
|
onPressFavorite={this.props.onPressFavorite}
|
|
|
onPressProduct={this.props.onPressProduct}
|
|
|
product_skn={product_skn}
|
|
|
/>
|
|
|
</View>
|
|
|
:<LoadingIndicator
|
|
|
isVisible={isFetching}
|
...
|
...
|
@@ -166,45 +158,4 @@ let styles = StyleSheet.create({ |
|
|
listContainer: {
|
|
|
width: width / 2,
|
|
|
},
|
|
|
footer: {
|
|
|
width: width,
|
|
|
height: 59,
|
|
|
borderColor: '#ededed',
|
|
|
borderTopWidth: 1,
|
|
|
flexDirection: 'row',
|
|
|
alignItems: 'center',
|
|
|
},
|
|
|
detailButton: {
|
|
|
position: 'absolute',
|
|
|
width: 100,
|
|
|
height: 44,
|
|
|
top: 7,
|
|
|
left: width - 15 - 100,
|
|
|
backgroundColor: '#d0021b',
|
|
|
borderRadius: 4,
|
|
|
alignItems: 'center',
|
|
|
},
|
|
|
detailButtonText: {
|
|
|
marginTop: 4,
|
|
|
height: 36,
|
|
|
color: 'white',
|
|
|
paddingTop: 10,
|
|
|
textAlign: 'center',
|
|
|
fontSize: 15,
|
|
|
},
|
|
|
favoriteButton: {
|
|
|
width: 100,
|
|
|
height: 40,
|
|
|
},
|
|
|
favIcon: {
|
|
|
width: 17,
|
|
|
height: 16,
|
|
|
marginLeft: 20,
|
|
|
marginRight: 0,
|
|
|
},
|
|
|
favText: {
|
|
|
fontSize: 13,
|
|
|
color: '#b0b0b0',
|
|
|
marginLeft: 5,
|
|
|
},
|
|
|
}); |
...
|
...
|
|