mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-11 19:06:43 +08:00
[FIX]电投优化-账户信息页、附件上传页-拦截原生返回事件
This commit is contained in:
@@ -234,18 +234,45 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
appCallBack() {
|
appCallBack(data) {
|
||||||
this.isclear = true
|
if (data.trigger == 'left_button_click') {
|
||||||
// 筛选按钮的点击事件
|
return this.$dialog
|
||||||
this.isclear = true
|
.confirm({
|
||||||
this.$jump({
|
className: 'dialog-delete',
|
||||||
flag: 'navigation',
|
title: '提示',
|
||||||
extra: {
|
message: '退出流程可能会丢失部分数据,是否确认退出?',
|
||||||
title: '账户管理',
|
cancelButtonColor: '#E9332E',
|
||||||
hiddenRight: '1'
|
confirmButtonColor: '#FFFFFF'
|
||||||
}
|
})
|
||||||
})
|
.then(() => {
|
||||||
this.isScan = false
|
this.$jump({
|
||||||
|
flag: 'h5',
|
||||||
|
extra: {
|
||||||
|
title: '电子投保单列表',
|
||||||
|
url: location.origin + `/#/sale/list`
|
||||||
|
},
|
||||||
|
routerInfo: {
|
||||||
|
path: `/sale/list`,
|
||||||
|
type: '1'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
return
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.isclear = true
|
||||||
|
// 筛选按钮的点击事件
|
||||||
|
this.isclear = true
|
||||||
|
this.$jump({
|
||||||
|
flag: 'navigation',
|
||||||
|
extra: {
|
||||||
|
title: '账户管理',
|
||||||
|
hiddenRight: '1'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.isScan = false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 单选框选中
|
// 单选框选中
|
||||||
clickRadio(val) {
|
clickRadio(val) {
|
||||||
@@ -373,7 +400,6 @@ export default {
|
|||||||
}
|
}
|
||||||
saveInformation(data).then(res => {
|
saveInformation(data).then(res => {
|
||||||
if (res.result == '0') {
|
if (res.result == '0') {
|
||||||
localStorage.salePageFlag = '8' //当前后台接口及前端代码不完善,仅调试观察现象使用,调试完成后删除
|
|
||||||
window.localStorage.setItem('accountInformationRadio', that.radio)
|
window.localStorage.setItem('accountInformationRadio', that.radio)
|
||||||
|
|
||||||
that.$jump({
|
that.$jump({
|
||||||
@@ -425,6 +451,8 @@ export default {
|
|||||||
localStorage.setItem('isAutoPay', res.orderDTO.orderAccountDTO.isAutoPay)
|
localStorage.setItem('isAutoPay', res.orderDTO.orderAccountDTO.isAutoPay)
|
||||||
localStorage.setItem('isAutoRenewal', res.orderDTO.orderAccountDTO.isAutoRenewal)
|
localStorage.setItem('isAutoRenewal', res.orderDTO.orderAccountDTO.isAutoRenewal)
|
||||||
localStorage.setItem('isRenew', res.orderDTO.orderAccountDTO.isRenew)
|
localStorage.setItem('isRenew', res.orderDTO.orderAccountDTO.isRenew)
|
||||||
|
} else {
|
||||||
|
localStorage.setItem('salePageFlag', this.salePageFlag)
|
||||||
}
|
}
|
||||||
this.productNo = res.orderDTO.insuredDTOs[0].riskDTOLst[0].mainRiskCode
|
this.productNo = res.orderDTO.insuredDTOs[0].riskDTOLst[0].mainRiskCode
|
||||||
//计算年龄
|
//计算年龄
|
||||||
@@ -462,19 +490,14 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
document.body.style.backgroundColor = '#F5F5F5'
|
document.body.style.backgroundColor = '#F5F5F5'
|
||||||
|
setTimeout(() => {
|
||||||
|
EWebBridge.webCallAppInJs('webview_left_button', {
|
||||||
|
img: this.$assetsUrl + 'images/del-close@3x.png',
|
||||||
|
intercept: '1' //是否拦截原生返回事件 1是 其他否
|
||||||
|
})
|
||||||
|
}, 100)
|
||||||
// 筛选按钮的点击事件
|
// 筛选按钮的点击事件
|
||||||
window.appCallBack = this.appCallBack
|
window.appCallBack = this.appCallBack
|
||||||
if (!this.$route.query.edit) {
|
|
||||||
//如果不是编辑/导航条跳转进来的
|
|
||||||
localStorage.setItem('salePageFlag', this.salePageFlag)
|
|
||||||
} else if (this.$route.query.edit && !this.$route.query.salePageFlag) {
|
|
||||||
//如果从保单列表点击编辑按钮进入
|
|
||||||
this.salePageFlag = '6'
|
|
||||||
localStorage.setItem('salePageFlag', this.salePageFlag)
|
|
||||||
} else if (this.$route.query.salePageFlag) {
|
|
||||||
//如果是从导航栏点击进入
|
|
||||||
this.salePageFlag = localStorage.salePageFlag
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
beforeRouteLeave(to, from, next) {
|
beforeRouteLeave(to, from, next) {
|
||||||
document.body.style.backgroundColor = ''
|
document.body.style.backgroundColor = ''
|
||||||
|
|||||||
@@ -385,6 +385,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
setTimeout(() => {
|
||||||
|
EWebBridge.webCallAppInJs('webview_left_button', {
|
||||||
|
// img: this.$assetsUrl + 'images/del-close@3x.png',
|
||||||
|
intercept: '1' //是否拦截原生返回事件 1是 其他否
|
||||||
|
})
|
||||||
|
}, 100)
|
||||||
|
window.appCallBack = this.appCallBack
|
||||||
if (!this.$route.query.edit) {
|
if (!this.$route.query.edit) {
|
||||||
//如果不是编辑/导航条跳转进来的
|
//如果不是编辑/导航条跳转进来的
|
||||||
localStorage.setItem('salePageFlag', this.salePageFlag)
|
localStorage.setItem('salePageFlag', this.salePageFlag)
|
||||||
@@ -534,6 +541,35 @@ export default {
|
|||||||
next()
|
next()
|
||||||
},
|
},
|
||||||
methods: {
|
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
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
// 删除图片前
|
// 删除图片前
|
||||||
beforeDelete(file, detail) {
|
beforeDelete(file, detail) {
|
||||||
let that = this
|
let that = this
|
||||||
@@ -971,7 +1007,6 @@ export default {
|
|||||||
window.localStorage.removeItem('bankCardUrlPath')
|
window.localStorage.removeItem('bankCardUrlPath')
|
||||||
window.localStorage.removeItem('bankCardUrlInsured')
|
window.localStorage.removeItem('bankCardUrlInsured')
|
||||||
window.localStorage.removeItem('bankCardUrlInsuredPath')
|
window.localStorage.removeItem('bankCardUrlInsuredPath')
|
||||||
localStorage.salePageFlag = '8' //当前后台接口及前端代码不完善,仅调试观察现象使用,调试完成后删除
|
|
||||||
that.$jump({
|
that.$jump({
|
||||||
flag: 'h5',
|
flag: 'h5',
|
||||||
extra: {
|
extra: {
|
||||||
|
|||||||
Reference in New Issue
Block a user