├── .babelrc ├── .buckconfig ├── .flowconfig ├── .gitattributes ├── .gitignore ├── .tags ├── .tags1 ├── .watchmanconfig ├── Component ├── Home │ ├── XMGBottomCommonCell.js │ ├── XMGGuestYouLike.js │ ├── XMGHome.js │ ├── XMGHomeDetail.js │ ├── XMGHomeMiddleView.js │ ├── XMGMiddleBottomView.js │ ├── XMGMiddleCommonView.js │ ├── XMGShopCenter.js │ ├── XMGShopCenterDetailView.js │ ├── XMGTopListView.js │ └── XMGTopView.js ├── Main │ └── XMGMain.js ├── Mine │ ├── MiddleData.json │ ├── XMGCommonMyCell.js │ ├── XMGMine.js │ ├── XMGMineHeaderView.js │ └── XMGMineMiddleView.js ├── More │ ├── XMGCommonCell.js │ └── XMGMore.js ├── Shop │ └── XMGShop.js └── Source │ ├── common_arrow_right.png │ ├── coupon_1.png │ ├── giftcard.png │ ├── h_0.png │ ├── h_1.png │ ├── h_10.png │ ├── h_2.png │ ├── h_3.png │ ├── h_4.png │ ├── h_5.png │ ├── h_6.png │ ├── h_7.png │ ├── h_8.png │ ├── h_9.png │ ├── slide_TeachingSource.png │ ├── slide_Ver_Refresh.png │ ├── slide_alert.png │ ├── slide_feedback.png │ ├── slide_setting.png │ ├── zr_exam.png │ ├── zr_exam_h.png │ ├── zr_home.png │ ├── zr_home_h.png │ ├── zr_konwledge.png │ ├── zr_konwledge_h.png │ ├── zr_train.png │ └── zr_train_h.png ├── LocalData ├── HomeGuestYouLike.json ├── HomeHotData.json ├── HomeTopMiddle.json ├── HomeTopMiddleLeft.json ├── TopMenu.json ├── XMG_Home_D4.json └── XMG_Home_D5.json ├── README.md ├── __tests__ ├── index.android.js └── index.ios.js ├── android ├── app │ ├── BUCK │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── xmgbuy │ │ │ ├── MainActivity.java │ │ │ └── MainApplication.java │ │ └── res │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ └── values │ │ ├── strings.xml │ │ └── styles.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── keystores │ ├── BUCK │ └── debug.keystore.properties └── settings.gradle ├── app.json ├── index.android.js ├── index.ios.js ├── ios ├── XMGBuy-tvOS │ └── Info.plist ├── XMGBuy-tvOSTests │ └── Info.plist ├── XMGBuy.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ ├── XMGBuy-tvOS.xcscheme │ │ └── XMGBuy.xcscheme ├── XMGBuy │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Base.lproj │ │ └── LaunchScreen.xib │ ├── Images.xcassets │ │ ├── AppIcon-5.appiconset │ │ │ ├── Contents.json │ │ │ ├── iPhone 7-20@2x.png │ │ │ ├── iPhone 7-20@3x.png │ │ │ ├── iPhone 7-60@2x.png │ │ │ ├── iPhone 7-60@3x.png │ │ │ ├── iPhone 7-Small-40@2x.png │ │ │ ├── iPhone 7-Small-40@3x.png │ │ │ ├── iPhone 7-Small.png │ │ │ ├── iPhone 7-Small@2x.png │ │ │ └── iPhone 7-Small@3x.png │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Contents.json │ │ ├── IMG_3814.imageset │ │ │ ├── Contents.json │ │ │ └── IMG_3814.PNG │ │ ├── LaunchImage-1.launchimage │ │ │ ├── Contents.json │ │ │ ├── launchImage3_5.png │ │ │ ├── launchImage3_5@2x-1.png │ │ │ ├── launchImage3_5@2x.png │ │ │ ├── launchImage4_0@2x-1.png │ │ │ ├── launchImage4_0@2x.png │ │ │ ├── launchImage4_7@2x.png │ │ │ └── launchImage5_5@3x.png │ │ ├── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ └── LaunchImage.png │ │ ├── ad1.imageset │ │ │ ├── Contents.json │ │ │ └── ad1.png │ │ ├── code_display.imageset │ │ │ ├── Contents.json │ │ │ └── code_display@2x.png │ │ ├── common_back.imageset │ │ │ ├── Contents.json │ │ │ └── common_back.png │ │ ├── coupon_0.imageset │ │ │ ├── Contents.json │ │ │ └── coupon_0.png │ │ ├── coupon_1.imageset │ │ │ ├── Contents.json │ │ │ └── coupon_1.png │ │ ├── fod_1.imageset │ │ │ ├── Contents.json │ │ │ └── fod_1.png │ │ ├── fod_2.imageset │ │ │ ├── Contents.json │ │ │ └── fod_2.png │ │ ├── h_10.imageset │ │ │ ├── Contents.json │ │ │ └── h_10.png │ │ ├── h_11.imageset │ │ │ ├── Contents.json │ │ │ └── h_11.png │ │ ├── h_12.imageset │ │ │ ├── Contents.json │ │ │ └── h_12.png │ │ ├── h_13.imageset │ │ │ ├── Contents.json │ │ │ └── h_13.png │ │ ├── h_14.imageset │ │ │ ├── Contents.json │ │ │ └── h_14.png │ │ ├── h_15.imageset │ │ │ ├── Contents.json │ │ │ └── h_15.png │ │ ├── h_2.imageset │ │ │ ├── Contents.json │ │ │ └── h_2.png │ │ ├── h_3.imageset │ │ │ ├── Contents.json │ │ │ └── h_3.png │ │ ├── h_4.imageset │ │ │ ├── Contents.json │ │ │ └── h_4.png │ │ ├── h_5.imageset │ │ │ ├── Contents.json │ │ │ └── h_5.png │ │ ├── h_6.imageset │ │ │ ├── Contents.json │ │ │ └── h_6.png │ │ ├── h_7.imageset │ │ │ ├── Contents.json │ │ │ └── h_7.png │ │ ├── h_8.imageset │ │ │ ├── Contents.json │ │ │ └── h_8.png │ │ ├── h_9.imageset │ │ │ ├── Contents.json │ │ │ └── h_9.png │ │ ├── hot_0.imageset │ │ │ ├── Contents.json │ │ │ └── hot_0.png │ │ ├── hot_1.imageset │ │ │ ├── Contents.json │ │ │ └── hot_1.png │ │ ├── hot_2.imageset │ │ │ ├── Contents.json │ │ │ └── hot_2.png │ │ ├── hot_3.imageset │ │ │ ├── Contents.json │ │ │ └── hot_3.png │ │ ├── left_search.imageset │ │ │ ├── Contents.json │ │ │ └── left_search@2x.png │ │ ├── my_avator.imageset │ │ │ ├── Contents.json │ │ │ └── my_avator.png │ │ ├── nice_0.imageset │ │ │ ├── Contents.json │ │ │ └── nice_0.png │ │ ├── nice_1.imageset │ │ │ ├── Contents.json │ │ │ └── nice_1.png │ │ ├── nice_2.imageset │ │ │ ├── Contents.json │ │ │ └── nice_2.png │ │ ├── nice_3.imageset │ │ │ ├── Contents.json │ │ │ └── nice_3.png │ │ ├── nice_4.imageset │ │ │ ├── Contents.json │ │ │ └── nice_4.png │ │ ├── nice_5.imageset │ │ │ ├── Contents.json │ │ │ └── nice_5.png │ │ ├── nice_6.imageset │ │ │ ├── Contents.json │ │ │ └── nice_6.png │ │ ├── nice_7.imageset │ │ │ ├── Contents.json │ │ │ └── nice_7.png │ │ ├── nice_f1.imageset │ │ │ ├── Contents.json │ │ │ └── nice_f1.png │ │ ├── nice_f2.imageset │ │ │ ├── Contents.json │ │ │ └── nice_f2.png │ │ ├── nice_f3.imageset │ │ │ ├── Contents.json │ │ │ └── nice_f3.png │ │ ├── no_log.imageset │ │ │ ├── Contents.json │ │ │ └── no_log.png │ │ ├── sale_0.imageset │ │ │ ├── Contents.json │ │ │ └── sale_0.png │ │ ├── sale_1.imageset │ │ │ ├── Contents.json │ │ │ └── sale_1.png │ │ ├── sale_2.imageset │ │ │ ├── Contents.json │ │ │ └── sale_2.png │ │ ├── sale_3.imageset │ │ │ ├── Contents.json │ │ │ └── sale_3.png │ │ ├── star-1.imageset │ │ │ ├── Contents.json │ │ │ └── star-1.png │ │ ├── star.imageset │ │ │ ├── Contents.json │ │ │ └── star.png │ │ ├── tabbar_compose_camera.imageset │ │ │ ├── Contents.json │ │ │ ├── tabbar_compose_camera@2x.png │ │ │ └── tabbar_compose_camera@3x.png │ │ ├── tabbar_compose_idea.imageset │ │ │ ├── Contents.json │ │ │ ├── tabbar_compose_idea@2x.png │ │ │ └── tabbar_compose_idea@3x.png │ │ ├── tabbar_compose_lbs.imageset │ │ │ ├── Contents.json │ │ │ ├── tabbar_compose_lbs@2x.png │ │ │ └── tabbar_compose_lbs@3x.png │ │ ├── tabbar_compose_more.imageset │ │ │ ├── Contents.json │ │ │ ├── tabbar_compose_more@2x.png │ │ │ └── tabbar_compose_more@3x.png │ │ ├── tabbar_compose_photo.imageset │ │ │ ├── Contents.json │ │ │ ├── tabbar_compose_photo@2x.png │ │ │ └── tabbar_compose_photo@3x.png │ │ ├── tabbar_compose_review.imageset │ │ │ ├── Contents.json │ │ │ ├── tabbar_compose_review@2x.png │ │ │ └── tabbar_compose_review@3x.png │ │ ├── zr_exam.imageset │ │ │ ├── Contents.json │ │ │ └── zr_exam.png │ │ ├── zr_home.imageset │ │ │ ├── Contents.json │ │ │ └── zr_home.png │ │ ├── zr_konwledge.imageset │ │ │ ├── Contents.json │ │ │ └── zr_konwledge.png │ │ └── zr_train.imageset │ │ │ ├── Contents.json │ │ │ └── zr_train.png │ ├── Info.plist │ └── main.m └── XMGBuyTests │ ├── Info.plist │ └── XMGBuyTests.m ├── package.json └── yarn.lock /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["react-native"] 3 | } -------------------------------------------------------------------------------- /.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | ; We fork some components by platform 3 | .*/*[.]android.js 4 | 5 | ; Ignore "BUCK" generated dirs 6 | /\.buckd/ 7 | 8 | ; Ignore unexpected extra "@providesModule" 9 | .*/node_modules/.*/node_modules/fbjs/.* 10 | 11 | ; Ignore duplicate module providers 12 | ; For RN Apps installed via npm, "Libraries" folder is inside 13 | ; "node_modules/react-native" but in the source repo it is in the root 14 | .*/Libraries/react-native/React.js 15 | .*/Libraries/react-native/ReactNative.js 16 | 17 | [include] 18 | 19 | [libs] 20 | node_modules/react-native/Libraries/react-native/react-native-interface.js 21 | node_modules/react-native/flow 22 | flow/ 23 | 24 | [options] 25 | module.system=haste 26 | 27 | experimental.strict_type_args=true 28 | 29 | munge_underscores=true 30 | 31 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' 32 | 33 | suppress_type=$FlowIssue 34 | suppress_type=$FlowFixMe 35 | suppress_type=$FixMe 36 | 37 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-7]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) 38 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-7]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ 39 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy 40 | 41 | unsafe.enable_getters_and_setters=true 42 | 43 | [version] 44 | ^0.37.0 45 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | project.xcworkspace 24 | 25 | # Android/IntelliJ 26 | # 27 | build/ 28 | .idea 29 | .gradle 30 | local.properties 31 | *.iml 32 | 33 | # node.js 34 | # 35 | node_modules/ 36 | npm-debug.log 37 | yarn-error.log 38 | 39 | # BUCK 40 | buck-out/ 41 | \.buckd/ 42 | android/app/libs 43 | *.keystore 44 | 45 | # fastlane 46 | # 47 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 48 | # screenshots whenever they are needed. 49 | # For more information about the recommended setup visit: 50 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 51 | 52 | fastlane/report.xml 53 | fastlane/Preview.html 54 | fastlane/screenshots 55 | -------------------------------------------------------------------------------- /.tags: -------------------------------------------------------------------------------- 1 | CommonCell /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/Component/Home/XMGShopCenter.js /^var CommonCell = require('.\/XMGBottomCommonCell');$/;" variable line:12 2 | Home_D5 /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/Component/Home/XMGShopCenter.js /^var Home_D5 = require('..\/..\/LocalData\/XMG_Home_D5');$/;" variable line:14 3 | getDefaultProps /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/Component/Home/XMGShopCenter.js /^ getDefaultProps(){$/;" function line:17 4 | render /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/Component/Home/XMGShopCenter.js /^ render() {$/;" function line:23 5 | renderAllItem /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/Component/Home/XMGShopCenter.js /^ renderAllItem(){$/;" function line:44 6 | popToHome /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/Component/Home/XMGShopCenter.js /^ popToHome(url){$/;" function line:69 7 | ShopCenter /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/Component/Home/XMGShopCenter.js /^var ShopCenter = React.createClass({$/;" variable line:16 8 | getDefaultProps /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/Component/Home/XMGShopCenter.js /^ getDefaultProps(){$/;" function line:79 9 | render /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/Component/Home/XMGShopCenter.js /^ render(){$/;" function line:88 10 | clickItem /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/Component/Home/XMGShopCenter.js /^ clickItem(url){$/;" function line:100 11 | ShopCenterItem /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/Component/Home/XMGShopCenter.js /^var ShopCenterItem = React.createClass({$/;" variable line:78 12 | styles /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/Component/Home/XMGShopCenter.js /^var styles = StyleSheet.create({$/;" variable line:108 13 | Dimensions /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/Component/Home/XMGHome.js /^var Dimensions = require('Dimensions');$/;" variable line:13 14 | HomeDetail /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/Component/Home/XMGHome.js /^var HomeDetail = require('.\/XMGHomeDetail');$/;" variable line:17 15 | TopView /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/Component/Home/XMGHome.js /^var TopView = require('.\/XMGTopView');$/;" variable line:18 16 | MiddleView /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/Component/Home/XMGHome.js /^var MiddleView = require('.\/XMGHomeMiddleView');$/;" variable line:19 17 | MiddleBottomView /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/Component/Home/XMGHome.js /^var MiddleBottomView = require('.\/XMGMiddleBottomView');$/;" variable line:20 18 | ShopCenter /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/Component/Home/XMGHome.js /^var ShopCenter = require('.\/XMGShopCenter');$/;" variable line:21 19 | ShopCenterDetailView /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/Component/Home/XMGHome.js /^var ShopCenterDetailView = require('.\/XMGShopCenterDetailView');$/;" variable line:22 20 | render /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/Component/Home/XMGHome.js /^ render() {$/;" function line:25 21 | renderNavBar /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/Component/Home/XMGHome.js /^ renderNavBar(){$/;" function line:52 22 | pushToShopCenterDetail /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/Component/Home/XMGHome.js /^ pushToShopCenterDetail(url){$/;" function line:77 23 | pushToDetail /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/Component/Home/XMGHome.js /^ pushToDetail(){$/;" function line:89 24 | Home /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/Component/Home/XMGHome.js /^var Home = React.createClass({$/;" variable line:24 25 | styles /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/Component/Home/XMGHome.js /^var styles = StyleSheet.create({$/;" variable line:99 26 | render /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/Component/Home/XMGShopCenterDetailView.js /^ render() {$/;" function line:13 27 | popToHome /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/Component/Home/XMGShopCenterDetailView.js /^popToHome(){$/;" function line:32 28 | renderNavBar /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/Component/Home/XMGShopCenterDetailView.js /^renderNavBar(){$/;" function line:36 29 | ShopCenterDetailView /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/Component/Home/XMGShopCenterDetailView.js /^var ShopCenterDetailView = React.createClass({$/;" variable line:12 30 | styles /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/Component/Home/XMGShopCenterDetailView.js /^var styles = StyleSheet.create({$/;" variable line:52 31 | tips /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "tips":"全部4家",$/;" function line:2 32 | count /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "count":4,$/;" function line:3 33 | data /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "data":[$/;" function line:4 34 | detailurl /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "detailurl":"https:\/\/www.jd.com",$/;" function line:6 35 | promotionIcon /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "promotionIcon":"",$/;" function line:7 36 | name /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "name":"正佳广场",$/;" function line:8 37 | img /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "img":"sale_1",$/;" function line:9 38 | showtext /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "showtext":{$/;" function line:10 39 | text /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "text":"离我最近",$/;" function line:11 40 | count /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "count":84,$/;" function line:12 41 | color /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "color":""$/;" function line:13 42 | longitude /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "longitude":113.327086,$/;" function line:15 43 | latitude /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "latitude":23.131090,$/;" function line:16 44 | smid /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "smid":4374715,$/;" function line:17 45 | promotionText /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "promotionText":"送福利 商品低至1.5折"$/;" function line:18 46 | detailurl /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "detailurl":"https:\/\/www.jd.com",$/;" function line:21 47 | promotionIcon /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "promotionIcon":"",$/;" function line:22 48 | name /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "name":"凯德广场来尚",$/;" function line:23 49 | img /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "img":"sale_3",$/;" function line:24 50 | showtext /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "showtext":{$/;" function line:25 51 | text /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "text":"离我最近",$/;" function line:26 52 | count /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "count":84,$/;" function line:27 53 | color /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "color":""$/;" function line:28 54 | longitude /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "longitude":113.327086,$/;" function line:30 55 | latitude /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "latitude":23.131090,$/;" function line:31 56 | smid /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "smid":4374715,$/;" function line:32 57 | promotionText /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "promotionText":"送福利 商品低至1.5折"$/;" function line:33 58 | detailurl /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "detailurl":"https:\/\/www.baidu.com",$/;" function line:36 59 | promotionIcon /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "promotionIcon":"",$/;" function line:37 60 | name /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "name":"来又来广场",$/;" function line:38 61 | img /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "img":"sale_0",$/;" function line:39 62 | showtext /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "showtext":{$/;" function line:40 63 | text /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "text":"离我最近",$/;" function line:41 64 | count /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "count":84,$/;" function line:42 65 | color /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "color":""$/;" function line:43 66 | longitude /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "longitude":113.327086,$/;" function line:45 67 | latitude /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "latitude":23.131090,$/;" function line:46 68 | smid /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "smid":4374715,$/;" function line:47 69 | promotionText /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "promotionText":"送福利 商品低至1.5折"$/;" function line:48 70 | detailurl /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "detailurl":"https:\/\/www.baidu.com",$/;" function line:51 71 | promotionIcon /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "promotionIcon":"",$/;" function line:52 72 | name /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "name":"万达西地广场",$/;" function line:53 73 | img /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "img":"sale_3",$/;" function line:54 74 | showtext /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "showtext":{$/;" function line:55 75 | text /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "text":"离我最近",$/;" function line:56 76 | count /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "count":84,$/;" function line:57 77 | color /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "color":""$/;" function line:58 78 | longitude /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "longitude":113.327086,$/;" function line:60 79 | latitude /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "latitude":23.131090,$/;" function line:61 80 | smid /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "smid":4374715,$/;" function line:62 81 | promotionText /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "promotionText":"送福利 商品低至1.5折"$/;" function line:63 82 | -------------------------------------------------------------------------------- /.tags1: -------------------------------------------------------------------------------- 1 | !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ 2 | !_TAG_FILE_SORTED 0 /0=unsorted, 1=sorted, 2=foldcase/ 3 | !_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ 4 | !_TAG_PROGRAM_NAME Exuberant Ctags // 5 | !_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ 6 | !_TAG_PROGRAM_VERSION 5.8 // 7 | tips /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "tips":"全部4家",$/;" function line:2 8 | count /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "count":4,$/;" function line:3 9 | data /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "data":[$/;" function line:4 10 | detailurl /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "detailurl":"https:\/\/www.jd.com",$/;" function line:6 11 | promotionIcon /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "promotionIcon":"",$/;" function line:7 12 | name /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "name":"正佳广场",$/;" function line:8 13 | img /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "img":"sale_1",$/;" function line:9 14 | showtext /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "showtext":{$/;" function line:10 15 | text /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "text":"离我最近",$/;" function line:11 16 | count /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "count":84,$/;" function line:12 17 | color /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "color":""$/;" function line:13 18 | longitude /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "longitude":113.327086,$/;" function line:15 19 | latitude /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "latitude":23.131090,$/;" function line:16 20 | smid /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "smid":4374715,$/;" function line:17 21 | promotionText /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "promotionText":"送福利 商品低至1.5折"$/;" function line:18 22 | detailurl /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "detailurl":"https:\/\/www.jd.com",$/;" function line:21 23 | promotionIcon /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "promotionIcon":"",$/;" function line:22 24 | name /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "name":"凯德广场来尚",$/;" function line:23 25 | img /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "img":"sale_3",$/;" function line:24 26 | showtext /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "showtext":{$/;" function line:25 27 | text /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "text":"离我最近",$/;" function line:26 28 | count /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "count":84,$/;" function line:27 29 | color /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "color":""$/;" function line:28 30 | longitude /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "longitude":113.327086,$/;" function line:30 31 | latitude /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "latitude":23.131090,$/;" function line:31 32 | smid /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "smid":4374715,$/;" function line:32 33 | promotionText /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "promotionText":"送福利 商品低至1.5折"$/;" function line:33 34 | detailurl /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "detailurl":"https:\/\/www.baidu.com",$/;" function line:36 35 | promotionIcon /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "promotionIcon":"",$/;" function line:37 36 | name /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "name":"来又来广场",$/;" function line:38 37 | img /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "img":"sale_0",$/;" function line:39 38 | showtext /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "showtext":{$/;" function line:40 39 | text /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "text":"离我最近",$/;" function line:41 40 | count /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "count":84,$/;" function line:42 41 | color /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "color":""$/;" function line:43 42 | longitude /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "longitude":113.327086,$/;" function line:45 43 | latitude /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "latitude":23.131090,$/;" function line:46 44 | smid /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "smid":4374715,$/;" function line:47 45 | promotionText /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "promotionText":"送福利 商品低至1.5折"$/;" function line:48 46 | detailurl /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "detailurl":"https:\/\/www.baidu.com",$/;" function line:51 47 | promotionIcon /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "promotionIcon":"",$/;" function line:52 48 | name /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "name":"万达西地广场",$/;" function line:53 49 | img /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "img":"sale_3",$/;" function line:54 50 | showtext /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "showtext":{$/;" function line:55 51 | text /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "text":"离我最近",$/;" function line:56 52 | count /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "count":84,$/;" function line:57 53 | color /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "color":""$/;" function line:58 54 | longitude /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "longitude":113.327086,$/;" function line:60 55 | latitude /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "latitude":23.131090,$/;" function line:61 56 | smid /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "smid":4374715,$/;" function line:62 57 | promotionText /Users/dangxy/Desktop/RN_iOS项目源码/XMGBuy/LocalData/XMG_Home_D5.json /^ "promotionText":"送福利 商品低至1.5折"$/;" function line:63 58 | -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /Component/Home/XMGBottomCommonCell.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { 3 | AppRegistry, 4 | StyleSheet, 5 | Text, 6 | View, 7 | TouchableOpacity, 8 | Image, 9 | } from 'react-native'; 10 | 11 | var BottomCommonCell = React.createClass({ 12 | getDefaultProps(){ 13 | return{ 14 | leftIcon:'', 15 | leftTitle:'', 16 | rightTitle:'', 17 | } 18 | }, 19 | render() { 20 | return ( 21 | 22 | 23 | { /*左边*/ } 24 | 25 | 26 | {this.props.leftTitle} 27 | 28 | { /*右边*/ } 29 | 30 | {this.props.rightTitle} 31 | 32 | 33 | 34 | 35 | ); 36 | } 37 | }); 38 | 39 | var styles = StyleSheet.create({ 40 | container: { 41 | height:44, 42 | flexDirection:'row', 43 | backgroundColor:'white', 44 | alignItems:'center', 45 | //设置对其方式 两端对其 46 | justifyContent:'space-between', 47 | //设置下边框 48 | borderBottomColor:'#e8e8e8', 49 | borderBottomWidth:0.5 50 | }, 51 | leftViewStyle: { 52 | //改变主轴的方向 53 | flexDirection:'row', 54 | alignItems:'center', 55 | marginLeft:8 56 | }, 57 | rightViewStyle: { 58 | flexDirection:'row', 59 | alignItems:'center' 60 | } 61 | }); 62 | 63 | module.exports = BottomCommonCell; 64 | -------------------------------------------------------------------------------- /Component/Home/XMGGuestYouLike.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { 3 | AppRegistry, 4 | StyleSheet, 5 | Text, 6 | View, 7 | TouchableOpacity, 8 | Image, 9 | ListView 10 | } from 'react-native'; 11 | 12 | // 导入外部组件 13 | var CommonCell = require('./XMGBottomCommonCell'); 14 | //导入外部的json数据 15 | var YouLikeData = require('../../LocalData/HomeGuestYouLike'); 16 | 17 | var GuestYouLike = React.createClass({ 18 | getDefaultProps(){ 19 | return{ 20 | api_url:'http://api.meituan.com/group/v2/recommend/homepage/city/20?userId=160495643&userid=160495643&__vhost=api.mobile.meituan.com&position=23.134643%2C113.373951&movieBundleVersion=100&utm_term=6.6' 21 | } 22 | }, 23 | 24 | getInitialState(){ 25 | //创建数据源 26 | var ds = new ListView.DataSource({rowHasChanged:(row1, row2) => row1 !== row2}); 27 | //初始化数据源 28 | return { 29 | dataSource: ds 30 | } 31 | }, 32 | render() { 33 | return ( 34 | 35 | 39 | { /*列表*/ } 40 | 44 | 45 | ); 46 | }, 47 | 48 | renderRow(rowData){ 49 | return( 50 | alert(0)}> 51 | 52 | { /*左边*/ } 53 | 54 | { /*右边*/ } 55 | 56 | 57 | {rowData.title} 58 | {rowData.topRightInfo} 59 | 60 | {rowData.subTitle} 61 | 62 | {rowData.subMessage} 63 | {rowData.bottomRightInfo} 64 | 65 | 66 | 67 | 68 | ) 69 | }, 70 | 71 | //处理图像的尺寸 72 | dealWithImgUrl(url){ 73 | if (url.search('w.h') == -1) { //没有找到,正常返回 74 | return url; 75 | }else { 76 | return url.replace('w.h','120.90'); 77 | } 78 | }, 79 | 80 | componentDidMount(){ 81 | //从网络上请求数据 82 | this.loadDataFromNet(); 83 | }, 84 | loadDataFromNet(){ 85 | fetch(this.props.api_url) 86 | .then((response) => response.json()) //下一步操作 87 | .then((responseData) => { 88 | console.log(responseData); //打印出来 89 | //更新数据源 90 | this.setState({ 91 | dataSource:this.state.dataSource.cloneWithRows(responseData.data) 92 | }); 93 | }) 94 | .catch((error)=>{ 95 | // alert(error); 96 | //更新数据源 97 | this.setState({ 98 | //当网络请求异常时,从本地加载数据 99 | dataSource:this.state.dataSource.cloneWithRows(YouLikeData.data) 100 | }); 101 | 102 | }) 103 | } 104 | }); 105 | 106 | var styles = StyleSheet.create({ 107 | container: { 108 | flex: 1, 109 | backgroundColor: '#e8e8e8', 110 | marginTop:15 111 | }, 112 | imageViewStyle: { 113 | width:120, 114 | height:90 115 | }, 116 | listViewStyle: { 117 | backgroundColor: 'white', 118 | padding: 10, 119 | borderBottomColor:'#e8e8e8', 120 | borderBottomWidth:0.5, 121 | flexDirection:'row' 122 | }, 123 | rightViewStyle: { 124 | marginLeft:8, 125 | width:220, 126 | justifyContent:'center' 127 | }, 128 | rightTopViewStyle: { 129 | flexDirection:'row', 130 | marginBottom:7, 131 | justifyContent:'space-between' 132 | }, 133 | rightBottomViewStyle: { 134 | flexDirection:'row', 135 | marginTop:7, 136 | justifyContent:'space-between' 137 | } 138 | }); 139 | 140 | module.exports = GuestYouLike; 141 | -------------------------------------------------------------------------------- /Component/Home/XMGHome.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { 3 | AppRegistry, 4 | StyleSheet, 5 | Text, 6 | View, 7 | TouchableOpacity, 8 | TextInput, 9 | Image, 10 | ScrollView 11 | } from 'react-native'; 12 | 13 | var Dimensions = require('Dimensions'); 14 | var {width, height} = Dimensions.get('window'); 15 | 16 | /* 导入外部组件类 */ 17 | var HomeDetail = require('./XMGHomeDetail'); 18 | var TopView = require('./XMGTopView'); 19 | var MiddleView = require('./XMGHomeMiddleView'); 20 | var MiddleBottomView = require('./XMGMiddleBottomView'); 21 | var ShopCenter = require('./XMGShopCenter'); 22 | var ShopCenterDetailView = require('./XMGShopCenterDetailView'); 23 | var GuestYouLike = require('./XMGGuestYouLike'); 24 | 25 | var Home = React.createClass({ 26 | render() { 27 | return ( 28 | 29 | { /*首页导航条*/ } 30 | {this.renderNavBar()} 31 | { /*首页的主要内容*/ } 32 | 33 | { /*头部的view*/ } 34 | 35 | { /*中间的View*/ } 36 | {this.pushToDetail()}} 38 | /> 39 | { /*下半部分内容*/ } 40 | {this.pushToDetail()}} 42 | /> 43 | { /*购物中心*/ } 44 | this.pushToShopCenterDetail(url)} //最终在这里拿到传递上来的参数 46 | /> 47 | { /*猜你喜欢*/ } 48 | 49 | 50 | 51 | ); 52 | }, 53 | 54 | // 首页导航条 55 | renderNavBar(){ 56 | return( 57 | 58 | { /*左边*/ } 59 | {this.pushToDetail()}}> 60 | 广州 61 | 62 | { /*中间*/ } 63 | 67 | { /*右边*/ } 68 | 69 | {alert('点击了')}}> 70 | 71 | 72 | {alert('点击了')}}> 73 | 74 | 75 | 76 | 77 | ) 78 | }, 79 | //跳转到购物中心的详情页 80 | pushToShopCenterDetail(url){ 81 | //测试一下传递上来的参数有没有获取到 82 | this.props.navigator.push( 83 | { 84 | component:ShopCenterDetailView,//要跳转的版块 85 | passProps:{'url':url} 86 | } 87 | ); 88 | }, 89 | 90 | 91 | // 跳转到二级界面 92 | pushToDetail(){ 93 | this.props.navigator.push( 94 | { 95 | component: HomeDetail, // 要跳转的版块 96 | title: '详情页' 97 | } 98 | ); 99 | } 100 | }); 101 | 102 | var styles = StyleSheet.create({ 103 | navBarStyle: { // 导航条样式 104 | height: 64, 105 | backgroundColor: '#1fb5ec', 106 | // 设置主轴方向 107 | flexDirection: 'row', 108 | // 垂直居中,设置侧轴的对其方式 109 | alignItems: 'center', 110 | // 设置主轴对其方式 111 | justifyContent: 'space-around' 112 | }, 113 | rightNavViewStyle: { 114 | flexDirection: 'row', 115 | height: 64, 116 | //设置侧轴的对其方式 117 | alignItems: 'center', 118 | marginTop: 8 119 | }, 120 | topInputStyle: { // 设置输入框 121 | width: width * 0.71, 122 | height: 31, 123 | backgroundColor: 'white', 124 | marginTop: 20, 125 | //设置圆角 126 | borderRadius: 15, 127 | //设置内左边距 128 | paddingLeft: 10, 129 | fontSize: 15 130 | }, 131 | navRightImageStyle: { //设置图片的大小 132 | width: 23, 133 | height: 23, 134 | }, 135 | container: { 136 | flex: 1, 137 | // justifyContent: 'center', // 主轴对其方式要去掉 138 | // alignItems: 'center', 139 | backgroundColor: '#E8E8E8', 140 | }, 141 | welcome: { 142 | fontSize: 20, 143 | textAlign: 'center', 144 | margin: 10, 145 | }, 146 | instructions: { 147 | textAlign: 'center', 148 | color: '#333333', 149 | marginBottom: 5, 150 | }, 151 | }); 152 | 153 | module.exports = Home; 154 | -------------------------------------------------------------------------------- /Component/Home/XMGHomeDetail.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { 3 | AppRegistry, 4 | StyleSheet, 5 | Text, 6 | View, 7 | TouchableOpacity, 8 | Image, 9 | WebView 10 | } from 'react-native'; 11 | 12 | var HomeDetail = React.createClass({ 13 | render() { 14 | return ( 15 | 16 | { /*导航条*/ } 17 | {this.renderNavBar()} 18 | 19 | 23 | 24 | 25 | ); 26 | }, 27 | 28 | popToHome(){ 29 | this.props.navigator.pop(); 30 | }, 31 | // 导航条 32 | renderNavBar(){ 33 | return( 34 | 35 | {this.popToHome()}} style={styles.leftViewStyle}> 36 | 37 | 38 | 商家 39 | {alert('点击')}} style={styles.rightViewStyle}> 40 | 41 | 42 | 43 | ) 44 | } 45 | 46 | }); 47 | 48 | var styles = StyleSheet.create({ 49 | container: { 50 | flex: 1, 51 | backgroundColor: '#e8e8e8', 52 | }, 53 | navImagStyle: { 54 | width: 23, 55 | height: 23, 56 | }, 57 | leftViewStyle: { 58 | //绝对定位 59 | position: 'absolute', 60 | left: 10, 61 | bottom: 13 62 | }, 63 | rightViewStyle: { 64 | //绝对定位 65 | position: 'absolute', 66 | right: 10, 67 | bottom: 13 68 | }, 69 | navOutViewStyle: { 70 | height: 64, 71 | backgroundColor: '#1fb5ec', 72 | // 设置主轴方向 73 | flexDirection: 'row', 74 | // 垂直居中,设置侧轴的对其方式 75 | alignItems: 'center', 76 | // 设置主轴放心居中 77 | justifyContent: 'center' 78 | } 79 | }); 80 | 81 | module.exports = HomeDetail; 82 | -------------------------------------------------------------------------------- /Component/Home/XMGHomeMiddleView.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { 3 | AppRegistry, 4 | StyleSheet, 5 | Text, 6 | View, 7 | Image, 8 | TouchableOpacity 9 | } from 'react-native'; 10 | 11 | var Dimensions = require('Dimensions'); 12 | var {width, height} = Dimensions.get('window'); 13 | 14 | var CommonView = require('./XMGMiddleCommonView'); 15 | //引入外部数据 16 | var TopMiddleData = require('../../LocalData/HomeTopMiddleLeft.json'); 17 | 18 | var HomeMiddleView = React.createClass({ 19 | render() { 20 | return ( 21 | 22 | { /*左边*/ } 23 | {this.renderLeftView()} 24 | { /*右边*/ } 25 | 26 | {this.renderRightView()} 27 | 28 | 29 | ); 30 | }, 31 | //左边的View 32 | renderLeftView(){ 33 | //拿到对应的数据 34 | var data = TopMiddleData.dataLeft[0]; 35 | return( 36 | 37 | 38 | 39 | {data.title} 40 | 41 | {data.price} 42 | {data.sale} 43 | 44 | 45 | 46 | ); 47 | }, 48 | //右边的view 49 | renderRightView(){ 50 | //组件数组 51 | var itemArr = []; 52 | //取出具体数据 53 | var rightData = TopMiddleData.dataRight; 54 | // 遍历 55 | for (var i = 0; i < rightData.length; i++) { 56 | //取出单独的数据 57 | var data = rightData[i]; 58 | itemArr.push( 59 | this.popToTopView(data)} 66 | /> 67 | ); 68 | } 69 | //返回组件数组 70 | return itemArr; 71 | }, 72 | //继续往父级界面传递数据 73 | popToTopView(data){ 74 | //继续执行回调函数 75 | this.props.popToHome(data); 76 | } 77 | 78 | }); 79 | 80 | var styles = StyleSheet.create({ 81 | container: { 82 | marginTop: 15, 83 | //改变主轴的方向 84 | flexDirection: 'row', 85 | }, 86 | leftViewStyle: { 87 | width:width * 0.5, 88 | height: 119, 89 | backgroundColor: 'white' 90 | ,marginRight: 1, 91 | //水平居中 92 | alignItems: 'center', 93 | justifyContent: 'center' 94 | }, 95 | leftImageStyle: { 96 | width:120, 97 | height: 40, 98 | margin:10 99 | //内容模式 100 | // resizeMode:'contain' 101 | } 102 | }); 103 | 104 | module.exports = HomeMiddleView; 105 | -------------------------------------------------------------------------------- /Component/Home/XMGMiddleBottomView.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { 3 | AppRegistry, 4 | StyleSheet, 5 | Text, 6 | View 7 | } from 'react-native'; 8 | 9 | var Home_D4 = require('../../LocalData/XMG_Home_D4.json'); 10 | var CommonView = require('./XMGMiddleCommonView'); 11 | 12 | var BottomView = React.createClass({ 13 | render() { 14 | return ( 15 | 16 | { /*上部分*/ } 17 | 18 | 19 | 20 | { /*下部分*/ } 21 | 22 | {this.renderBottomItem()} 23 | 24 | 25 | ); 26 | }, 27 | //下部分的所有子组件 28 | renderBottomItem(){ 29 | //定义组件数组 30 | var itemArr = []; 31 | // 拿到对应的数据 32 | var dataArr = Home_D4.data; 33 | //遍历 34 | for (var i = 0; i < dataArr.length; i++) { 35 | //取出单独的数据 36 | var itemData = dataArr[i]; 37 | //创建组件装入数组 38 | itemArr.push( 39 | this.popToTopView(data)} 47 | /> 48 | ); 49 | } 50 | //返回组件数组 51 | return itemArr; 52 | }, 53 | //继续往父级界面传递数据 54 | popToTopView(data){ 55 | //继续执行回调函数 56 | this.props.popToHome(data); 57 | } 58 | }); 59 | 60 | var styles = StyleSheet.create({ 61 | container: { 62 | flex: 1, 63 | justifyContent: 'center', 64 | alignItems: 'center', 65 | backgroundColor: '#F5FCFF', 66 | marginTop:15 67 | }, 68 | topViewStyle: { 69 | 70 | }, 71 | /* 72 | flexWrap为wrap不起作用解决之道: 73 | 74 | 解释原因:由于在rn 0.28之后的版本上官方已经修改了flexWrap:'wrap'的工作方式了, 75 | 之前版本的是flexWrap:'wrap'和默认的alignItems: 'stretch'是一起工作的; 76 | 如果是0.28之后的版本,你需要加上alignItems: 'flex-start' 77 | */ 78 | bottomViewStyle: { 79 | //设置主轴的方向 80 | flexDirection: 'row', 81 | //换行 82 | flexWrap: 'wrap', 83 | alignItems:'flex-start' 84 | } 85 | }); 86 | 87 | module.exports = BottomView; 88 | -------------------------------------------------------------------------------- /Component/Home/XMGMiddleCommonView.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { 3 | AppRegistry, 4 | StyleSheet, 5 | Text, 6 | View, 7 | Image, 8 | TouchableOpacity 9 | } from 'react-native'; 10 | 11 | var Dimensions = require('Dimensions'); 12 | var {width, height} = Dimensions.get('window'); 13 | 14 | var CommonView = React.createClass({ 15 | getDefaultProps(){ 16 | return{ 17 | title: '', 18 | subTitle: '', 19 | rightIcon: '', 20 | titleColor: '', 21 | tplurl:'', //下级界面url路径 22 | callBackClickCell:null //回调函数 23 | } 24 | }, 25 | render() { 26 | return ( 27 | this.clickCell(this.props.tplurl)}> 28 | 29 | { /*左边*/ } 30 | 31 | {this.props.title} 32 | {this.props.subTitle} 33 | 34 | { /*右边*/ } 35 | 36 | 37 | 38 | ); 39 | }, 40 | clickCell(){ 41 | this.props.callBackClickCell(); 42 | } 43 | }); 44 | 45 | var styles = StyleSheet.create({ 46 | container: { 47 | backgroundColor: 'white', 48 | width: width * 0.5 - 1, 49 | height: 59, 50 | marginBottom: 1, 51 | marginRight: 1, 52 | //改变主轴方向 53 | flexDirection:'row', 54 | //侧轴居中 55 | alignItems: 'center', 56 | justifyContent: 'space-around' 57 | }, 58 | titleStyle: { 59 | fontSize: 17, 60 | fontWeight: 'bold' 61 | }, 62 | subTitleStyle: { 63 | color: 'gray', 64 | marginTop: 5, 65 | fontSize: 13 66 | } 67 | }); 68 | 69 | module.exports = CommonView; 70 | -------------------------------------------------------------------------------- /Component/Home/XMGShopCenter.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { 3 | AppRegistry, 4 | StyleSheet, 5 | Text, 6 | View, 7 | TouchableOpacity, 8 | Image, 9 | ScrollView 10 | } from 'react-native'; 11 | //引入外部的组件类 12 | var CommonCell = require('./XMGBottomCommonCell'); 13 | //引入外部json数据 14 | var Home_D5 = require('../../LocalData/XMG_Home_D5'); 15 | 16 | var ShopCenter = React.createClass({ 17 | getDefaultProps(){ 18 | //回调函数 19 | return{ 20 | popToHomeView:null 21 | } 22 | }, 23 | render() { 24 | return ( 25 | 26 | { /*上部分*/} 27 | 32 | { /*下部分*/ } 33 | 37 | {this.renderAllItem()} 38 | 39 | 40 | ); 41 | }, 42 | 43 | //返回下部分所有的item 44 | renderAllItem(){ 45 | //定义组件数组 46 | var itemArr = []; 47 | //取出数据 48 | var shopData = Home_D5.data; 49 | //遍历 50 | for (var i = 0; i < shopData.length; i++) { 51 | // 取出单个数据 52 | var data = shopData[i]; 53 | //创建组件装入数组 54 | itemArr.push( 55 | this.popToHome(url)} // 参数往上传,用来接收 62 | /> 63 | ) 64 | } 65 | //返回 66 | return itemArr; 67 | }, 68 | //参数继续往上传 69 | popToHome(url){ 70 | //判断 71 | if(this.props.popToHomeView == null) return; 72 | //执行回调函数 73 | this.props.popToHomeView(url); 74 | } 75 | }); 76 | 77 | // 每一个商场 78 | var ShopCenterItem = React.createClass({ 79 | getDefaultProps(){ 80 | return{ 81 | shopImage:'', 82 | shopSale:'', 83 | shopName:'', 84 | detailurl:'', 85 | popToShopCenter:null 86 | } 87 | }, 88 | render(){ 89 | return( 90 | {this.clickItem(this.props.detailurl)}}> 91 | 92 | 93 | {this.props.shopSale} 94 | {this.props.shopName} 95 | 96 | 97 | ); 98 | }, 99 | // 参数往上传 100 | clickItem(url){ 101 | //判断 102 | if(this.props.detailurl == null) return; 103 | //执行回调函数 104 | this.props.popToShopCenter(url); 105 | } 106 | }); 107 | 108 | var styles = StyleSheet.create({ 109 | container: { 110 | marginTop: 15 111 | }, 112 | imageStyle: { 113 | width:120, 114 | height:100, 115 | borderRadius:8 116 | }, 117 | scrollViewStyle: { 118 | flexDirection:'row', 119 | backgroundColor:'white', 120 | padding:10 121 | }, 122 | itemViewStyle: { 123 | margin:8 124 | }, 125 | shopSaleStyle: { 126 | //绝对定位 127 | position:'absolute', 128 | left:0, 129 | bottom:30, 130 | backgroundColor:'red', 131 | color:'white', 132 | padding:3, 133 | //这两个属性在ios中不管用,可以不设置 134 | borderTopRightRadius:8, 135 | borderBottomRightRadius:8 136 | }, 137 | shopNameStyle: { 138 | textAlign: 'center', 139 | marginTop:5 140 | } 141 | }); 142 | 143 | module.exports = ShopCenter; 144 | -------------------------------------------------------------------------------- /Component/Home/XMGShopCenterDetailView.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { 3 | AppRegistry, 4 | StyleSheet, 5 | Text, 6 | View, 7 | TouchableOpacity, 8 | Image, 9 | WebView 10 | } from 'react-native'; 11 | 12 | var ShopCenterDetailView = React.createClass({ 13 | render() { 14 | alert(this.props.url); 15 | return ( 16 | 17 | { /*导航条*/ } 18 | {this.renderNavBar()} 19 | 20 | 28 | 29 | ); 30 | }, 31 | 32 | popToHome(){ 33 | this.props.navigator.pop(); 34 | }, 35 | // 导航条 36 | renderNavBar(){ 37 | return( 38 | 39 | {this.popToHome()}} style={styles.leftViewStyle}> 40 | 41 | 42 | 商家 43 | {alert('点击')}} style={styles.rightViewStyle}> 44 | 45 | 46 | 47 | ) 48 | } 49 | 50 | }); 51 | 52 | var styles = StyleSheet.create({ 53 | container: { 54 | flex: 1, 55 | backgroundColor: '#e8e8e8', 56 | }, 57 | navImagStyle: { 58 | width: 23, 59 | height: 23, 60 | }, 61 | leftViewStyle: { 62 | //绝对定位 63 | position: 'absolute', 64 | left: 10, 65 | bottom: 13 66 | }, 67 | rightViewStyle: { 68 | //绝对定位 69 | position: 'absolute', 70 | right: 10, 71 | bottom: 13 72 | }, 73 | navOutViewStyle: { 74 | height: 64, 75 | backgroundColor: '#1fb5ec', 76 | // 设置主轴方向 77 | flexDirection: 'row', 78 | // 垂直居中,设置侧轴的对其方式 79 | alignItems: 'center', 80 | // 设置主轴放心居中 81 | justifyContent: 'center' 82 | } 83 | }); 84 | 85 | module.exports = ShopCenterDetailView; 86 | -------------------------------------------------------------------------------- /Component/Home/XMGTopListView.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { 3 | AppRegistry, 4 | StyleSheet, 5 | Text, 6 | View, 7 | Image, 8 | ListView, 9 | TouchableOpacity, 10 | Platform 11 | } from 'react-native'; 12 | 13 | var Dimensions = require('Dimensions'); 14 | var {width} = Dimensions.get('window'); 15 | 16 | //全局的变量 17 | var cols = 5; 18 | var cellW = Platform.OS == 'ios' ? 70 : 60; 19 | var cellH = Platform.OS == 'ios' ? 70 : 60; 20 | var vMargin = (width - cellW * cols) / (cols + 1); 21 | 22 | 23 | var TopListView = React.createClass({ 24 | 25 | getDefaultProps(){ 26 | return{ 27 | dataArr: [] 28 | } 29 | }, 30 | getInitialState(){ 31 | //创建数据源 32 | var ds = new ListView.DataSource({rowHasChanged:(row1, row2)=> row1 !== row2}); 33 | return{ 34 | dataSource: ds.cloneWithRows(this.props.dataArr) 35 | } 36 | }, 37 | 38 | render() { 39 | return ( 40 | 41 | 48 | 49 | ); 50 | }, 51 | //具体的cell 52 | renderRow(rowdata){ 53 | return( 54 | 55 | {alert('详情')}}> 56 | 57 | {rowdata.title} 58 | 59 | 60 | ); 61 | }, 62 | }); 63 | 64 | var styles = StyleSheet.create({ 65 | contentViewStyle: { 66 | //设置主轴方向 67 | flexDirection:'row', 68 | //多个cell在同一行显示 69 | flexWrap:'wrap', 70 | //宽度 71 | width:width 72 | }, 73 | cellStyle: { 74 | backgroundColor:'white', 75 | width:cellW, 76 | height:cellH, 77 | //水平居中和垂直居中 78 | justifyContent:'center', 79 | alignItems:'center', 80 | //设置间距 81 | marginTop:5, 82 | marginLeft:vMargin 83 | }, 84 | titleStyle: { 85 | fontSize: Platform.OS == 'ios' ? 13 : 12 , 86 | textAlign:'center', 87 | color:'gray' 88 | } 89 | }); 90 | 91 | module.exports = TopListView; 92 | -------------------------------------------------------------------------------- /Component/Home/XMGTopView.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { 3 | AppRegistry, 4 | StyleSheet, 5 | Text, 6 | View, 7 | ScrollView, 8 | ListView, 9 | Image 10 | } from 'react-native'; 11 | 12 | var Dimensions = require('Dimensions'); 13 | var {width} = Dimensions.get('window'); 14 | 15 | //引入外部的json数据 16 | var TopMenu = require('../../LocalData/TopMenu.json'); 17 | 18 | // 引入外部组件 19 | var TopListView = require('./XMGTopListView'); 20 | 21 | var TopView = React.createClass({ 22 | 23 | getInitialState(){ 24 | return{ 25 | activePage: 0 26 | } 27 | }, 28 | 29 | render() { 30 | return ( 31 | 32 | { /*内容部分*/ } 33 | 40 | {this.renderScrollItem()} 41 | 42 | { /*页码部分*/ } 43 | 44 | {this.renderIndicator()} 45 | 46 | 47 | ); 48 | }, 49 | 50 | //当一祯滚动结束的时候调用 51 | onScrollAnimationEnd(e){ 52 | //求出当前的页码 53 | var currentPage = Math.floor(e.nativeEvent.contentOffset.x / width);//取整 54 | //更新状态机 55 | this.setState({ 56 | activePage: currentPage 57 | }); 58 | }, 59 | 60 | //ScrollView中内部的组件 61 | renderScrollItem(){ 62 | //定义组件数组 63 | var itemArr = []; 64 | //定义颜色数组 ---> 数据数组 65 | var dataArr = TopMenu.data; 66 | //遍历创建组件 67 | for (var i = 0; i < dataArr.length; i++) { 68 | itemArr.push( 69 | 72 | ); 73 | } 74 | //返回组件数组 75 | return itemArr; 76 | }, 77 | 78 | //页码(指示器) 79 | renderIndicator(){ 80 | //指示器数组 81 | var indicatorArr = [], style; 82 | //遍历创建组件 83 | for (var i = 0; i < 2; i++) { 84 | //设置圆点的样式 85 | style = (i === this.state.activePage) ? {color:'orange'} : {color:'gray'} 86 | indicatorArr.push( 87 | //圆点 88 | ); 89 | } 90 | //返回数组 91 | return indicatorArr; 92 | } 93 | }); 94 | 95 | var styles = StyleSheet.create({ 96 | container: { 97 | backgroundColor: 'white', 98 | marginTop:15 99 | }, 100 | welcome: { 101 | fontSize: 20, 102 | textAlign: 'center', 103 | margin: 10, 104 | }, 105 | indicatorViewStyle: { 106 | //设置主轴方向,横向 107 | flexDirection: 'row', 108 | //水平居中 109 | justifyContent: 'center' 110 | } 111 | }); 112 | 113 | module.exports = TopView; 114 | -------------------------------------------------------------------------------- /Component/Main/XMGMain.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { 3 | AppRegistry, 4 | StyleSheet, 5 | Text, 6 | View, 7 | Image, 8 | Platform, //判断当前运行的系统 Platform.OS === 'ios' 9 | Navigator 10 | } from 'react-native'; 11 | 12 | import TabNavigator from 'react-native-tab-navigator'; 13 | 14 | var Home = require('../Home/XMGHome'); 15 | var Shop = require('../Shop/XMGShop'); 16 | var Mine = require('../Mine/XMGMine'); 17 | var More = require('../More/XMGMore'); 18 | 19 | var Main = React.createClass({ 20 | 21 | // 初始化函数(变量是可以改变的,充当状态机的角色) 22 | getInitialState() { 23 | return { 24 | selectedTab:'home' 25 | } 26 | }, 27 | 28 | render() { 29 | return ( 30 | 31 | { /*首页*/ } 32 | } 35 | renderSelectedIcon={() => } 36 | onPress={() => {this.setState({ selectedTab: 'home' })}} 37 | selected={this.state.selectedTab === 'home'} 38 | > 39 | { 42 | return Navigator.SceneConfigs.PushFromRight; 43 | }} 44 | renderScene={(route,navigator)=>{ 45 | let Component = route.component; 46 | return ; 47 | }} 48 | /> 49 | 50 | { /*商家*/ } 51 | } 54 | renderSelectedIcon={() => } 55 | onPress={() => {this.setState({ selectedTab: 'shop' })}} 56 | selected={this.state.selectedTab === 'shop'} 57 | > 58 | { 61 | return Navigator.SceneConfigs.PushFromRight; 62 | }} 63 | renderScene={(route,navigator)=>{ 64 | let Component = route.component; 65 | return ; 66 | }} 67 | /> 68 | 69 | { /*我的*/ } 70 | } 73 | renderSelectedIcon={() => } 74 | onPress={() => {this.setState({ selectedTab: 'mine' })}} 75 | selected={this.state.selectedTab === 'mine'}> 76 | { 79 | return Navigator.SceneConfigs.PushFromRight; 80 | }} 81 | renderScene={(route,navigator)=>{ 82 | let Component = route.component; 83 | return ; 84 | }} 85 | /> 86 | 87 | { /*更多*/ } 88 | } 91 | renderSelectedIcon={() => } 92 | onPress={() => {this.setState({ selectedTab: 'more' })}} 93 | selected={this.state.selectedTab === 'more'} 94 | > 95 | { 98 | return Navigator.SceneConfigs.PushFromRight; 99 | }} 100 | renderScene={(route,navigator)=>{ 101 | let Component = route.component; 102 | return ; 103 | }} 104 | /> 105 | 106 | 107 | ); 108 | } 109 | }); 110 | 111 | var styles = StyleSheet.create({ 112 | container: { 113 | flex: 1, 114 | justifyContent: 'center', 115 | alignItems: 'center', 116 | backgroundColor: '#F5FCFF', 117 | }, 118 | welcome: { 119 | fontSize: 20, 120 | textAlign: 'center', 121 | margin: 10, 122 | }, 123 | instructions: { 124 | textAlign: 'center', 125 | color: '#333333', 126 | marginBottom: 5, 127 | }, 128 | iconStyle: { 129 | width: 22, 130 | height: 22 131 | } 132 | }); 133 | 134 | module.exports = Main; 135 | -------------------------------------------------------------------------------- /Component/Mine/MiddleData.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"iconName":"zr_exam", "title":"待付款"}, 3 | {"iconName":"zr_home", "title":"待使用"}, 4 | {"iconName":"zr_konwledge", "title":"待评价"}, 5 | {"iconName":"zr_train", "title":"退款售后"}, 6 | ] 7 | -------------------------------------------------------------------------------- /Component/Mine/XMGCommonMyCell.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { 3 | AppRegistry, 4 | StyleSheet, 5 | Text, 6 | View, 7 | TouchableOpacity, 8 | Image 9 | } from 'react-native'; 10 | 11 | var MyCell = React.createClass({ 12 | getDefaultProps(){ 13 | return{ 14 | leftIconName:'', 15 | leftTitle:'', 16 | rightIconName:'', 17 | rightTitle:'' 18 | } 19 | }, 20 | render() { 21 | return ( 22 | 23 | 24 | { /*左边*/ } 25 | 26 | 27 | {this.props.leftTitle} 28 | 29 | { /*右边*/ } 30 | 31 | {this.rightSubView()} 32 | 33 | 34 | 35 | ); 36 | }, 37 | //右边的内容 38 | rightSubView(){ 39 | return( 40 | 41 | {this.renderRightContent()} 42 | { /*箭头*/ } 43 | 44 | 45 | ) 46 | }, 47 | // 右边具体返回的值 48 | renderRightContent(){ 49 | if (this.props.rightIconName.length == 0) { //不返回图片 50 | return( 51 | {this.props.rightTitle} 52 | ) 53 | }else { 54 | return( 55 | 56 | ) 57 | } 58 | } 59 | }); 60 | 61 | var styles = StyleSheet.create({ 62 | container: { 63 | // 主轴方向 64 | flexDirection:'row', 65 | //主轴的对其方式 66 | justifyContent:'space-between', 67 | //背景颜色 68 | backgroundColor: 'white', 69 | //设置垂直居中 70 | alignItems: 'center', 71 | //高度 72 | height: 43, 73 | //下边框 74 | borderBottomColor:'#e8e8e8', 75 | borderBottomWidth:0.5 76 | }, 77 | leftViewStyle: { 78 | // 主轴方向 79 | flexDirection:'row', 80 | //侧轴居中 81 | alignItems:'center', 82 | //左外边距 83 | marginLeft: 8 84 | }, 85 | rightViewStyle: { 86 | 87 | }, 88 | leftImageStyle: { // 左边的图片 89 | width:25, 90 | height:25, 91 | marginRight:6, 92 | //设置圆角 93 | borderRadius:12 94 | }, 95 | leftTitleStyle: { 96 | fontSize:15 97 | } 98 | }); 99 | 100 | module.exports = MyCell; 101 | -------------------------------------------------------------------------------- /Component/Mine/XMGMine.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { 3 | AppRegistry, 4 | StyleSheet, 5 | Text, 6 | View, 7 | ScrollView 8 | } from 'react-native'; 9 | 10 | // 导入外部的组件 11 | var MyCell = require('./XMGCommonMyCell'); 12 | var MineMiddleView = require('./XMGMineMiddleView'); 13 | var MineHeaderView = require('./XMGMineHeaderView'); 14 | 15 | var Mine = React.createClass({ 16 | render() { 17 | return ( 18 | 26 | 27 | 28 | 33 | 34 | 35 | 36 | 41 | 46 | 47 | 48 | 52 | 53 | 54 | 59 | 60 | 61 | 66 | 67 | 68 | ); 69 | } 70 | }); 71 | 72 | var styles = StyleSheet.create({ 73 | scrollViewStyle: { 74 | backgroundColor:'#e8e8e8' 75 | } 76 | }); 77 | 78 | module.exports = Mine; 79 | -------------------------------------------------------------------------------- /Component/Mine/XMGMineHeaderView.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { 3 | AppRegistry, 4 | StyleSheet, 5 | Text, 6 | View, 7 | Image, 8 | TouchableOpacity 9 | } from 'react-native'; 10 | 11 | var Dimensions = require('Dimensions'); 12 | var {width} = Dimensions.get('window'); 13 | 14 | var HeaderView = React.createClass({ 15 | render() { 16 | return ( 17 | 18 | { /*上部分*/ } 19 | {this.renderTopView()} 20 | { /*下部分*/ } 21 | {this.renderBottomView()} 22 | 23 | ); 24 | }, 25 | 26 | // 上部分 27 | renderTopView(){ 28 | return( 29 | 30 | 31 | 32 | react-native实战 33 | 34 | 35 | 36 | ) 37 | }, 38 | 39 | // 下部分 40 | renderBottomView(){ 41 | return( 42 | 43 | {this.renderBottomItem()} 44 | 45 | ); 46 | }, 47 | renderBottomItem(){ 48 | // 数组 49 | var itemArr = []; 50 | //数据数组 51 | var data = [{'number':'100', 'titile':'码哥券'},{'number':'12', 'titile':'评价'},{'number':'50', 'titile':'收藏'},]; 52 | //遍历创建组件装入数组 53 | for (var i = 0; i < data.length; i++) { 54 | //取出单独的数据 55 | var item = data[i]; 56 | itemArr.push( 57 | 58 | 59 | {item.number} 60 | {item.titile} 61 | 62 | 63 | ); 64 | } 65 | //返回数组 66 | return itemArr; 67 | } 68 | 69 | }); 70 | 71 | var styles = StyleSheet.create({ 72 | container: { 73 | height:400, 74 | backgroundColor: '#1fb5ec', 75 | }, 76 | leftIconStyle: { 77 | width: 60, 78 | height: 60, 79 | borderRadius: 30, 80 | borderWidth: 3, 81 | borderColor: 'rgba(0,0,0,0.2)', 82 | }, 83 | centerViewStyle: { 84 | flexDirection:'row', 85 | width:width * 0.72, 86 | }, 87 | topViewStyle: { 88 | flexDirection: 'row', 89 | marginTop: 250, 90 | //设置侧轴的对其方式 91 | alignItems: 'center', 92 | //设置主轴的对其方式 93 | justifyContent: 'space-around' 94 | }, 95 | bottomViewStyle: { 96 | flexDirection:'row', 97 | //绝对定位 98 | position:'absolute', 99 | bottom: 0, 100 | }, 101 | bottomInnerViewStyle: { 102 | width:width/3+1, 103 | height: 50, 104 | backgroundColor:'rgba(255,255,255,0.5)', 105 | justifyContent:'center', 106 | alignItems:'center', 107 | borderRightWidth:1, 108 | borderRightColor:'white' 109 | } 110 | }); 111 | 112 | module.exports = HeaderView; 113 | -------------------------------------------------------------------------------- /Component/Mine/XMGMineMiddleView.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { 3 | AppRegistry, 4 | StyleSheet, 5 | Text, 6 | View, 7 | Image, 8 | TouchableOpacity 9 | } from 'react-native'; 10 | 11 | var MiddleData = require('./MiddleData.json'); 12 | 13 | var MineMiddleView = React.createClass({ 14 | render() { 15 | return ( 16 | 17 | {this.renderAllItem()} 18 | 19 | ); 20 | }, 21 | 22 | renderAllItem(){ 23 | // 定义组件数组 24 | var itemArr = []; 25 | // 遍历 26 | for (var i = 0; i < MiddleData.length; i++) { 27 | //取出单独的数据 28 | var data = MiddleData[i]; 29 | //创建组件装入数组 30 | itemArr.push( 31 | 32 | ); 33 | } 34 | // 返回 35 | return itemArr; 36 | } 37 | 38 | }); 39 | 40 | var InnerView = React.createClass({ 41 | getDefaultProps(){ 42 | return{ 43 | iconName: '', 44 | title:'' 45 | } 46 | }, 47 | render(){ 48 | return( 49 | 50 | 51 | {this.props.title} 52 | 53 | ); 54 | } 55 | }); 56 | 57 | var styles = StyleSheet.create({ 58 | container: { 59 | //设置主轴方向 60 | flexDirection:'row', 61 | alignItems: 'center', 62 | backgroundColor: 'white', 63 | height: 80, 64 | justifyContent: 'space-around' 65 | 66 | } 67 | }); 68 | 69 | module.exports = MineMiddleView; 70 | -------------------------------------------------------------------------------- /Component/More/XMGCommonCell.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { 3 | AppRegistry, 4 | StyleSheet, 5 | Text, 6 | View, 7 | Image, 8 | TouchableOpacity, 9 | Switch 10 | } from 'react-native'; 11 | 12 | var CommonCell = React.createClass({ 13 | getDefaultProps(){ 14 | return{ 15 | title:'', //标题 16 | isSwitch: false, //是否展示开关 17 | rightTitle:'' 18 | } 19 | }, 20 | getInitialState(){ 21 | return{ 22 | isOn:false 23 | } 24 | }, 25 | 26 | render() { 27 | return ( 28 | 29 | 30 | { /*左边*/ } 31 | {this.props.title} 32 | { /*右边*/ } 33 | {this.renderRightView()} 34 | 35 | 36 | ); 37 | }, 38 | // cell右边显示的内容 39 | renderRightView(){ 40 | // 判断 41 | if (this.props.isSwitch) { 42 | return( 43 | {this.setState({isOn:!this.state.isOn})}} style={{marginRight:8}} /> 44 | ) 45 | }else { 46 | return( 47 | 48 | {this.rightTitle()} 49 | 50 | 51 | ) 52 | } 53 | }, 54 | rightTitle(){ 55 | if (this.props.rightTitle.length > 0) { 56 | return( 57 | {this.props.rightTitle} 58 | ) 59 | } 60 | } 61 | 62 | }); 63 | 64 | var styles = StyleSheet.create({ 65 | container: { 66 | height:40, 67 | backgroundColor: 'white', 68 | borderBottomColor: '#dddddd', 69 | borderBottomWidth: 0.5, 70 | flexDirection: 'row', 71 | //设置主轴的对其方式 72 | justifyContent:'space-between', 73 | //垂直居中 74 | alignItems: 'center' 75 | } 76 | }); 77 | 78 | module.exports = CommonCell; 79 | -------------------------------------------------------------------------------- /Component/More/XMGMore.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { 3 | AppRegistry, 4 | StyleSheet, 5 | Text, 6 | View, 7 | Image, 8 | TouchableOpacity, 9 | ScrollView, 10 | } from 'react-native'; 11 | 12 | var CommonCell = require('./XMGCommonCell'); 13 | 14 | var More = React.createClass({ 15 | render() { 16 | return ( 17 | 18 | { /*导航条*/ } 19 | {this.renderNavBar()} 20 | 21 | 22 | 23 | 26 | 27 | 28 | 32 | 35 | 38 | 42 | 43 | 44 | 47 | 50 | 53 | 56 | 59 | 62 | 63 | 64 | 65 | ); 66 | }, 67 | 68 | // 导航条 69 | renderNavBar(){ 70 | return( 71 | 72 | 更多 73 | {alert('点击')}} style={styles.rightViewStyle}> 74 | 75 | 76 | 77 | ) 78 | } 79 | 80 | 81 | }); 82 | 83 | var styles = StyleSheet.create({ 84 | navImagStyle: { 85 | width: 23, 86 | height: 23, 87 | }, 88 | rightViewStyle: { 89 | //绝对定位 90 | position: 'absolute', 91 | right: 10, 92 | bottom: 13 93 | }, 94 | navOutViewStyle: { 95 | height: 64, 96 | backgroundColor: '#1fb5ec', 97 | // 设置主轴方向 98 | flexDirection: 'row', 99 | // 垂直居中,设置侧轴的对其方式 100 | alignItems: 'center', 101 | // 设置主轴放心居中 102 | justifyContent: 'center' 103 | }, 104 | container: { 105 | flex: 1, 106 | backgroundColor: '#e8e8e8', 107 | }, 108 | welcome: { 109 | fontSize: 20, 110 | textAlign: 'center', 111 | margin: 10, 112 | }, 113 | instructions: { 114 | textAlign: 'center', 115 | color: '#333333', 116 | marginBottom: 5, 117 | }, 118 | }); 119 | 120 | module.exports = More; 121 | -------------------------------------------------------------------------------- /Component/Shop/XMGShop.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { 3 | AppRegistry, 4 | StyleSheet, 5 | Text, 6 | View, 7 | TouchableOpacity, 8 | Image, 9 | WebView 10 | } from 'react-native'; 11 | 12 | var Shop = React.createClass({ 13 | render() { 14 | return ( 15 | 16 | { /*导航条*/ } 17 | {this.renderNavBar()} 18 | 19 | 23 | 24 | 25 | ); 26 | }, 27 | 28 | // 导航条 29 | renderNavBar(){ 30 | return( 31 | 32 | 商家 33 | {alert('点击')}} style={styles.rightViewStyle}> 34 | 35 | 36 | 37 | ) 38 | } 39 | 40 | }); 41 | 42 | var styles = StyleSheet.create({ 43 | container: { 44 | flex: 1, 45 | backgroundColor: '#e8e8e8', 46 | }, 47 | navImagStyle: { 48 | width: 23, 49 | height: 23, 50 | }, 51 | rightViewStyle: { 52 | //绝对定位 53 | position: 'absolute', 54 | right: 10, 55 | bottom: 13 56 | }, 57 | navOutViewStyle: { 58 | height: 64, 59 | backgroundColor: '#1fb5ec', 60 | // 设置主轴方向 61 | flexDirection: 'row', 62 | // 垂直居中,设置侧轴的对其方式 63 | alignItems: 'center', 64 | // 设置主轴放心居中 65 | justifyContent: 'center' 66 | } 67 | }); 68 | 69 | module.exports = Shop; 70 | -------------------------------------------------------------------------------- /Component/Source/common_arrow_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/Component/Source/common_arrow_right.png -------------------------------------------------------------------------------- /Component/Source/coupon_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/Component/Source/coupon_1.png -------------------------------------------------------------------------------- /Component/Source/giftcard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/Component/Source/giftcard.png -------------------------------------------------------------------------------- /Component/Source/h_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/Component/Source/h_0.png -------------------------------------------------------------------------------- /Component/Source/h_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/Component/Source/h_1.png -------------------------------------------------------------------------------- /Component/Source/h_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/Component/Source/h_10.png -------------------------------------------------------------------------------- /Component/Source/h_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/Component/Source/h_2.png -------------------------------------------------------------------------------- /Component/Source/h_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/Component/Source/h_3.png -------------------------------------------------------------------------------- /Component/Source/h_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/Component/Source/h_4.png -------------------------------------------------------------------------------- /Component/Source/h_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/Component/Source/h_5.png -------------------------------------------------------------------------------- /Component/Source/h_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/Component/Source/h_6.png -------------------------------------------------------------------------------- /Component/Source/h_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/Component/Source/h_7.png -------------------------------------------------------------------------------- /Component/Source/h_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/Component/Source/h_8.png -------------------------------------------------------------------------------- /Component/Source/h_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/Component/Source/h_9.png -------------------------------------------------------------------------------- /Component/Source/slide_TeachingSource.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/Component/Source/slide_TeachingSource.png -------------------------------------------------------------------------------- /Component/Source/slide_Ver_Refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/Component/Source/slide_Ver_Refresh.png -------------------------------------------------------------------------------- /Component/Source/slide_alert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/Component/Source/slide_alert.png -------------------------------------------------------------------------------- /Component/Source/slide_feedback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/Component/Source/slide_feedback.png -------------------------------------------------------------------------------- /Component/Source/slide_setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/Component/Source/slide_setting.png -------------------------------------------------------------------------------- /Component/Source/zr_exam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/Component/Source/zr_exam.png -------------------------------------------------------------------------------- /Component/Source/zr_exam_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/Component/Source/zr_exam_h.png -------------------------------------------------------------------------------- /Component/Source/zr_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/Component/Source/zr_home.png -------------------------------------------------------------------------------- /Component/Source/zr_home_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/Component/Source/zr_home_h.png -------------------------------------------------------------------------------- /Component/Source/zr_konwledge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/Component/Source/zr_konwledge.png -------------------------------------------------------------------------------- /Component/Source/zr_konwledge_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/Component/Source/zr_konwledge_h.png -------------------------------------------------------------------------------- /Component/Source/zr_train.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/Component/Source/zr_train.png -------------------------------------------------------------------------------- /Component/Source/zr_train_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/Component/Source/zr_train_h.png -------------------------------------------------------------------------------- /LocalData/HomeHotData.json: -------------------------------------------------------------------------------- 1 | { 2 | "data":[ 3 | { 4 | "shopImage" : "ms", 5 | "shopName" : "凯德广场云商", 6 | "saleCount":22 7 | }, 8 | { 9 | "shopImage" : "ms", 10 | "shopName" : "来又来广场", 11 | "saleCount":111 12 | }, 13 | { 14 | "shopImage" : "ms", 15 | "shopName" : "白云万达广场", 16 | "saleCount":32 17 | }, 18 | { 19 | "shopImage" : "ms", 20 | "shopName" : "正佳广场", 21 | "saleCount":99 22 | } 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /LocalData/HomeTopMiddle.json: -------------------------------------------------------------------------------- 1 | { 2 | "data":[ 3 | { 4 | "title" : "最高立减25", 5 | "subTitle" : "报名小码哥 新学员专享", 6 | "image" : "sj" 7 | } 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /LocalData/HomeTopMiddleLeft.json: -------------------------------------------------------------------------------- 1 | { 2 | "dataLeft":[ 3 | {"img1":"nice_f3", "img2":"http://p1.meituan.net/120.90/deal/cb756f70e5e8c37f96e59c0335182f9033646.jpg@90_0_279_279a%7C267h_267w_2e_90q", "title":"探路者碳烤鱼", "price":"¥9.5", "sale":"再减3元"} 4 | ], 5 | "dataRight":[ 6 | {"title" : "天天特价","subTitle" : "特惠不打烊","rightImage" : "nice_6","titleColor" : "orange"}, 7 | {"title" : "一元吃","subTitle" : "一元吃美食","rightImage" : "nice_7","titleColor" : "red"}, 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /LocalData/TopMenu.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | [ 4 | { 5 | "title" : "美食", 6 | "image" : "h_2" 7 | }, 8 | { 9 | "title" : "电影", 10 | "image" : "h_3" 11 | }, 12 | { 13 | "title" : "酒店", 14 | "image" : "h_4" 15 | }, 16 | { 17 | "title" : "娱乐", 18 | "image" : "h_5" 19 | }, 20 | { 21 | "title" : "外卖", 22 | "image" : "h_6" 23 | }, 24 | { 25 | "title" : "购物", 26 | "image" : "h_7" 27 | }, 28 | { 29 | "title" : "特惠", 30 | "image" : "h_8" 31 | }, 32 | { 33 | "title" : "医疗", 34 | "image" : "h_9" 35 | }, 36 | { 37 | "title" : "休闲", 38 | "image" : "h_10" 39 | }, 40 | { 41 | "title" : "足疗", 42 | "image" : "h_11" 43 | } 44 | ], 45 | [ 46 | { 47 | "title" : "门票", 48 | "image" : "h_12" 49 | }, 50 | { 51 | "title" : "美甲", 52 | "image" : "h_13" 53 | }, 54 | { 55 | "title" : "抢购", 56 | "image" : "h_14" 57 | }, 58 | { 59 | "title" : "儿童", 60 | "image" : "h_15" 61 | }, 62 | { 63 | "title" : "运动", 64 | "image" : "h_7" 65 | }, 66 | { 67 | "title" : "户外", 68 | "image" : "h_8" 69 | }, 70 | { 71 | "title" : "直播", 72 | "image" : "h_9" 73 | }, 74 | { 75 | "title" : "达人", 76 | "image" : "h_10" 77 | }, 78 | { 79 | "title" : "休闲", 80 | "image" : "h_2" 81 | }, 82 | { 83 | "title" : "会所", 84 | "image" : "h_3" 85 | } 86 | ] 87 | ], 88 | "bottomData":[ 89 | { 90 | "title" : "订机票", 91 | "subTitle" : "一折票马上抢", 92 | "hotImage" : "h_10" 93 | }, 94 | { 95 | "title" : "温泉", 96 | "subTitle" : "一折票马上抢", 97 | "hotImage" : "h_10" 98 | }, 99 | { 100 | "title" : "火锅", 101 | "subTitle" : "一折票马上抢", 102 | "hotImage" : "h_10" 103 | }, 104 | { 105 | "title" : "订机票", 106 | "subTitle" : "一折票马上抢", 107 | "hotImage" : "h_10" 108 | } 109 | ] 110 | } 111 | -------------------------------------------------------------------------------- /LocalData/XMG_Home_D4.json: -------------------------------------------------------------------------------- 1 | { 2 | "stid": "7206981553244490924", 3 | "data": [{ 4 | "postion": 0, 5 | "typeface_color": "#ff9900", 6 | "id": 7486, 7 | "share": { 8 | "message": "一元能吃肯德基", 9 | "url": "http://i.meituan.com/firework/kfchanbao" 10 | }, 11 | "title": "一元能吃肯德基", 12 | "module": false, 13 | "mainTitle": "一元肯德基", 14 | "tplurl": "http://www.baidu.com", 15 | "type": 1, 16 | "imageurl": "http://p0.meituan.net/120.90/deal/5dc3fc168d2116222e0283217e4805ca31072.jpeg@267h_267w_2e_90Q", 17 | "solds": 0, 18 | "deputytitle": "新用户专享" 19 | }, 20 | { 21 | "postion": 0, 22 | "typeface_color": "#f6687d", 23 | "id": 7486, 24 | "share": { 25 | "message": "一元能吃肯德基", 26 | "url": "http://i.meituan.com/firework/kfchanbao" 27 | }, 28 | "title": "一元能吃肯德基", 29 | "module": false, 30 | "mainTitle": "4月开春大促", 31 | "tplurl": "http://www.baidu.com", 32 | "type": 1, 33 | "imageurl": "http://p0.meituan.net/120.90/deal/1e76222d7812a3ecf41118c13477c62525894.jpg@90_0_279_279a%7C267h_267w_2e_90q", 34 | "solds": 0, 35 | "deputytitle": "回馈促销活动" 36 | }, 37 | { 38 | "postion": 0, 39 | "typeface_color": "#8a2be2", 40 | "id": 7486, 41 | "share": { 42 | "message": "一元能吃肯德基", 43 | "url": "http://i.meituan.com/firework/kfchanbao" 44 | }, 45 | "title": "一元能吃肯德基", 46 | "module": false, 47 | "mainTitle": "一折购鲜花", 48 | "tplurl": "http://www.baidu.com", 49 | "type": 1, 50 | "imageurl": "http://p0.meituan.net/120.90/deal/cce67fbdd25688235f49a397379f261162859.jpg", 51 | "solds": 0, 52 | "deputytitle": "情人节特惠" 53 | }, 54 | { 55 | "postion": 0, 56 | "typeface_color": "#6495ed", 57 | "id": 7486, 58 | "share": { 59 | "message": "一元能吃肯德基", 60 | "url": "http://i.meituan.com/firework/kfchanbao" 61 | }, 62 | "title": "一元能吃肯德基", 63 | "module": false, 64 | "mainTitle": "领21元红包", 65 | "tplurl": "http://www.baidu.com", 66 | "type": 1, 67 | "imageurl": "http://p1.meituan.net/120.90/deal/d9114f14de32ef9e9685ffd1679711d149946.jpg", 68 | "solds": 0, 69 | "deputytitle": "邀请新用户领" 70 | } 71 | ] 72 | } 73 | -------------------------------------------------------------------------------- /LocalData/XMG_Home_D5.json: -------------------------------------------------------------------------------- 1 | { 2 | "tips":"全部4家", 3 | "count":4, 4 | "data":[ 5 | { 6 | "detailurl":"https://www.jd.com", 7 | "promotionIcon":"", 8 | "name":"正佳广场", 9 | "img":"sale_1", 10 | "showtext":{ 11 | "text":"离我最近", 12 | "count":84, 13 | "color":"" 14 | }, 15 | "longitude":113.327086, 16 | "latitude":23.131090, 17 | "smid":4374715, 18 | "promotionText":"送福利 商品低至1.5折" 19 | }, 20 | { 21 | "detailurl":"https://www.jd.com", 22 | "promotionIcon":"", 23 | "name":"凯德广场来尚", 24 | "img":"sale_3", 25 | "showtext":{ 26 | "text":"离我最近", 27 | "count":84, 28 | "color":"" 29 | }, 30 | "longitude":113.327086, 31 | "latitude":23.131090, 32 | "smid":4374715, 33 | "promotionText":"送福利 商品低至1.5折" 34 | }, 35 | { 36 | "detailurl":"https://www.baidu.com", 37 | "promotionIcon":"", 38 | "name":"来又来广场", 39 | "img":"sale_0", 40 | "showtext":{ 41 | "text":"离我最近", 42 | "count":84, 43 | "color":"" 44 | }, 45 | "longitude":113.327086, 46 | "latitude":23.131090, 47 | "smid":4374715, 48 | "promotionText":"送福利 商品低至1.5折" 49 | }, 50 | { 51 | "detailurl":"https://www.baidu.com", 52 | "promotionIcon":"", 53 | "name":"万达西地广场", 54 | "img":"sale_3", 55 | "showtext":{ 56 | "text":"离我最近", 57 | "count":84, 58 | "color":"" 59 | }, 60 | "longitude":113.327086, 61 | "latitude":23.131090, 62 | "smid":4374715, 63 | "promotionText":"送福利 商品低至1.5折" 64 | } 65 | ] 66 | } 67 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # react-native-buy 2 | 3 | 学习完小码哥react-native视频教程,已完成电商项目的基本框架与界面搭建。 4 | 5 | 以下提供项目的源码,仅供更多的react-native爱好者学习交流使用。后续将更新出项目代码编写过程中遇到的问题与解决方案... 6 | 7 | 新浪博客地址:http://blog.sina.com.cn/u/5499795228 8 | 9 | 简书地址:http://www.jianshu.com/u/be64cd651c35 10 | 11 | -------------------------------------------------------------------------------- /__tests__/index.android.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import Index from '../index.android.js'; 4 | 5 | // Note: test renderer must be required after react-native. 6 | import renderer from 'react-test-renderer'; 7 | 8 | it('renders correctly', () => { 9 | const tree = renderer.create( 10 | 11 | ); 12 | }); 13 | -------------------------------------------------------------------------------- /__tests__/index.ios.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import Index from '../index.ios.js'; 4 | 5 | // Note: test renderer must be required after react-native. 6 | import renderer from 'react-test-renderer'; 7 | 8 | it('renders correctly', () => { 9 | const tree = renderer.create( 10 | 11 | ); 12 | }); 13 | -------------------------------------------------------------------------------- /android/app/BUCK: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | # To learn about Buck see [Docs](https://buckbuild.com/). 4 | # To run your application with Buck: 5 | # - install Buck 6 | # - `npm start` - to start the packager 7 | # - `cd android` 8 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` 9 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck 10 | # - `buck install -r android/app` - compile, install and run application 11 | # 12 | 13 | lib_deps = [] 14 | for jarfile in glob(['libs/*.jar']): 15 | name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile) 16 | lib_deps.append(':' + name) 17 | prebuilt_jar( 18 | name = name, 19 | binary_jar = jarfile, 20 | ) 21 | 22 | for aarfile in glob(['libs/*.aar']): 23 | name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile) 24 | lib_deps.append(':' + name) 25 | android_prebuilt_aar( 26 | name = name, 27 | aar = aarfile, 28 | ) 29 | 30 | android_library( 31 | name = 'all-libs', 32 | exported_deps = lib_deps 33 | ) 34 | 35 | android_library( 36 | name = 'app-code', 37 | srcs = glob([ 38 | 'src/main/java/**/*.java', 39 | ]), 40 | deps = [ 41 | ':all-libs', 42 | ':build_config', 43 | ':res', 44 | ], 45 | ) 46 | 47 | android_build_config( 48 | name = 'build_config', 49 | package = 'com.xmgbuy', 50 | ) 51 | 52 | android_resource( 53 | name = 'res', 54 | res = 'src/main/res', 55 | package = 'com.xmgbuy', 56 | ) 57 | 58 | android_binary( 59 | name = 'app', 60 | package_type = 'debug', 61 | manifest = 'src/main/AndroidManifest.xml', 62 | keystore = '//android/keystores:debug', 63 | deps = [ 64 | ':app-code', 65 | ], 66 | ) 67 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: "com.android.application" 2 | 3 | import com.android.build.OutputFile 4 | 5 | /** 6 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets 7 | * and bundleReleaseJsAndAssets). 8 | * These basically call `react-native bundle` with the correct arguments during the Android build 9 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the 10 | * bundle directly from the development server. Below you can see all the possible configurations 11 | * and their defaults. If you decide to add a configuration block, make sure to add it before the 12 | * `apply from: "../../node_modules/react-native/react.gradle"` line. 13 | * 14 | * project.ext.react = [ 15 | * // the name of the generated asset file containing your JS bundle 16 | * bundleAssetName: "index.android.bundle", 17 | * 18 | * // the entry file for bundle generation 19 | * entryFile: "index.android.js", 20 | * 21 | * // whether to bundle JS and assets in debug mode 22 | * bundleInDebug: false, 23 | * 24 | * // whether to bundle JS and assets in release mode 25 | * bundleInRelease: true, 26 | * 27 | * // whether to bundle JS and assets in another build variant (if configured). 28 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants 29 | * // The configuration property can be in the following formats 30 | * // 'bundleIn${productFlavor}${buildType}' 31 | * // 'bundleIn${buildType}' 32 | * // bundleInFreeDebug: true, 33 | * // bundleInPaidRelease: true, 34 | * // bundleInBeta: true, 35 | * 36 | * // the root of your project, i.e. where "package.json" lives 37 | * root: "../../", 38 | * 39 | * // where to put the JS bundle asset in debug mode 40 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", 41 | * 42 | * // where to put the JS bundle asset in release mode 43 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release", 44 | * 45 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 46 | * // require('./image.png')), in debug mode 47 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", 48 | * 49 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 50 | * // require('./image.png')), in release mode 51 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", 52 | * 53 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means 54 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to 55 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle 56 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ 57 | * // for example, you might want to remove it from here. 58 | * inputExcludes: ["android/**", "ios/**"], 59 | * 60 | * // override which node gets called and with what additional arguments 61 | * nodeExecutableAndArgs: ["node"] 62 | * 63 | * // supply additional arguments to the packager 64 | * extraPackagerArgs: [] 65 | * ] 66 | */ 67 | 68 | apply from: "../../node_modules/react-native/react.gradle" 69 | 70 | /** 71 | * Set this to true to create two separate APKs instead of one: 72 | * - An APK that only works on ARM devices 73 | * - An APK that only works on x86 devices 74 | * The advantage is the size of the APK is reduced by about 4MB. 75 | * Upload all the APKs to the Play Store and people will download 76 | * the correct one based on the CPU architecture of their device. 77 | */ 78 | def enableSeparateBuildPerCPUArchitecture = false 79 | 80 | /** 81 | * Run Proguard to shrink the Java bytecode in release builds. 82 | */ 83 | def enableProguardInReleaseBuilds = false 84 | 85 | android { 86 | compileSdkVersion 23 87 | buildToolsVersion "23.0.1" 88 | 89 | defaultConfig { 90 | applicationId "com.xmgbuy" 91 | minSdkVersion 16 92 | targetSdkVersion 22 93 | versionCode 1 94 | versionName "1.0" 95 | ndk { 96 | abiFilters "armeabi-v7a", "x86" 97 | } 98 | } 99 | splits { 100 | abi { 101 | reset() 102 | enable enableSeparateBuildPerCPUArchitecture 103 | universalApk false // If true, also generate a universal APK 104 | include "armeabi-v7a", "x86" 105 | } 106 | } 107 | buildTypes { 108 | release { 109 | minifyEnabled enableProguardInReleaseBuilds 110 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 111 | } 112 | } 113 | // applicationVariants are e.g. debug, release 114 | applicationVariants.all { variant -> 115 | variant.outputs.each { output -> 116 | // For each separate APK per architecture, set a unique version code as described here: 117 | // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits 118 | def versionCodes = ["armeabi-v7a":1, "x86":2] 119 | def abi = output.getFilter(OutputFile.ABI) 120 | if (abi != null) { // null for the universal-debug, universal-release variants 121 | output.versionCodeOverride = 122 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode 123 | } 124 | } 125 | } 126 | } 127 | 128 | dependencies { 129 | compile fileTree(dir: "libs", include: ["*.jar"]) 130 | compile "com.android.support:appcompat-v7:23.0.1" 131 | compile "com.facebook.react:react-native:+" // From node_modules 132 | } 133 | 134 | // Run this once to be able to run the application with BUCK 135 | // puts all compile dependencies into folder libs for BUCK to use 136 | task copyDownloadableDepsToLibs(type: Copy) { 137 | from configurations.compile 138 | into 'libs' 139 | } 140 | -------------------------------------------------------------------------------- /android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Disabling obfuscation is useful if you collect stack traces from production crashes 20 | # (unless you are using a system that supports de-obfuscate the stack traces). 21 | -dontobfuscate 22 | 23 | # React Native 24 | 25 | # Keep our interfaces so they can be used by other ProGuard rules. 26 | # See http://sourceforge.net/p/proguard/bugs/466/ 27 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip 28 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters 29 | -keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip 30 | 31 | # Do not strip any method/class that is annotated with @DoNotStrip 32 | -keep @com.facebook.proguard.annotations.DoNotStrip class * 33 | -keep @com.facebook.common.internal.DoNotStrip class * 34 | -keepclassmembers class * { 35 | @com.facebook.proguard.annotations.DoNotStrip *; 36 | @com.facebook.common.internal.DoNotStrip *; 37 | } 38 | 39 | -keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * { 40 | void set*(***); 41 | *** get*(); 42 | } 43 | 44 | -keep class * extends com.facebook.react.bridge.JavaScriptModule { *; } 45 | -keep class * extends com.facebook.react.bridge.NativeModule { *; } 46 | -keepclassmembers,includedescriptorclasses class * { native ; } 47 | -keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; } 48 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp ; } 49 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup ; } 50 | 51 | -dontwarn com.facebook.react.** 52 | 53 | # okhttp 54 | 55 | -keepattributes Signature 56 | -keepattributes *Annotation* 57 | -keep class okhttp3.** { *; } 58 | -keep interface okhttp3.** { *; } 59 | -dontwarn okhttp3.** 60 | 61 | # okio 62 | 63 | -keep class sun.misc.Unsafe { *; } 64 | -dontwarn java.nio.file.* 65 | -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement 66 | -dontwarn okio.** 67 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/xmgbuy/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.xmgbuy; 2 | 3 | import com.facebook.react.ReactActivity; 4 | 5 | public class MainActivity extends ReactActivity { 6 | 7 | /** 8 | * Returns the name of the main component registered from JavaScript. 9 | * This is used to schedule rendering of the component. 10 | */ 11 | @Override 12 | protected String getMainComponentName() { 13 | return "XMGBuy"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/xmgbuy/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.xmgbuy; 2 | 3 | import android.app.Application; 4 | import android.util.Log; 5 | 6 | import com.facebook.react.ReactApplication; 7 | import com.facebook.react.ReactInstanceManager; 8 | import com.facebook.react.ReactNativeHost; 9 | import com.facebook.react.ReactPackage; 10 | import com.facebook.react.shell.MainReactPackage; 11 | import com.facebook.soloader.SoLoader; 12 | 13 | import java.util.Arrays; 14 | import java.util.List; 15 | 16 | public class MainApplication extends Application implements ReactApplication { 17 | 18 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { 19 | @Override 20 | public boolean getUseDeveloperSupport() { 21 | return BuildConfig.DEBUG; 22 | } 23 | 24 | @Override 25 | protected List getPackages() { 26 | return Arrays.asList( 27 | new MainReactPackage() 28 | ); 29 | } 30 | }; 31 | 32 | @Override 33 | public ReactNativeHost getReactNativeHost() { 34 | return mReactNativeHost; 35 | } 36 | 37 | @Override 38 | public void onCreate() { 39 | super.onCreate(); 40 | SoLoader.init(this, /* native exopackage */ false); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | XMGBuy 3 | 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:1.3.1' 9 | 10 | // NOTE: Do not place your application dependencies here; they belong 11 | // in the individual module build.gradle files 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | mavenLocal() 18 | jcenter() 19 | maven { 20 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 21 | url "$rootDir/../node_modules/react-native/android" 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | android.useDeprecatedNdk=true 21 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip 6 | -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # For Cygwin, ensure paths are in UNIX format before anything is touched. 46 | if $cygwin ; then 47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 48 | fi 49 | 50 | # Attempt to set APP_HOME 51 | # Resolve links: $0 may be a link 52 | PRG="$0" 53 | # Need this for relative symlinks. 54 | while [ -h "$PRG" ] ; do 55 | ls=`ls -ld "$PRG"` 56 | link=`expr "$ls" : '.*-> \(.*\)$'` 57 | if expr "$link" : '/.*' > /dev/null; then 58 | PRG="$link" 59 | else 60 | PRG=`dirname "$PRG"`"/$link" 61 | fi 62 | done 63 | SAVED="`pwd`" 64 | cd "`dirname \"$PRG\"`/" >&- 65 | APP_HOME="`pwd -P`" 66 | cd "$SAVED" >&- 67 | 68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 69 | 70 | # Determine the Java command to use to start the JVM. 71 | if [ -n "$JAVA_HOME" ] ; then 72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 73 | # IBM's JDK on AIX uses strange locations for the executables 74 | JAVACMD="$JAVA_HOME/jre/sh/java" 75 | else 76 | JAVACMD="$JAVA_HOME/bin/java" 77 | fi 78 | if [ ! -x "$JAVACMD" ] ; then 79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 80 | 81 | Please set the JAVA_HOME variable in your environment to match the 82 | location of your Java installation." 83 | fi 84 | else 85 | JAVACMD="java" 86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 87 | 88 | Please set the JAVA_HOME variable in your environment to match the 89 | location of your Java installation." 90 | fi 91 | 92 | # Increase the maximum file descriptors if we can. 93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 94 | MAX_FD_LIMIT=`ulimit -H -n` 95 | if [ $? -eq 0 ] ; then 96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 97 | MAX_FD="$MAX_FD_LIMIT" 98 | fi 99 | ulimit -n $MAX_FD 100 | if [ $? -ne 0 ] ; then 101 | warn "Could not set maximum file descriptor limit: $MAX_FD" 102 | fi 103 | else 104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 105 | fi 106 | fi 107 | 108 | # For Darwin, add options to specify how the application appears in the dock 109 | if $darwin; then 110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 111 | fi 112 | 113 | # For Cygwin, switch paths to Windows format before running java 114 | if $cygwin ; then 115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 158 | function splitJvmOpts() { 159 | JVM_OPTS=("$@") 160 | } 161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 163 | 164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 165 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /android/keystores/BUCK: -------------------------------------------------------------------------------- 1 | keystore( 2 | name = 'debug', 3 | store = 'debug.keystore', 4 | properties = 'debug.keystore.properties', 5 | visibility = [ 6 | 'PUBLIC', 7 | ], 8 | ) 9 | -------------------------------------------------------------------------------- /android/keystores/debug.keystore.properties: -------------------------------------------------------------------------------- 1 | key.store=debug.keystore 2 | key.alias=androiddebugkey 3 | key.store.password=android 4 | key.alias.password=android 5 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'XMGBuy' 2 | 3 | include ':app' 4 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "XMGBuy", 3 | "displayName": "XMGBuy" 4 | } -------------------------------------------------------------------------------- /index.android.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample React Native App 3 | * https://github.com/facebook/react-native 4 | * @flow 5 | */ 6 | 7 | import React, { Component } from 'react'; 8 | import { 9 | AppRegistry, 10 | StyleSheet, 11 | Text, 12 | View 13 | } from 'react-native'; 14 | 15 | export default class XMGBuy extends Component { 16 | render() { 17 | return ( 18 | 19 | 20 | Welcome to React Native! 21 | 22 | 23 | To get started, edit index.android.js 24 | 25 | 26 | Double tap R on your keyboard to reload,{'\n'} 27 | Shake or press menu button for dev menu 28 | 29 | 30 | ); 31 | } 32 | } 33 | 34 | const styles = StyleSheet.create({ 35 | container: { 36 | flex: 1, 37 | justifyContent: 'center', 38 | alignItems: 'center', 39 | backgroundColor: '#F5FCFF', 40 | }, 41 | welcome: { 42 | fontSize: 20, 43 | textAlign: 'center', 44 | margin: 10, 45 | }, 46 | instructions: { 47 | textAlign: 'center', 48 | color: '#333333', 49 | marginBottom: 5, 50 | }, 51 | }); 52 | 53 | AppRegistry.registerComponent('XMGBuy', () => XMGBuy); 54 | -------------------------------------------------------------------------------- /index.ios.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample React Native App 3 | * https://github.com/facebook/react-native 4 | * @flow 5 | */ 6 | 7 | import React, { Component } from 'react'; 8 | import { 9 | AppRegistry, 10 | StyleSheet, 11 | Text, 12 | View 13 | } from 'react-native'; 14 | 15 | var Main = require('./Component/Main/XMGMain'); 16 | 17 | var XMGBuy = React.createClass({ 18 | render() { 19 | return ( 20 |
21 | ); 22 | } 23 | }); 24 | 25 | AppRegistry.registerComponent('XMGBuy', () => XMGBuy); 26 | -------------------------------------------------------------------------------- /ios/XMGBuy-tvOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UIViewControllerBasedStatusBarAppearance 38 | 39 | NSLocationWhenInUseUsageDescription 40 | 41 | NSAppTransportSecurity 42 | 43 | 44 | NSExceptionDomains 45 | 46 | localhost 47 | 48 | NSExceptionAllowsInsecureHTTPLoads 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /ios/XMGBuy-tvOSTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ios/XMGBuy.xcodeproj/xcshareddata/xcschemes/XMGBuy-tvOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 43 | 49 | 50 | 51 | 52 | 53 | 58 | 59 | 61 | 67 | 68 | 69 | 70 | 71 | 77 | 78 | 79 | 80 | 81 | 82 | 92 | 94 | 100 | 101 | 102 | 103 | 104 | 105 | 111 | 113 | 119 | 120 | 121 | 122 | 124 | 125 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /ios/XMGBuy.xcodeproj/xcshareddata/xcschemes/XMGBuy.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 43 | 49 | 50 | 51 | 52 | 53 | 58 | 59 | 61 | 67 | 68 | 69 | 70 | 71 | 77 | 78 | 79 | 80 | 81 | 82 | 92 | 94 | 100 | 101 | 102 | 103 | 104 | 105 | 111 | 113 | 119 | 120 | 121 | 122 | 124 | 125 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /ios/XMGBuy/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | @interface AppDelegate : UIResponder 13 | 14 | @property (nonatomic, strong) UIWindow *window; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /ios/XMGBuy/AppDelegate.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "AppDelegate.h" 11 | 12 | #import 13 | #import 14 | 15 | @implementation AppDelegate 16 | 17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 18 | { 19 | 20 | // 设置状态栏 21 | [[UIApplication sharedApplication] setStatusBarStyle: UIStatusBarStyleLightContent]; 22 | 23 | NSURL *jsCodeLocation; 24 | 25 | jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil]; 26 | 27 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation 28 | moduleName:@"XMGBuy" 29 | initialProperties:nil 30 | launchOptions:launchOptions]; 31 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; 32 | 33 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 34 | UIViewController *rootViewController = [UIViewController new]; 35 | rootViewController.view = rootView; 36 | self.window.rootViewController = rootViewController; 37 | [self.window makeKeyAndVisible]; 38 | return YES; 39 | } 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /ios/XMGBuy/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/AppIcon-5.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "iPhone 7-20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "iPhone 7-20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "iPhone 7-Small.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "iPhone 7-Small@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "iPhone 7-Small@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "iPhone 7-Small-40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "iPhone 7-Small-40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "iPhone 7-60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "iPhone 7-60@3x.png", 55 | "scale" : "3x" 56 | } 57 | ], 58 | "info" : { 59 | "version" : 1, 60 | "author" : "xcode" 61 | } 62 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/AppIcon-5.appiconset/iPhone 7-20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/AppIcon-5.appiconset/iPhone 7-20@2x.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/AppIcon-5.appiconset/iPhone 7-20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/AppIcon-5.appiconset/iPhone 7-20@3x.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/AppIcon-5.appiconset/iPhone 7-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/AppIcon-5.appiconset/iPhone 7-60@2x.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/AppIcon-5.appiconset/iPhone 7-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/AppIcon-5.appiconset/iPhone 7-60@3x.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/AppIcon-5.appiconset/iPhone 7-Small-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/AppIcon-5.appiconset/iPhone 7-Small-40@2x.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/AppIcon-5.appiconset/iPhone 7-Small-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/AppIcon-5.appiconset/iPhone 7-Small-40@3x.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/AppIcon-5.appiconset/iPhone 7-Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/AppIcon-5.appiconset/iPhone 7-Small.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/AppIcon-5.appiconset/iPhone 7-Small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/AppIcon-5.appiconset/iPhone 7-Small@2x.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/AppIcon-5.appiconset/iPhone 7-Small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/AppIcon-5.appiconset/iPhone 7-Small@3x.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | } 43 | ], 44 | "info" : { 45 | "version" : 1, 46 | "author" : "xcode" 47 | } 48 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/IMG_3814.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "IMG_3814.PNG", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/IMG_3814.imageset/IMG_3814.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/IMG_3814.imageset/IMG_3814.PNG -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/LaunchImage-1.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "filename" : "launchImage3_5.png", 7 | "extent" : "full-screen", 8 | "scale" : "1x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "filename" : "launchImage3_5@2x-1.png", 14 | "extent" : "full-screen", 15 | "scale" : "2x" 16 | }, 17 | { 18 | "orientation" : "portrait", 19 | "idiom" : "iphone", 20 | "filename" : "launchImage4_0@2x-1.png", 21 | "extent" : "full-screen", 22 | "subtype" : "retina4", 23 | "scale" : "2x" 24 | }, 25 | { 26 | "orientation" : "portrait", 27 | "idiom" : "ipad", 28 | "extent" : "to-status-bar", 29 | "scale" : "1x" 30 | }, 31 | { 32 | "orientation" : "portrait", 33 | "idiom" : "ipad", 34 | "extent" : "full-screen", 35 | "scale" : "1x" 36 | }, 37 | { 38 | "orientation" : "landscape", 39 | "idiom" : "ipad", 40 | "extent" : "to-status-bar", 41 | "scale" : "1x" 42 | }, 43 | { 44 | "orientation" : "landscape", 45 | "idiom" : "ipad", 46 | "extent" : "full-screen", 47 | "scale" : "1x" 48 | }, 49 | { 50 | "orientation" : "portrait", 51 | "idiom" : "ipad", 52 | "extent" : "to-status-bar", 53 | "scale" : "2x" 54 | }, 55 | { 56 | "orientation" : "portrait", 57 | "idiom" : "ipad", 58 | "extent" : "full-screen", 59 | "scale" : "2x" 60 | }, 61 | { 62 | "orientation" : "landscape", 63 | "idiom" : "ipad", 64 | "extent" : "to-status-bar", 65 | "scale" : "2x" 66 | }, 67 | { 68 | "orientation" : "landscape", 69 | "idiom" : "ipad", 70 | "extent" : "full-screen", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "extent" : "full-screen", 75 | "idiom" : "iphone", 76 | "subtype" : "736h", 77 | "filename" : "launchImage5_5@3x.png", 78 | "minimum-system-version" : "8.0", 79 | "orientation" : "portrait", 80 | "scale" : "3x" 81 | }, 82 | { 83 | "orientation" : "landscape", 84 | "idiom" : "iphone", 85 | "extent" : "full-screen", 86 | "minimum-system-version" : "8.0", 87 | "subtype" : "736h", 88 | "scale" : "3x" 89 | }, 90 | { 91 | "extent" : "full-screen", 92 | "idiom" : "iphone", 93 | "subtype" : "667h", 94 | "filename" : "launchImage4_7@2x.png", 95 | "minimum-system-version" : "8.0", 96 | "orientation" : "portrait", 97 | "scale" : "2x" 98 | }, 99 | { 100 | "orientation" : "portrait", 101 | "idiom" : "iphone", 102 | "filename" : "launchImage3_5@2x.png", 103 | "extent" : "full-screen", 104 | "minimum-system-version" : "7.0", 105 | "scale" : "2x" 106 | }, 107 | { 108 | "extent" : "full-screen", 109 | "idiom" : "iphone", 110 | "subtype" : "retina4", 111 | "filename" : "launchImage4_0@2x.png", 112 | "minimum-system-version" : "7.0", 113 | "orientation" : "portrait", 114 | "scale" : "2x" 115 | }, 116 | { 117 | "orientation" : "portrait", 118 | "idiom" : "ipad", 119 | "extent" : "full-screen", 120 | "minimum-system-version" : "7.0", 121 | "scale" : "1x" 122 | }, 123 | { 124 | "orientation" : "landscape", 125 | "idiom" : "ipad", 126 | "extent" : "full-screen", 127 | "minimum-system-version" : "7.0", 128 | "scale" : "1x" 129 | }, 130 | { 131 | "orientation" : "portrait", 132 | "idiom" : "ipad", 133 | "extent" : "full-screen", 134 | "minimum-system-version" : "7.0", 135 | "scale" : "2x" 136 | }, 137 | { 138 | "orientation" : "landscape", 139 | "idiom" : "ipad", 140 | "extent" : "full-screen", 141 | "minimum-system-version" : "7.0", 142 | "scale" : "2x" 143 | } 144 | ], 145 | "info" : { 146 | "version" : 1, 147 | "author" : "xcode" 148 | } 149 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/LaunchImage-1.launchimage/launchImage3_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/LaunchImage-1.launchimage/launchImage3_5.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/LaunchImage-1.launchimage/launchImage3_5@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/LaunchImage-1.launchimage/launchImage3_5@2x-1.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/LaunchImage-1.launchimage/launchImage3_5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/LaunchImage-1.launchimage/launchImage3_5@2x.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/LaunchImage-1.launchimage/launchImage4_0@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/LaunchImage-1.launchimage/launchImage4_0@2x-1.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/LaunchImage-1.launchimage/launchImage4_0@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/LaunchImage-1.launchimage/launchImage4_0@2x.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/LaunchImage-1.launchimage/launchImage4_7@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/LaunchImage-1.launchimage/launchImage4_7@2x.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/LaunchImage-1.launchimage/launchImage5_5@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/LaunchImage-1.launchimage/launchImage5_5@3x.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/ad1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "ad1.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/ad1.imageset/ad1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/ad1.imageset/ad1.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/code_display.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "code_display@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/code_display.imageset/code_display@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/code_display.imageset/code_display@2x.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/common_back.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "common_back.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/common_back.imageset/common_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/common_back.imageset/common_back.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/coupon_0.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "coupon_0.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/coupon_0.imageset/coupon_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/coupon_0.imageset/coupon_0.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/coupon_1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "coupon_1.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/coupon_1.imageset/coupon_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/coupon_1.imageset/coupon_1.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/fod_1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "fod_1.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/fod_1.imageset/fod_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/fod_1.imageset/fod_1.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/fod_2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "fod_2.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/fod_2.imageset/fod_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/fod_2.imageset/fod_2.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/h_10.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "h_10.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/h_10.imageset/h_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/h_10.imageset/h_10.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/h_11.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "h_11.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/h_11.imageset/h_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/h_11.imageset/h_11.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/h_12.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "h_12.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/h_12.imageset/h_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/h_12.imageset/h_12.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/h_13.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "h_13.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/h_13.imageset/h_13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/h_13.imageset/h_13.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/h_14.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "h_14.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/h_14.imageset/h_14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/h_14.imageset/h_14.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/h_15.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "h_15.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/h_15.imageset/h_15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/h_15.imageset/h_15.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/h_2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "h_2.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/h_2.imageset/h_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/h_2.imageset/h_2.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/h_3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "h_3.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/h_3.imageset/h_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/h_3.imageset/h_3.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/h_4.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "h_4.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/h_4.imageset/h_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/h_4.imageset/h_4.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/h_5.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "h_5.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/h_5.imageset/h_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/h_5.imageset/h_5.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/h_6.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "h_6.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/h_6.imageset/h_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/h_6.imageset/h_6.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/h_7.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "h_7.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/h_7.imageset/h_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/h_7.imageset/h_7.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/h_8.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "h_8.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/h_8.imageset/h_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/h_8.imageset/h_8.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/h_9.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "h_9.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/h_9.imageset/h_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/h_9.imageset/h_9.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/hot_0.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "hot_0.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/hot_0.imageset/hot_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/hot_0.imageset/hot_0.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/hot_1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "hot_1.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/hot_1.imageset/hot_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/hot_1.imageset/hot_1.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/hot_2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "hot_2.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/hot_2.imageset/hot_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/hot_2.imageset/hot_2.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/hot_3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "hot_3.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/hot_3.imageset/hot_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/hot_3.imageset/hot_3.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/left_search.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "left_search@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/left_search.imageset/left_search@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/left_search.imageset/left_search@2x.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/my_avator.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "my_avator.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/my_avator.imageset/my_avator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/my_avator.imageset/my_avator.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/nice_0.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "nice_0.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/nice_0.imageset/nice_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/nice_0.imageset/nice_0.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/nice_1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "nice_1.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/nice_1.imageset/nice_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/nice_1.imageset/nice_1.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/nice_2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "nice_2.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/nice_2.imageset/nice_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/nice_2.imageset/nice_2.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/nice_3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "nice_3.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/nice_3.imageset/nice_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/nice_3.imageset/nice_3.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/nice_4.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "nice_4.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/nice_4.imageset/nice_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/nice_4.imageset/nice_4.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/nice_5.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "nice_5.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/nice_5.imageset/nice_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/nice_5.imageset/nice_5.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/nice_6.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "nice_6.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/nice_6.imageset/nice_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/nice_6.imageset/nice_6.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/nice_7.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "nice_7.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/nice_7.imageset/nice_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/nice_7.imageset/nice_7.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/nice_f1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "nice_f1.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/nice_f1.imageset/nice_f1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/nice_f1.imageset/nice_f1.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/nice_f2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "nice_f2.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/nice_f2.imageset/nice_f2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/nice_f2.imageset/nice_f2.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/nice_f3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "nice_f3.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/nice_f3.imageset/nice_f3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/nice_f3.imageset/nice_f3.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/no_log.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "no_log.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/no_log.imageset/no_log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/no_log.imageset/no_log.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/sale_0.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "sale_0.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/sale_0.imageset/sale_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/sale_0.imageset/sale_0.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/sale_1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "sale_1.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/sale_1.imageset/sale_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/sale_1.imageset/sale_1.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/sale_2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "sale_2.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/sale_2.imageset/sale_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/sale_2.imageset/sale_2.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/sale_3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "sale_3.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/sale_3.imageset/sale_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/sale_3.imageset/sale_3.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/star-1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "star-1.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/star-1.imageset/star-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/star-1.imageset/star-1.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/star.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "star.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/star.imageset/star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/star.imageset/star.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/tabbar_compose_camera.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "tabbar_compose_camera@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "tabbar_compose_camera@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/tabbar_compose_camera.imageset/tabbar_compose_camera@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/tabbar_compose_camera.imageset/tabbar_compose_camera@2x.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/tabbar_compose_camera.imageset/tabbar_compose_camera@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/tabbar_compose_camera.imageset/tabbar_compose_camera@3x.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/tabbar_compose_idea.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "tabbar_compose_idea@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "tabbar_compose_idea@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/tabbar_compose_idea.imageset/tabbar_compose_idea@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/tabbar_compose_idea.imageset/tabbar_compose_idea@2x.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/tabbar_compose_idea.imageset/tabbar_compose_idea@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/tabbar_compose_idea.imageset/tabbar_compose_idea@3x.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/tabbar_compose_lbs.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "tabbar_compose_lbs@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "tabbar_compose_lbs@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/tabbar_compose_lbs.imageset/tabbar_compose_lbs@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/tabbar_compose_lbs.imageset/tabbar_compose_lbs@2x.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/tabbar_compose_lbs.imageset/tabbar_compose_lbs@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/tabbar_compose_lbs.imageset/tabbar_compose_lbs@3x.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/tabbar_compose_more.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "tabbar_compose_more@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "tabbar_compose_more@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/tabbar_compose_more.imageset/tabbar_compose_more@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/tabbar_compose_more.imageset/tabbar_compose_more@2x.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/tabbar_compose_more.imageset/tabbar_compose_more@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/tabbar_compose_more.imageset/tabbar_compose_more@3x.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/tabbar_compose_photo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "tabbar_compose_photo@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "tabbar_compose_photo@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/tabbar_compose_photo.imageset/tabbar_compose_photo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/tabbar_compose_photo.imageset/tabbar_compose_photo@2x.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/tabbar_compose_photo.imageset/tabbar_compose_photo@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/tabbar_compose_photo.imageset/tabbar_compose_photo@3x.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/tabbar_compose_review.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "tabbar_compose_review@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "tabbar_compose_review@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/tabbar_compose_review.imageset/tabbar_compose_review@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/tabbar_compose_review.imageset/tabbar_compose_review@2x.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/tabbar_compose_review.imageset/tabbar_compose_review@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/tabbar_compose_review.imageset/tabbar_compose_review@3x.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/zr_exam.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "zr_exam.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/zr_exam.imageset/zr_exam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/zr_exam.imageset/zr_exam.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/zr_home.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "zr_home.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/zr_home.imageset/zr_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/zr_home.imageset/zr_home.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/zr_konwledge.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "zr_konwledge.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/zr_konwledge.imageset/zr_konwledge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/zr_konwledge.imageset/zr_konwledge.png -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/zr_train.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "zr_train.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/XMGBuy/Images.xcassets/zr_train.imageset/zr_train.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dangxiaoyin/react-native-buy/5ce8205126fd6935851906d425a444deeba7a561/ios/XMGBuy/Images.xcassets/zr_train.imageset/zr_train.png -------------------------------------------------------------------------------- /ios/XMGBuy/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | RN电商 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSRequiresIPhoneOS 26 | 27 | NSAppTransportSecurity 28 | 29 | NSAllowsArbitraryLoads 30 | 31 | NSExceptionDomains 32 | 33 | localhost 34 | 35 | NSExceptionAllowsInsecureHTTPLoads 36 | 37 | 38 | 39 | 40 | NSLocationWhenInUseUsageDescription 41 | 42 | UIRequiredDeviceCapabilities 43 | 44 | armv7 45 | 46 | UISupportedInterfaceOrientations 47 | 48 | UIInterfaceOrientationPortrait 49 | UIInterfaceOrientationLandscapeLeft 50 | UIInterfaceOrientationLandscapeRight 51 | 52 | UIViewControllerBasedStatusBarAppearance 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /ios/XMGBuy/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import "AppDelegate.h" 13 | 14 | int main(int argc, char * argv[]) { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ios/XMGBuyTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ios/XMGBuyTests/XMGBuyTests.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | #import 12 | 13 | #import 14 | #import 15 | 16 | #define TIMEOUT_SECONDS 600 17 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!" 18 | 19 | @interface XMGBuyTests : XCTestCase 20 | 21 | @end 22 | 23 | @implementation XMGBuyTests 24 | 25 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test 26 | { 27 | if (test(view)) { 28 | return YES; 29 | } 30 | for (UIView *subview in [view subviews]) { 31 | if ([self findSubviewInView:subview matching:test]) { 32 | return YES; 33 | } 34 | } 35 | return NO; 36 | } 37 | 38 | - (void)testRendersWelcomeScreen 39 | { 40 | UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController]; 41 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 42 | BOOL foundElement = NO; 43 | 44 | __block NSString *redboxError = nil; 45 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 46 | if (level >= RCTLogLevelError) { 47 | redboxError = message; 48 | } 49 | }); 50 | 51 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 52 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 53 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 54 | 55 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { 56 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 57 | return YES; 58 | } 59 | return NO; 60 | }]; 61 | } 62 | 63 | RCTSetLogFunction(RCTDefaultLogFunction); 64 | 65 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 66 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 67 | } 68 | 69 | 70 | @end 71 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "XMGBuy", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "start": "node node_modules/react-native/local-cli/cli.js start" 7 | }, 8 | "dependencies": { 9 | "react": "~15.4.0", 10 | "react-native": "0.41.2", 11 | "react-native-tab-navigator": "^0.3.3" 12 | } 13 | } 14 | --------------------------------------------------------------------------------