This commit is contained in:
@@ -146,7 +146,13 @@ export default {
|
||||
},
|
||||
onLoad(options) {
|
||||
this.orderId = options.order_id || '';
|
||||
if (this.orderId) {
|
||||
// 优先从缓存读取(订单列表/交易完成页跳转时已存入)
|
||||
const cached = uni.getStorageSync('__order_detail_cache');
|
||||
if (cached) {
|
||||
this.order = cached;
|
||||
this.orderId = cached.order_id || this.orderId;
|
||||
uni.removeStorageSync('__order_detail_cache');
|
||||
} else if (this.orderId) {
|
||||
this.fetchOrder();
|
||||
}
|
||||
},
|
||||
|
||||
@@ -335,6 +335,7 @@ export default {
|
||||
},
|
||||
|
||||
goToDetail(order) {
|
||||
uni.setStorageSync('__order_detail_cache', order);
|
||||
uni.navigateTo({ url: `/pages/order/detail?order_id=${order.order_id}` });
|
||||
},
|
||||
handlePay(order) {
|
||||
|
||||
Reference in New Issue
Block a user