Authored by 张文文

ui fix reviewd by 陈林

... ... @@ -13,7 +13,7 @@ import ReactNative, {
Platform,
} from 'react-native';
import YH_Image from '../../../common/components/YH_Image';
import Immutable, {Map} from 'immutable';
export default class BrandCell extends Component {
... ... @@ -27,7 +27,7 @@ export default class BrandCell extends Component {
let shop_logo = data.get('shop_logo');
let shops_id = data.get('shops_id');
let new_product_num = data.get('new_product_num');
shop_logo = shop_logo?shop_logo.replace('{width}', 80).replace('{height}', 40).replace('{mode}',2):'';
shop_logo = YH_Image.getSlicedUrl(shop_logo, 100, 50, 2);
let yh_exposureData = data.get('yh_exposureData');
return (
<TouchableOpacity style={styles.container} yh_exposureData={yh_exposureData} onPress={()=>{this.props.onPressShop&&this.props.onPressShop(data, index);}}>
... ... @@ -49,8 +49,8 @@ let styles = StyleSheet.create({
height: 76,
width: 80,
backgroundColor: 'white',
marginLeft: 4,
marginTop: 10,
marginRight: 4,
},
image: {
marginTop: 0,
... ...
... ... @@ -59,8 +59,7 @@ export default class CategorySelector extends Component {
renderRow(rowData, sectionID, rowID, highlightRow) {
let marginLeft = (rowID == 0) ? 0 : 8;
let color = rowID == this.props.selectedCategoryIndex ? '#222222' : '#444444';
let fontFamily = rowID == this.props.selectedCategoryIndex ? 'PingFang-SC-Medium' : 'PingFang-SC-Regular';
let fontWeight = rowID == this.props.selectedCategoryIndex ? 'bold' : 'normal';
return (
<TouchableOpacity
key={'row' + rowID}
... ... @@ -76,9 +75,9 @@ export default class CategorySelector extends Component {
}}
>
<View style={[styles.categoryContainer, {marginLeft}]}>
<Text style={[styles.categoryName, {color, fontFamily}]}>{rowData.get('tab_name')}</Text>
<Text style={[styles.categoryName, {color, fontWeight}]}>{rowData.get('tab_name')}</Text>
</View>
{rowID == this.props.selectedCategoryIndex ? <View style={[styles.tabLine, {marginLeft}]}/> : null}
{rowID == this.props.selectedCategoryIndex ? <View style={[styles.tabLine, {left: marginLeft, right: 22}]}/> : null}
</TouchableOpacity>
);
}
... ... @@ -129,20 +128,19 @@ let styles = StyleSheet.create({
},
categoryName: {
fontSize: 14,
color: '#b0b0b0',
},
line: {
position: 'absolute',
width,
height: 1,
height: 0.5,
left: 0,
bottom: 0,
backgroundColor: '#e5e5e5',
},
tabLine: {
position: 'absolute',
width: 28,
height: 2,
left: 0,
bottom: 0,
backgroundColor: '#222222',
},
... ...
... ... @@ -121,9 +121,9 @@ export default class NewArrivalHeader extends Component {
return (
<View style={[styles.container]}>
{this.renderFocus(focusItem)}
{this.renderDivideImage(divideItem)}
{this.renderShopList(shopItem)}
{this.renderJointImg(jointItem, fIndex)}
{this.renderDivideImage(divideItem)}
</View>
);
... ...
... ... @@ -33,6 +33,7 @@ export default class RecommendCell extends Component {
render() {
let {data}=this.props;
if (!data) { return null; }
return (
<View style={styles.container}>
<View style={styles.header}>
... ... @@ -72,11 +73,12 @@ let styles = StyleSheet.create({
color: '#222222',
width: width,
textAlign: 'left',
fontFamily: 'PingFang-SC-Medium'
fontFamily: 'PingFang-SC-Medium',
fontWeight: 'bold',
},
contentContainer: {
backgroundColor: 'white',
marginLeft: 11,
marginLeft: 15,
},
separator: {
width: width,
... ...
... ... @@ -53,7 +53,7 @@ export default class JointCell extends React.Component {
return (
<View >
<YH_Image url={YH_Image.getSlicedUrl(source.src, width-marginLeft*2, ratioHeight, 2)} resizeMode={'stretch'} style={{ width: width-marginLeft*2, height: ratioHeight, marginLeft: marginLeft, backgroundColor: 'red'}} />
<YH_Image url={YH_Image.getSlicedUrl(source.src, width-marginLeft*2, ratioHeight, 2)} resizeMode={'stretch'} style={{ width: width-marginLeft*2, height: ratioHeight, marginLeft: marginLeft}} />
<View style={{flexDirection: 'row', position: 'absolute', top: 0, left: marginLeft, bottom: 0, right: marginLeft}}>{
list.map((item, i) => {
let exposureData = {
... ...