feat(patient-h5): 接入签署令牌与签名上传

This commit is contained in:
yelan
2026-09-01 10:13:45 +08:00
parent e467f03f23
commit 40cd313786
11 changed files with 614 additions and 42 deletions
+21
View File
@@ -1,5 +1,6 @@
import { createRouter, createWebHistory } from 'vue-router'
import { signingState } from '@/composables/useSignFlow'
import ConsentView from '@/views/consent/ConsentView.vue'
import EntryView from '@/views/entry/EntryView.vue'
import ResultView from '@/views/result/ResultView.vue'
@@ -17,4 +18,24 @@ const router = createRouter({
],
})
router.beforeEach((to) => {
if (to.path === '/entry') {
return true
}
if (signingState.status === 'idle') {
return '/entry'
}
if (to.path === '/signer' && !signingState.consentAccepted) {
return '/consent'
}
if (to.path === '/result' && !signingState.signatureCaptured) {
return '/entry'
}
return true
})
export default router