头部返回修改为返回列表

This commit is contained in:
jiawei
2023-02-22 17:59:04 +08:00
parent 5befbcda16
commit d4f4e8d7b6

View File

@@ -2,7 +2,7 @@
* @Author: jiawei
* @Date: 2023-02-15 09:41:46
* @LastEditors: jiawei jia.wei@ebiz-digits.com
* @LastEditTime: 2023-02-22 11:44:35
* @LastEditTime: 2023-02-22 17:57:37
* @FilePath: \ebiz-h5\src\views\ebiz\sale\answerPage.vue
* @Description:
-->
@@ -83,7 +83,15 @@ created(){
},
mounted(){
if (!this.$route.query.edit) {
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
if (!this.$route.query.edit) {
//如果不是编辑/导航条跳转进来的
localStorage.setItem('salePageFlag', this.salePageFlag)
} else if (this.$route.query.edit && !this.$route.query.salePageFlag) {
@@ -94,9 +102,37 @@ mounted(){
//如果是从导航栏点击进入
this.salePageFlag = localStorage.salePageFlag
}
},
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
})
}
},
isDisabledType(val,index){
if(val) {
this.question[index].answer.score = this.question[index].options.filter(item=>item.option ==val )[0].score