|
@@ -205,6 +205,28 @@ export default {
|
|
|
},
|
|
|
onHide() {
|
|
|
this.$app.$def.createShortcut(true);
|
|
|
+ },
|
|
|
+ async onBackPress() {
|
|
|
+ // 查询订单的过程如果用户返回
|
|
|
+ if (this.showLoading) {
|
|
|
+ let ret = await prompt.showDialog({
|
|
|
+ title: "警告",
|
|
|
+ message: "订单正在查询中,是否确认退出?",
|
|
|
+ buttons: [
|
|
|
+ {
|
|
|
+ text: "退出",
|
|
|
+ color: "#EF5952"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ text: "取消",
|
|
|
+ color: "#999"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ });
|
|
|
+ if (ret.data.index === 1) return true;
|
|
|
+ else router.back();
|
|
|
+ }
|
|
|
+ else router.back();
|
|
|
}
|
|
|
}
|
|
|
</script>
|