feat: 初始化项目脚手架

This commit is contained in:
UGREEN USER
2026-01-28 14:35:43 +08:00
commit 1377b18790
31 changed files with 13898 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
<template>
<div id="app">
<RouterView />
</div>
</template>
<script setup lang="ts">
// 根组件
</script>
<style>
#app {
width: 100%;
min-height: 100vh;
}
</style>
+9
View File
@@ -0,0 +1,9 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
body {
@apply bg-gray-50 text-gray-900;
}
}
+17
View File
@@ -0,0 +1,17 @@
// API 配置
export const API_BASE_URL = import.meta.env.VITE_API_BASE_URL || '/api'
export const API_TIMEOUT = 15000
// 本地存储键
export const STORAGE_KEYS = {
ACCESS_TOKEN: 'access_token',
REFRESH_TOKEN: 'refresh_token',
USER_INFO: 'user_info'
} as const
// 分页配置
export const PAGINATION = {
DEFAULT_PAGE: 1,
DEFAULT_LIMIT: 20,
MAX_LIMIT: 100
} as const
+21
View File
@@ -0,0 +1,21 @@
// 用户角色
export enum UserRole {
OWNER = 'owner',
ADMIN = 'admin',
MEMBER = 'member'
}
// 预约状态
export enum AppointmentStatus {
OPEN = 'open',
FULL = 'full',
CANCELLED = 'cancelled',
FINISHED = 'finished'
}
// 游戏平台
export enum GamePlatform {
PC = 'PC',
MOBILE = 'Mobile',
CONSOLE = 'Console'
}
+9
View File
@@ -0,0 +1,9 @@
import { createApp } from 'vue'
import App from './App.vue'
// 样式
import './assets/styles/main.css'
const app = createApp(App)
app.mount('#app')
+16
View File
@@ -0,0 +1,16 @@
// 统一响应格式
export interface ApiResponse<T = any> {
code: number
message: string
data: T
timestamp: number
}
// 分页响应
export interface PageResponse<T> {
items: T[]
total: number
page: number
limit: number
totalPages: number
}
+21
View File
@@ -0,0 +1,21 @@
export interface AppointmentInfo {
id: string
title: string
startTime: string
endTime: string
currentParticipants: number
maxParticipants: number
status: 'open' | 'full' | 'cancelled' | 'finished'
game: {
id: string
name: string
coverUrl: string
}
group: {
id: string
name: string
}
isParticipant: boolean
isCreator: boolean
isFull: boolean
}
+10
View File
@@ -0,0 +1,10 @@
export interface GameInfo {
id: string
name: string
coverUrl: string
description?: string
tags: string[]
minPlayers: number
maxPlayers: number
platform: string
}
+19
View File
@@ -0,0 +1,19 @@
export interface GroupInfo {
id: string
name: string
avatar: string
description?: string
currentMembers: number
maxMembers: number
myRole?: 'owner' | 'admin' | 'member'
tags?: string[]
createdAt?: string
}
export interface CreateGroupParams {
name: string
description?: string
avatar?: string
maxMembers?: number
tags?: string[]
}
+12
View File
@@ -0,0 +1,12 @@
export interface UserInfo {
id: string
username: string
nickname?: string
avatar?: string
email?: string
phone?: string
role?: string
isMember?: boolean
isOnline?: boolean
createdAt?: string
}
+7
View File
@@ -0,0 +1,7 @@
/// <reference types="vite/client" />
declare module '*.vue' {
import type { DefineComponent } from 'vue'
const component: DefineComponent<{}, {}, any>
export default component
}