Authored by 孙凯

修改 红人店铺header UI review by hongmo

... ... @@ -120,7 +120,7 @@ export default class Header extends React.Component {
let backgroundImage = data.shopBanner?data.shopBanner.module_data.data[0].pic:'null';
let brandIcon = getSlicedUrl(data.shop_logo, 60, 60, 2);
let isFav = data.is_addFav;
let favImage = isFav?require('../../image/heart_h.png'):require('../../image/heart_n.png');
let favImage = isFav?require('../../image/btn_gz_h.png'):require('../../image/btn_gz_n.png');
//下拉图标
let sourceIcon = launchProfile?require('../../image/arrow_ic_up.png'):require('../../image/arrow_ic.png');
//计算控件高度,图片+标题+简介+下拉图标+20空白
... ... @@ -141,16 +141,19 @@ export default class Header extends React.Component {
url={backgroundImage}
style={{width, height: imageHeigth }}
/>
<View style={styles.titleView}>
<Text style={styles.name} numberOfLines={1}>{brandName}</Text>
<View style={styles.maskView}/>
<View style={styles.header}>
<Text style={styles.number} numberOfLines={1}>{numberOfFav}</Text>
<TouchableOpacity activeOpacity={0.5} onPress={() => {
this.props.onPressCollection && this.props.onPressCollection(isFav);
}}>
this.props.onPressCollection && this.props.onPressCollection(isFav);
}}>
<Image source={favImage} style={styles.favImage}/>
</TouchableOpacity>
</View>
<View style={styles.titleView}>
<Text style={styles.name} numberOfLines={1}>{brandName}</Text>
</View>
<Text style={styles.number}>{numberOfFav}</Text>
<YH_Image
url={brandIcon}
... ... @@ -204,30 +207,43 @@ let styles = StyleSheet.create({
backgroundColor:'white',
width: width,
height: titleHeigth,
justifyContent:'space-between',
},
maskView: {
width: width,
height: imageHeigth,
position: 'absolute',
marginTop: -imageHeigth,
backgroundColor: 'rgba(0,0,0,.2)'
},
header: {
justifyContent: 'flex-end',
flexDirection: 'row',
width: width,
height: 25,
position: 'absolute',
marginTop: -35,
backgroundColor: 'transparent',
},
name: {
marginLeft: 15 + 60 + 15,
backgroundColor: 'white',
width: width-85-120,
width: width-120,
marginTop: 22,
color: '#444444',
fontWeight: 'bold',
fontSize: 16,
},
number: {
marginTop: - (60 - 22),
color: '#444444',
color: '#ffffff',
fontSize: 13,
backgroundColor: 'white',
position: 'absolute',
marginLeft: width - 15 - 60 - 15 - 17,
marginRight: 10,
marginTop: 8,
backgroundColor: 'transparent',
},
favImage: {
width: 17,
height: 16,
marginTop: 22,
backgroundColor: 'white',
width: 64,
height: 25,
backgroundColor: 'transparent',
marginRight: 15,
},
text: {
... ...