feat: initial project setup with core infrastructure and api clients

- Add environment configs for dev/staging/prod environments
- Implement centralized axios request utility with standardized error handling
- Add shared TypeScript types for API responses and requests
- Create comprehensive API client modules for all core endpoints
- Configure vue router with all application page routes
- Add icon fonts, static assets, and loading animations
- Set up project documentation and collaboration guidelines
- Remove deprecated uni-app bridge component files
This commit is contained in:
duanshuwen
2026-05-26 21:42:36 +08:00
parent ad93ca5e8e
commit 548df7020c
30 changed files with 1213 additions and 560 deletions

View File

@@ -0,0 +1,29 @@
export interface ApiResponse<T> {
code: number;
message?: string;
data: T;
}
export interface RequestOptions {
signal?: AbortSignal;
headers?: Record<string, string>;
skipAuth?: boolean;
}
export type RequestContext = {
token: string | null;
clientId: string | null;
latitude: number | null;
longitude: number | null;
language: string | null;
};
export type NormalizedErrorKind = "business" | "http" | "network" | "unknown";
export interface NormalizedError extends Error {
kind: NormalizedErrorKind;
code?: number;
httpStatus?: number;
response?: unknown;
}