Coder Social home page Coder Social logo

eleteam / shop-react-native Goto Github PK

View Code? Open in Web Editor NEW
1.1K 106.0 473.0 2.49 MB

EleTeam开源项目 - 电商全套解决方案之 React Native 版 - Shop-React-Native。一个类似京东/天猫/淘宝的商城,有对应的服务端支持,由EleTeam团队维护!

License: MIT License

Python 0.58% Java 0.51% JavaScript 97.37% Objective-C 1.54%

shop-react-native's Introduction

Shop-React-Native

Shop-React-Native 是基于 React Native 和 Redux 实现的电商类APP,同时运行在iOS和Android平台上。持续更新中,欢迎一起讨论学习!

如果你支持这个项目,请 Star and Fork Me。

注:有任何问题请在Issues提交,EleTeam会尽快回复。

EleTeam开源项目 - 电商全套解决方案之 React Native 版 - Shop-React-Native。一个类似京东/天猫/淘宝的商城,有对应的服务端支持,由EleTeam团队维护!

服务端是PHP商城,对应项目是 Shop-PHP-Yii2,https://github.com/EleTeam/Shop-PHP-Yii2

功能如下:

支持下拉刷新和上拖加载更多
广告模块
文章模块
用户模块
产品模块
购物车模块
订单模块
地址模块
分享&收藏
营销模块

依赖组件:

"dependencies": {
    "react": "15.3.1",                      //react框架
    "react-native": "0.33.0",               //react native
    "react-native-device-info": "^0.9.5",   //获取硬件信息
    "react-native-root-toast": "^1.0.3",    //纯JS toast, 用于错误提示的小弹窗
    "react-native-swiper": "^1.4.4",        //滑动查看图片
    "react-native-tab-navigator": "^0.3.3", //纯JS底部导航条, 同时适用在iOS和Android上
    "react-native-vector-icons": "^2.0.3",  //图标库, 需要更改原生文件的组件, 查看: https://www.npmjs.com/package/react-native-vector-icons
    "react-redux": "^4.4.5",                //将redux跟react应用结合起来
    "redux": "^3.5.2",                      //数据流动的控制
    "redux-persist": "^2.0.1",              //将store对象存储到本地, 从本地恢复数据到store中
    "redux-thunk": "^2.1.0"                 //redux-thunk
    
}

访问在线服务器:

取消注释, 在文件: app/common/constants_url.js: 
const kUrlHost = 'http://api.eleteam.com/v1';    //在线服务器

查看服务器是否可用

http://api.eleteam.com/v1/banner/list

安装出现问题

1. Application Shop-React-Native has not been registered. This is either due to a require() error during initialization or failure to call AppRegistry.registerComponent
解决办法:
    造成这种错误有两种情况:
    1. AppRegistry.registerComponent('项目名', () => 项目名); 与./ios/项目名/appDelegate.m中的RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation moduleName:@"项目名" initialProperties:nil launchOptions:launchOptions]; 不同
      在Android项目中可能是./android/app/src/main/java/com/项目名/MainActivity.java中的mReactRootView.startReactApplication(mReactInstanceManager, "项目名", null); 没有保持一致,修改方法:编辑成相同的参数即可。
    2. 有可能你同时在运行一个以上的程序。如果你的react-native在运行程序A而你打开了程序B,也会出现相同的问题。解决方法:关闭其它React Native程序, 只运行一个。

react-native 的学习文档:

入门基础: http://reactnative.cn/docs/0.31/getting-started.html
组件的生命周期: http://www.race604.com/react-native-component-lifecycle

部分App界面:

@author Tony Wong
@copyright Copyright © 2016 EleTeam. All rights reserved.
@license The MIT License (MIT)
此源码遵守 The MIT License (MIT),可用于商业上,但是因此带来的商业损失EleTeam团队不承担责任。

shop-react-native's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shop-react-native's Issues

Application ShopReactNative has not been registered

请教下错误是啥意思

Application ShopReactNative has not been registered. This is either due to a require() error during initialization or failure to call AppRegistry.registerComponent.

runApplication
AppRegistry.js:93
__callFunction
MessageQueue.js:229

MessageQueue.js:111
guard
MessageQueue.js:42
callFunctionReturnFlushedQueue
MessageQueue.js:110

关于不能访问api接口

readme 里已经说明了,api接口需要下载Shop-for-PHP-Yii2这个项目,在本地部署一下就好了

项目解析

感谢 EleTeam 开源了这个项目,对我的开发提供了很多帮助。我在看源码的时候有一些理解困难,比如 CartPage 这个文件里面的界面和网络请求的交互实现。希望 EleTeam 能对此项目结构和一些重点功能实现做一些说明,多谢。

请问下,首页的banner不知道为什么读不到图片

刚开始研究RN,现在这个app 打开首页banner读不到 还有在我的安卓手机上, 部分控件有一半和底栏重叠了,还有我的页面 几个图标和内容都挤在一块了,是什么原因 我可以直接修改 pages页里面的样式吗?
谢谢了

在Android上运行报错,TabBarItemIOS

首先非常感谢EleTeam的奉献,让我有机会用这个项目学习RN
在git clone,npm install,安装vector Icon并重运行后,运行react-native run-android遇到这样一个错误
image
根据报错似乎是android上使用了ios控件无法运行,请问如何解决呢?谢谢

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.