From 665b162d9bc63cc3b39dd4c13b387fc8b5285938 Mon Sep 17 00:00:00 2001 From: yuweiqi Date: Fri, 20 Mar 2020 19:11:43 +0800 Subject: [PATCH] =?UTF-8?q?[FIX]=E7=94=B5=E6=8A=95=E4=BC=98=E5=8C=96-?= =?UTF-8?q?=E7=AD=BE=E5=90=8D=E7=A1=AE=E8=AE=A4=E9=A1=B5-=E6=8B=A6?= =?UTF-8?q?=E6=88=AA=E5=8E=9F=E7=94=9F=E8=BF=94=E5=9B=9E=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ebiz/sale/SignatureConfirmation.vue | 37 +++++++++++++++++-- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/src/views/ebiz/sale/SignatureConfirmation.vue b/src/views/ebiz/sale/SignatureConfirmation.vue index 4813c1a87..975bd4b4f 100644 --- a/src/views/ebiz/sale/SignatureConfirmation.vue +++ b/src/views/ebiz/sale/SignatureConfirmation.vue @@ -287,6 +287,34 @@ export default { } }, methods: { + appCallBack(data) { + if (data.trigger == 'left_button_click') { + return this.$dialog + .confirm({ + className: 'dialog-delete', + title: '提示', + message: '退出流程可能会丢失部分数据,是否确认退出?', + cancelButtonColor: '#E9332E', + confirmButtonColor: '#FFFFFF' + }) + .then(() => { + this.$jump({ + flag: 'h5', + extra: { + title: '电子投保单列表', + url: location.origin + `/#/sale/list` + }, + routerInfo: { + path: `/sale/list`, + type: '1' + } + }) + }) + .catch(() => { + return + }) + } + }, // 初始化 async init() { if (this.isWeixin) { @@ -856,9 +884,12 @@ export default { } }, created() { - EWebBridge.webCallAppInJs('webview_left_button', { - intercept: '1' //是否拦截原生返回事件 1是 其他否 - }) + setTimeout(() => { + EWebBridge.webCallAppInJs('webview_left_button', { + intercept: '1' //是否拦截原生返回事件 1是 其他否 + }) + }, 100) + window.appCallBack = this.appCallBack }, mounted() { //若进入签名页,则不允许回到签名页前面的页面