# X-Financial Mobile 初始化说明 ## 运行 ```powershell npm.cmd install --registry=https://registry.npmjs.org npm.cmd run android ``` Android 模拟器访问本机后端时,默认 API 地址为: ```text http://10.0.2.2:8000/api/v1 ``` ## 当前工程边界 - `src/app`:Expo Router 页面入口,已初始化首页、报销、审批、AI 助手、我的。 - `src/shared`:API、登录态、状态映射、公共组件和 mock 数据。 - `src/platform`:相机、相册、语音输入等平台能力。 - `src/features`:后续承载复杂业务逻辑,避免页面文件继续膨胀。 ## 已接入能力 - Android 权限:相机、麦克风、相册图片读取。 - 相机/相册:`platform/camera/receiptCapture.ts`。 - 语音录制占位:`platform/voice/voiceInput.ts`。 - 请求缓存:`@tanstack/react-query`。 - 轻量状态:`zustand`。 - 安全存储:`expo-secure-store`。 ## 开发原则 普通问答、票据预览和 AI 识别建议不自动保存草稿;只有用户明确点击保存、生成、继续提交或关联已有草稿,才进入持久化链路。