From 520654f6339e8edc2bbb4b256ddbd770f060650e Mon Sep 17 00:00:00 2001 From: "yang.huaxiang" Date: Mon, 2 Nov 2020 10:50:17 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AD=BE=E5=90=8D=E9=A1=B5=E9=9D=A2=E5=90=8E?= =?UTF-8?q?=E9=80=80=E6=8C=89=E9=92=AE=E5=A4=84=E7=90=86=EF=BC=9A=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=BD=8D=E5=85=B3=E9=97=AD=E6=8C=89=E9=92=AE=20--?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BA=BA=EF=BC=9A=E9=98=B3=E5=8D=8E=E7=A5=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ebiz/sale/AvoidDutyTip.vue | 39 +++++++++++++++++++ src/views/ebiz/sale/DoubleRecordTip.vue | 39 +++++++++++++++++++ src/views/ebiz/sale/InsuranceInformation.vue | 39 +++++++++++++++++++ src/views/ebiz/sale/InsuranceTip.vue | 39 +++++++++++++++++++ src/views/ebiz/sale/SignatureOfNotice.vue | 40 ++++++++++++++++++++ src/views/ebiz/sale/productTip.vue | 40 ++++++++++++++++++++ 6 files changed, 236 insertions(+) diff --git a/src/views/ebiz/sale/AvoidDutyTip.vue b/src/views/ebiz/sale/AvoidDutyTip.vue index 48ccb4694..b86df4102 100644 --- a/src/views/ebiz/sale/AvoidDutyTip.vue +++ b/src/views/ebiz/sale/AvoidDutyTip.vue @@ -80,6 +80,16 @@ export default { document.body.style.backgroundColor = '#fff' }, async created() { + if (!this.isWeixin) { + setTimeout(() => { + // eslint-disable-next-line no-undef + EWebBridge.webCallAppInJs('webview_left_button', { + img: this.$assetsUrl + 'images/del-close-btn@3x.png', + intercept: '1' //是否拦截原生返回事件 1是 其他否 + }) + }, 100) + window.appCallBack = this.appCallBack + } let that = this that.detailJump = window.localStorage.getItem('detailJump') that.signVal = window.localStorage.getItem('sign-val') @@ -144,6 +154,35 @@ 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: '电子投保单列表', + forbidSwipeBack: 1, //当前页面禁止右滑返回 + url: location.origin + `/#/sale/list` + }, + routerInfo: { + path: `/sale/list`, + type: '1' + } + }) + }) + .catch(() => { + return + }) + } + }, timeOut() { let that = this let time = that.time diff --git a/src/views/ebiz/sale/DoubleRecordTip.vue b/src/views/ebiz/sale/DoubleRecordTip.vue index 0c6c968f1..5d0fd9870 100644 --- a/src/views/ebiz/sale/DoubleRecordTip.vue +++ b/src/views/ebiz/sale/DoubleRecordTip.vue @@ -80,6 +80,16 @@ export default { document.body.style.backgroundColor = '#fff' }, async created() { + if (!this.isWeixin) { + setTimeout(() => { + // eslint-disable-next-line no-undef + EWebBridge.webCallAppInJs('webview_left_button', { + img: this.$assetsUrl + 'images/del-close-btn@3x.png', + intercept: '1' //是否拦截原生返回事件 1是 其他否 + }) + }, 100) + window.appCallBack = this.appCallBack + } let that = this that.detailJump = window.localStorage.getItem('detailJump') that.signVal = window.localStorage.getItem('sign-val') @@ -144,6 +154,35 @@ 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: '电子投保单列表', + forbidSwipeBack: 1, //当前页面禁止右滑返回 + url: location.origin + `/#/sale/list` + }, + routerInfo: { + path: `/sale/list`, + type: '1' + } + }) + }) + .catch(() => { + return + }) + } + }, timeOut() { let that = this let time = that.time diff --git a/src/views/ebiz/sale/InsuranceInformation.vue b/src/views/ebiz/sale/InsuranceInformation.vue index c87006901..b2f27ab43 100644 --- a/src/views/ebiz/sale/InsuranceInformation.vue +++ b/src/views/ebiz/sale/InsuranceInformation.vue @@ -174,7 +174,46 @@ export default { that.appntSign = JSON.parse(window.localStorage.getItem('sign-appnt')) } }, + created() { + setTimeout(() => { + // eslint-disable-next-line no-undef + EWebBridge.webCallAppInJs('webview_left_button', { + img: this.$assetsUrl + 'images/del-close-btn@3x.png', + intercept: '1' //是否拦截原生返回事件 1是 其他否 + }) + }, 100) + window.appCallBack = this.appCallBack + }, 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: '电子投保单列表', + forbidSwipeBack: 1, //当前页面禁止右滑返回 + url: location.origin + `/#/sale/list` + }, + routerInfo: { + path: `/sale/list`, + type: '1' + } + }) + }) + .catch(() => { + return + }) + } + }, timeOut() { let that = this let time = that.time diff --git a/src/views/ebiz/sale/InsuranceTip.vue b/src/views/ebiz/sale/InsuranceTip.vue index 56523788c..27c5970d6 100644 --- a/src/views/ebiz/sale/InsuranceTip.vue +++ b/src/views/ebiz/sale/InsuranceTip.vue @@ -81,6 +81,16 @@ export default { document.body.style.backgroundColor = '#fff' }, async created() { + if (!this.isWeixin) { + setTimeout(() => { + // eslint-disable-next-line no-undef + EWebBridge.webCallAppInJs('webview_left_button', { + img: this.$assetsUrl + 'images/del-close-btn@3x.png', + intercept: '1' //是否拦截原生返回事件 1是 其他否 + }) + }, 100) + window.appCallBack = this.appCallBack + } let that = this that.detailJump = window.localStorage.getItem('detailJump') that.signVal = window.localStorage.getItem('sign-val') @@ -145,6 +155,35 @@ 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: '电子投保单列表', + forbidSwipeBack: 1, //当前页面禁止右滑返回 + url: location.origin + `/#/sale/list` + }, + routerInfo: { + path: `/sale/list`, + type: '1' + } + }) + }) + .catch(() => { + return + }) + } + }, timeOut() { let that = this let time = that.time diff --git a/src/views/ebiz/sale/SignatureOfNotice.vue b/src/views/ebiz/sale/SignatureOfNotice.vue index 26796a960..5b859637c 100644 --- a/src/views/ebiz/sale/SignatureOfNotice.vue +++ b/src/views/ebiz/sale/SignatureOfNotice.vue @@ -107,6 +107,35 @@ export default { [NoticeBar.name]: NoticeBar }, 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: '电子投保单列表', + forbidSwipeBack: 1, //当前页面禁止右滑返回 + url: location.origin + `/#/sale/list` + }, + routerInfo: { + path: `/sale/list`, + type: '1' + } + }) + }) + .catch(() => { + return + }) + } + }, timeOut() { let that = this let time = that.time @@ -527,6 +556,17 @@ export default { } }, created() { + if (!this.isWeixin) { + setTimeout(() => { + // eslint-disable-next-line no-undef + EWebBridge.webCallAppInJs('webview_left_button', { + img: this.$assetsUrl + 'images/del-close-btn@3x.png', + intercept: '1' //是否拦截原生返回事件 1是 其他否 + }) + }, 100) + window.appCallBack = this.appCallBack + } + let that = this that.detailJump = window.localStorage.getItem('detailJump') diff --git a/src/views/ebiz/sale/productTip.vue b/src/views/ebiz/sale/productTip.vue index 4ce4abd3c..8e229326b 100644 --- a/src/views/ebiz/sale/productTip.vue +++ b/src/views/ebiz/sale/productTip.vue @@ -82,6 +82,17 @@ export default { }, 5000) }, async created() { + if (!this.isWeixin) { + setTimeout(() => { + // eslint-disable-next-line no-undef + EWebBridge.webCallAppInJs('webview_left_button', { + img: this.$assetsUrl + 'images/del-close-btn@3x.png', + intercept: '1' //是否拦截原生返回事件 1是 其他否 + }) + }, 100) + window.appCallBack = this.appCallBack + } + let that = this that.detailJump = window.localStorage.getItem('detailJump') @@ -157,6 +168,35 @@ 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: '电子投保单列表', + forbidSwipeBack: 1, //当前页面禁止右滑返回 + url: location.origin + `/#/sale/list` + }, + routerInfo: { + path: `/sale/list`, + type: '1' + } + }) + }) + .catch(() => { + return + }) + } + }, timeOut() { let that = this let time = that.time