修改停车订单页面数据不显示的bug

This commit is contained in:
赵毅 2025-09-13 11:56:08 +08:00
parent 9e664e1a21
commit 849d6149bb
2 changed files with 30 additions and 20 deletions

View File

@ -7,8 +7,9 @@
<text class="park-name">{{ orderDetail.parking.parking_name }}</text>
</view>
<view class="status-right">
<image class="success-icon" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/park/park_orderOk.png"
mode="aspectFit"></image>
<image class="success-icon"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/park/park_orderOk.png" mode="aspectFit">
</image>
</view>
</view>
@ -71,11 +72,11 @@
<script>
import {
isPhone,
picUrl,
request,
upload,
NavgateTo
isPhone,
picUrl,
request,
upload,
NavgateTo
} from '../../../utils';
import { apiArr } from '@/api/park.js'
@ -145,9 +146,17 @@ export default {
}
},
onLoad(options) {
const order = options.order;
if (order) {
this.orderDetail = JSON.parse(order);
console.log("接收的原始参数:", options);
if (options && options.order) {
try {
//
const decodedOrder = decodeURIComponent(options.order);
this.orderDetail = JSON.parse(decodedOrder);
console.log("解析成功:", this.orderDetail);
} catch (err) {
console.error("解析失败:", err);
//
}
}
}
}

View File

@ -69,7 +69,10 @@ export default {
methods: {
//
viewOrderDetail(order) {
NavgateTo('../orderDetail/index?order=' + JSON.stringify(order))
const orderStr = JSON.stringify(order);
// &?
const encodedOrder = encodeURIComponent(orderStr);
NavgateTo(`../orderDetail/index?order=${encodedOrder}`);
},
//
@ -89,9 +92,7 @@ export default {
icon: 'success',
duration: 2000
});
setTimeout(() => {
that.getOrderData();
}, 1000);
that.getOrderData();
})
}
}