vitesse-yitisheng-web/project_task.md

2.0 KiB

Project Tasks

  • [Task 1] Global Message Component, API Encapsulation, and Login/Logout Integration

    • Check/Implement Global Message Component
    • Install axios
    • Create src/service/request/index.ts
    • Create src/service/api/auth.ts
    • Update src/stores/user.ts (Pinia + Persistence)
    • Integrate Login/Logout in TheNavigation.vue
    • Install crypto-js and types
    • Configure API secret in environment variables
    • Update Axios request interceptor with signature logic
    • Fix CORS by updating VITE_API_BASE_URL
    • Refactor vite.config.ts to use loadEnv for dynamic proxy configuration
    • Update .env.development with VITE_API_PROXY_TARGET
    • Prioritize backend error message in Axios response interceptor
    • Check TheNavigation.vue for reactive user state usage
    • Update TheNavigation.vue template to toggle Login/User info based on store state
  • [Task 2] Score API Encapsulation and Business Integration

    • Create src/service/api/score.ts with types
    • Create src/stores/score.ts
    • Integrate Get Score in TheNavigation.vue
    • Integrate Save Score in ScoreForm.vue
  • [Task 3] Enhance WMessage Component

    • Add position support to src/utils/message.ts (top/bottom/left/right/center)
  • [Task 4] Implement Fullscreen Loading

    • Create src/components/ui/WLoading.vue
    • Create src/utils/loading.ts logic
    • Update src/service/request/index.ts to handle showLoading parameter