[FIX]电投优化-建议书、电投共用页面-产品页-只在电投时拦截原生返回事件

This commit is contained in:
yuweiqi
2020-03-20 19:36:42 +08:00
parent 665b162d9b
commit c0571f05eb

View File

@@ -72,12 +72,14 @@ export default {
[IndexBar.name]: IndexBar
},
mounted() {
setTimeout(() => {
EWebBridge.webCallAppInJs('webview_left_button', {
img: this.$assetsUrl + 'images/del-close@3x.png',
intercept: '1' //是否拦截原生返回事件 1是 其他否
})
}, 100)
if (localStorage.isFrom == 'sale') {
setTimeout(() => {
EWebBridge.webCallAppInJs('webview_left_button', {
img: this.$assetsUrl + 'images/del-close@3x.png',
intercept: '1' //是否拦截原生返回事件 1是 其他否
})
}, 100)
}
window.appCallBack = this.appCallBack
document.body.style.backgroundColor = '#fff'
this.getProductList()
@@ -112,7 +114,7 @@ export default {
},
methods: {
appCallBack(data) {
if (data.trigger == 'left_button_click') {
if (data.trigger == 'left_button_click' && localStorage.isFrom == 'sale') {
return this.$dialog
.confirm({
className: 'dialog-delete',
@@ -126,6 +128,7 @@ export default {
flag: 'h5',
extra: {
title: '电子投保单列表',
forbidSwipeBack: 1, //当前页面禁止右滑返回
url: location.origin + `/#/sale/list`
},
routerInfo: {