{"id":18332198,"url":"https://github.com/canfoo/react-native-taopiaopiao","last_synced_at":"2025-04-06T03:33:40.191Z","repository":{"id":239789422,"uuid":"113551760","full_name":"canfoo/react-native-taopiaopiao","owner":"canfoo","description":"react-native 构建全栈淘票票","archived":false,"fork":false,"pushed_at":"2017-12-13T14:54:07.000Z","size":3236,"stargazers_count":30,"open_issues_count":0,"forks_count":13,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-21T16:21:20.430Z","etag":null,"topics":["mobx","react-native"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/canfoo.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}},"created_at":"2017-12-08T08:38:07.000Z","updated_at":"2022-08-19T06:35:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"d60b4441-f62d-45e1-af48-aa0a132eda93","html_url":"https://github.com/canfoo/react-native-taopiaopiao","commit_stats":null,"previous_names":["canfoo/react-native-taopiaopiao"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canfoo%2Freact-native-taopiaopiao","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canfoo%2Freact-native-taopiaopiao/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canfoo%2Freact-native-taopiaopiao/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canfoo%2Freact-native-taopiaopiao/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/canfoo","download_url":"https://codeload.github.com/canfoo/react-native-taopiaopiao/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247430838,"owners_count":20937873,"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":["mobx","react-native"],"created_at":"2024-11-05T19:38:00.919Z","updated_at":"2025-04-06T03:33:37.036Z","avatar_url":"https://github.com/canfoo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native 构建淘票票\n### [react构建淘票票，请点击这里](https://github.com/canfoo/react-taopiaopiao)\n### [vue2.0构建淘票票，请点击这里](https://github.com/canfoo/vue2.0-taopiaopiao)\n\n## 描述\n本项目是使用react-navie构建的app项目，已经成功在ios真机跑起来，android机暂时没有测试。分享的目的无他，只供大家学习、讨论。（ps: 由于之前已经分享过[vue2.0构建淘票票](https://github.com/canfoo/vue2.0-taopiaopiao)和[react构建淘票票](https://github.com/canfoo/react-taopiaopiao)了，所以这次的demo不是没有之前的完整，但是作为入门教材还是绰绰有余的）\n\n主要技术栈：\u003cbr/\u003e\n- react-native\n- react-native-video\n- react-navigation\n- mobx\n- nodejs\n- express\n\n## 如何运行\n下载项目\n```\n git clone https://github.com/canfoo/react-native-taopiaopiao.git\n```\n 打开一个终端（称这个终端为A终端）进入到react-native-taopiaopiao目录安装依赖包（注意：如果`npm install` 不能正常安装完成，请使用`cnpm install`进行安装）\n```\n npm install\n```\n 打开另一个一个终端（称这个终端为B终端）进入到server目录安装依赖包\n```\n npm install\n```\n启动server服务（得先启动后台服务，否则app没有数据），在server目录（B终端）下执行以下命令，成功执行会终端会提示服务端口号为9000\n```\n npm run start\n```\n启动react-native服务，在react-native-taopiaopiao目录（A终端）里执行以下命令（如果报错的话，直接在找到目录的里的启动文件，直接双击启动，例如直接双击ios内的reactNativeTaopiaopiao.xcodeproj文件）\n```\n react-native run-ios\n```\n\n## 项目预览\n![Mou icon](./Screenshots/rn_tpp_s.gif)\n\n## 后台接口\n本项目是手动抓取淘票票部分数据，数据是16年12月份的，城市数据只有北上广有数据，其它城市都是随机从北上广数据抽取过来的，电影数据也是部分有数据。抓取的数据存放在server目录里的database里，供前端调用。\n\n1. 访问淘票票首页路径： `http://localhost:9000/app`\n\n2. 部分数据接口\n\t- 获取热映数据 \n\t```\n\tmethod: GET\n \turl: http://localhost:9000/movie/hot/?city=bj\n \t参数说明: city可以为bj、sh、gz\n\t```\n\t- 获取即将上映数据 \n\t```\n\tmethod: GET\n \turl: http://localhost:9000/movie/coming/?limit=20\u0026offset=0\n \t参数说明: limit为每次请求的数据数量，offset为所有数据的偏移量\n\t```\n\t- 获取城市数据\n\t```\n\tmethod: GET\n \turl: http://localhost:9000/movie/city\n\t```\n\t- 获取电影院数据\n\t```\n\tmethod: GET\n \turl: http://localhost:9000/movie/cinema/?city=bj\n \t参数说明:  city可以为bj、sh、gz\n\t```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcanfoo%2Freact-native-taopiaopiao","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcanfoo%2Freact-native-taopiaopiao","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcanfoo%2Freact-native-taopiaopiao/lists"}