修改停车订单页面数据不显示的bug
This commit is contained in:
parent
9e664e1a21
commit
849d6149bb
@ -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>
|
||||
|
||||
@ -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);
|
||||
// 容错处理(如提示加载失败)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user