Commit 245b5809 authored by songrui's avatar songrui

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

parent cb901851
...@@ -66,7 +66,7 @@ export default { ...@@ -66,7 +66,7 @@ export default {
if (!token) { if (!token) {
token = sessionStorage.getItem('token') token = sessionStorage.getItem('token')
if (process.env.NODE_ENV !== 'production') { if (process.env.NODE_ENV !== 'production') {
token = '09050c27-9dca-40eb-811a-8afd10db0aa6' token = 'bfda4283-602d-45b1-ac7f-99f5c40f7e6c'
} }
} }
if (token) { if (token) {
......
...@@ -32,6 +32,7 @@ import { getChronicResidentsId } from '@/api/doctor/generalFU' ...@@ -32,6 +32,7 @@ import { getChronicResidentsId } from '@/api/doctor/generalFU'
import { firstScreenDetail, saveFirstScreening, updateFirstScreening } from '@/api/doctor/screening.js' import { firstScreenDetail, saveFirstScreening, updateFirstScreening } from '@/api/doctor/screening.js'
import { fetchDataHandle } from '@/utils/common.js' import { fetchDataHandle } from '@/utils/common.js'
import { useStore } from '@/doctor/store' import { useStore } from '@/doctor/store'
import { showConfirmDialog } from 'vant'
export default { export default {
components: { components: {
...@@ -63,6 +64,22 @@ export default { ...@@ -63,6 +64,22 @@ export default {
return this.$route.query.idCard 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() { created() {
this.init() 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