删除跳转获取的信息弹出提示
parent
bf7cb7ec01
commit
075054a6c1
86
App.vue
86
App.vue
|
|
@ -19,52 +19,52 @@
|
||||||
console.log(options)
|
console.log(options)
|
||||||
|
|
||||||
// 2. 注意:scene 返回的是数字类型,不是字符串!原生代码中写 '1038' 会导致判断失败
|
// 2. 注意:scene 返回的是数字类型,不是字符串!原生代码中写 '1038' 会导致判断失败
|
||||||
if (options.scene === 1038 &&
|
// if (options.scene === 1038 &&
|
||||||
options.referrerInfo?.appId === 'wxef277996acc166c3') {
|
// options.referrerInfo?.appId === 'wxef277996acc166c3') {
|
||||||
|
|
||||||
// 从收银台小程序返回的逻辑
|
// // 从收银台小程序返回的逻辑
|
||||||
const extraData = options.referrerInfo.extraData;
|
// const extraData = options.referrerInfo.extraData;
|
||||||
console.log("extraData",extraData)
|
// console.log("extraData",extraData)
|
||||||
|
|
||||||
if (!extraData) {
|
// if (!extraData) {
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
title: '当前通过物理按键返回,未接收到返参,建议自行查询交易结果',
|
// title: '当前通过物理按键返回,未接收到返参,建议自行查询交易结果',
|
||||||
icon: 'none',
|
// icon: 'none',
|
||||||
duration: 3000
|
// duration: 3000
|
||||||
});
|
// });
|
||||||
} else {
|
// } else {
|
||||||
if (extraData.code === 'success') {
|
// if (extraData.code === 'success') {
|
||||||
// 有返回成功标记后,启动轮询查询订单状态
|
// // 有返回成功标记后,启动轮询查询订单状态
|
||||||
// 1. 优先使用收银台回传的订单号
|
// // 1. 优先使用收银台回传的订单号
|
||||||
const orderNumberFromExtra =
|
// const orderNumberFromExtra =
|
||||||
extraData.orderNumber || extraData.reqsn || extraData.orderNo;
|
// extraData.orderNumber || extraData.reqsn || extraData.orderNo;
|
||||||
// 2. 如果对方没有回传,则使用我们在跳转前自己缓存到本地的订单号
|
// // 2. 如果对方没有回传,则使用我们在跳转前自己缓存到本地的订单号
|
||||||
const storedOrderNumber = uni.getStorageSync("lastOrderNumber");
|
// const storedOrderNumber = uni.getStorageSync("lastOrderNumber");
|
||||||
const orderNumber = orderNumberFromExtra || storedOrderNumber;
|
// const orderNumber = orderNumberFromExtra || storedOrderNumber;
|
||||||
|
|
||||||
if (orderNumber) {
|
// if (orderNumber) {
|
||||||
this.startOrderStatusPolling(orderNumber);
|
// this.startOrderStatusPolling(orderNumber);
|
||||||
} else {
|
// } else {
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
title: '支付返回缺少订单号,请稍后在服务记录中查看',
|
// title: '支付返回缺少订单号,请稍后在服务记录中查看',
|
||||||
icon: 'none',
|
// icon: 'none',
|
||||||
duration: 3000
|
// duration: 3000
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
} else if (extraData.code === 'cancel') {
|
// } else if (extraData.code === 'cancel') {
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
title: '支付已取消',
|
// title: '支付已取消',
|
||||||
icon: 'none'
|
// icon: 'none'
|
||||||
});
|
// });
|
||||||
} else {
|
// } else {
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
title: `支付失败:${extraData.errmsg || '未知错误'}`,
|
// title: `支付失败:${extraData.errmsg || '未知错误'}`,
|
||||||
icon: 'none',
|
// icon: 'none',
|
||||||
duration: 3000
|
// duration: 3000
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
onHide: function() {
|
onHide: function() {
|
||||||
console.log('App Hide')
|
console.log('App Hide')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue