├── .buckconfig ├── .eslintrc.js ├── .flowconfig ├── .gitattributes ├── .gitignore ├── .prettierrc.js ├── .watchmanconfig ├── README.md ├── __tests__ └── App-test.js ├── android ├── app │ ├── _BUCK │ ├── build.gradle │ ├── build_defs.bzl │ ├── debug.keystore │ ├── proguard-rules.pro │ └── src │ │ ├── debug │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── reactapp │ │ │ └── ReactNativeFlipper.java │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── assets │ │ └── fonts │ │ │ └── Ionicons.ttf │ │ ├── java │ │ └── com │ │ │ └── reactapp │ │ │ ├── MainActivity.java │ │ │ └── MainApplication.java │ │ └── res │ │ ├── drawable │ │ └── launch_screen.png │ │ ├── layout │ │ └── launch_screen.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ └── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle ├── app.json ├── babel.config.js ├── img ├── poster.jpg ├── screenshoot1.jpeg ├── screenshoot2.jpeg └── screenshoot3.jpeg ├── index.js ├── ios ├── Podfile ├── ReactApp-tvOS │ └── Info.plist ├── ReactApp-tvOSTests │ └── Info.plist ├── ReactApp.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ ├── ReactApp-tvOS.xcscheme │ │ └── ReactApp.xcscheme ├── ReactApp │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Base.lproj │ │ └── LaunchScreen.xib │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Info.plist │ └── main.m └── ReactAppTests │ ├── Info.plist │ └── ReactAppTests.m ├── metro.config.js ├── package.json ├── source ├── launch_screen.png ├── logo │ ├── logo.jpg │ └── logo.png └── logo_bg_white │ └── logo │ ├── logo.jpg │ └── logo.png ├── src ├── App.js ├── assets │ ├── icon │ │ ├── icon_back.svg │ │ ├── icon_chevron.svg │ │ ├── icon_close_circle.svg │ │ ├── icon_comment.svg │ │ ├── icon_cube.svg │ │ ├── icon_dislike.svg │ │ ├── icon_down.svg │ │ ├── icon_ellipsis_horizontal.svg │ │ ├── icon_file_tray_full.svg │ │ ├── icon_flame.svg │ │ ├── icon_hand.svg │ │ ├── icon_happy.svg │ │ ├── icon_heart.svg │ │ ├── icon_heart_active.svg │ │ ├── icon_image.svg │ │ ├── icon_images.svg │ │ ├── icon_like.svg │ │ ├── icon_location.svg │ │ ├── icon_lock.svg │ │ ├── icon_mail.svg │ │ ├── icon_medal.svg │ │ ├── icon_more.svg │ │ ├── icon_person.svg │ │ ├── icon_person_add.svg │ │ ├── icon_refresh.svg │ │ ├── icon_ribbon.svg │ │ ├── icon_search.svg │ │ ├── icon_share.svg │ │ ├── icon_thumbs_up.svg │ │ ├── icon_time.svg │ │ ├── icon_v.svg │ │ ├── ma_aperture.svg │ │ ├── ma_cloud.svg │ │ ├── ma_color.svg │ │ ├── ma_edit.svg │ │ ├── ma_golf.svg │ │ ├── ma_newspaper.svg │ │ ├── ma_task.svg │ │ └── ma_user.svg │ └── image │ │ ├── cell_add.png │ │ ├── cell_file.png │ │ ├── cell_login.png │ │ ├── cell_more.png │ │ ├── cell_star.png │ │ ├── default_avatar.png │ │ ├── empty.svg │ │ ├── friend.svg │ │ ├── home_activity.png │ │ ├── home_like.png │ │ ├── home_new.png │ │ ├── home_search.png │ │ ├── item_gongyi.png │ │ ├── item_jishu.png │ │ ├── item_qita.png │ │ ├── item_sheyin.png │ │ ├── item_shijian.png │ │ ├── item_wenyi.png │ │ ├── item_yinyue.png │ │ ├── item_yule.png │ │ ├── item_yundong.png │ │ ├── login_bg.png │ │ ├── login_bg2.png │ │ ├── login_plate.svg │ │ ├── profile_light.png │ │ ├── profile_msg.png │ │ ├── profile_show.png │ │ ├── profile_tab.png │ │ ├── qq.svg │ │ ├── tab_fun.png │ │ ├── tab_fun_active.png │ │ ├── tab_home.png │ │ ├── tab_home_active.png │ │ ├── tab_msg.png │ │ ├── tab_msg_active.png │ │ ├── tab_profile.png │ │ ├── tab_profile_active.png │ │ ├── text_bg.png │ │ ├── wechat.svg │ │ └── weibo.svg ├── components │ ├── ActionSheet.js │ ├── ActivityCard.js │ ├── Avatar.js │ ├── ClubCard.js │ ├── CommentItem.js │ ├── CoverLayer.js │ ├── CustomHeader.js │ ├── CustomTabBar.js │ ├── EmptyData.js │ ├── ImageGrid.js │ ├── ImagePicker.js │ ├── MessageItem.js │ ├── PhotoPreview.js │ ├── PostCard.js │ ├── RefreshView.js │ ├── SearchInput.js │ ├── ShareActionSheet.js │ └── TextArea.js ├── config │ ├── route.config.js │ └── style.config.js ├── mock-data │ └── index.js └── pages │ ├── club │ ├── ClubManagement.js │ ├── ClubMessage.js │ ├── ClubTask.js │ ├── RecruitForm.js │ ├── components │ │ ├── ClubHeader.js │ │ ├── ClubHome.js │ │ ├── ClubMember.js │ │ ├── ClubPost.js │ │ ├── ClubRecruit.js │ │ └── ClubTabView.js │ └── index.js │ ├── explore │ ├── ClubClass.js │ └── index.js │ ├── home │ ├── Activity.js │ ├── ActivityDetail.js │ ├── PostDetail.js │ ├── Recruit.js │ ├── Search.js │ ├── components │ │ ├── HomeBar.js │ │ ├── HomeHeader.js │ │ └── RecruitCard.js │ └── index.js │ ├── login │ ├── Login.js │ └── LoginWay.js │ ├── message │ ├── Message.js │ ├── MessageDetail.js │ ├── Post.js │ └── index.js │ └── profile │ ├── Follow.js │ ├── MyActivity.js │ ├── MyClub.js │ ├── Post.js │ ├── Setting.js │ ├── components │ ├── ProfileHeader.js │ ├── ProfileItem.js │ └── ProfileMenu.js │ ├── index.js │ └── managements │ └── TaskPost.js └── yarn.lock /.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: '@react-native-community', 4 | rules: { 5 | 'react-native/no-inline-styles': 0, 6 | semi: ['error', 'never'], 7 | }, 8 | } 9 | -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | ; We fork some components by platform 3 | .*/*[.]android.js 4 | 5 | ; Ignore "BUCK" generated dirs 6 | /\.buckd/ 7 | 8 | ; Ignore polyfills 9 | node_modules/react-native/Libraries/polyfills/.* 10 | 11 | ; These should not be required directly 12 | ; require from fbjs/lib instead: require('fbjs/lib/warning') 13 | node_modules/warning/.* 14 | 15 | ; Flow doesn't support platforms 16 | .*/Libraries/Utilities/LoadingView.js 17 | 18 | [untyped] 19 | .*/node_modules/@react-native-community/cli/.*/.* 20 | 21 | [include] 22 | 23 | [libs] 24 | node_modules/react-native/interface.js 25 | node_modules/react-native/flow/ 26 | 27 | [options] 28 | emoji=true 29 | 30 | esproposal.optional_chaining=enable 31 | esproposal.nullish_coalescing=enable 32 | 33 | module.file_ext=.js 34 | module.file_ext=.json 35 | module.file_ext=.ios.js 36 | 37 | munge_underscores=true 38 | 39 | module.name_mapper='^react-native/\(.*\)$' -> '/node_modules/react-native/\1' 40 | 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\)$' -> '/node_modules/react-native/Libraries/Image/RelativeImageStub' 41 | 42 | suppress_type=$FlowIssue 43 | suppress_type=$FlowFixMe 44 | suppress_type=$FlowFixMeProps 45 | suppress_type=$FlowFixMeState 46 | 47 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\) 48 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+ 49 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError 50 | 51 | [lints] 52 | sketchy-null-number=warn 53 | sketchy-null-mixed=warn 54 | sketchy-number=warn 55 | untyped-type-import=warn 56 | nonstrict-import=warn 57 | deprecated-type=warn 58 | unsafe-getters-setters=warn 59 | inexact-spread=warn 60 | unnecessary-invariant=warn 61 | signature-verification-failure=warn 62 | deprecated-utility=error 63 | 64 | [strict] 65 | deprecated-type 66 | nonstrict-import 67 | sketchy-null 68 | unclear-type 69 | unsafe-getters-setters 70 | untyped-import 71 | untyped-type-import 72 | 73 | [version] 74 | ^0.113.0 75 | -------------------------------------------------------------------------------- /.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 | 24 | # Android/IntelliJ 25 | # 26 | build/ 27 | .idea 28 | .gradle 29 | local.properties 30 | *.iml 31 | 32 | # node.js 33 | # 34 | node_modules/ 35 | npm-debug.log 36 | yarn-error.log 37 | 38 | # BUCK 39 | buck-out/ 40 | \.buckd/ 41 | *.keystore 42 | !debug.keystore 43 | 44 | # fastlane 45 | # 46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 47 | # screenshots whenever they are needed. 48 | # For more information about the recommended setup visit: 49 | # https://docs.fastlane.tools/best-practices/source-control/ 50 | 51 | */fastlane/report.xml 52 | */fastlane/Preview.html 53 | */fastlane/screenshots 54 | 55 | # Bundle artifact 56 | *.jsbundle 57 | 58 | # CocoaPods 59 | /ios/Pods/ 60 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | semi: false, 3 | bracketSpacing: true, 4 | jsxBracketSameLine: true, 5 | singleQuote: true, 6 | trailingComma: 'all', 7 | } 8 | -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![参赛海报(看不到图片?开个 VPN 吧)](./img/poster.jpg) 2 | 3 | ## 项目介绍 4 | 5 | `意想社团` 是我在大学期间开发的一个关于高校社团组织应用,为大学社团的招新和组织活动提供一个的宣传和推广平台,提供了高效、便捷的社团管理方式,优化了社团管理流程,让社团间的交流变得活跃和有趣!该应用主要功能包括社团申请、活动发布、群投票、动态推送、成员状态筛选等。 6 | 7 | 该应用获得过以下荣誉: 8 | 9 | - 2019 年微信小程序应用开发赛华南赛区一等奖,[查看获奖证书](https://imgur.com/7JrrhYP) 10 | 11 | - 第十六届 “青牛杯” 软件设计大赛三等奖 12 | 13 | - 入选本校最高奖学金奖项名单并获奖 14 | 15 | ## 真机体验 16 | 17 | 安装包已在 GitHub 发布,[前往下载体验](https://github.com/Codennnn/eason-club/releases) 18 | 19 | ## 应用界面 20 | 21 | ![应用界面截图1(看不到图片?开个 VPN 吧)](./img/screenshoot1.jpeg) 22 | 23 | ![应用界面截图2(看不到图片?开个 VPN 吧)](./img/screenshoot2.jpeg) 24 | 25 | ![应用界面截图3(看不到图片?开个 VPN 吧)](./img/screenshoot3.jpeg) 26 | 27 | ## 运行配置 28 | 29 | ``` 30 | # 安装依赖 31 | yarn 32 | # 启动本地运行程序 33 | yarn android 34 | ``` 35 | 36 | ## 生成发行 APK 包 37 | 38 | ``` 39 | # 进入根目录下的 android 文件夹 40 | cd android 41 | # 执行打包命令 42 | ./gradlew assembleRelease 43 | ``` 44 | 45 | 生成的 APK 文件位于 `android/app/build/outputs/apk/release/app-release.apk` 46 | -------------------------------------------------------------------------------- /__tests__/App-test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import 'react-native' 6 | import React from 'react' 7 | import App from '../App' 8 | 9 | // Note: test renderer must be required after react-native. 10 | import renderer from 'react-test-renderer' 11 | 12 | it('renders correctly', () => { 13 | renderer.create() 14 | }) 15 | -------------------------------------------------------------------------------- /android/app/_BUCK: -------------------------------------------------------------------------------- 1 | # To learn about Buck see [Docs](https://buckbuild.com/). 2 | # To run your application with Buck: 3 | # - install Buck 4 | # - `npm start` - to start the packager 5 | # - `cd android` 6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` 7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck 8 | # - `buck install -r android/app` - compile, install and run application 9 | # 10 | 11 | load(":build_defs.bzl", "create_aar_targets", "create_jar_targets") 12 | 13 | lib_deps = [] 14 | 15 | create_aar_targets(glob(["libs/*.aar"])) 16 | 17 | create_jar_targets(glob(["libs/*.jar"])) 18 | 19 | android_library( 20 | name = "all-libs", 21 | exported_deps = lib_deps, 22 | ) 23 | 24 | android_library( 25 | name = "app-code", 26 | srcs = glob([ 27 | "src/main/java/**/*.java", 28 | ]), 29 | deps = [ 30 | ":all-libs", 31 | ":build_config", 32 | ":res", 33 | ], 34 | ) 35 | 36 | android_build_config( 37 | name = "build_config", 38 | package = "com.reactapp", 39 | ) 40 | 41 | android_resource( 42 | name = "res", 43 | package = "com.reactapp", 44 | res = "src/main/res", 45 | ) 46 | 47 | android_binary( 48 | name = "app", 49 | keystore = "//android/keystores:debug", 50 | manifest = "src/main/AndroidManifest.xml", 51 | package_type = "debug", 52 | deps = [ 53 | ":app-code", 54 | ], 55 | ) 56 | -------------------------------------------------------------------------------- /android/app/build_defs.bzl: -------------------------------------------------------------------------------- 1 | """Helper definitions to glob .aar and .jar targets""" 2 | 3 | def create_aar_targets(aarfiles): 4 | for aarfile in aarfiles: 5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")] 6 | lib_deps.append(":" + name) 7 | android_prebuilt_aar( 8 | name = name, 9 | aar = aarfile, 10 | ) 11 | 12 | def create_jar_targets(jarfiles): 13 | for jarfile in jarfiles: 14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")] 15 | lib_deps.append(":" + name) 16 | prebuilt_jar( 17 | name = name, 18 | binary_jar = jarfile, 19 | ) 20 | -------------------------------------------------------------------------------- /android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/android/app/debug.keystore -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/debug/java/com/reactapp/ReactNativeFlipper.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | *

This source code is licensed under the MIT license found in the LICENSE file in the root 5 | * directory of this source tree. 6 | */ 7 | package com.reactapp; 8 | 9 | import android.content.Context; 10 | import com.facebook.flipper.android.AndroidFlipperClient; 11 | import com.facebook.flipper.android.utils.FlipperUtils; 12 | import com.facebook.flipper.core.FlipperClient; 13 | import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin; 14 | import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin; 15 | import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin; 16 | import com.facebook.flipper.plugins.inspector.DescriptorMapping; 17 | import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin; 18 | import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor; 19 | import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; 20 | import com.facebook.flipper.plugins.react.ReactFlipperPlugin; 21 | import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin; 22 | import com.facebook.react.ReactInstanceManager; 23 | import com.facebook.react.bridge.ReactContext; 24 | import com.facebook.react.modules.network.NetworkingModule; 25 | import okhttp3.OkHttpClient; 26 | 27 | public class ReactNativeFlipper { 28 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { 29 | if (FlipperUtils.shouldEnableFlipper(context)) { 30 | final FlipperClient client = AndroidFlipperClient.getInstance(context); 31 | 32 | client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())); 33 | client.addPlugin(new ReactFlipperPlugin()); 34 | client.addPlugin(new DatabasesFlipperPlugin(context)); 35 | client.addPlugin(new SharedPreferencesFlipperPlugin(context)); 36 | client.addPlugin(CrashReporterPlugin.getInstance()); 37 | 38 | NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin(); 39 | NetworkingModule.setCustomClientBuilder( 40 | new NetworkingModule.CustomClientBuilder() { 41 | @Override 42 | public void apply(OkHttpClient.Builder builder) { 43 | builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); 44 | } 45 | }); 46 | client.addPlugin(networkFlipperPlugin); 47 | client.start(); 48 | 49 | // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized 50 | // Hence we run if after all native modules have been initialized 51 | ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); 52 | if (reactContext == null) { 53 | reactInstanceManager.addReactInstanceEventListener( 54 | new ReactInstanceManager.ReactInstanceEventListener() { 55 | @Override 56 | public void onReactContextInitialized(ReactContext reactContext) { 57 | reactInstanceManager.removeReactInstanceEventListener(this); 58 | reactContext.runOnNativeModulesQueueThread( 59 | new Runnable() { 60 | @Override 61 | public void run() { 62 | client.addPlugin(new FrescoFlipperPlugin()); 63 | } 64 | }); 65 | } 66 | }); 67 | } else { 68 | client.addPlugin(new FrescoFlipperPlugin()); 69 | } 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 16 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/android/app/src/main/assets/fonts/Ionicons.ttf -------------------------------------------------------------------------------- /android/app/src/main/java/com/reactapp/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.reactapp; 2 | 3 | import android.os.Bundle; 4 | import com.facebook.react.ReactActivity; 5 | import org.devio.rn.splashscreen.SplashScreen; 6 | 7 | public class MainActivity extends ReactActivity { 8 | @Override 9 | protected void onCreate(Bundle savedInstanceState) { 10 | SplashScreen.show(this, R.style.SplashScreenTheme); 11 | super.onCreate(savedInstanceState); 12 | } 13 | 14 | /** 15 | * Returns the name of the main component registered from JavaScript. This is used to schedule 16 | * rendering of the component. 17 | */ 18 | @Override 19 | protected String getMainComponentName() { 20 | return "ReactApp"; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/reactapp/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.reactapp; 2 | 3 | import android.app.Application; 4 | import android.content.Context; 5 | import com.facebook.react.PackageList; 6 | import com.facebook.react.ReactApplication; 7 | import com.reactnativecommunity.asyncstorage.AsyncStoragePackage; 8 | import com.reactcommunity.rndatetimepicker.RNDateTimePickerPackage; 9 | import com.reactnativecommunity.webview.RNCWebViewPackage; 10 | import com.reactnativecommunity.cameraroll.CameraRollPackage; 11 | import com.imagepicker.ImagePickerPackage; 12 | import com.reactnativecommunity.viewpager.RNCViewPagerPackage; 13 | import org.devio.rn.splashscreen.SplashScreenReactPackage; 14 | import org.devio.rn.splashscreen.SplashScreenReactPackage; 15 | import com.horcrux.svg.SvgPackage; 16 | import com.facebook.react.ReactInstanceManager; 17 | import com.facebook.react.ReactNativeHost; 18 | import com.facebook.react.ReactPackage; 19 | import com.facebook.soloader.SoLoader; 20 | import java.lang.reflect.InvocationTargetException; 21 | import java.util.List; 22 | 23 | public class MainApplication extends Application implements ReactApplication { 24 | 25 | private final ReactNativeHost mReactNativeHost = 26 | new ReactNativeHost(this) { 27 | @Override 28 | public boolean getUseDeveloperSupport() { 29 | return BuildConfig.DEBUG; 30 | } 31 | 32 | @Override 33 | protected List getPackages() { 34 | @SuppressWarnings("UnnecessaryLocalVariable") 35 | List packages = new PackageList(this).getPackages(); 36 | // Packages that cannot be autolinked yet can be added manually here, for example: 37 | // packages.add(new MyReactNativePackage()); 38 | return packages; 39 | } 40 | 41 | @Override 42 | protected String getJSMainModuleName() { 43 | return "index"; 44 | } 45 | }; 46 | 47 | @Override 48 | public ReactNativeHost getReactNativeHost() { 49 | return mReactNativeHost; 50 | } 51 | 52 | @Override 53 | public void onCreate() { 54 | super.onCreate(); 55 | SoLoader.init(this, /* native exopackage */ false); 56 | initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); 57 | } 58 | 59 | /** 60 | * Loads Flipper in React Native templates. Call this in the onCreate method with something like 61 | * initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); 62 | * 63 | * @param context 64 | * @param reactInstanceManager 65 | */ 66 | private static void initializeFlipper( 67 | Context context, ReactInstanceManager reactInstanceManager) { 68 | if (BuildConfig.DEBUG) { 69 | try { 70 | /* 71 | We use reflection here to pick up the class that initializes Flipper, 72 | since Flipper library is not available in release mode 73 | */ 74 | Class aClass = Class.forName("com.reactapp.ReactNativeFlipper"); 75 | aClass 76 | .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class) 77 | .invoke(null, context, reactInstanceManager); 78 | } catch (ClassNotFoundException e) { 79 | e.printStackTrace(); 80 | } catch (NoSuchMethodException e) { 81 | e.printStackTrace(); 82 | } catch (IllegalAccessException e) { 83 | e.printStackTrace(); 84 | } catch (InvocationTargetException e) { 85 | e.printStackTrace(); 86 | } 87 | } 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/android/app/src/main/res/drawable/launch_screen.png -------------------------------------------------------------------------------- /android/app/src/main/res/layout/launch_screen.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 12 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #000000 4 | #ffffff 5 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 意想社团 3 | 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | ext { 5 | buildToolsVersion = "28.0.3" 6 | minSdkVersion = 16 7 | compileSdkVersion = 28 8 | targetSdkVersion = 28 9 | } 10 | repositories { 11 | maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } 12 | maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' } 13 | maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' } 14 | maven { url 'http://maven.aliyun.com/nexus/content/repositories/gradle-plugin' } 15 | google() 16 | jcenter() 17 | } 18 | dependencies { 19 | classpath("com.android.tools.build:gradle:3.5.2") 20 | 21 | // NOTE: Do not place your application dependencies here; they belong 22 | // in the individual module build.gradle files 23 | } 24 | } 25 | 26 | allprojects { 27 | repositories { 28 | mavenLocal() 29 | maven { 30 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 31 | url("$rootDir/../node_modules/react-native/android") 32 | } 33 | maven { 34 | // Android JSC is installed from npm 35 | url("$rootDir/../node_modules/jsc-android/dist") 36 | } 37 | 38 | maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } 39 | maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' } 40 | maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' } 41 | maven { url 'http://maven.aliyun.com/nexus/content/repositories/gradle-plugin' } 42 | google() 43 | jcenter() 44 | maven { url 'https://www.jitpack.io' } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /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 | # AndroidX package structure to make it clearer which packages are bundled with the 21 | # Android operating system, and which are packaged with your app's APK 22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 23 | android.useAndroidX=true 24 | # Automatically convert third-party libraries to use AndroidX 25 | android.enableJetifier=true 26 | 27 | # Version of flipper SDK to use with React Native 28 | FLIPPER_VERSION=0.33.1 29 | 30 | MYAPP_RELEASE_STORE_FILE=my-release-key.keystore 31 | MYAPP_RELEASE_KEY_ALIAS=my-key-alias 32 | MYAPP_RELEASE_STORE_PASSWORD=CZCqq00004 33 | MYAPP_RELEASE_KEY_PASSWORD=CZCqq00004 -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 33 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 34 | 35 | @rem Find java.exe 36 | if defined JAVA_HOME goto findJavaFromJavaHome 37 | 38 | set JAVA_EXE=java.exe 39 | %JAVA_EXE% -version >NUL 2>&1 40 | if "%ERRORLEVEL%" == "0" goto init 41 | 42 | echo. 43 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 44 | echo. 45 | echo Please set the JAVA_HOME variable in your environment to match the 46 | echo location of your Java installation. 47 | 48 | goto fail 49 | 50 | :findJavaFromJavaHome 51 | set JAVA_HOME=%JAVA_HOME:"=% 52 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 53 | 54 | if exist "%JAVA_EXE%" goto init 55 | 56 | echo. 57 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 58 | echo. 59 | echo Please set the JAVA_HOME variable in your environment to match the 60 | echo location of your Java installation. 61 | 62 | goto fail 63 | 64 | :init 65 | @rem Get command-line arguments, handling Windows variants 66 | 67 | if not "%OS%" == "Windows_NT" goto win9xME_args 68 | 69 | :win9xME_args 70 | @rem Slurp the command line arguments. 71 | set CMD_LINE_ARGS= 72 | set _SKIP=2 73 | 74 | :win9xME_args_slurp 75 | if "x%~1" == "x" goto execute 76 | 77 | set CMD_LINE_ARGS=%* 78 | 79 | :execute 80 | @rem Setup the command line 81 | 82 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 83 | 84 | @rem Execute Gradle 85 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 86 | 87 | :end 88 | @rem End local scope for the variables with windows NT shell 89 | if "%ERRORLEVEL%"=="0" goto mainEnd 90 | 91 | :fail 92 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 93 | rem the _cmd.exe /c_ return code! 94 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 95 | exit /b 1 96 | 97 | :mainEnd 98 | if "%OS%"=="Windows_NT" endlocal 99 | 100 | :omega 101 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'ReactApp' 2 | include ':@react-native-community_async-storage' 3 | project(':@react-native-community_async-storage').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/async-storage/android') 4 | include ':@react-native-community_datetimepicker' 5 | project(':@react-native-community_datetimepicker').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/datetimepicker/android') 6 | include ':react-native-webview' 7 | project(':react-native-webview').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webview/android') 8 | include ':@react-native-community_cameraroll' 9 | project(':@react-native-community_cameraroll').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/cameraroll/android') 10 | include ':react-native-image-picker' 11 | project(':react-native-image-picker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-image-picker/android') 12 | include ':@react-native-community_viewpager' 13 | project(':@react-native-community_viewpager').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/viewpager/android') 14 | include ':react-native-splash-screen' 15 | project(':react-native-splash-screen').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-splash-screen/android') 16 | include ':react-native-splash-screen' 17 | project(':react-native-splash-screen').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-splash-screen/android') 18 | include ':react-native-svg' 19 | project(':react-native-svg').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-svg/android') 20 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 21 | include ':app' 22 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ReactApp", 3 | "displayName": "ReactApp" 4 | } -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | plugins: [ 4 | [ 5 | 'module-resolver', 6 | { 7 | root: ['./'], 8 | alias: { 9 | '@': './src', 10 | '@comp': './src/components', 11 | '@icon': './src/assets/icon', 12 | '@img': './src/assets/image', 13 | }, 14 | extensions: ['.js', '.jsx', '.tsx'], 15 | }, 16 | ], 17 | ], 18 | } 19 | -------------------------------------------------------------------------------- /img/poster.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/img/poster.jpg -------------------------------------------------------------------------------- /img/screenshoot1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/img/screenshoot1.jpeg -------------------------------------------------------------------------------- /img/screenshoot2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/img/screenshoot2.jpeg -------------------------------------------------------------------------------- /img/screenshoot3.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/img/screenshoot3.jpeg -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | import 'react-native-gesture-handler' 2 | import { AppRegistry } from 'react-native' 3 | import App from './src/App' 4 | import { name as appName } from './app.json' 5 | 6 | AppRegistry.registerComponent(appName, () => App) 7 | -------------------------------------------------------------------------------- /ios/ReactApp-tvOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 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 | NSAppTransportSecurity 26 | 27 | NSExceptionDomains 28 | 29 | localhost 30 | 31 | NSExceptionAllowsInsecureHTTPLoads 32 | 33 | 34 | 35 | 36 | NSLocationWhenInUseUsageDescription 37 | 38 | UILaunchStoryboardName 39 | LaunchScreen 40 | UIRequiredDeviceCapabilities 41 | 42 | armv7 43 | 44 | UISupportedInterfaceOrientations 45 | 46 | UIInterfaceOrientationPortrait 47 | UIInterfaceOrientationLandscapeLeft 48 | UIInterfaceOrientationLandscapeRight 49 | 50 | UIViewControllerBasedStatusBarAppearance 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /ios/ReactApp-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/ReactApp.xcodeproj/xcshareddata/xcschemes/ReactApp-tvOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 53 | 55 | 61 | 62 | 63 | 64 | 70 | 72 | 78 | 79 | 80 | 81 | 83 | 84 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /ios/ReactApp.xcodeproj/xcshareddata/xcschemes/ReactApp.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 53 | 55 | 61 | 62 | 63 | 64 | 70 | 72 | 78 | 79 | 80 | 81 | 83 | 84 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /ios/ReactApp/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : UIResponder 5 | 6 | @property (nonatomic, strong) UIWindow *window; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /ios/ReactApp/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | 3 | #import 4 | #import 5 | #import 6 | 7 | #if DEBUG 8 | #import 9 | #import 10 | #import 11 | #import 12 | #import 13 | #import 14 | 15 | static void InitializeFlipper(UIApplication *application) { 16 | FlipperClient *client = [FlipperClient sharedClient]; 17 | SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults]; 18 | [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]]; 19 | [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]]; 20 | [client addPlugin:[FlipperKitReactPlugin new]]; 21 | [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]]; 22 | [client start]; 23 | } 24 | #endif 25 | 26 | @implementation AppDelegate 27 | 28 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 29 | { 30 | #if DEBUG 31 | InitializeFlipper(application); 32 | #endif 33 | 34 | RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; 35 | RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge 36 | moduleName:@"ReactApp" 37 | initialProperties:nil]; 38 | 39 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; 40 | 41 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 42 | UIViewController *rootViewController = [UIViewController new]; 43 | rootViewController.view = rootView; 44 | self.window.rootViewController = rootViewController; 45 | [self.window makeKeyAndVisible]; 46 | return YES; 47 | } 48 | 49 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge 50 | { 51 | #if DEBUG 52 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; 53 | #else 54 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 55 | #endif 56 | } 57 | 58 | @end 59 | -------------------------------------------------------------------------------- /ios/ReactApp/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /ios/ReactApp/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /ios/ReactApp/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ios/ReactApp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ReactApp 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 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 | UILaunchStoryboardName 43 | LaunchScreen 44 | UIRequiredDeviceCapabilities 45 | 46 | armv7 47 | 48 | UISupportedInterfaceOrientations 49 | 50 | UIInterfaceOrientationPortrait 51 | UIInterfaceOrientationLandscapeLeft 52 | UIInterfaceOrientationLandscapeRight 53 | 54 | UIViewControllerBasedStatusBarAppearance 55 | 56 | UIAppFonts 57 | 58 | Ionicons.ttf 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /ios/ReactApp/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char * argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /ios/ReactAppTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 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/ReactAppTests/ReactAppTests.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #import 5 | #import 6 | 7 | #define TIMEOUT_SECONDS 600 8 | #define TEXT_TO_LOOK_FOR @"Welcome to React" 9 | 10 | @interface ReactAppTests : XCTestCase 11 | 12 | @end 13 | 14 | @implementation ReactAppTests 15 | 16 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test 17 | { 18 | if (test(view)) { 19 | return YES; 20 | } 21 | for (UIView *subview in [view subviews]) { 22 | if ([self findSubviewInView:subview matching:test]) { 23 | return YES; 24 | } 25 | } 26 | return NO; 27 | } 28 | 29 | - (void)testRendersWelcomeScreen 30 | { 31 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; 32 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 33 | BOOL foundElement = NO; 34 | 35 | __block NSString *redboxError = nil; 36 | #ifdef DEBUG 37 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 38 | if (level >= RCTLogLevelError) { 39 | redboxError = message; 40 | } 41 | }); 42 | #endif 43 | 44 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 45 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 46 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 47 | 48 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { 49 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 50 | return YES; 51 | } 52 | return NO; 53 | }]; 54 | } 55 | 56 | #ifdef DEBUG 57 | RCTSetLogFunction(RCTDefaultLogFunction); 58 | #endif 59 | 60 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 61 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 62 | } 63 | 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /metro.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Metro configuration for React Native 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | */ 7 | const { getDefaultConfig } = require('metro-config') 8 | 9 | module.exports = (async () => { 10 | const { 11 | resolver: { sourceExts, assetExts }, 12 | } = await getDefaultConfig() 13 | 14 | return { 15 | transformer: { 16 | babelTransformerPath: require.resolve('react-native-svg-transformer'), 17 | getTransformOptions: async () => ({ 18 | transform: { 19 | experimentalImportSupport: false, 20 | inlineRequires: false, 21 | }, 22 | }), 23 | }, 24 | resolver: { 25 | assetExts: assetExts.filter(ext => ext !== 'svg'), 26 | sourceExts: [...sourceExts, 'svg'], 27 | }, 28 | } 29 | })() 30 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-app", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "android": "react-native run-android", 7 | "ios": "react-native run-ios", 8 | "start": "react-native start", 9 | "test": "jest", 10 | "lint": "eslint ." 11 | }, 12 | "dependencies": { 13 | "@react-native-community/async-storage": "^1.11.0", 14 | "@react-native-community/cameraroll": "^4.0.0", 15 | "@react-native-community/datetimepicker": "^2.6.0", 16 | "@react-native-community/masked-view": "^0.1.10", 17 | "@react-native-community/viewpager": "^4.0.1", 18 | "@react-navigation/bottom-tabs": "^5.6.1", 19 | "@react-navigation/native": "^5.6.1", 20 | "@react-navigation/stack": "^5.6.2", 21 | "dayjs": "^1.8.29", 22 | "react": "16.11.0", 23 | "react-native": "0.62.2", 24 | "react-native-easy-toast": "^1.2.0", 25 | "react-native-emoji-selector": "^0.1.9", 26 | "react-native-gesture-handler": "^1.6.1", 27 | "react-native-gifted-chat": "^0.16.3", 28 | "react-native-image-picker": "^2.3.1", 29 | "react-native-image-zoom-viewer": "^3.0.1", 30 | "react-native-material-ripple": "^0.9.1", 31 | "react-native-popup-menu": "^0.15.8", 32 | "react-native-reanimated": "^1.9.0", 33 | "react-native-safe-area-context": "^3.0.7", 34 | "react-native-screens": "^2.9.0", 35 | "react-native-scrollable-tab-view": "^1.0.0", 36 | "react-native-splash-screen": "^3.2.0", 37 | "react-native-svg": "^12.1.0", 38 | "react-native-swiper": "^1.6.0-rc.3", 39 | "react-native-webview": "^10.3.2", 40 | "react-redux": "^7.2.0", 41 | "rn-placeholder": "^3.0.1" 42 | }, 43 | "devDependencies": { 44 | "@babel/core": "^7.6.2", 45 | "@babel/runtime": "^7.6.2", 46 | "@react-native-community/eslint-config": "^0.0.5", 47 | "babel-jest": "^24.9.0", 48 | "babel-plugin-module-resolver": "^4.0.0", 49 | "eslint": "^6.5.1", 50 | "jest": "^24.9.0", 51 | "metro-react-native-babel-preset": "^0.58.0", 52 | "react-native-svg-transformer": "^0.14.3", 53 | "react-test-renderer": "16.11.0" 54 | }, 55 | "jest": { 56 | "preset": "react-native" 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /source/launch_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/source/launch_screen.png -------------------------------------------------------------------------------- /source/logo/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/source/logo/logo.jpg -------------------------------------------------------------------------------- /source/logo/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/source/logo/logo.png -------------------------------------------------------------------------------- /source/logo_bg_white/logo/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/source/logo_bg_white/logo/logo.jpg -------------------------------------------------------------------------------- /source/logo_bg_white/logo/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/source/logo_bg_white/logo/logo.png -------------------------------------------------------------------------------- /src/App.js: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useRef } from 'react' 2 | import { StatusBar, Image } from 'react-native' 3 | import { NavigationContainer } from '@react-navigation/native' 4 | import { createStackNavigator } from '@react-navigation/stack' 5 | import { createBottomTabNavigator } from '@react-navigation/bottom-tabs' 6 | import AsyncStorage from '@react-native-community/async-storage' 7 | import { MenuProvider } from 'react-native-popup-menu' 8 | import Toast from 'react-native-easy-toast' 9 | import SplashScreen from 'react-native-splash-screen' 10 | import routes from '@/config/route.config' 11 | 12 | import Home from './pages/home' 13 | import Explore from './pages/explore' 14 | import Message from './pages/message' 15 | import Profile from './pages/profile' 16 | 17 | const Tabbar = { 18 | Home: { 19 | label: '首页', 20 | defaultIcon: require('@img/tab_home.png'), 21 | activeIcon: require('@img/tab_home_active.png'), 22 | component: Home, 23 | }, 24 | Explore: { 25 | label: '探索', 26 | defaultIcon: require('@img/tab_fun.png'), 27 | activeIcon: require('@img/tab_fun_active.png'), 28 | component: Explore, 29 | }, 30 | Message: { 31 | label: '消息', 32 | defaultIcon: require('@img/tab_msg.png'), 33 | activeIcon: require('@img/tab_msg_active.png'), 34 | component: Message, 35 | }, 36 | Profile: { 37 | label: '我的', 38 | defaultIcon: require('@img/tab_profile.png'), 39 | activeIcon: require('@img/tab_profile_active.png'), 40 | component: Profile, 41 | }, 42 | } 43 | 44 | const Tab = createBottomTabNavigator() 45 | 46 | const Tabs = ({ navigation }) => { 47 | const toast = useRef() 48 | 49 | return ( 50 | <> 51 | 52 | 59 | {['Home', 'Explore', 'Message', 'Profile'].map(name => ( 60 | { 66 | const img = Tabbar[name][focused ? 'activeIcon' : 'defaultIcon'] 67 | return ( 68 | 69 | ) 70 | }, 71 | }} 72 | component={Tabbar[name].component} 73 | /> 74 | ))} 75 | 76 | 77 | ) 78 | } 79 | 80 | const Stack = createStackNavigator() 81 | 82 | const App = () => { 83 | const toast = useRef() 84 | 85 | useEffect(() => { 86 | SplashScreen.hide() 87 | }, []) 88 | 89 | useEffect(() => { 90 | // eslint-disable-next-line no-extra-semi 91 | ; (async () => { 92 | try { 93 | const info = JSON.stringify({ 94 | avatar: 95 | 'https://portrait.gitee.com/uploads/avatars/user/1608/4826670_chinesee_1578975163.png!avatar200', 96 | nickname: '令狐少侠', 97 | brief: '水能载舟,亦可赛艇', 98 | }) 99 | await AsyncStorage.setItem('use_info', info) 100 | } catch { 101 | toast.current.show('无法访问本地存储') 102 | } 103 | })() 104 | }, []) 105 | 106 | return ( 107 | 108 | 109 | 110 | 115 | 116 | 121 | 122 | {routes.map(({ name, component, title, headerShown = false }) => ( 123 | 129 | ))} 130 | 131 | 132 | 133 | ) 134 | } 135 | 136 | export default App 137 | -------------------------------------------------------------------------------- /src/assets/icon/icon_back.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-a -------------------------------------------------------------------------------- /src/assets/icon/icon_chevron.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-a -------------------------------------------------------------------------------- /src/assets/icon/icon_close_circle.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-m -------------------------------------------------------------------------------- /src/assets/icon/icon_comment.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-s -------------------------------------------------------------------------------- /src/assets/icon/icon_cube.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-h -------------------------------------------------------------------------------- /src/assets/icon/icon_dislike.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-f -------------------------------------------------------------------------------- /src/assets/icon/icon_down.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-a -------------------------------------------------------------------------------- /src/assets/icon/icon_ellipsis_horizontal.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-f -------------------------------------------------------------------------------- /src/assets/icon/icon_file_tray_full.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-i -------------------------------------------------------------------------------- /src/assets/icon/icon_flame.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-m -------------------------------------------------------------------------------- /src/assets/icon/icon_hand.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-i -------------------------------------------------------------------------------- /src/assets/icon/icon_happy.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-i -------------------------------------------------------------------------------- /src/assets/icon/icon_heart.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-f -------------------------------------------------------------------------------- /src/assets/icon/icon_heart_active.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-f -------------------------------------------------------------------------------- /src/assets/icon/icon_image.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-e -------------------------------------------------------------------------------- /src/assets/icon/icon_images.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-e -------------------------------------------------------------------------------- /src/assets/icon/icon_like.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icon/icon_location.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-n -------------------------------------------------------------------------------- /src/assets/icon/icon_lock.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-g -------------------------------------------------------------------------------- /src/assets/icon/icon_mail.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-o -------------------------------------------------------------------------------- /src/assets/icon/icon_medal.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-n -------------------------------------------------------------------------------- /src/assets/icon/icon_more.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-f -------------------------------------------------------------------------------- /src/assets/icon/icon_person.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-j -------------------------------------------------------------------------------- /src/assets/icon/icon_person_add.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-j -------------------------------------------------------------------------------- /src/assets/icon/icon_refresh.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-b -------------------------------------------------------------------------------- /src/assets/icon/icon_ribbon.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-p -------------------------------------------------------------------------------- /src/assets/icon/icon_search.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-f -------------------------------------------------------------------------------- /src/assets/icon/icon_share.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-b -------------------------------------------------------------------------------- /src/assets/icon/icon_thumbs_up.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-k -------------------------------------------------------------------------------- /src/assets/icon/icon_time.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-c -------------------------------------------------------------------------------- /src/assets/icon/icon_v.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icon/ma_aperture.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-a -------------------------------------------------------------------------------- /src/assets/icon/ma_cloud.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-f -------------------------------------------------------------------------------- /src/assets/icon/ma_color.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-m -------------------------------------------------------------------------------- /src/assets/icon/ma_edit.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-n -------------------------------------------------------------------------------- /src/assets/icon/ma_golf.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-l -------------------------------------------------------------------------------- /src/assets/icon/ma_newspaper.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-n -------------------------------------------------------------------------------- /src/assets/icon/ma_task.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-i -------------------------------------------------------------------------------- /src/assets/icon/ma_user.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-j -------------------------------------------------------------------------------- /src/assets/image/cell_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/src/assets/image/cell_add.png -------------------------------------------------------------------------------- /src/assets/image/cell_file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/src/assets/image/cell_file.png -------------------------------------------------------------------------------- /src/assets/image/cell_login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/src/assets/image/cell_login.png -------------------------------------------------------------------------------- /src/assets/image/cell_more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/src/assets/image/cell_more.png -------------------------------------------------------------------------------- /src/assets/image/cell_star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/src/assets/image/cell_star.png -------------------------------------------------------------------------------- /src/assets/image/default_avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/src/assets/image/default_avatar.png -------------------------------------------------------------------------------- /src/assets/image/friend.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/image/home_activity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/src/assets/image/home_activity.png -------------------------------------------------------------------------------- /src/assets/image/home_like.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/src/assets/image/home_like.png -------------------------------------------------------------------------------- /src/assets/image/home_new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/src/assets/image/home_new.png -------------------------------------------------------------------------------- /src/assets/image/home_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/src/assets/image/home_search.png -------------------------------------------------------------------------------- /src/assets/image/item_gongyi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/src/assets/image/item_gongyi.png -------------------------------------------------------------------------------- /src/assets/image/item_jishu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/src/assets/image/item_jishu.png -------------------------------------------------------------------------------- /src/assets/image/item_qita.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/src/assets/image/item_qita.png -------------------------------------------------------------------------------- /src/assets/image/item_sheyin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/src/assets/image/item_sheyin.png -------------------------------------------------------------------------------- /src/assets/image/item_shijian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/src/assets/image/item_shijian.png -------------------------------------------------------------------------------- /src/assets/image/item_wenyi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/src/assets/image/item_wenyi.png -------------------------------------------------------------------------------- /src/assets/image/item_yinyue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/src/assets/image/item_yinyue.png -------------------------------------------------------------------------------- /src/assets/image/item_yule.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/src/assets/image/item_yule.png -------------------------------------------------------------------------------- /src/assets/image/item_yundong.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/src/assets/image/item_yundong.png -------------------------------------------------------------------------------- /src/assets/image/login_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/src/assets/image/login_bg.png -------------------------------------------------------------------------------- /src/assets/image/login_bg2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/src/assets/image/login_bg2.png -------------------------------------------------------------------------------- /src/assets/image/profile_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/src/assets/image/profile_light.png -------------------------------------------------------------------------------- /src/assets/image/profile_msg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/src/assets/image/profile_msg.png -------------------------------------------------------------------------------- /src/assets/image/profile_show.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/src/assets/image/profile_show.png -------------------------------------------------------------------------------- /src/assets/image/profile_tab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/src/assets/image/profile_tab.png -------------------------------------------------------------------------------- /src/assets/image/qq.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/image/tab_fun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/src/assets/image/tab_fun.png -------------------------------------------------------------------------------- /src/assets/image/tab_fun_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/src/assets/image/tab_fun_active.png -------------------------------------------------------------------------------- /src/assets/image/tab_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/src/assets/image/tab_home.png -------------------------------------------------------------------------------- /src/assets/image/tab_home_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/src/assets/image/tab_home_active.png -------------------------------------------------------------------------------- /src/assets/image/tab_msg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/src/assets/image/tab_msg.png -------------------------------------------------------------------------------- /src/assets/image/tab_msg_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/src/assets/image/tab_msg_active.png -------------------------------------------------------------------------------- /src/assets/image/tab_profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/src/assets/image/tab_profile.png -------------------------------------------------------------------------------- /src/assets/image/tab_profile_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/src/assets/image/tab_profile_active.png -------------------------------------------------------------------------------- /src/assets/image/text_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codennnn/eason-club/b264e0f6c78267df9ee283795c15a9fa08daf8c0/src/assets/image/text_bg.png -------------------------------------------------------------------------------- /src/assets/image/wechat.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/image/weibo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/components/ActionSheet.js: -------------------------------------------------------------------------------- 1 | import React, { useRef, useEffect } from 'react' 2 | import { Animated, View, TouchableNativeFeedback, Text } from 'react-native' 3 | 4 | export default ({ style }) => { 5 | // const fadeAnim = useRef(new Animated.Value(0)).current 6 | const pos = useRef(new Animated.Value(100)).current 7 | // useEffect(() => { 8 | // Animated.timing(fadeAnim, { 9 | // toValue: 1, 10 | // duration: 200, 11 | // useNativeDriver: true, 12 | // }).start() 13 | // }, [fadeAnim]) 14 | useEffect(() => { 15 | Animated.timing(pos, { 16 | toValue: 0, 17 | duration: 200, 18 | useNativeDriver: true, 19 | }).start() 20 | }, [pos]) 21 | 22 | return ( 23 | 24 | 25 | 41 | 42 | 123 43 | 44 | 45 | 46 | 47 | ) 48 | } 49 | -------------------------------------------------------------------------------- /src/components/ActivityCard.js: -------------------------------------------------------------------------------- 1 | import React, { useState } from 'react' 2 | import { 3 | StyleSheet, 4 | TouchableNativeFeedback, 5 | TouchableOpacity, 6 | View, 7 | Text, 8 | Image, 9 | } from 'react-native' 10 | import { useNavigation } from '@react-navigation/native' 11 | import { 12 | Menu, 13 | MenuOptions, 14 | MenuOption, 15 | MenuTrigger, 16 | } from 'react-native-popup-menu' 17 | import { primary, secondary, menuStyle } from '@/config/style.config' 18 | 19 | import Avatar from '@comp/Avatar' 20 | import MoreIcon from '@icon/icon_ellipsis_horizontal.svg' 21 | 22 | const css = StyleSheet.create({ 23 | card: { 24 | width: '100%', 25 | overflow: 'hidden', 26 | }, 27 | card_title: { marginTop: 20, marginBottom: 6, fontSize: 18 }, 28 | card_content: { fontSize: 13, lineHeight: 20, color: secondary }, 29 | }) 30 | 31 | export default ({ 32 | style, 33 | title, 34 | content, 35 | cover_url, 36 | name, 37 | avatar_url, 38 | created_at, 39 | }) => { 40 | const localAvatar = require('@img/default_avatar.png') 41 | const [imgSrc, setImgSrc] = useState( 42 | cover_url ? { uri: cover_url } : localAvatar, 43 | ) 44 | const nav = useNavigation() 45 | 46 | return ( 47 | 48 | nav.navigate('ActivityDetail')}> 52 | 53 | setImgSrc(localAvatar)} 62 | /> 63 | {title} 64 | 65 | {content} 66 | 67 | 68 | 69 |

