feat: HttpOnly Cookie 登入狀態初始化

This commit is contained in:
skytek_xinliang
2026-08-31 09:26:47 +08:00
parent db089ce267
commit 28cda7be1c
5 changed files with 60 additions and 7 deletions
@@ -513,7 +513,7 @@
</template>
<script setup lang="ts">
import { computed, onMounted, reactive, ref } from "vue";
import { computed, onMounted, reactive, ref, watch } from "vue";
import { useRouter } from "vue-router";
import type {
ChronicDisease,
@@ -687,16 +687,25 @@ function scrollToPageTop() {
window.scrollTo({ top: 0 });
}
function clearErrorMessage() {
errorMessage.value = "";
}
function goToPreviousStep() {
clearErrorMessage();
currentStep.value -= 1;
scrollToPageTop();
}
function goToNextStep() {
clearErrorMessage();
currentStep.value += 1;
scrollToPageTop();
}
watch(profileForm, clearErrorMessage);
watch(assessmentForm, clearErrorMessage);
function buildAssessmentRequest(): SelfAssessmentRequest | null {
if (
!profileForm.name.trim() ||