修改位置交互,修改代码逻辑

This commit is contained in:
2025-10-18 22:21:04 +08:00
parent c446df73b5
commit 39fa0b2d04
36 changed files with 2743 additions and 1995 deletions

View File

@@ -26,10 +26,13 @@ export interface SearchResult {
phone: string;
}
// 导入角色枚举
import { Role } from '../utils/roleUtils';
// 用户信息接口
export interface UserInfo {
id: number; // 用户ID
role: 'ADMIN' | 'DELIVERY_PERSON' | 'GUEST'; // 用户角色
role: Role; // 用户角色
token?: string; // 认证token
openid?: string; // 微信openid
session_key?: string; // 微信会话密钥
@@ -42,7 +45,7 @@ export interface EmployeeInfo {
id: number; // 员工ID
name: string; // 员工姓名
phone: string; // 员工电话
role?: 'ADMIN' | 'DELIVERY_PERSON' | 'GUEST'; // 员工角色
role?: Role; // 员工角色
}
// 地图标记点接口
@@ -143,4 +146,55 @@ export interface AMapRegeoResponse {
};
};
status: string;
}
// 页面组件接口定义
export interface IndexPageComponent {
data: {
longitude: number;
latitude: number;
scale: number;
markers: Marker[];
userInfo: UserInfo | null;
authStatus: {
hasWxCode: boolean;
userStatus: 'unknown' | 'registered' | 'unregistered' | 'signed_in' | 'signed_out';
};
showUserPanel: boolean;
showOrderPanel: boolean;
currentOrder: any;
currentDeliveryPerson: any;
currentWarehouse: any;
currentPanelPosition: { x: number; y: number };
polyline: any;
pendingOrders: any[];
currentRoute: any;
showRoute: boolean;
routeDistance: number;
routeDuration: number;
showWarehouseModal: boolean;
showDeliveryPersonModal: boolean;
warehouseModalState: 'bottom' | 'full';
deliveryPersonModalState: 'bottom' | 'full';
showSignOutButton: boolean;
showSignInButton: boolean;
showRegisterButton: boolean;
showAuthButton: boolean;
};
setData(data: Partial<IndexPageComponent['data']>): void;
mainPageModule?: any;
}
// 登录模块接口定义
export interface LoginModule {
processUserInfo(userInfo: UserInfo): Promise<UserInfo>;
updatePageAfterLogin(userInfo: UserInfo): void;
checkLoginStatus(): boolean;
logout(): Promise<void>;
showManualLoginModal(): Promise<boolean>;
handleLoginFailure(resolve: (value: boolean) => void): Promise<void>;
showCloseAppOption(resolve: (value: boolean) => void): void;
handleSignIn(): Promise<boolean>;
}