feat: bmi

This commit is contained in:
skytek_xinliang
2026-09-18 09:58:52 +08:00
parent ea8793e34c
commit 0f3e7b8a56
15 changed files with 534 additions and 26 deletions
+18
View File
@@ -1,5 +1,6 @@
import { createRouter, createWebHistory } from "vue-router";
import Appointment from "@/pages/appointment.vue";
import BodyComposition from "@/pages/body-composition.vue";
import Checkin from "@/pages/checkin.vue";
import CheckinDetail from "@/pages/checkinDetail.vue";
import Course from "@/pages/course.vue";
@@ -53,6 +54,16 @@ const router = createRouter({
component: Profile,
meta: { requiresAuth: true, title: "個人資料修改|運動玩轉健康力" },
},
{
path: "/body-composition",
name: "body-composition",
component: BodyComposition,
meta: {
requiresAuth: true,
requiresUserID: true,
title: "身體數值分析|運動玩轉健康力",
},
},
{
path: "/appointment",
name: "appointment",
@@ -106,6 +117,13 @@ router.beforeEach(async (to) => {
};
}
if (to.meta.requiresUserID && !store.userID.trim()) {
return {
name: "login",
query: { redirect: to.fullPath },
};
}
if (to.meta.requiresFitnessGroup) {
const courseStore = useCourseStore();