[FIX]电投优化-签名确认页-拦截原生返回事件

This commit is contained in:
yuweiqi
2020-03-20 19:11:43 +08:00
parent 8f222eb20d
commit 665b162d9b

View File

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