Commit 245b5809 authored by songrui's avatar songrui

医生端 初筛表单路由跳转修改

parent cb901851
......@@ -66,7 +66,7 @@ export default {
if (!token) {
token = sessionStorage.getItem('token')
if (process.env.NODE_ENV !== 'production') {
token = '09050c27-9dca-40eb-811a-8afd10db0aa6'
token = 'bfda4283-602d-45b1-ac7f-99f5c40f7e6c'
}
}
if (token) {
......
......@@ -32,6 +32,7 @@ import { getChronicResidentsId } from '@/api/doctor/generalFU'
import { firstScreenDetail, saveFirstScreening, updateFirstScreening } from '@/api/doctor/screening.js'
import { fetchDataHandle } from '@/utils/common.js'
import { useStore } from '@/doctor/store'
import { showConfirmDialog } from 'vant'
export default {
components: {
......@@ -63,6 +64,22 @@ export default {
return this.$route.query.idCard
},
},
// 路由守卫
beforeRouteLeave(to, from) {
// showConfirmDialog({
// message: '已填写的表单不会保存,确定要离开吗?'})
// .then(() => {
// next()
// })
// .catch(() => {
// next(false)
// })
if (this.step === 2) {
this.onBack()
return false
}
return true
},
created() {
this.init()
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment