fix(mp): Phase 0 基础设施修复 — secureGet 解密 + Storage 一致性

- secureGet: 移除错误的 startsWith 条件,始终尝试 XOR 解密
- request.ts: current_patient_id 读取改用 safeGet,清理改用 secureRemove
- health.ts: getTodaySummary 使用 getCachedPatientId 替代直接 Storage
- auth.ts: analytics_queue 清理改用明文 Taro.removeStorageSync
This commit is contained in:
iven
2026-05-21 16:13:43 +08:00
parent 43795b2fb7
commit 23f7bcb8ce
4 changed files with 16 additions and 14 deletions

View File

@@ -263,7 +263,8 @@ export const useAuthStore = create<AuthState>((set, get) => ({
secureRemove('wechat_openid');
secureRemove('current_patient');
secureRemove('current_patient_id');
secureRemove('analytics_queue');
// analytics_queue 使用明文存储analytics.ts STORAGE_KEY = 'analytics_queue'
Taro.removeStorageSync('analytics_queue');
secureRemove('edit_patient');
secureRemove('ai_chat_history');
// 清理 BLE DataBuffer 缓存key 格式ble_buffer_{patientId}_{bucket}