fix(orderDetail): 修复订单详情页面的价格计算问题

- 使用 Math.round() 函数对订单价格进行四舍五入,确保价格计算准确
- 移除了多余的空行和空格,优化代码格式
main
Tuzki 7 months ago
parent 9d2844292a
commit 75b9186dfb
  1. 15
      pages/orderDetail/orderDetail.vue

@ -106,7 +106,8 @@
this.orderDetail = null;
this.orderDetail = JSON.parse(params.order);
console.log('this.orderDetail', this.orderDetail);
this.orderPrice = this.orderDetail.orderInfo.settlementAmount*100;
this.orderPrice = Math.round(this.orderDetail.orderInfo.settlementAmount * 100)
}
},
onUnload() {
@ -183,7 +184,7 @@
};
printTicket(ob)
.then((ress) => {
const datas = JSON.stringify(that.orderDetail.orderInfo
.ticketList);
// console.log(data)
@ -243,7 +244,7 @@
console.log('支付结果', res)
const data = res.data;
//
if (data.status === 0) {
that.createQueryInterval();
return;
@ -263,7 +264,7 @@
setTimeout(()=>{
printTicket(ob)
.then((ress) => {
const datas = JSON.stringify(that.orderDetail.orderInfo
.ticketList);
console.log('ress',ress)
@ -278,7 +279,7 @@
},1000)
return
}
}).catch(err => {
// uni.showLoading({
// title: '...'
@ -392,7 +393,7 @@
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
.m-way-item {
width: 49%;
height: 102upx;
@ -505,4 +506,4 @@
}
}
}
</style>
</style>

Loading…
Cancel
Save