70 | 71 | 72 | 73 | 74 | 75 | 80 | 添加到收藏夹 81 | 82 | 83 | 84 | 89 | 举报此活动 90 | 91 | 92 | 93 | 94 | 95 | 96 | nav.navigate('Club')}> 99 | 100 | 101 | 102 | {name} 103 | 104 | 105 | {created_at} 106 | 107 | 108 | nav.navigate('Club')} 111 | /> 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | ) 120 | } 121 | -------------------------------------------------------------------------------- /src/components/Avatar.js: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from 'react' 2 | import { StyleSheet, TouchableWithoutFeedback, Image, View } from 'react-native' 3 | 4 | export default ({ style, src, clickFunc, rounded = true, size = 45 }) => { 5 | const localAvatar = require('@img/default_avatar.png') 6 | const [avatarSrc, setAvatarSrc] = useState() 7 | useEffect(() => { 8 | setAvatarSrc(src ? { uri: src } : localAvatar) 9 | }, [src, localAvatar]) 10 | 11 | const avatarSize = size 12 | 13 | const css = StyleSheet.create({ 14 | avatarWrapper: { 15 | width: avatarSize, 16 | height: avatarSize, 17 | borderRadius: rounded ? avatarSize / 2 : 10, 18 | borderWidth: 0.8, 19 | borderStyle: 'solid', 20 | borderColor: '#ddd', 21 | overflow: 'hidden', 22 | }, 23 | avatarImg: { 24 | width: '100%', 25 | height: '100%', 26 | }, 27 | }) 28 | 29 | return ( 30 | clickFunc?.()}> 31 | 32 | setAvatarSrc(localAvatar)} 36 | /> 37 | 38 | 39 | ) 40 | } 41 | -------------------------------------------------------------------------------- /src/components/ClubCard.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { StyleSheet, View, Text, TouchableWithoutFeedback } from 'react-native' 3 | import Avatar from './Avatar' 4 | import { useNavigation } from '@react-navigation/native' 5 | import { primary, secondary } from '@/config/style.config' 6 | 7 | import VIcon from '@icon/icon_v.svg' 8 | 9 | const css = StyleSheet.create({ 10 | club_card: { 11 | padding: 15, 12 | flexDirection: 'row', 13 | alignItems: 'center', 14 | }, 15 | follow_btn: { 16 | marginLeft: 'auto', 17 | alignSelf: 'flex-start', 18 | paddingVertical: 5, 19 | paddingHorizontal: 10, 20 | borderRadius: 5, 21 | }, 22 | }) 23 | 24 | export default ({ 25 | style, 26 | avatar_url, 27 | name, 28 | own, 29 | fans_num, 30 | post_num, 31 | introduction, 32 | is_followed, 33 | }) => { 34 | const nav = useNavigation() 35 | const onClickAvatar = () => { 36 | nav.navigate('Club') 37 | } 38 | 39 | return ( 40 | 41 | 42 | 43 | 48 | 49 | 50 | 51 | {name} 52 | 58 | 59 | 粉丝:{fans_num} 60 | 61 | 62 | 动态:{post_num} 63 | 64 | 65 | {own} 66 | 67 | 68 | 69 | 74 | 75 | {is_followed ? '已关注' : '+ 关注'} 76 | 77 | 78 | 79 | 80 | ) 81 | } 82 | -------------------------------------------------------------------------------- /src/components/CommentItem.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { 3 | StyleSheet, 4 | View, 5 | Text, 6 | TouchableWithoutFeedback, 7 | TouchableNativeFeedback, 8 | } from 'react-native' 9 | import { useNavigation } from '@react-navigation/native' 10 | import { secondary, lightGray } from '@/config/style.config' 11 | 12 | import Avatar from './Avatar' 13 | import LikeIcon from '@icon/icon_like.svg' 14 | 15 | export default ({ style, data }) => { 16 | const nav = useNavigation() 17 | 18 | const css = StyleSheet.create({ 19 | item: { padding: 15, backgroundColor: 'white' }, 20 | item_header: { flexDirection: 'row', alignItems: 'center' }, 21 | reply: { 22 | padding: 10, 23 | borderRadius: 5, 24 | backgroundColor: '#f4f4f4', 25 | }, 26 | }) 27 | 28 | return ( 29 | 30 | 31 | nav.navigate('Club')} 34 | src={data.avatar_url} 35 | /> 36 | 37 | {data.name} 38 | {data.created_at} 39 | 40 | 41 | 42 | 48 | 49 | {data.like_num || ''} 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | {data.content} 60 | 61 | 62 | 63 | 64 | 65 | {data.replies.map(({ name, content }, i) => ( 66 | 67 | {name}:{content} 68 | 69 | ))} 70 | nav.navigate('Club')}> 71 | 72 | 73 | 共{data.total_replies}条回复 > 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | ) 84 | } 85 | -------------------------------------------------------------------------------- /src/components/CoverLayer.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { Modal, View, TouchableWithoutFeedback } from 'react-native' 3 | 4 | export default ({ children, transparent, closeModal, ...props }) => { 5 | return ( 6 | 12 | closeModal()}> 13 | 14 | {children} 15 | 16 | 17 | 18 | ) 19 | } 20 | -------------------------------------------------------------------------------- /src/components/CustomHeader.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { StyleSheet, View, Text, TouchableWithoutFeedback } from 'react-native' 3 | import { useNavigation } from '@react-navigation/native' 4 | import { secondary } from '@/config/style.config' 5 | 6 | import BackIcon from '@icon/icon_back.svg' 7 | 8 | export default ({ style, title, action }) => { 9 | const nav = useNavigation() 10 | 11 | const css = StyleSheet.create({ 12 | bar: { 13 | paddingVertical: 15, 14 | paddingHorizontal: 10, 15 | flexDirection: 'row', 16 | alignItems: 'center', 17 | backgroundColor: 'white', 18 | }, 19 | }) 20 | 21 | return ( 22 | 23 | nav.goBack()}> 24 | 25 | 26 | {title} 27 | 28 | {action} 29 | 30 | ) 31 | } 32 | -------------------------------------------------------------------------------- /src/components/CustomTabBar.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { StyleSheet, Text, View, Animated } from 'react-native' 3 | import Ripple from 'react-native-material-ripple' 4 | 5 | const css = StyleSheet.create({ 6 | tab: { 7 | paddingBottom: 5, 8 | flex: 1, 9 | alignItems: 'center', 10 | justifyContent: 'center', 11 | }, 12 | tabs: { 13 | height: 50, 14 | flexDirection: 'row', 15 | justifyContent: 'space-around', 16 | borderWidth: 1, 17 | borderTopWidth: 0, 18 | borderLeftWidth: 0, 19 | borderRightWidth: 0, 20 | borderColor: '#eee', 21 | }, 22 | }) 23 | 24 | const Button = props => { 25 | return ( 26 | 31 | {props.children} 32 | 33 | ) 34 | } 35 | 36 | const renderTab = (name, page, isTabActive, props) => { 37 | const { activeTextColor, inactiveTextColor, textStyle } = props 38 | const textColor = isTabActive ? activeTextColor : inactiveTextColor 39 | const fontWeight = isTabActive ? 'bold' : 'normal' 40 | 41 | return ( 42 | 55 | ) 56 | } 57 | 58 | const CustomTabBar = ({ 59 | style, 60 | containerWidth, 61 | tabs, 62 | activeTab, 63 | scrollValue, 64 | backgroundColor, 65 | underlineStyle, 66 | ...props 67 | }) => { 68 | const numberOfTabs = tabs.length 69 | const tabUnderlineStyle = { 70 | position: 'absolute', 71 | left: containerWidth / (numberOfTabs * 4) + 5, 72 | width: containerWidth / (numberOfTabs * 2) - 10, 73 | height: 4, 74 | backgroundColor: 'navy', 75 | bottom: 0, 76 | } 77 | 78 | const translateX = scrollValue.interpolate({ 79 | inputRange: [0, 1], 80 | outputRange: [0, containerWidth / numberOfTabs], 81 | }) 82 | 83 | return ( 84 | 85 | {tabs.map((name, page) => { 86 | const isTabActive = activeTab === page 87 | return renderTab(name, page, isTabActive, props) 88 | })} 89 | 98 | 99 | ) 100 | } 101 | 102 | module.exports = CustomTabBar 103 | -------------------------------------------------------------------------------- /src/components/EmptyData.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { Text, View } from 'react-native' 3 | import { lightGray } from '@/config/style.config' 4 | 5 | import Empty from '@img/empty.svg' 6 | 7 | export default ({ text = '暂无数据' }) => { 8 | return ( 9 | 16 | 17 | {text} 18 | 19 | ) 20 | } 21 | -------------------------------------------------------------------------------- /src/components/ImageGrid.js: -------------------------------------------------------------------------------- 1 | import React, { useState, useRef } from 'react' 2 | import { 3 | StyleSheet, 4 | View, 5 | Image, 6 | Text, 7 | Modal, 8 | TouchableOpacity, 9 | } from 'react-native' 10 | import ImageViewer from 'react-native-image-zoom-viewer' 11 | import { 12 | Menu, 13 | MenuOptions, 14 | MenuOption, 15 | MenuTrigger, 16 | } from 'react-native-popup-menu' 17 | import { menuStyle } from '@/config/style.config' 18 | 19 | export default ({ style, imgList, columns = 4 }) => { 20 | const css = StyleSheet.create({ 21 | grid: { 22 | width: '100%', 23 | marginHorizontal: -3, 24 | flexDirection: 'row', 25 | flexWrap: 'wrap', 26 | }, 27 | imgWrapper: { 28 | width: imgList.length === 1 ? '80%' : `${100 / columns}%`, 29 | aspectRatio: 1, 30 | padding: 3, 31 | marginBottom: -2, 32 | }, 33 | img: { 34 | width: '100%', 35 | height: '100%', 36 | borderRadius: 15, 37 | overflow: 'hidden', 38 | }, 39 | }) 40 | 41 | const [showModal, setShowModal] = useState(false) 42 | const [currPreview, setCurrPreview] = useState(0) 43 | const menu = useRef() 44 | 45 | const onShowModal = i => { 46 | setShowModal(true) 47 | setCurrPreview(i) 48 | } 49 | 50 | return ( 51 | 52 | 58 | ({ url }))} 61 | enableSwipeDown={true} 62 | useNativeDriver={true} 63 | backgroundColor="rgba(0,0,0,0.8)" 64 | pageAnimateTime={150} 65 | swipeDownThreshold={120} 66 | onClick={() => setShowModal(false)} 67 | onCancel={() => setShowModal(false)} 68 | /> 69 | 70 | {imgList.map((uri, i) => ( 71 | 72 | 73 | 74 | onShowModal()} 77 | onLongPress={() => menu.current.open()}> 78 | 79 | 80 | 81 | 82 | 83 | 84 | 保存到手机 85 | 86 | 87 | 88 | 89 | 收藏 90 | 91 | 92 | 93 | 94 | 95 | ))} 96 | 97 | ) 98 | } 99 | -------------------------------------------------------------------------------- /src/components/ImagePicker.js: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from 'react' 2 | import { 3 | StyleSheet, 4 | Modal, 5 | View, 6 | Image, 7 | Text, 8 | TouchableWithoutFeedback, 9 | } from 'react-native' 10 | import ImagePicker from 'react-native-image-picker' 11 | import ImageViewer from 'react-native-image-zoom-viewer' 12 | import { lightGray } from '@/config/style.config' 13 | 14 | import ImagesIcon from '@icon/icon_images.svg' 15 | 16 | const css = StyleSheet.create({ 17 | grid: { 18 | width: '100%', 19 | marginHorizontal: -3, 20 | flexDirection: 'row', 21 | flexWrap: 'wrap', 22 | }, 23 | imgWrapper: { 24 | width: '33.3%', 25 | aspectRatio: 1, 26 | padding: 3, 27 | marginBottom: 2, 28 | }, 29 | img: { 30 | width: '100%', 31 | height: '100%', 32 | borderRadius: 10, 33 | overflow: 'hidden', 34 | }, 35 | }) 36 | 37 | export default ({ style, onChange }) => { 38 | const [imgList, setImgList] = useState([]) 39 | const onPickImage = () => { 40 | ImagePicker.showImagePicker( 41 | { 42 | title: '选择图片', 43 | cancelButtonTitle: '取消', 44 | takePhotoButtonTitle: '相机拍摄', 45 | chooseFromLibraryButtonTitle: '从相册选择', 46 | mediaType: 'photo', 47 | }, 48 | response => { 49 | if (response.didCancel) { 50 | // console.log('User cancelled image picker') 51 | } else if (response.error) { 52 | console.log('ImagePicker Error: ', response.error) 53 | } else if (response.customButton) { 54 | // console.log('User tapped custom button: ', response.customButton) 55 | } else { 56 | const source = { uri: response.uri } 57 | setImgList([source, ...imgList]) 58 | } 59 | }, 60 | ) 61 | } 62 | useEffect(() => { 63 | onChange?.(imgList) 64 | }, [imgList, onChange]) 65 | 66 | const [showModal, setShowModal] = useState(false) 67 | const [currPreview, setCurrPreview] = useState(0) 68 | 69 | const onShowModal = i => { 70 | setShowModal(true) 71 | setCurrPreview(i) 72 | } 73 | 74 | return ( 75 | 76 | 82 | { 85 | uri 86 | })} 87 | enableSwipeDown={true} 88 | useNativeDriver={true} 89 | backgroundColor="rgba(0,0,0,0.8)" 90 | pageAnimateTime={150} 91 | swipeDownThreshold={120} 92 | onClick={() => setShowModal(false)} 93 | onCancel={() => setShowModal(false)} 94 | /> 95 | 96 | 97 | {imgList?.map((img, i) => ( 98 | onShowModal(i)}> 99 | 100 | 101 | 102 | 103 | ))} 104 | onPickImage()}> 105 | 106 | 116 | 117 | 118 | 添加图片 119 | 120 | 121 | 122 | 123 | 124 | ) 125 | } 126 | -------------------------------------------------------------------------------- /src/components/MessageItem.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { StyleSheet, View, Text, TouchableNativeFeedback } from 'react-native' 3 | import { useNavigation } from '@react-navigation/native' 4 | import { lightGray } from '@/config/style.config' 5 | 6 | import Avatar from '@comp/Avatar' 7 | 8 | const css = StyleSheet.create({ 9 | item: { 10 | padding: 15, 11 | flexDirection: 'row', 12 | alignItems: 'center', 13 | borderBottomWidth: 1, 14 | borderBottomColor: '#eee', 15 | }, 16 | }) 17 | 18 | export default ({ style, user, avatar, content, last_time }) => { 19 | const nav = useNavigation() 20 | 21 | return ( 22 | nav.navigate('MessageDetail')}> 23 | 24 | 25 | 26 | {user.name} 27 | 28 | {content} 29 | 30 | 31 | 38 | {last_time} 39 | 40 | 41 | 42 | ) 43 | } 44 | -------------------------------------------------------------------------------- /src/components/PhotoPreview.js: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState, useCallback } from 'react' 2 | import { 3 | PermissionsAndroid, 4 | Platform, 5 | Dimensions, 6 | FlatList, 7 | ActivityIndicator, 8 | View, 9 | TouchableNativeFeedback, 10 | Image, 11 | } from 'react-native' 12 | import CameraRoll from '@react-native-community/cameraroll' 13 | import { primary } from '@/config/style.config' 14 | 15 | export default () => { 16 | async function hasAndroidPermission() { 17 | const permission = PermissionsAndroid.PERMISSIONS.WRITE_EXTERNAL_STORAGE 18 | 19 | const hasPermission = await PermissionsAndroid.check(permission) 20 | if (hasPermission) { 21 | return true 22 | } 23 | 24 | const status = await PermissionsAndroid.request(permission) 25 | return status === 'granted' 26 | } 27 | 28 | const photoSize = Dimensions.get('window').width / 4 29 | const [loading, setLoading] = useState(false) 30 | const [hasPermission, setHasPermission] = useState(false) 31 | const [photos, setPhotos] = useState([]) 32 | 33 | const getPhotos = useCallback(() => { 34 | ; (async () => { 35 | if (Platform.OS === 'android' && !(await hasAndroidPermission())) { 36 | return 37 | } 38 | CameraRoll.getPhotos({ 39 | first: 12, 40 | assetType: 'Photos', 41 | }) 42 | .then(res => { 43 | setPhotos(res.edges) 44 | }) 45 | .finally(() => { 46 | setLoading(false) 47 | }) 48 | })() 49 | }, []) 50 | 51 | useEffect(() => { 52 | setLoading(true) 53 | getPhotos() 54 | }, [getPhotos]) 55 | 56 | return ( 57 | 58 | {loading ? ( 59 | 60 | 61 | 62 | ) : ( 63 | ( 67 | 74 | 75 | 79 | 80 | 81 | )} 82 | /> 83 | )} 84 | 85 | ) 86 | } 87 | -------------------------------------------------------------------------------- /src/components/RefreshView.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { RefreshControl } from 'react-native' 3 | 4 | import { primary } from '@/config/style.config' 5 | 6 | export default ({ children, onLoadData, ...props }) => { 7 | return ( 8 | onLoadData?.()}> 13 | {children} 14 | 15 | ) 16 | } 17 | -------------------------------------------------------------------------------- /src/components/SearchInput.js: -------------------------------------------------------------------------------- 1 | import React, { useState, useRef } from 'react' 2 | import { 3 | StyleSheet, 4 | TouchableWithoutFeedback, 5 | TextInput, 6 | View, 7 | } from 'react-native' 8 | import { lightGray } from '@/config/style.config' 9 | 10 | import SearchIcon from '@icon/icon_search.svg' 11 | import CloseIcon from '@/assets/icon/icon_close_circle.svg' 12 | 13 | export default ({ style, clickFunc, inputStyle, ...props }) => { 14 | const searchInput = useRef() 15 | const [searchText, setSearchText] = useState('') 16 | 17 | const css = StyleSheet.create({ 18 | inputWrapper: { 19 | height: 36, 20 | paddingHorizontal: 10, 21 | flexDirection: 'row', 22 | alignItems: 'center', 23 | borderRadius: 36 / 2, 24 | backgroundColor: '#f4f4f4', 25 | }, 26 | }) 27 | 28 | return ( 29 | clickFunc?.()}> 30 | 31 | 32 | setSearchText(text)} 36 | {...props} 37 | /> 38 | {searchText?.trim().length > 0 && ( 39 | { 41 | searchInput.current.clear() 42 | setSearchText('') 43 | }}> 44 | 50 | 51 | )} 52 | 53 | 54 | ) 55 | } 56 | -------------------------------------------------------------------------------- /src/components/ShareActionSheet.js: -------------------------------------------------------------------------------- 1 | import React, { useRef, useEffect } from 'react' 2 | import { Animated, View, Text, TouchableWithoutFeedback } from 'react-native' 3 | 4 | import Friend from '@img/friend.svg' 5 | import Wechat from '@img/wechat.svg' 6 | import Weibo from '@img/weibo.svg' 7 | import QQ from '@img/qq.svg' 8 | 9 | export default ({ style, visible, onCancel }) => { 10 | const pos = useRef(new Animated.Value(220)).current 11 | // useEffect(() => { 12 | // Animated.timing(pos, { 13 | // toValue: 0, 14 | // duration: 200, 15 | // useNativeDriver: true, 16 | // }).start() 17 | // }, [pos]) 18 | 19 | useEffect(() => { 20 | if (visible) { 21 | // console.log(1111) 22 | Animated.timing(pos, { 23 | toValue: 0, 24 | duration: 150, 25 | useNativeDriver: true, 26 | }).start() 27 | } else { 28 | // console.log(2222) 29 | Animated.timing(pos, { 30 | toValue: 220, 31 | duration: 150, 32 | useNativeDriver: true, 33 | }).start() 34 | } 35 | }) 36 | 37 | return ( 38 | 39 | 40 | 56 | 61 | 分享 62 | 63 | 64 | 71 | {[ 72 | { Icon: Friend, label: '朋友圈' }, 73 | { Icon: Wechat, label: '微信好友' }, 74 | { Icon: QQ, label: 'QQ' }, 75 | { Icon: Weibo, label: '微博' }, 76 | ].map(({ Icon, label }) => ( 77 | 78 | 79 | 80 | {label} 81 | 82 | 83 | ))} 84 | 85 | 86 | onCancel()}> 87 | 94 | 取消 95 | 96 | 97 | 98 | 99 | 100 | ) 101 | } 102 | -------------------------------------------------------------------------------- /src/components/TextArea.js: -------------------------------------------------------------------------------- 1 | import React, { useState } from 'react' 2 | import { View, TextInput, Text } from 'react-native' 3 | import { lightGray } from '@/config/style.config' 4 | 5 | export default ({ 6 | style, 7 | textInputStyle, 8 | countStyle, 9 | showCount, 10 | onInputFocus, 11 | maxLength = 140, 12 | ...props 13 | }) => { 14 | const [content, setContent] = useState('') 15 | 16 | return ( 17 | 18 | setContent(text)} 24 | onFocus={() => onInputFocus?.()} 25 | {...props} 26 | /> 27 | 28 | {showCount && ( 29 | 37 | 38 | {content.length} / {maxLength} 39 | 40 | 41 | )} 42 | 43 | ) 44 | } 45 | -------------------------------------------------------------------------------- /src/config/route.config.js: -------------------------------------------------------------------------------- 1 | import LoginWay from '@/pages/login/LoginWay' 2 | import Login from '@/pages/login/Login' 3 | 4 | import Recruit from '@/pages/home/Recruit' 5 | import Activity from '@/pages/home/Activity' 6 | import Search from '@/pages/home/Search' 7 | import PostDetail from '@/pages/home/PostDetail' 8 | import ActivityDetail from '@/pages/home/ActivityDetail' 9 | 10 | import ClubClass from '@/pages/explore/ClubClass' 11 | 12 | import MessageDetail from '@/pages/message/MessageDetail' 13 | 14 | import Setting from '@/pages/profile/Setting' 15 | import Follow from '@/pages/profile/Follow' 16 | import Post from '@/pages/profile/Post' 17 | import MyClub from '@/pages/profile/MyClub' 18 | import MyActivity from '@/pages/profile/MyActivity' 19 | 20 | import ClubManagement from '@/pages/club/ClubManagement' 21 | import ClubMessage from '@/pages/club/ClubMessage' 22 | import ClubTask from '@/pages/club/ClubTask' 23 | 24 | import TaskPost from '@/pages/profile/managements/TaskPost' 25 | 26 | import Club from '@/pages/club' 27 | import RecruitForm from '@/pages/club/RecruitForm' 28 | 29 | export default [ 30 | { name: 'LoginWay', component: LoginWay }, 31 | { name: 'Login', component: Login }, 32 | 33 | { name: 'Search', component: Search }, 34 | { name: 'Club', component: Club }, 35 | { name: 'PostDetail', component: PostDetail }, 36 | { name: 'ClubClass', component: ClubClass, title: '分类', headerShown: true }, 37 | { name: 'ActivityDetail', component: ActivityDetail }, 38 | 39 | { name: 'MessageDetail', component: MessageDetail }, 40 | 41 | { 42 | name: 'ClubManagement', 43 | component: ClubManagement, 44 | title: '社团管理', 45 | headerShown: true, 46 | }, 47 | { 48 | name: 'ClubMessage', 49 | component: ClubMessage, 50 | title: '社团消息', 51 | headerShown: true, 52 | }, 53 | { name: 'Setting', component: Setting, title: '应用设置', headerShown: true }, 54 | { name: 'Recruit', component: Recruit, title: '社团招新', headerShown: true }, 55 | 56 | { 57 | name: 'Activity', 58 | component: Activity, 59 | title: '社团活动', 60 | headerShown: true, 61 | }, 62 | { 63 | name: 'Follow', 64 | component: Follow, 65 | title: '我的关注', 66 | headerShown: true, 67 | }, 68 | { name: 'Post', component: Post }, 69 | { name: 'MyClub', component: MyClub, title: '我的社团', headerShown: true }, 70 | { 71 | name: 'MyActivity', 72 | component: MyActivity, 73 | title: '我的活动', 74 | headerShown: true, 75 | }, 76 | { 77 | name: 'ClubTask', 78 | component: ClubTask, 79 | title: '我的任务', 80 | headerShown: true, 81 | }, 82 | { 83 | name: 'TaskPost', 84 | component: TaskPost, 85 | title: '我的任务', 86 | headerShown: true, 87 | }, 88 | 89 | { name: 'RecruitForm', component: RecruitForm }, 90 | ] 91 | -------------------------------------------------------------------------------- /src/config/style.config.js: -------------------------------------------------------------------------------- 1 | export const primary = '#ffbd4a' 2 | export const secondary = '#7c7c7c' 3 | export const lightGray = '#aaa' 4 | 5 | export const menuStyle = { 6 | optionsContainer: { 7 | width: 145, 8 | borderRadius: 10, 9 | overflow: 'hidden', 10 | }, 11 | optionWrapper: { 12 | padding: 10, 13 | }, 14 | optionTouchable: { 15 | padding: 10, 16 | activeOpacity: 10, 17 | }, 18 | } 19 | -------------------------------------------------------------------------------- /src/pages/club/ClubManagement.js: -------------------------------------------------------------------------------- 1 | import React, { useRef } from 'react' 2 | import { 3 | Dimensions, 4 | SafeAreaView, 5 | View, 6 | Text, 7 | TouchableNativeFeedback, 8 | } from 'react-native' 9 | import { useNavigation } from '@react-navigation/native' 10 | import Toast from 'react-native-easy-toast' 11 | 12 | import EditIcon from '@icon/ma_edit.svg' 13 | import ApertureIcon from '@icon/ma_aperture.svg' 14 | import ColorIcon from '@icon/ma_color.svg' 15 | import CloudIcon from '@icon/ma_cloud.svg' 16 | import UserIcon from '@icon/ma_user.svg' 17 | import TaskIcon from '@icon/ma_task.svg' 18 | import GolfIcon from '@icon/ma_golf.svg' 19 | import NewspaperIcon from '@icon/ma_newspaper.svg' 20 | 21 | const blocks = [ 22 | { label: '编辑主页', Icon: EditIcon, route: '' }, 23 | { label: '编辑风采', Icon: ColorIcon, route: '' }, 24 | { label: '发布任务', Icon: TaskIcon, route: 'TaskPost' }, 25 | { label: '查看空闲', Icon: CloudIcon, route: '' }, 26 | { label: '成员管理', Icon: UserIcon, route: '' }, 27 | { label: '发送动态', Icon: ApertureIcon, route: 'Post' }, 28 | { label: '新建活动', Icon: GolfIcon, route: '' }, 29 | { label: '发布投票', Icon: NewspaperIcon, route: '' }, 30 | ] 31 | 32 | export default () => { 33 | const nav = useNavigation() 34 | const toast = useRef() 35 | 36 | return ( 37 | 38 | 39 | 40 | {blocks.map(({ Icon, label, route }) => ( 41 | 48 | 50 | route 51 | ? nav.navigate(route) 52 | : toast.current.show('Ծ‸Ծ 暂无页面', 200) 53 | }> 54 | 60 | 61 | {label} 62 | 63 | 64 | 65 | ))} 66 | 67 | 68 | ) 69 | } 70 | -------------------------------------------------------------------------------- /src/pages/club/ClubMessage.js: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from 'react' 2 | import { SafeAreaView, Text, View } from 'react-native' 3 | import { lightGray } from '@/config/style.config' 4 | 5 | import RefreshView from '@comp/RefreshView' 6 | import Empty from '@img/empty.svg' 7 | 8 | export default () => { 9 | const [refreshing, setRefreshing] = useState(false) 10 | 11 | const onLoadData = async () => { 12 | setRefreshing(true) 13 | setTimeout(() => { 14 | setRefreshing(false) 15 | }, 1500) 16 | } 17 | useEffect(() => { 18 | onLoadData() 19 | }, []) 20 | 21 | return ( 22 | 23 | 24 | 31 | 32 | 暂无数据 33 | 34 | 35 | 36 | ) 37 | } 38 | -------------------------------------------------------------------------------- /src/pages/club/ClubTask.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { SafeAreaView, Text, View } from 'react-native' 3 | import { lightGray } from '@/config/style.config' 4 | 5 | import RefreshView from '@comp/RefreshView' 6 | import Empty from '@img/empty.svg' 7 | 8 | export default () => { 9 | return ( 10 | 11 | 12 | 19 | 20 | 暂无数据 21 | 22 | 23 | 24 | ) 25 | } 26 | -------------------------------------------------------------------------------- /src/pages/club/RecruitForm.js: -------------------------------------------------------------------------------- 1 | import React, { useState } from 'react' 2 | import { 3 | StyleSheet, 4 | SafeAreaView, 5 | ScrollView, 6 | TextInput, 7 | Text, 8 | View, 9 | StatusBar, 10 | TouchableNativeFeedback, 11 | } from 'react-native' 12 | import { primary, secondary } from '@/config/style.config' 13 | 14 | import CustomHeader from '@comp/CustomHeader' 15 | 16 | const css = StyleSheet.create({ 17 | form_title: { 18 | marginTop: 20, 19 | fontSize: 16, 20 | fontWeight: 'bold', 21 | }, 22 | form_title_line: { 23 | width: 50, 24 | height: 5, 25 | marginTop: 5, 26 | marginBottom: 15, 27 | borderRadius: 2.5, 28 | backgroundColor: primary, 29 | }, 30 | form_item: { 31 | paddingVertical: 5, 32 | flexDirection: 'row', 33 | alignItems: 'center', 34 | }, 35 | form_item_label: { minWidth: 100 }, 36 | form_item_value: { flex: 1, color: secondary }, 37 | input: { padding: 0, flex: 1, color: secondary }, 38 | }) 39 | 40 | export default () => { 41 | const [formData, setFormData] = useState({}) 42 | return ( 43 | 44 | 45 | 46 | 47 | 48 | 社团信息 49 | 50 | 51 | 52 | 社团名称 53 | 意想社团 54 | 55 | 56 | 所属组织 57 | 广州大学华软软件系分团委 58 | 59 | 60 | 个人信息 61 | 62 | 63 | {[ 64 | { key: 'name', label: '姓名', placeholder: '请填写姓名' }, 65 | { key: 'team', label: '班级', placeholder: '请填写班级' }, 66 | { 67 | key: 'specialty', 68 | label: '特长', 69 | placeholder: '(选填)你有什么特长?', 70 | }, 71 | ].map(({ key, label, placeholder }) => ( 72 | 73 | {label} 74 | 78 | setFormData({ ...formData, [key]: text }) 79 | } 80 | /> 81 | 82 | ))} 83 | 84 | 85 | 联系方式 86 | 87 | 88 | {[ 89 | { key: 'wechat', label: '微信', placeholder: '请填写微信号' }, 90 | { key: 'qq', label: 'QQ', placeholder: '请填写QQ号' }, 91 | { 92 | key: 'phone', 93 | label: '电话', 94 | placeholder: '请填写电话号码', 95 | }, 96 | ].map(({ key, label, placeholder }) => ( 97 | 98 | {label} 99 | 103 | setFormData({ ...formData, [key]: text }) 104 | } 105 | /> 106 | 107 | ))} 108 | 109 | 110 | 111 | 112 | 113 | 119 | 申请加入 120 | 121 | 122 | 123 | 124 | 125 | ) 126 | } 127 | -------------------------------------------------------------------------------- /src/pages/club/components/ClubHome.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { StyleSheet, ScrollView, View, Text } from 'react-native' 3 | import { secondary, lightGray } from '@/config/style.config' 4 | 5 | import ImageGrid from '@comp/ImageGrid' 6 | 7 | export default ({ style }) => { 8 | const css = StyleSheet.create({ 9 | section: { 10 | marginBottom: 20, 11 | }, 12 | section_title: { 13 | marginBottom: 5, 14 | fontSize: 16, 15 | fontWeight: 'bold', 16 | color: secondary, 17 | }, 18 | section_content: { 19 | color: lightGray, 20 | textAlign: 'justify', 21 | }, 22 | }) 23 | 24 | return ( 25 | 26 | 27 | 28 | 社团简介 29 | 30 | 新媒体工作部是负责软件系宣传工作的部门。作为系内的信息传播中心,我们致力于打造优秀的微信公众号,同时结合软讯 31 | | 宣传视频 | 32 | 电子海报等途径向广大同学传播系内最新资讯。在这里,你不仅能学会公众号图文排版 33 | || 图片加工 || 34 | 视频特效处理等技术,还能完美地发挥自己的专业知识。加入我们你不需要任何基础,只要你拥有一个有趣的灵魂,我们将让你拥有满腹的才华。 35 | 36 | 37 | 38 | 社团荣誉 39 | {/* 40 | 你嗅觉敏锐,紧跟热点,立志关注天下时事 41 | 你钟情文字,喜欢摄影,欣赏美妙的图文排版 42 | 你热爱设计,痴迷ps技术,追求酷炫的视频 那么,欢迎加入新媒体工作部! 43 | */} 44 | 52 | 53 | 54 | 社团历史 55 | 成立于2008年5月20日 56 | 57 | 58 | 59 | ) 60 | } 61 | -------------------------------------------------------------------------------- /src/pages/club/components/ClubMember.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { 3 | Dimensions, 4 | ScrollView, 5 | View, 6 | Text, 7 | TouchableWithoutFeedback, 8 | } from 'react-native' 9 | import { secondary } from '@/config/style.config' 10 | 11 | import Avatar from '@comp/Avatar' 12 | 13 | import { members } from '@/mock-data' 14 | 15 | export default ({ style }) => { 16 | return ( 17 | 18 | 19 | {members.map(({ avatar_url, name }) => ( 20 | 21 | 28 | 29 | 30 | {name} 31 | 32 | 33 | 34 | ))} 35 | 36 | 37 | ) 38 | } 39 | -------------------------------------------------------------------------------- /src/pages/club/components/ClubPost.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { FlatList } from 'react-native' 3 | 4 | import PostCard from '@comp/PostCard' 5 | 6 | import { clubDynamic } from '@/mock-data' 7 | 8 | export default ({ style }) => { 9 | return ( 10 | ( 13 | 23 | )} 24 | /> 25 | ) 26 | } 27 | -------------------------------------------------------------------------------- /src/pages/club/components/ClubRecruit.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { View, Text, TouchableNativeFeedback } from 'react-native' 3 | import { WebView } from 'react-native-webview' 4 | import { useNavigation } from '@react-navigation/native' 5 | import { primary } from '@/config/style.config' 6 | 7 | export default ({ style }) => { 8 | const nav = useNavigation() 9 | 10 | return ( 11 | 12 | 13 | 20 | 21 | 27 | nav.navigate('RecruitForm')}> 28 | 34 | 我想加入 35 | 36 | 37 | 38 | 39 | ) 40 | } 41 | -------------------------------------------------------------------------------- /src/pages/club/components/ClubTabView.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { StyleSheet } from 'react-native' 3 | import ScrollableTabView from 'react-native-scrollable-tab-view' 4 | import { primary, secondary } from '@/config/style.config' 5 | 6 | import CustomTabBar from '@comp/CustomTabBar' 7 | import ClubHome from './ClubHome' 8 | import ClubPost from './ClubPost' 9 | import ClubMember from './ClubMember' 10 | import ClubRecruit from './ClubRecruit' 11 | 12 | const css = StyleSheet.create({ 13 | tabBarUnderline: { 14 | backgroundColor: primary, 15 | borderRadius: 5, 16 | }, 17 | }) 18 | 19 | export default () => { 20 | return ( 21 | }> 28 | 29 | 30 | 31 | 32 | 33 | ) 34 | } 35 | -------------------------------------------------------------------------------- /src/pages/club/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { SafeAreaView, StatusBar } from 'react-native' 3 | 4 | import ClubHeader from './components/ClubHeader' 5 | import ClubTabView from './components/ClubTabView' 6 | 7 | const info = { 8 | owner: { 9 | avatar_url: 'https://gitee.com/chinesee/images/raw/master/club/008.jpg', 10 | name: '新媒体工作部', 11 | }, 12 | introduction: '理性观世界,自信看中国', 13 | } 14 | 15 | export default () => { 16 | return ( 17 | 18 | 19 | 24 | 25 | 26 | ) 27 | } 28 | -------------------------------------------------------------------------------- /src/pages/explore/ClubClass.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { StyleSheet, View } from 'react-native' 3 | 4 | import ClubCard from '@comp/ClubCard' 5 | 6 | import { clubCardList } from '@/mock-data' 7 | 8 | const css = StyleSheet.create({ 9 | club_card: {}, 10 | }) 11 | 12 | export default ({ style }) => { 13 | return ( 14 | 15 | {clubCardList.map((item, i) => ( 16 | 25 | ))} 26 | 27 | ) 28 | } 29 | -------------------------------------------------------------------------------- /src/pages/explore/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { 3 | StyleSheet, 4 | Dimensions, 5 | SafeAreaView, 6 | View, 7 | Image, 8 | Text, 9 | } from 'react-native' 10 | import Ripple from 'react-native-material-ripple' 11 | 12 | import MedalIcon from '@/assets/icon/icon_medal.svg' 13 | import RibbonIcon from '@/assets/icon/icon_ribbon.svg' 14 | import { useNavigation } from '@react-navigation/native' 15 | 16 | const css = StyleSheet.create({ 17 | title: { 18 | paddingVertical: 5, 19 | paddingHorizontal: 10, 20 | fontSize: 18, 21 | }, 22 | item: { 23 | width: Dimensions.get('window').width / 3, 24 | paddingHorizontal: 15, 25 | paddingVertical: 40, 26 | justifyContent: 'center', 27 | alignItems: 'center', 28 | }, 29 | }) 30 | 31 | export default function() { 32 | const nav = useNavigation() 33 | const routeTo = () => { 34 | nav.navigate('ClubClass') 35 | } 36 | const items = [ 37 | { icon: require('@img/item_wenyi.png'), label: '文艺', iconWith: 42 }, 38 | { icon: require('@img/item_yinyue.png'), label: '音乐' }, 39 | { icon: require('@img/item_yule.png'), label: '娱乐', iconWith: 45.5 }, 40 | { icon: require('@img/item_sheyin.png'), label: '摄影', iconWith: 43.5 }, 41 | { icon: require('@img/item_jishu.png'), label: '技术' }, 42 | { icon: require('@img/item_yundong.png'), label: '运动' }, 43 | { icon: require('@img/item_shijian.png'), label: '实践' }, 44 | { icon: require('@img/item_gongyi.png'), label: '公益' }, 45 | { icon: require('@img/item_qita.png'), label: '其他' }, 46 | ] 47 | 48 | return ( 49 | 53 | 社团分类 54 | 59 | {items.map(({ icon, label, iconWith = 40 }) => ( 60 | routeTo()}> 67 | 68 | {label} 69 | 70 | ))} 71 | 72 | 73 | 官方组织 74 | 75 | 76 | routeTo()}> 80 | 81 | 院组织 82 | 83 | 84 | 85 | routeTo()}> 89 | 90 | 系组织 91 | 92 | 93 | 94 | 95 | ) 96 | } 97 | -------------------------------------------------------------------------------- /src/pages/home/Activity.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { SafeAreaView, FlatList } from 'react-native' 3 | 4 | import ActivityCard from '@comp/ActivityCard' 5 | 6 | import { activityList } from '@/mock-data' 7 | 8 | export default function({ navigation }) { 9 | return ( 10 | 16 | ( 19 | 28 | )} 29 | /> 30 | 31 | ) 32 | } 33 | -------------------------------------------------------------------------------- /src/pages/home/ActivityDetail.js: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from 'react' 2 | import { SafeAreaView, View, StatusBar } from 'react-native' 3 | import { WebView } from 'react-native-webview' 4 | import { 5 | Placeholder, 6 | PlaceholderMedia, 7 | PlaceholderLine, 8 | Fade, 9 | } from 'rn-placeholder' 10 | 11 | import { activityDetail } from '@/mock-data' 12 | 13 | function PlaceHolder() { 14 | return ( 15 | 16 | ( 18 | 23 | )}> 24 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 47 | 51 | 52 | 53 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | ) 67 | } 68 | 69 | function Article() { 70 | return ( 71 | 78 | ) 79 | } 80 | 81 | export default () => { 82 | const [article, setArticle] = useState(null) 83 | useEffect(() => { 84 | setTimeout(() => { 85 | setArticle(activityDetail) 86 | }, 1500) 87 | }, []) 88 | 89 | return ( 90 | 91 |