修改停车订单页面删除最后一条数据后造成的bug

This commit is contained in:
赵毅 2025-09-13 11:58:45 +08:00
parent 849d6149bb
commit db78fe36b0
2 changed files with 27 additions and 26 deletions

View File

@ -62,7 +62,7 @@
</view> </view>
<view class="hr"></view> <view class="hr"></view>
<view class="info-item"> <view class="info-item">
<view class="info-label1">下单总金额( ¥{{ orderInfo.orderAmount }} )</view> <view class="info-label1">下单总金额( ¥{{ orderInfo.total_amount }} )</view>
<view class="info-action">明细</view> <view class="info-action">明细</view>
</view> </view>
<view class="info-item"> <view class="info-item">
@ -170,7 +170,6 @@ export default {
}, },
onLoad(options) { onLoad(options) {
const item = JSON.parse(options?.item); const item = JSON.parse(options?.item);
console.log("🚀 ~ onLoad ~ item:", item)
// //
item.order_status == "1" ? this.startCountdown() : ""; item.order_status == "1" ? this.startCountdown() : "";
this.status = JSON.stringify(item.order_status); this.status = JSON.stringify(item.order_status);
@ -210,7 +209,6 @@ export default {
}); });
}, },
gotoPayment() { gotoPayment() {
console.log("🚀 ~ gotoPayment ~ 去支付:");
// //
// uni.navigateTo({ // uni.navigateTo({
// url: "/kitchen/pay/index", // url: "/kitchen/pay/index",

View File

@ -8,33 +8,36 @@
</view> </view>
<!-- 订单列表 --> <!-- 订单列表 -->
<view class="order-item" v-for="order in monthGroup.orders" :key="order.id" @tap="viewOrderDetail(order)"> <view v-if="orderData.length > 0">
<view class="order-left"> <view class="order-item" v-for="order in monthGroup.orders" :key="order.id"
<view class="order-type"> @tap="viewOrderDetail(order)">
<view class="order-type1"> <view class="order-left">
<image class="order-icon" <view class="order-type">
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/park/park_p.png" <view class="order-type1">
mode="aspectFit"></image> <image class="order-icon"
<text class="order-type-text">停车</text> src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/park/park_p.png"
mode="aspectFit"></image>
<text class="order-type-text">停车</text>
</view>
<text class="order-status">{{ order.status == 1 ? '待支付' : '已支付' }}</text>
</view> </view>
<text class="order-status">{{ order.status == 1 ? '待支付' : '已支付' }}</text>
</view>
<view class="order-park-info"> <view class="order-park-info">
<text class="order-park-name">{{ order.record_info.parking_info.parking_name }}</text> <text class="order-park-name">{{ order.record_info.parking_info.parking_name }}</text>
<text class="order-amount">¥{{ order.amount.toFixed(2) }}</text> <text class="order-amount">¥{{ order.amount.toFixed(2) }}</text>
</view> </view>
<view class="order-car-info"> <view class="order-car-info">
<text class="order-car-number">{{ order.record_info.car_number }}</text> <text class="order-car-number">{{ order.record_info.car_number }}</text>
<text class="order-car-type">{{ order.record_info.car_billing_type == 1 ? '月租车' : <text class="order-car-type">{{ order.record_info.car_billing_type == 1 ? '月租车' :
(order.record_info.car_billing_type == 2) ? '临时车' : '贵宾车' }}</text> (order.record_info.car_billing_type == 2) ? '临时车' : '贵宾车' }}</text>
</view> </view>
<text class="order-time">{{ order.pay_time }}</text> <text class="order-time">{{ order.pay_time }}</text>
</view> </view>
<view class="delete-button" @tap.stop="deleteOrder(order)"> <view class="delete-button" @tap.stop="deleteOrder(order)">
<u-icon name="trash" size="45rpx"></u-icon> <u-icon name="trash" size="45rpx"></u-icon>
</view>
</view> </view>
</view> </view>
</view> </view>