|
@@ -27,11 +27,9 @@ const { data: copyright, send: load } = useRequest(copyrightMethod).onError(asyn
|
|
|
});
|
|
|
const { send: handle, loading } = useRequest(processMethod, { immediate: false })
|
|
|
.onSuccess(({ data }) => {
|
|
|
+ Visitor.$reset();
|
|
|
router.push({ path: data, replace: true }).then(
|
|
|
- () => {
|
|
|
- Visitor.$reset();
|
|
|
- if (visitor.value) Visitor.patientId = visitor.value;
|
|
|
- },
|
|
|
+ () => { if (visitor.value) Visitor.patientId = visitor.value; },
|
|
|
() => {}
|
|
|
);
|
|
|
})
|
|
@@ -180,7 +178,7 @@ function init({ width, height, container }: { width: number; height: number; con
|
|
|
}
|
|
|
|
|
|
onBeforeRouteLeave((to, from) => {
|
|
|
- if (to.path === '/register') return true;
|
|
|
+ if (to.path === '/register' || Visitor.patientId) return true;
|
|
|
return register().then((data) => !!data, () => false);
|
|
|
});
|
|
|
</script>
|