Commit 21a80cb8 by 姜雷

修复订单中金额显示

parent 761bb09a
...@@ -64,6 +64,8 @@ class OrderItem extends Component { ...@@ -64,6 +64,8 @@ class OrderItem extends Component {
const { const {
data: { orderState, createAt, serviceName, payableMoney }, data: { orderState, createAt, serviceName, payableMoney },
} = this.props; } = this.props;
let moneyStr = payableMoney.toFixed(2);
return ( return (
<View className='OrderItem' onClick={this.detailHandle}> <View className='OrderItem' onClick={this.detailHandle}>
<View className='OrderItem-text'> <View className='OrderItem-text'>
...@@ -83,7 +85,7 @@ class OrderItem extends Component { ...@@ -83,7 +85,7 @@ class OrderItem extends Component {
</View> </View>
<View <View
className={`OrderItem-price ${orderState === '1' ? 'topay' : ''}`}> className={`OrderItem-price ${orderState === '1' ? 'topay' : ''}`}>
{payableMoney.toFixed(2)} {moneyStr}
</View> </View>
</View> </View>
); );
......
...@@ -8,6 +8,7 @@ const RechargeItem = (props: { data: RechargeOrder }) => { ...@@ -8,6 +8,7 @@ const RechargeItem = (props: { data: RechargeOrder }) => {
const { const {
data: { createAt, rechargeRemark, actualAmount, orderNum }, data: { createAt, rechargeRemark, actualAmount, orderNum },
} = props; } = props;
let moneyStr = actualAmount.toFixed(2);
return ( return (
<View className='RechargeItem'> <View className='RechargeItem'>
...@@ -26,7 +27,7 @@ const RechargeItem = (props: { data: RechargeOrder }) => { ...@@ -26,7 +27,7 @@ const RechargeItem = (props: { data: RechargeOrder }) => {
</View> </View>
<View <View
className={`RechargeItem-price ${actualAmount >= 0 ? 'topay' : ''}`}> className={`RechargeItem-price ${actualAmount >= 0 ? 'topay' : ''}`}>
{actualAmount.toFixed(2)} {moneyStr}
</View> </View>
</View> </View>
); );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment