diff --git a/client/src/App.vue b/client/src/App.vue index 366c106..cf9a543 100644 --- a/client/src/App.vue +++ b/client/src/App.vue @@ -1,5 +1,8 @@ + + diff --git a/client/src/layouts/DesktopLayout.vue b/client/src/layouts/DesktopLayout.vue new file mode 100644 index 0000000..482383c --- /dev/null +++ b/client/src/layouts/DesktopLayout.vue @@ -0,0 +1,9 @@ + + + diff --git a/client/src/layouts/MobileLayout.vue b/client/src/layouts/MobileLayout.vue new file mode 100644 index 0000000..3de89b3 --- /dev/null +++ b/client/src/layouts/MobileLayout.vue @@ -0,0 +1,8 @@ + + + diff --git a/client/src/router/index.ts b/client/src/router/index.ts new file mode 100644 index 0000000..3bd15d8 --- /dev/null +++ b/client/src/router/index.ts @@ -0,0 +1,8 @@ +export const routes = { + dashboard: '/', + practice: '/practice', + analysis: '/analysis', + plan: '/plan', + news: '/news', + profile: '/profile' +} as const diff --git a/client/src/stores/app.ts b/client/src/stores/app.ts new file mode 100644 index 0000000..dbd630b --- /dev/null +++ b/client/src/stores/app.ts @@ -0,0 +1,9 @@ +import { defineStore } from 'pinia' + +export const useAppStore = defineStore('app', { + state: () => ({ busy: false, notice: '' }), + actions: { + setBusy(value: boolean) { this.busy = value }, + notify(message: string) { this.notice = message } + } +}) diff --git a/client/src/stores/practice.ts b/client/src/stores/practice.ts new file mode 100644 index 0000000..0fb16d8 --- /dev/null +++ b/client/src/stores/practice.ts @@ -0,0 +1,5 @@ +import { defineStore } from 'pinia' + +export const usePracticeStore = defineStore('practice', { + state: () => ({ sessionId: null as string | null, currentIndex: 0 }) +}) diff --git a/client/src/stores/profile.ts b/client/src/stores/profile.ts new file mode 100644 index 0000000..ef65d6f --- /dev/null +++ b/client/src/stores/profile.ts @@ -0,0 +1,5 @@ +import { defineStore } from 'pinia' + +export const useProfileStore = defineStore('profile', { + state: () => ({ nickname: '备考人', targetScore: 72, examDate: '' }) +}) diff --git a/client/src/types/view-models.ts b/client/src/types/view-models.ts new file mode 100644 index 0000000..9ab237e --- /dev/null +++ b/client/src/types/view-models.ts @@ -0,0 +1 @@ +export type NavigationItem = { label: string; index: number } diff --git a/client/src/utils/format.ts b/client/src/utils/format.ts new file mode 100644 index 0000000..3eed9a4 --- /dev/null +++ b/client/src/utils/format.ts @@ -0,0 +1 @@ +export const formatPercent = (value: number) => `${Math.round(value)}%` diff --git a/client/src/views/dashboard/DashboardView.vue b/client/src/views/dashboard/DashboardView.vue new file mode 100644 index 0000000..d59c6af --- /dev/null +++ b/client/src/views/dashboard/DashboardView.vue @@ -0,0 +1,3 @@ +