Commit 615bb31b by 姜雷

修改订单详情样式

parent bb546863
......@@ -118,6 +118,7 @@ class OrderDetail extends Component {
equipmentNum,
equipmentPosition,
deductionMoney,
thirdDiscountMoney,
} = this.state;
const payTypeName = getPayType(payType);
return (
......@@ -140,7 +141,7 @@ class OrderDetail extends Component {
</View>
{deductionBean ? (
<View className='OrderDetail-payinfo'>
<Text>通用豆抵扣</Text>
<Text>{serviceName}豆抵扣</Text>
<Text className='deduction'>{deductionBean.toFixed(2)}</Text>
</View>
) : null}
......@@ -150,6 +151,12 @@ class OrderDetail extends Component {
<Text className='deduction'>{deductionMoney.toFixed(2)}</Text>
</View>
) : null}
{thirdDiscountMoney ? (
<View className='OrderDetail-payinfo'>
<Text>三方抵扣</Text>
<Text className='deduction'>{thirdDiscountMoney.toFixed(2)}</Text>
</View>
) : null}
<View className='OrderDetail-payinfo'>
<Text>支付方式</Text>
......
......@@ -32,8 +32,13 @@ type PageOwnProps = {};
type PageProps = PageStateProps & PageDispatchProps & PageOwnProps;
type PageState = {
needRefresh: boolean;
};
interface OrderList {
props: PageProps;
state: PageState;
}
@connect(
......@@ -60,14 +65,21 @@ class OrderList extends Component {
};
constructor(props: PageProps) {
super(props);
this.state = {
needRefresh: false,
};
}
componentWillMount() {
this.getPayOrderHandle();
this.getAllOrderHandle();
}
componentDidShow() {
this.getPayOrderHandle();
this.getAllOrderHandle();
const { needRefresh } = this.state;
if (needRefresh) {
this.getPayOrderHandle();
this.getAllOrderHandle();
}
}
onPullDownRefresh() {
......@@ -132,12 +144,18 @@ class OrderList extends Component {
}
goPayPage(data) {
this.setState({
needRefresh: true,
});
this.$preload({ id: data.id });
Taro.navigateTo({
url: '/pages/Order/OrderPay/OrderPay',
});
}
goDetail(data) {
this.setState({
needRefresh: false,
});
this.$preload(data);
Taro.navigateTo({
url: '/pages/Order/OrderDetail/OrderDetail',
......
.OrderDetail-info {
display: flex;
height: 60px;
line-height: 60px;
justify-content: space-between;
font-size: 28px;
......@@ -11,8 +10,5 @@
.OrderDetail-info-content {
text-align: right;
flex: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
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