{"id":13602308,"url":"https://github.com/js-newbee/taro-yanxuan","last_synced_at":"2025-05-15T11:07:43.676Z","repository":{"id":38348603,"uuid":"168635064","full_name":"js-newbee/taro-yanxuan","owner":"js-newbee","description":"首个 Taro 多端统一实例 - 网易严选（小程序 + H5 + React Native） - By 趣店 FED","archived":false,"fork":false,"pushed_at":"2022-12-10T16:52:43.000Z","size":5336,"stargazers_count":2661,"open_issues_count":44,"forks_count":561,"subscribers_count":67,"default_branch":"master","last_synced_at":"2025-04-14T19:58:13.716Z","etag":null,"topics":["react","react-native","taro"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/js-newbee.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-01T03:12:04.000Z","updated_at":"2025-04-11T11:29:24.000Z","dependencies_parsed_at":"2023-01-26T06:45:08.254Z","dependency_job_id":null,"html_url":"https://github.com/js-newbee/taro-yanxuan","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/js-newbee%2Ftaro-yanxuan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/js-newbee%2Ftaro-yanxuan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/js-newbee%2Ftaro-yanxuan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/js-newbee%2Ftaro-yanxuan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/js-newbee","download_url":"https://codeload.github.com/js-newbee/taro-yanxuan/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254328384,"owners_count":22052632,"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","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":["react","react-native","taro"],"created_at":"2024-08-01T18:01:19.799Z","updated_at":"2025-05-15T11:07:43.645Z","avatar_url":"https://github.com/js-newbee.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","开源项目"],"sub_categories":["Taro1"],"readme":"# taro-yanxuan\n\n![overview](https://qit-team.github.io/public/images/taro-yanxuan/overview.png)\n\n首个 [Taro](https://github.com/NervJS/taro) 多端统一实例 - 网易严选（小程序 + H5 + React Native）。\n\n本项目基于**趣店 FED** 在 Taro 多端统一开发方面的实践经验，以网易严选小程序为载体，旨在探讨如何以正确的方式使用 Taro 进行多端开发，具体可查看文章 [Taro 多端开发的正确姿势：打造三端统一的网易严选（小程序、H5、React Native）](https://juejin.im/post/5c6a151f518825625e4ac830)。\n\n## 效果预览\n\n小程序端已支持微信小程序、支付宝小程序，但无法提供在线版，请 clone 代码本地运行。\n\n本项目直接调用的网易严选接口，若要体验登录、购物车功能，请使用网易邮箱账号登录。\n\n| 小程序 | H5 - [访问链接](http://jsnewbee.com/taro-yanxuan/) | React Native |\n| :--------: | :--------:| :--------: |\n| 请 clone 代码本地运行 | ![H5](https://qit-team.github.io/public/images/taro-yanxuan/h5-qr-code.png) | [Expo Snacks](https://snack.expo.io/@caiminxing/taro-yanxuan) |\n\n如下是 **React Native** 的运行截图：\n\n| 首页、分类 | 详情、加购物车 | 购物车、个人 |\n| :--------: | :--------:| :--------: |\n| ![首页、分类](https://qit-team.github.io/public/images/taro-yanxuan/video-01.gif) | ![二级分类、详情](https://qit-team.github.io/public/images/taro-yanxuan/video-02.gif) | ![购物车、个人](https://qit-team.github.io/public/images/taro-yanxuan/video-03.gif) |\n\n## 本地运行\n\n本项目直接调用的网易严选接口（网易登录接口改动，暂时无法登陆）。\n\n``` bash\n# 安装依赖，或 npm i\nyarn\n\n# 运行小程序，编译后的文件位于项目下的 dist 文件夹\n# （微信 dev:weapp，支付宝 dev:alipay）\nnpm run dev:weapp\n\n# 运行 H5\nnpm run dev:h5\n\n# 运行 React Native，请务必查阅文档：https://nervjs.github.io/taro/docs/react-native.html\nnpm run dev:rn\n```\n\n## 项目说明\n\n本项目的主要目的是阐述多端开发思路、技巧，力求直观、方便阅读，因此是在 `taro init` 的基础上开发的，没有去做太多封装。诸如是用 Redux 还是 Mobx，网络请求怎么封装比较完美并不是本项目的重点。\n\n本项目不会去实现一个完整的网易严选，但也实现了足够多的功能、细节进行踩坑，具体涉及的踩坑点、注意事项都在代码中以注释 `// TODO`（Taro 还未支持的）、`// NOTE`（开发技巧、注意事项）注明了。\n\n最后，有一点很遗憾，就是一开始没有保留一份 mock 数据，后面网易严选改动挺大，主要是登录逻辑也变了，导致不少功能现在没法运行，后续有空会完善 mock 功能。\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjs-newbee%2Ftaro-yanxuan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjs-newbee%2Ftaro-yanxuan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjs-newbee%2Ftaro-yanxuan/lists"}