{"id":30196560,"url":"https://github.com/guoguodad/jd_mall","last_synced_at":"2025-09-04T15:44:02.919Z","repository":{"id":37421642,"uuid":"451901066","full_name":"GuoguoDad/jd_mall","owner":"GuoguoDad","description":"🔥🔥高仿京东商城App，具有完整的结构，代码整洁规范，结构清晰，集成Flutter模块，具备React-Native热更功能... 同款Flutter版本（ https://github.com/GuoguoDad/jd_mall_flutter.git ）","archived":false,"fork":false,"pushed_at":"2023-11-10T08:50:34.000Z","size":369461,"stargazers_count":212,"open_issues_count":1,"forks_count":42,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-08-13T05:39:29.311Z","etag":null,"topics":["android","kotlin","mvi","react-native"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GuoguoDad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-01-25T14:05:02.000Z","updated_at":"2025-08-07T15:18:14.000Z","dependencies_parsed_at":"2025-08-13T05:38:40.881Z","dependency_job_id":null,"html_url":"https://github.com/GuoguoDad/jd_mall","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/GuoguoDad/jd_mall","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuoguoDad%2Fjd_mall","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuoguoDad%2Fjd_mall/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuoguoDad%2Fjd_mall/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuoguoDad%2Fjd_mall/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GuoguoDad","download_url":"https://codeload.github.com/GuoguoDad/jd_mall/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuoguoDad%2Fjd_mall/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273632815,"owners_count":25140770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","kotlin","mvi","react-native"],"created_at":"2025-08-13T05:26:36.056Z","updated_at":"2025-09-04T15:44:02.885Z","avatar_url":"https://github.com/GuoguoDad.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 前言\n高仿京东商城App，具有完整的结构，代码整洁规范，结构清晰，集成Flutter模块，具备React-Native热更功能，...如果对你有帮助，给个star\n1. 使用kotlin语言开发，项目使用模块化开发，降低了耦合性\n2. 网络使用 retrofit2 + okhttp3方式，进行了高度的封装\n3. [使用leakcanary 内存泄漏检测](https://github.com/square/leakcanary)\n4. [基于MVI架构(airbnb的Mavericks)开发](https://airbnb.io/mavericks/#/README)\n5. [使用本地mock模拟服务端](https://github.com/mirrajabi/okhttp-json-mock)\n6. [采用ARouter路由管理](https://github.com/alibaba/ARouter/tree/master)\n7. 集成Flutter模块，填写订单页由flutter编写, module_flutter可单独运行\n8. 集成RN热更功能，[rn工程请见](https://github.com/GuoguoDad/mall_page.git)\n\n* ### 同款Flutter版本（ https://github.com/GuoguoDad/jd_mall_flutter.git ）\n\n###  **** 运行要求，Android环境，flutter环境， rn为热更，无需rn环境 ****\n\n# MVI架构\n\u003cimg src=\"images/framework.png\" title=\"\" alt=\"image\" width=\"800\"\u003e\n\n由于没有明确的状态管理标准，随着应用程序的增长或添加功能或事先没有计划的功能，视图渲染和业务逻辑可能会变得有点混乱，并且这种情况经常发生在Android应用开发过程中。可能你经常遇到状态管理导致业务逻辑和 UI 渲染的分工不明确，最终导致应用架构的混乱。而新提出的MVI架构，提倡一种单向数据流的设计思想，非常适合数据驱动型的UI展示项目。MVI的架构思想来源于前端，由于Model、View和Intent三部分组成。\n\n* Model: 与其他MVVM中的Model不同的是，MVI的Model主要指UI状态（State）。当前界面展示的内容无非就是UI状态的一个快照：例如数据加载过程、控件位置等都是一种UI状态\n* View: 与其他MVX中的View一致，可能是一个Activity、Fragment或者任意UI承载单元。MVI中的View通过订阅Intent的变化实现界面刷新（不是Activity的Intent、后面介绍）\n* Intent: 此Intent不是Activity的Intent，用户的任何操作都被包装成Intent后发送给Model进行数据请求\n\n# Flutter module 作为依赖项\n#### 方案 A - 依赖 Android Archive (AAR)\n- 这种方式会将 Flutter 库打包成由 AAR 和 POM artifacts 组成的本地 Maven 存储库。这种方案可以不需要安装 Flutter SDK 即可编译宿主应用。\n\n#### 方案 B - 依赖模块的源码\n- 该方式可以使你的 Android 项目和 Flutter 项目能够同步一键式构建。当你需要同时在这两个项目中进行快速迭代时，这种方案非常方便。必须安装 Flutter SDK 才能构建宿主应用程序。\n\n本项目采用的方案B，[细节详见](https://flutter.cn/docs/development/add-to-app)\n\n# 热更新\n热更新也叫动态更新，一种和web更新方式很类似。对比App的版本更新，热更新能及时修复线上存在的问题，大幅提升业务迭代效率。\n\n热更流程:\n\n\u003cimg src=\"images/process.png\" title=\"\" alt=\"image\"\u003e\n\n1，将本地打包好 Bundle 文件上传到 OSS ，同时生成MD5值。只要 Bundle 内容发生了变化，那么生成 MD5 值就是不一样的，用 MD5 保证文件的唯一性。\n\n2，上传前面生成的bundle包，然后将服务最新的线上 Bundle 修改成最新的，这时版本服务会在内部通过 mysql 或 redis 把线上最新文件给记录下来。\n(这里项目使用json文件记录)\n\n3，React Native App 发起版本请求，版本服务会直接把最新的 Bundle 告诉 React Native 应用。\n\n4，React Native 发起 CDN 资源请求\n资源请求会先询问某个 CDN 的边缘节点，如果该边缘节点没有缓存，则会去源站拉取；如果该边缘节点有缓存，则直接返回。\n\n# 效果\n### 首页\n\u003cimg src=\"images/home.gif\" title=\"\" alt=\"image\" width=\"351\"\u003e\n\n### 分类\n\u003cimg src=\"images/category.gif\" title=\"\" alt=\"image\" width=\"351\"\u003e\n\n### 购物车\n\u003cimg src=\"images/cart.gif\" title=\"\" alt=\"image\" width=\"351\"\u003e\n\n### 我的\n\u003cimg src=\"images/mine.gif\" title=\"\" alt=\"image\" width=\"351\"\u003e\n\n### 商品详情\n\u003cimg src=\"images/detail.gif\" title=\"\" alt=\"image\" width=\"351\"\u003e\n\n### 填写订单(flutter模块，混合)\n\u003cimg src=\"images/generateOrder.gif\" title=\"\" alt=\"image\" width=\"351\"\u003e\n\n### 账户设置(rn页面-拉取远程的bundle)\n\u003cimg src=\"images/setting.gif\" title=\"\" alt=\"image\" width=\"351\"\u003e\n\n# 第三方库\n| 库                       | 功能                      |\n| ----------------------- | ----------------------    |\n| **retrofit2**           | **网络**                   |\n| **okHttp3**             | **网络**                   |\n| **mavericks**           | **MVI框架**                |\n| **BaseRecyclerViewAdapterHelper**  | **万能适配器**   |\n| **PhotoView**           | **图片预览**                |\n| **ARouter**             | **组件化路由**              |\n| **coil**                | **图片加载**                |\n| **XPopup**              | **弹窗组件**                |\n| **banner**              | **滚动图**                  |\n| **SmartRefreshLayout**  | **智能下拉刷新框架**         |\n| **gson**                | **json解析**                |\n| **leakcanary**          | **内存泄漏检测库**           |\n\n# 声明\n⚠️本APP仅限于学习交流使用，请勿用于其它商业用途\n\n⚠️项目中使用的图片及字体等资源如有侵权请联系作者删除\n\n⚠️如使用本项目代码造成侵权与作者无关\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguoguodad%2Fjd_mall","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguoguodad%2Fjd_mall","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguoguodad%2Fjd_mall/lists"}