fix(mp): 修复 72 个 TypeScript 类型错误 — noImplicitAny 全量通过
- 移除 28 个文件中不再需要的 import React (jsx: react-jsx) - 修复 catch(err: any) → catch(err: unknown) 类型收窄 - 修复 __wxConfig / CanvasRenderingContext2D 全局类型声明 - 修复 DTO 类型不匹配 (UpdateDialysisRecordReq, notificationService) - 移除 52 个未使用的 import/变量/常量 - 修复 services 类型 (auth.ts tenant_id, actionInbox boolean, device-sync)
This commit is contained in:
@@ -18,13 +18,6 @@ let cachedRolesObj: string[] = [];
|
||||
let cachedPatientJson = '';
|
||||
let cachedPatientObj: authApi.PatientInfo | null = null;
|
||||
|
||||
interface BindPhoneResp {
|
||||
access_token: string;
|
||||
refresh_token: string;
|
||||
expires_in?: number;
|
||||
user: { id: string; username: string; display_name?: string; phone?: string; tenant_id?: string };
|
||||
}
|
||||
|
||||
interface AuthState {
|
||||
user: { id: string; username: string; display_name?: string; phone?: string; tenant_id?: string } | null;
|
||||
roles: string[];
|
||||
@@ -221,7 +214,7 @@ export const useAuthStore = create<AuthState>((set, get) => ({
|
||||
clearLoggingOut();
|
||||
get().loadPatients();
|
||||
return true;
|
||||
} catch (err: any) {
|
||||
} catch (err: unknown) {
|
||||
secureRemove('wechat_openid');
|
||||
set({ loading: false });
|
||||
throw err;
|
||||
|
||||
Reference in New Issue
Block a user