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() { //若进入签名页,则不允许回到签名页前面的页面