# axios_harmony **Repository Path**: javacse/axios_harmony ## Basic Information - **Project Name**: axios_harmony - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-03-27 - **Last Updated**: 2025-03-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## Harmony_OS Next TodoList Or Axios ### 本项目使用 V2 状态管理管理数据,并且使用MVVM模式.TodoList列表与Axios模拟登录的代码编写 MVVM模式 ,数据层(Model)、逻辑层(ViewModel)和展示层(View) ### 项目配置 - [Harmony_OS SDK: API13](https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V13/development-intro-api-V13?catalogVersion=V13) - [ohos/axios(V2.2.5)](https://ohpm.openharmony.cn/#/cn/detail/@ohos%2Faxios) ### 功能 - TodoList `已完成` - 新增 - 状态变更 - 删除 - uiAbility间数据共享 - Axios 功能示例 `已完成` - 使用 Axios 模拟登录实现 ### 示例 ![](demo.gif) ### 项目结构 ``` ├─main │ ├─ets │ │ ├─axios │ │ │ HttpApi.ets // API 接口集合 │ │ │ HttpAxios.ets // Axios 自定义实现 │ │ │ HttpAxiosClient.ets // Axios 客户端 │ │ ├─builder │ │ │ ActionButtonBuilder.ets // 全局按钮自定义构建函数 │ │ │ UserInfoBuilder.ets // 全局用户信息卡片自定义构建函数 │ │ ├─components │ │ │ TaskItem.ets // 任务详情组件 │ │ ├─entryability │ │ ├─entrybackupability │ │ ├─model │ │ │ LoginUser.ets // 登录用户信息类型 │ │ │ LoginUserModel.ets // 登录数据处理 │ │ │ model.md │ │ │ TaskListModel.ets // 列表数据处理 │ │ │ TaskModel.ets // 列表数据类型 │ │ ├─pages │ │ │ Index.ets │ │ │ LoginPage.ets // 登录页面 │ │ │ SettingPage.ets // 设置页面 │ │ │ TodoListPage.ets // 任务列表页面 │ │ ├─settingability │ │ │ SettingAbility.ets // 设置Ability │ │ ├─view │ │ │ BottomView.ets // 列表底部按钮View │ │ │ ListView.ets // 列表View │ │ │ LoginInfoView.ets // 登录信息View │ │ │ LoginView.ets // 登录页面View │ │ │ TitleView.ets // 列表标题View │ │ └─viewmodel │ │ Login.ets // 登录参数 │ │ Setting.ets // 设置页参数 │ │ TaskListViewModel.ets // 任务列表ViewModel │ │ TaskViewModel.ets // 任务ViewModel │ │ UserInfoViewModel.ets // 用户信息ViewModel │ │ UserViewModel.ets // 用户信息ViewModel │ │ ViewModel.md │ └─resources ... └─ ... ```