diff --git a/src/views/ebiz/sale/AvoidDutyTip.vue b/src/views/ebiz/sale/AvoidDutyTip.vue index 6bcac5461..d40e61bba 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 405b4e672..0922b5804 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 a977609e2..2760391cb 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 200b8c1db..3bc2ae079 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 3cc39f886..3579107c4 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 62c2c8359..d68648887 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