|
|
@@ -497,8 +497,8 @@ renderRankDom() { |
|
|
|
} |
|
|
|
//每一条 rank |
|
|
|
rankItemDom(item,index) { |
|
|
|
// let fontSizeNum = 30/(PixelRatio.get()); |
|
|
|
let fontSizeNum = 28; |
|
|
|
let fontSizeNum = 40/(PixelRatio.get()); |
|
|
|
// let fontSizeNum = 28;{item.merchantName} |
|
|
|
let curStyleObj = { |
|
|
|
width: fontSizeNum, |
|
|
|
height: fontSizeNum, |
|
|
@@ -507,35 +507,37 @@ rankItemDom(item,index) { |
|
|
|
<View style={styles.rankItemBox} key={index}> |
|
|
|
<Image style={styles.RankLogo} resizeMode="stretch" source={{uri:item.logoUrl}}></Image> |
|
|
|
<View style={styles.rankContent}> |
|
|
|
<Text style={styles.merchantText}>{item.merchantName}</Text> |
|
|
|
<View style={styles.rankRun}> |
|
|
|
<Text style={styles.starTitle}>经营指数: {item.starNum} 分</Text> |
|
|
|
<View style={{height: 28, flexDirection: 'row', alignItems: 'center',}}> |
|
|
|
<StarRatingBar |
|
|
|
score={item.starNum} |
|
|
|
allowsHalfStars={true} |
|
|
|
accurateHalfStars={true} |
|
|
|
starStyle={curStyleObj} |
|
|
|
emptyStarImage={<Image style={curStyleObj} resizeMode="stretch" source={require('./image/star_gray.png')} />} |
|
|
|
filledStarImage={<Image style={curStyleObj} resizeMode="stretch" source={require('./image/star_red.png')} />} |
|
|
|
scoreTextStyle={{color:'#fff'}} |
|
|
|
/> |
|
|
|
<Text style={styles.merchantText} numberOfLines={1} ellipsizeMode="tail">法大师傅大师傅士大法大师傅大师傅士大夫法大师傅大师傅士大夫法大师傅大师傅士大夫法大师傅大师傅士大夫法大师傅大师傅士大夫法大师傅大师傅士大夫法大师傅大师傅士大夫法大师傅大师傅士大夫法大师傅大师傅士大夫法大师傅大师傅士大夫法大师傅大师傅士大夫法大师傅大师傅士大夫夫</Text> |
|
|
|
<View style={styles.rankRunBox}> |
|
|
|
<View style={styles.rankRun}> |
|
|
|
<Text style={styles.starTitle}>经营指数: {item.starNum} 分</Text> |
|
|
|
<View style={{height: 40,marginTop: 17/PixelRatio.get()}}> |
|
|
|
<StarRatingBar |
|
|
|
score={item.starNum} |
|
|
|
allowsHalfStars={true} |
|
|
|
accurateHalfStars={true} |
|
|
|
starStyle={curStyleObj} |
|
|
|
emptyStarImage={<Image style={curStyleObj} resizeMode="stretch" source={require('./image/star_gray.png')} />} |
|
|
|
filledStarImage={<Image style={curStyleObj} resizeMode="stretch" source={require('./image/star_red.png')} />} |
|
|
|
scoreTextStyle={{color:'#fff'}} |
|
|
|
/> |
|
|
|
</View> |
|
|
|
|
|
|
|
</View> |
|
|
|
|
|
|
|
</View> |
|
|
|
|
|
|
|
<View style={styles.rankRun}> |
|
|
|
<Text style={styles.starTitle}>人气指数: {item.starNum} 分</Text> |
|
|
|
<View style={{height: 28, flexDirection: 'row', alignItems: 'center',}}> |
|
|
|
<StarRatingBar |
|
|
|
score={item.starNum} |
|
|
|
allowsHalfStars={true} |
|
|
|
accurateHalfStars={true} |
|
|
|
starStyle={curStyleObj} |
|
|
|
emptyStarImage={<Image style={curStyleObj} resizeMode="stretch" source={require('./image/hot_gray.png')} />} |
|
|
|
filledStarImage={<Image style={curStyleObj} resizeMode="stretch" source={require('./image/hot_red.png')} />} |
|
|
|
scoreTextStyle={{color:'#fff'}} |
|
|
|
/> |
|
|
|
<View style={styles.rankRun}> |
|
|
|
<Text style={styles.starTitle}>人气指数: {item.starNum} 分</Text> |
|
|
|
<View style={{height: 40,marginTop: 17/PixelRatio.get()}}> |
|
|
|
<StarRatingBar |
|
|
|
score={item.starNum} |
|
|
|
allowsHalfStars={true} |
|
|
|
accurateHalfStars={true} |
|
|
|
starStyle={curStyleObj} |
|
|
|
emptyStarImage={<Image style={curStyleObj} resizeMode="stretch" source={require('./image/hot_gray.png')} />} |
|
|
|
filledStarImage={<Image style={curStyleObj} resizeMode="stretch" source={require('./image/hot_red.png')} />} |
|
|
|
scoreTextStyle={{color:'#fff'}} |
|
|
|
/> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
|
|
|
@@ -1417,18 +1419,19 @@ MyPage = CodePush(codePushOptions)(MyPage); |
|
|
|
}, |
|
|
|
//排名的列表样式 |
|
|
|
rankItemBox: { |
|
|
|
position: 'relative', |
|
|
|
flex: 1, |
|
|
|
flexDirection: 'row', |
|
|
|
alignItems: 'center', |
|
|
|
width: '92%', |
|
|
|
height: 260/PixelRatio.get(), |
|
|
|
height: 250/PixelRatio.get(), |
|
|
|
backgroundColor: '#fff', |
|
|
|
borderRadius: 18/PixelRatio.get(), |
|
|
|
marginTop: 20/PixelRatio.get(), |
|
|
|
marginTop: 30/PixelRatio.get(), |
|
|
|
}, |
|
|
|
|
|
|
|
rankContent: { |
|
|
|
flex: 1, |
|
|
|
flexDirection: 'column', |
|
|
|
marginLeft: 30/PixelRatio.get(), |
|
|
|
}, |
|
|
|
|
|
|
@@ -1437,33 +1440,40 @@ MyPage = CodePush(codePushOptions)(MyPage); |
|
|
|
flexDirection: 'row', |
|
|
|
alignItems: 'center', |
|
|
|
width: '100%', |
|
|
|
height: 260/PixelRatio.get(), |
|
|
|
height: 250/PixelRatio.get(), |
|
|
|
}, |
|
|
|
|
|
|
|
RankLogo: { |
|
|
|
width: 220/PixelRatio.get(), |
|
|
|
height: 220/PixelRatio.get(), |
|
|
|
marginLeft: 14/PixelRatio.get(), |
|
|
|
width: 200/PixelRatio.get(), |
|
|
|
height: 200/PixelRatio.get(), |
|
|
|
marginLeft: 20/PixelRatio.get(), |
|
|
|
}, |
|
|
|
|
|
|
|
rankQrcodeImg: { |
|
|
|
width: 220/PixelRatio.get(), |
|
|
|
height: 220/PixelRatio.get(), |
|
|
|
width: 200/PixelRatio.get(), |
|
|
|
height: 200/PixelRatio.get(), |
|
|
|
marginLeft: 10/PixelRatio.get(), |
|
|
|
position: 'absolute', |
|
|
|
top: 17/PixelRatio.get(), |
|
|
|
right: 20/PixelRatio.get(), |
|
|
|
}, |
|
|
|
|
|
|
|
starTitle: { |
|
|
|
fontSize: 28/PixelRatio.get(), |
|
|
|
}, |
|
|
|
|
|
|
|
rankRun: { |
|
|
|
marginTop: 16/PixelRatio.get(), |
|
|
|
}, |
|
|
|
|
|
|
|
merchantText: { |
|
|
|
fontSize: 34/PixelRatio.get(), |
|
|
|
fontWeight : 'bold', |
|
|
|
marginBottom: 10/PixelRatio.get(), |
|
|
|
marginTop: 6/PixelRatio.get(), |
|
|
|
marginTop: 30/PixelRatio.get(), |
|
|
|
}, |
|
|
|
|
|
|
|
rankRunBox: { |
|
|
|
flex: 1, |
|
|
|
flexDirection: 'row', |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |