Authored by 张丽霞

个人中提示数量UI调整,review by 李犇

... ... @@ -29,23 +29,16 @@ export default class MineListHeader extends React.Component {
* */
_renderMineOrderNumberPoint(num) {
let offset = 0;
if (isNaN(num)) {
//兼容非数字
} else if (num <= 0) {
if (num <= 0) {
//0不显示
return null;
} else if (num < 10) {
offset = 17;
} else if (num < 100) {
offset = 17;
} else {
offset = 12;
} else if (num >= 100) {
num = '99+';
}
return (
<View style={{
position:'absolute',
right:offset,
left: orderContentWidth / 2 + 7,
top:0,
backgroundColor:'#d0021b',
paddingLeft: 2.5,
... ... @@ -68,29 +61,16 @@ export default class MineListHeader extends React.Component {
* 我的资产中的数字展示
* */
_renderMinePropertyNumberPoint(num) {
let offset = 0;
if (isNaN(num)) {
//兼容非数字
offset = 15;
} else if (num <= 0) {
if (num <= 0) {
//0不显示
return null;
} else if (num < 10) {
offset = 30;
} else if (num < 100) {
offset = 30;
} else if (num < 1000) {
offset = 25;
} else if (num < 10000) {
offset = 20;
} else {
offset = 15;
} else if (num >= 10000) {
num = '9999+';
}
return (
<View style={{
position:'absolute',
right:offset,
left: assetContentWidth / 2+ 7,
top:0,
backgroundColor:'#444444',
paddingLeft: 2.5,
... ... @@ -698,6 +678,8 @@ let subRowHeight = Math.ceil(35 * DEVICE_WIDTH_RATIO);//账号安全 通知层
let rowheight = 45;//wo的订单类似的高度,我的逛也用这个高度
let orderContainerHeight = 55;
let topHeight = 175 + rowheight + orderContainerHeight + 10 + rowheight + orderContainerHeight + 1 + 10 + rowheight * 3 + 91;
let orderContentWidth = (width - 10) / 5;
let assetContentWidth = (width - 10) / 4;
let styles = StyleSheet.create({
container: {
... ... @@ -736,7 +718,7 @@ let styles = StyleSheet.create({
order_content: {
flex: 1,
flexDirection: 'column',
width: (width - 10) / 5,
width: orderContentWidth,
alignItems: 'center',
paddingTop: 4,
paddingBottom: 4,
... ... @@ -746,7 +728,7 @@ let styles = StyleSheet.create({
flex: 1,
justifyContent: 'center',
alignItems: 'center',
width: (width - 10) / 4,
width: assetContentWidth,
paddingTop: 4,
paddingBottom: 4,
// backgroundColor:'red'
... ... @@ -755,7 +737,7 @@ let styles = StyleSheet.create({
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
width: (width - 10) / 4,
width: assetContentWidth,
height: 45,
},
icon_image: {
... ...