mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-22 11:46:44 +08:00
[FIX]电投优化-受益人页面-导航跳转条件、拦截原生返回事件
This commit is contained in:
@@ -86,13 +86,14 @@ export default {
|
|||||||
this.beneficiaries = this.beneficiaries.concat(JSON.parse(localStorage.beneficiaryInfo))
|
this.beneficiaries = this.beneficiaries.concat(JSON.parse(localStorage.beneficiaryInfo))
|
||||||
this.type = '2'
|
this.type = '2'
|
||||||
console.log(this.beneficiaries)
|
console.log(this.beneficiaries)
|
||||||
}
|
} else {
|
||||||
//如果是从编辑/导航进来
|
|
||||||
if (this.$route.query.edit) {
|
|
||||||
getOrderDetail({ orderNo: localStorage.orderNo }).then(res => {
|
getOrderDetail({ orderNo: localStorage.orderNo }).then(res => {
|
||||||
if (res.result == 0) {
|
if (res.result == 0) {
|
||||||
this.$utils.intLocalStorage(res)
|
this.$utils.intLocalStorage(res)
|
||||||
this.type = res.orderDTO.orderInfoDTO.bnfFlag == '1' ? '2' : '1' //bnfFlag 0-法定受益人 1-指定受益人
|
this.type = res.orderDTO.orderInfoDTO.bnfFlag == '1' ? '2' : '1' //bnfFlag 0-法定受益人 1-指定受益人
|
||||||
|
if (res.orderDTO.orderInfoDTO.bnfFlag == null) {
|
||||||
|
localStorage.setItem('salePageFlag', this.salePageFlag)
|
||||||
|
}
|
||||||
if (res.orderDTO.insuredDTOs[0].bnfDTOs !== null) {
|
if (res.orderDTO.insuredDTOs[0].bnfDTOs !== null) {
|
||||||
this.beneficiaries = this.beneficiaries.concat(res.orderDTO.insuredDTOs[0].bnfDTOs)
|
this.beneficiaries = this.beneficiaries.concat(res.orderDTO.insuredDTOs[0].bnfDTOs)
|
||||||
localStorage.beneficiaryInfo = JSON.stringify(res.orderDTO.insuredDTOs[0].bnfDTOs)
|
localStorage.beneficiaryInfo = JSON.stringify(res.orderDTO.insuredDTOs[0].bnfDTOs)
|
||||||
@@ -101,25 +102,16 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
|
||||||
localStorage.setItem('salePageFlag', this.salePageFlag)
|
|
||||||
}
|
}
|
||||||
if (this.$route.query.edit && !this.$route.query.salePageFlag) {
|
|
||||||
//如果从保单列表点击编辑按钮进入
|
|
||||||
this.salePageFlag = '4'
|
|
||||||
localStorage.setItem('salePageFlag', this.salePageFlag)
|
|
||||||
} else if (this.$route.query.salePageFlag) {
|
|
||||||
//如果是从导航栏点击进入
|
|
||||||
this.salePageFlag = localStorage.salePageFlag
|
|
||||||
}
|
|
||||||
|
|
||||||
this.insuredPerson = JSON.parse(localStorage.saleInsuredPersonInfo).name
|
this.insuredPerson = JSON.parse(localStorage.saleInsuredPersonInfo).name
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
setTimeout(() => {
|
||||||
EWebBridge.webCallAppInJs('webview_left_button', {
|
EWebBridge.webCallAppInJs('webview_left_button', {
|
||||||
img: this.$assetsUrl + 'images/del-close@3x.png',
|
img: this.$assetsUrl + 'images/del-close@3x.png',
|
||||||
intercept: '1' //是否拦截原生返回事件 1是 其他否
|
intercept: '1' //是否拦截原生返回事件 1是 其他否
|
||||||
})
|
})
|
||||||
|
}, 100)
|
||||||
window.appCallBack = this.appCallBack
|
window.appCallBack = this.appCallBack
|
||||||
document.body.style.backgroundColor = '#fff'
|
document.body.style.backgroundColor = '#fff'
|
||||||
},
|
},
|
||||||
@@ -193,20 +185,16 @@ export default {
|
|||||||
if (res.result == 0) {
|
if (res.result == 0) {
|
||||||
localStorage.removeItem('applicant')
|
localStorage.removeItem('applicant')
|
||||||
localStorage.removeItem('fromAddBeneficiaryInfo')
|
localStorage.removeItem('fromAddBeneficiaryInfo')
|
||||||
if (!this.$route.query.salePageFlag) {
|
|
||||||
//不是从导航栏进入
|
|
||||||
localStorage.salePageFlag = '5'
|
|
||||||
}
|
|
||||||
//页面跳转
|
//页面跳转
|
||||||
this.$jump({
|
this.$jump({
|
||||||
flag: 'h5',
|
flag: 'h5',
|
||||||
extra: {
|
extra: {
|
||||||
forbidSwipeBack: '1',
|
forbidSwipeBack: '1',
|
||||||
url: location.origin + '/#/sale/notifyingMessage',
|
url: location.origin + `/#/sale/notifyingMessage`,
|
||||||
needRefresh: '1'
|
needRefresh: '1'
|
||||||
},
|
},
|
||||||
routerInfo: {
|
routerInfo: {
|
||||||
path: '/sale/notifyingMessage'
|
path: `/sale/notifyingMessage`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user