Commit ac57239e by Denglingling Committed by zhangzh

初始化项目

parent b4c27178
Showing with 11976 additions and 0 deletions
[android]
target = Google Inc.:Google APIs:23
[maven_repositories]
central = https://repo1.maven.org/maven2
module.exports = {
root: true,
extends: '@react-native-community',
};
[ignore]
; We fork some components by platform
.*/*[.]android.js
; Ignore "BUCK" generated dirs
<PROJECT_ROOT>/\.buckd/
; Ignore polyfills
node_modules/react-native/Libraries/polyfills/.*
; These should not be required directly
; require from fbjs/lib instead: require('fbjs/lib/warning')
node_modules/warning/.*
; Flow doesn't support platforms
.*/Libraries/Utilities/LoadingView.js
[untyped]
.*/node_modules/@react-native-community/cli/.*/.*
[include]
[libs]
node_modules/react-native/interface.js
node_modules/react-native/flow/
[options]
emoji=true
esproposal.optional_chaining=enable
esproposal.nullish_coalescing=enable
module.file_ext=.js
module.file_ext=.json
module.file_ext=.ios.js
munge_underscores=true
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1'
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\)$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/Image/RelativeImageStub'
suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
[lints]
sketchy-null-number=warn
sketchy-null-mixed=warn
sketchy-number=warn
untyped-type-import=warn
nonstrict-import=warn
deprecated-type=warn
unsafe-getters-setters=warn
inexact-spread=warn
unnecessary-invariant=warn
signature-verification-failure=warn
deprecated-utility=error
[strict]
deprecated-type
nonstrict-import
sketchy-null
unclear-type
unsafe-getters-setters
untyped-import
untyped-type-import
[version]
^0.113.0
*.pbxproj -text
# OSX
#
.DS_Store
# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
# node.js
#
node_modules/
npm-debug.log
yarn-error.log
# BUCK
buck-out/
\.buckd/
*.keystore
!debug.keystore
# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/
*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots
# Bundle artifact
*.jsbundle
# CocoaPods
/ios/Pods/
module.exports = {
bracketSpacing: false,
jsxBracketSameLine: true,
singleQuote: true,
trailingComma: 'all',
};
{}
\ No newline at end of file
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow
*/
import React, {Component} from 'react';
import { Text, TextInput } from 'react-native';
import {Provider} from 'react-redux';
import configureStore from './app/store/configureStore';
import Router from './app/Router';
import { fetch as fetchPolyfill } from 'whatwg-fetch'
const store = configureStore();
global.fetch = fetchPolyfill
// 字体不随系统字体变化
Text.defaultProps = Object.assign({}, Text.defaultProps, { allowFontScaling: false })
TextInput.defaultProps = Object.assign({}, TextInput.defaultProps, { allowFontScaling: false })
export default class App extends Component {
render() {
return (
<Provider store={store}>
<Router/>
</Provider>
);
}
}
/**
* @format
*/
import 'react-native';
import React from 'react';
import App from '../App';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
it('renders correctly', () => {
renderer.create(<App />);
});
# To learn about Buck see [Docs](https://buckbuild.com/).
# To run your application with Buck:
# - install Buck
# - `npm start` - to start the packager
# - `cd android`
# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
# - `buck install -r android/app` - compile, install and run application
#
load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
lib_deps = []
create_aar_targets(glob(["libs/*.aar"]))
create_jar_targets(glob(["libs/*.jar"]))
android_library(
name = "all-libs",
exported_deps = lib_deps,
)
android_library(
name = "app-code",
srcs = glob([
"src/main/java/**/*.java",
]),
deps = [
":all-libs",
":build_config",
":res",
],
)
android_build_config(
name = "build_config",
package = "com.orderapp",
)
android_resource(
name = "res",
package = "com.orderapp",
res = "src/main/res",
)
android_binary(
name = "app",
keystore = "//android/keystores:debug",
manifest = "src/main/AndroidManifest.xml",
package_type = "debug",
deps = [
":app-code",
],
)
apply plugin: "com.android.application"
import com.android.build.OutputFile
/**
* The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
* and bundleReleaseJsAndAssets).
* These basically call `react-native bundle` with the correct arguments during the Android build
* cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
* bundle directly from the development server. Below you can see all the possible configurations
* and their defaults. If you decide to add a configuration block, make sure to add it before the
* `apply from: "../../node_modules/react-native/react.gradle"` line.
*
* project.ext.react = [
* // the name of the generated asset file containing your JS bundle
* bundleAssetName: "index.android.bundle",
*
* // the entry file for bundle generation. If none specified and
* // "index.android.js" exists, it will be used. Otherwise "index.js" is
* // default. Can be overridden with ENTRY_FILE environment variable.
* entryFile: "index.android.js",
*
* // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format
* bundleCommand: "ram-bundle",
*
* // whether to bundle JS and assets in debug mode
* bundleInDebug: false,
*
* // whether to bundle JS and assets in release mode
* bundleInRelease: true,
*
* // whether to bundle JS and assets in another build variant (if configured).
* // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
* // The configuration property can be in the following formats
* // 'bundleIn${productFlavor}${buildType}'
* // 'bundleIn${buildType}'
* // bundleInFreeDebug: true,
* // bundleInPaidRelease: true,
* // bundleInBeta: true,
*
* // whether to disable dev mode in custom build variants (by default only disabled in release)
* // for example: to disable dev mode in the staging build type (if configured)
* devDisabledInStaging: true,
* // The configuration property can be in the following formats
* // 'devDisabledIn${productFlavor}${buildType}'
* // 'devDisabledIn${buildType}'
*
* // the root of your project, i.e. where "package.json" lives
* root: "../../",
*
* // where to put the JS bundle asset in debug mode
* jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
*
* // where to put the JS bundle asset in release mode
* jsBundleDirRelease: "$buildDir/intermediates/assets/release",
*
* // where to put drawable resources / React Native assets, e.g. the ones you use via
* // require('./image.png')), in debug mode
* resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
*
* // where to put drawable resources / React Native assets, e.g. the ones you use via
* // require('./image.png')), in release mode
* resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
*
* // by default the gradle tasks are skipped if none of the JS files or assets change; this means
* // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
* // date; if you have any other folders that you want to ignore for performance reasons (gradle
* // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
* // for example, you might want to remove it from here.
* inputExcludes: ["android/**", "ios/**"],
*
* // override which node gets called and with what additional arguments
* nodeExecutableAndArgs: ["node"],
*
* // supply additional arguments to the packager
* extraPackagerArgs: []
* ]
*/
project.ext.react = [
enableHermes: false, // clean and rebuild if changing
]
apply from: "../../node_modules/react-native/react.gradle"
/**
* Set this to true to create two separate APKs instead of one:
* - An APK that only works on ARM devices
* - An APK that only works on x86 devices
* The advantage is the size of the APK is reduced by about 4MB.
* Upload all the APKs to the Play Store and people will download
* the correct one based on the CPU architecture of their device.
*/
def enableSeparateBuildPerCPUArchitecture = false
/**
* Run Proguard to shrink the Java bytecode in release builds.
*/
def enableProguardInReleaseBuilds = false
/**
* The preferred build flavor of JavaScriptCore.
*
* For example, to use the international variant, you can use:
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
*
* The international variant includes ICU i18n library and necessary data
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
* give correct results when using with locales other than en-US. Note that
* this variant is about 6MiB larger per architecture than default.
*/
def jscFlavor = 'org.webkit:android-jsc:+'
/**
* Whether to enable the Hermes VM.
*
* This should be set on project.ext.react and mirrored here. If it is not set
* on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
* and the benefits of using Hermes will therefore be sharply reduced.
*/
def enableHermes = project.ext.react.get("enableHermes", false);
android {
compileSdkVersion rootProject.ext.compileSdkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
applicationId "com.orderapp"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
// Caution! In production, you need to generate your own keystore file.
// see https://facebook.github.io/react-native/docs/signed-apk-android.
signingConfig signingConfigs.debug
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
packagingOptions {
pickFirst "lib/armeabi-v7a/libc++_shared.so"
pickFirst "lib/arm64-v8a/libc++_shared.so"
pickFirst "lib/x86/libc++_shared.so"
pickFirst "lib/x86_64/libc++_shared.so"
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// https://developer.android.com/studio/build/configure-apk-splits.html
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
}
}
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+" // From node_modules
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
exclude group:'com.facebook.fbjni'
}
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
exclude group:'com.facebook.flipper'
}
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
exclude group:'com.facebook.flipper'
}
if (enableHermes) {
def hermesPath = "../../node_modules/hermes-engine/android/";
debugImplementation files(hermesPath + "hermes-debug.aar")
releaseImplementation files(hermesPath + "hermes-release.aar")
} else {
implementation jscFlavor
}
}
// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
"""Helper definitions to glob .aar and .jar targets"""
def create_aar_targets(aarfiles):
for aarfile in aarfiles:
name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
lib_deps.append(":" + name)
android_prebuilt_aar(
name = name,
aar = aarfile,
)
def create_jar_targets(jarfiles):
for jarfile in jarfiles:
name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
lib_deps.append(":" + name)
prebuilt_jar(
name = name,
binary_jar = jarfile,
)
No preview for this file type
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" />
</manifest>
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
* directory of this source tree.
*/
package com.orderapp;
import android.content.Context;
import com.facebook.flipper.android.AndroidFlipperClient;
import com.facebook.flipper.android.utils.FlipperUtils;
import com.facebook.flipper.core.FlipperClient;
import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
import com.facebook.flipper.plugins.inspector.DescriptorMapping;
import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
import com.facebook.flipper.plugins.react.ReactFlipperPlugin;
import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.modules.network.NetworkingModule;
import okhttp3.OkHttpClient;
public class ReactNativeFlipper {
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
if (FlipperUtils.shouldEnableFlipper(context)) {
final FlipperClient client = AndroidFlipperClient.getInstance(context);
client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
client.addPlugin(new ReactFlipperPlugin());
client.addPlugin(new DatabasesFlipperPlugin(context));
client.addPlugin(new SharedPreferencesFlipperPlugin(context));
client.addPlugin(CrashReporterPlugin.getInstance());
NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
NetworkingModule.setCustomClientBuilder(
new NetworkingModule.CustomClientBuilder() {
@Override
public void apply(OkHttpClient.Builder builder) {
builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
}
});
client.addPlugin(networkFlipperPlugin);
client.start();
// Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
// Hence we run if after all native modules have been initialized
ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
if (reactContext == null) {
reactInstanceManager.addReactInstanceEventListener(
new ReactInstanceManager.ReactInstanceEventListener() {
@Override
public void onReactContextInitialized(ReactContext reactContext) {
reactInstanceManager.removeReactInstanceEventListener(this);
reactContext.runOnNativeModulesQueueThread(
new Runnable() {
@Override
public void run() {
client.addPlugin(new FrescoFlipperPlugin());
}
});
}
});
} else {
client.addPlugin(new FrescoFlipperPlugin());
}
}
}
}
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.orderapp">
<uses-permission android:name="android.permission.INTERNET" />
<!-- add -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="stateAlwaysHidden|adjustPan">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>
</manifest>
package com.orderapp;
import com.facebook.react.ReactActivity;
// import com.facebook.react.ReactActivityDelegate;
// import com.facebook.react.ReactRootView;
// import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
public class MainActivity extends ReactActivity {
/**
* Returns the name of the main component registered from JavaScript. This is used to schedule
* rendering of the component.
*/
@Override
protected String getMainComponentName() {
return "OrderApp";
}
// @Override
// protected ReactActivityDelegate createReactActivityDelegate() {
// return new ReactActivityDelegate(this, getMainComponentName()) {
// @Override
// protected ReactRootView createRootView() {
// return new RNGestureHandlerEnabledRootView(MainActivity.this);
// }
// };
// }
}
package com.orderapp;
import android.app.Application;
import android.content.Context;
import com.facebook.react.PackageList;
import com.facebook.react.ReactApplication;
import com.rnim.rn.audio.ReactNativeAudioPackage;
import com.reactnativecommunity.viewpager.RNCViewPagerPackage;
import com.swmansion.gesturehandler.react.RNGestureHandlerPackage;
import com.rnfs.RNFSPackage;
import com.rnfs.RNFSPackage;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.soloader.SoLoader;
import java.lang.reflect.InvocationTargetException;
import java.util.List;
public class MainApplication extends Application implements ReactApplication {
private final ReactNativeHost mReactNativeHost =
new ReactNativeHost(this) {
@Override
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
@Override
protected List<ReactPackage> getPackages() {
@SuppressWarnings("UnnecessaryLocalVariable")
List<ReactPackage> packages = new PackageList(this).getPackages();
// Packages that cannot be autolinked yet can be added manually here, for example:
// packages.add(new MyReactNativePackage());
return packages;
}
@Override
protected String getJSMainModuleName() {
return "index";
}
};
@Override
public ReactNativeHost getReactNativeHost() {
return mReactNativeHost;
}
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
}
/**
* Loads Flipper in React Native templates. Call this in the onCreate method with something like
* initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
*
* @param context
* @param reactInstanceManager
*/
private static void initializeFlipper(
Context context, ReactInstanceManager reactInstanceManager) {
if (BuildConfig.DEBUG) {
try {
/*
We use reflection here to pick up the class that initializes Flipper,
since Flipper library is not available in release mode
*/
Class<?> aClass = Class.forName("com.orderapp.ReactNativeFlipper");
aClass
.getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
.invoke(null, context, reactInstanceManager);
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
}
}
}
<resources>
<string name="app_name">OrderApp</string>
</resources>
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="android:textColor">#000000</item>
</style>
</resources>
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 28
}
repositories {
google()
jcenter()
}
dependencies {
classpath("com.android.tools.build:gradle:3.5.2")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
google()
jcenter()
maven { url 'https://www.jitpack.io' }
}
}
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
# Version of flipper SDK to use with React Native
FLIPPER_VERSION=0.33.1
No preview for this file type
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
rootProject.name = 'OrderApp'
include ':react-native-audio'
project(':react-native-audio').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-audio/android')
include ':@react-native-community_viewpager'
project(':@react-native-community_viewpager').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/viewpager/android')
include ':react-native-gesture-handler'
project(':react-native-gesture-handler').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-gesture-handler/android')
include ':react-native-fs'
project(':react-native-fs').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fs/android')
include ':react-native-fs'
project(':react-native-fs').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fs/android')
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
{
"name": "OrderApp",
"displayName": "OrderApp"
}
\ No newline at end of file
import React, {Component} from 'react';
import {
Easing,
Animated
} from 'react-native';
import { createStackNavigator, createAppContainer} from 'react-navigation';
// import { createAppContainer} from 'react-navigation';
// import { createStackNavigator } from 'react-navigation-stack';
import LoginPage from './containers/login/LoginPage';
import HomePage from './containers/home/HomePage';
import SelfOrderPage from './containers/selfOrder/SelfOrderPage';
import ChooseProductPage from './containers/selfOrder/module/ChooseProductPage';
import EditStencilPage from './containers/selfOrder/module/EditStencilPage';
import SubSuccessPage from './containers/selfOrder/module/SubSuccessPage';
import EquipConsuPage from './containers/equipConsu/EquipConsuPage';
import QuickOrderPage from './containers/quickOrder/QuickOrderPage';
import TransOrderPage from './containers/transOrder/TransOrderPage';
const Router = createAppContainer(createStackNavigator({
LoginPage: { screen: LoginPage },
HomePage: {screen: HomePage},
SelfOrderPage: {screen: SelfOrderPage},
ChooseProductPage: {screen: ChooseProductPage},
EditStencilPage: {screen: EditStencilPage},
SubSuccessPage: {screen: SubSuccessPage},
EquipConsuPage: {screen: EquipConsuPage},
QuickOrderPage: {screen: QuickOrderPage},
TransOrderPage: {screen: TransOrderPage}
}, {
navigationOptions: {
gesturesEnabled: true
},
headerMode: 'none',
transitionConfig: () => ({
transitionSpec: {
duration: 300,
easing: Easing.out(Easing.poly(4)),
timing: Animated.timing
},
screenInterpolator: sceneProps => {
const {layout, position, scene} = sceneProps;
const {index} = scene;
const Width = layout.initWidth;
//沿X轴平移
const translateX = position.interpolate({
inputRange: [index - 1, index, index + 1],
outputRange: [Width, 0, -(Width - 10)],
});
//透明度
const opacity = position.interpolate({
inputRange: [index - 1, index - 0.99, index],
outputRange: [0, 1, 1]
});
return {opacity, transform: [{translateX}]};
}
})
}))
// const defaultGetStateForAction = Router.router.getStateForAction;
// Router.router.getStateForAction = ((action, state) => {
// // goBack返回指定页面
// if (state && action.type === 'Navigation/BACK' && action.key) {
// const backRoute = state.routes.find((route) => route.routeName === action.key);
// if (backRoute) {
// const backRouteIndex = state.routes.indexOf(backRoute);
// const purposeState = {
// ...state,
// routes: state.routes.slice(0, backRouteIndex + 1),
// index: backRouteIndex,
// };
// return purposeState;
// }
// }
// return defaultGetStateForAction(action, state)
// })
export default Router
\ No newline at end of file
import { PostRequest, GetRequest } from '../network/RequestUtils';
import { show } from '../utils/Utils';
import { exitLoginStatus } from './LoginAction';
// import { SELF_ORDER_LIST_DOING, SELF_ORDER_LIST_SUCCESS, SELF_ORDER_LIST_FAILURE } from '../base/ActionTypes';
import {LOGIN_DOING,LOGIN_SUCCESS,LOGIN_FAILURE,EXIT_LOGIN,AUTO_LOGIN_SUCCESS,AUTO_LOGIN_FAILURE} from '../base/ActionTypes';
import { PostRequest,GetRequest } from '../network/RequestUtils';
import {show} from '../utils/Utils';
export function requestLogin(params) {
return dispatch => {
dispatch(logining());
PostRequest('/access_token/password/search?app_code=PDA', params).then((res) => {
if(res.error_code === 0){
show('登录成功');
dispatch(loginSuccess(res, params.data.user_name, params.data.user_password));
}else {
show(res.error_msg);
dispatch(loginFailure())
}
}).catch((err) => {
show(err.error);
})
}
}
function logining() {
return {
type: LOGIN_DOING
}
}
function loginSuccess(userInfo, username, password) {
return {
type: LOGIN_SUCCESS,
rawData:userInfo,
username,
password
}
}
function loginFailure() {
return {
type: LOGIN_FAILURE
}
}
export function exitLoginStatus(){
return {
type: EXIT_LOGIN
}
}
function autoLoginSuccess(userInfo) {
return {
type: AUTO_LOGIN_SUCCESS,
rawData: userInfo
}
}
function autoLoginFailure() {
return {
type: AUTO_LOGIN_FAILURE
}
}
export function autoLogin(params) {
return dispatch => {
PostRequest('/access_token/password/search?app_code=PDA', params).then((res) => {
if(res.error_code === 0){
console.warn('auto------',res);
dispatch(autoLoginSuccess(res))
}else {
console.warn(res.error_msg);
show(res.error_msg);
dispatch(autoLoginFailure())
}
}).catch((err) => {
show(err.error);
})
}
}
\ No newline at end of file
import { PostRequest, GetRequest } from '../network/RequestUtils';
import { show, getUrlParams } from '../utils/Utils';
import { exitLoginStatus } from './LoginAction';
import { QUICK_ORDER_LIST_DOING, QUICK_ORDER_LIST_SUCCESS, QUICK_ORDER_LIST_FAILURE } from '../base/ActionTypes';
// 获取组织 params={access_token:''}
// export const requestQuickOrganizations = async (params) => {
// return await GetRequest(`/api/latest/authorized_inventory/search?access_token=${params.access_token}`)
// }
export function requestQuickOrganizations(params) {
return dispatch => {
console.warn('----requestQuickOrganizations====================')
dispatch(requestOrganizationsing());
// GetRequest(`/authorized_inventory/search?access_token=${access_token}`)
GetRequest(getUrlParams('/authorized_inventory/search', params))
.then(res => {
console.warn('res=====', Object.keys(res), res.error, res.message);
if(res.error_code == 0) {
console.warn('res====organizations==========', res.data.organizations);
let { data: { organizations } } = res
dispatch(requestOrganizationsSuccess(organizations));
} else if(res.error_code === 41006) {
show('登录过期,请重新登录');
dispatch(exitLoginStatus());
} else {
let error_msg = res.error_msg || res.message
show(error_msg);
dispatch(requestOrganizationsFail());
}
})
.catch(err => {
console.log('------err--====organizations----', Object.keys(err), err.error, err.message)
show(err.error);
})
}
}
// 获取手术医院 params={access_token:'', org_code:'', seller_code:''}
export function requestQuickSurgeryHospital(params) {
return dispatch => {
console.warn('----requestQuickSurgeryHospital====================', params)
dispatch(requestOrganizationsing());
GetRequest(getUrlParams('/sale/seller_customer/search', params))
// GetRequest('/sale/seller_customer/search?access_token=20200512140017932dcdff2129a5f4201900f116c819e74865T473Ma2PGh16ek&org_code=A02&seller_code=shi.ming')
.then(res => {
console.warn('res===!!==', Object.keys(res), res.error, res.message);
if(res.error_code == 0) {
console.warn('res====requestQuickSurgeryHospital==========', res.data.organizations);
let { data: { customers } } = res
dispatch(requestOrganizationsSuccess(customers));
} else if(res.error_code === 41006) {
show('登录过期,请重新登录');
dispatch(exitLoginStatus());
} else {
let error_msg = res.error_msg || res.message
show(error_msg);
dispatch(requestOrganizationsFail());
}
})
.catch(err => {
console.log('------err--====requestQuickSurgeryHospital----', Object.keys(err))
show(err.error);
})
}
}
function requestOrganizationsing() {
return {
type: QUICK_ORDER_LIST_DOING
}
}
function requestOrganizationsSuccess(data) {
return {
type: QUICK_ORDER_LIST_SUCCESS,
rawData: data
}
}
function requestOrganizationsFail() {
return {
type: QUICK_ORDER_LIST_FAILURE
}
}
\ No newline at end of file
import { PostRequest, GetRequest } from '../network/RequestUtils';
import { show } from '../utils/Utils';
import { exitLoginStatus } from './LoginAction';
import { SELF_ORDER_LIST_DOING, SELF_ORDER_LIST_SUCCESS, SELF_ORDER_LIST_FAILURE } from '../base/ActionTypes';
// 获取组织
// export const requestOrganizations = async (params) => {
// return await GetRequest(`/api/latest/authorized_inventory/search?access_token=${params.access_token}`)
// }
export function requestOrganizations(access_token) {
return dispatch => {
// console.warn('----requestOrganizations')
dispatch(requestOrganizationsing());
GetRequest(`/authorized_inventory/search?access_token=${access_token}`)
.then(res => {
// console.warn('res=====', Object.keys(res));
if(res.error_code == 0) {
// console.warn('res====organizations=', res.data.organizations);
let { data: { organizations } } = res
dispatch(requestOrganizationsSuccess(organizations));
} else if(res.error_code === 41006) {
show('登录过期,请重新登录');
dispatch(exitLoginStatus());
} else {
show(res.error_msg);
dispatch(requestOrganizationsFail());
}
})
.catch(err => {
show(err.error);
})
}
}
function requestOrganizationsing() {
return {
type: SELF_ORDER_LIST_DOING
}
}
function requestOrganizationsSuccess(data) {
return {
type: SELF_ORDER_LIST_SUCCESS,
rawData: data
}
}
function requestOrganizationsFail() {
return {
type: SELF_ORDER_LIST_FAILURE
}
}
import { PostRequest, GetRequest } from '../network/RequestUtils';
import { show } from '../utils/Utils';
import { exitLoginStatus } from './LoginAction';
// import { SELF_ORDER_LIST_DOING, SELF_ORDER_LIST_SUCCESS, SELF_ORDER_LIST_FAILURE } from '../base/ActionTypes';
//-----------user---------------------------
export const LOGIN_NO = "LOGIN_NO"
export const LOGIN_DOING = "LOGIN_DOING"
export const LOGIN_SUCCESS = "LOGIN_SUCCESS"
export const LOGIN_FAILURE = "LOGIN_FAILURE"
export const EXIT_LOGIN = "EXIT_LOGIN"
export const AUTO_LOGIN_SUCCESS = "AUTO_LOGIN_SUCCESS"
export const AUTO_LOGIN_FAILURE = "AUTO_LOGIN_FAILURE"
//-----------self order---------------------
export const SELF_ORDER_LIST_NO = "SELF_ORDER_LIST_NO"
export const SELF_ORDER_LIST_DOING = "SELF_ORDER_LIST_DOING"
export const SELF_ORDER_LIST_SUCCESS = "SELF_ORDER_LIST_SUCCESS"
export const SELF_ORDER_LIST_FAILURE = "SELF_ORDER_LIST_FAILURE"
export const SELF_SUBMIT_NO = "SELF_SUBMIT_NO"
export const SELF_SUBMIT_DOING = "SELF_SUBMIT_DOING"
export const SELF_SUBMIT_SUCCESS = "SELF_SUBMIT_SUCCESS"
export const SELF_SUBMIT_FAILURE = "SELF_SUBMIT_FAILURE"
//-----------quick order---------------------
export const QUICK_ORDER_LIST_NO = "QUICK_ORDER_LIST_NO"
export const QUICK_ORDER_LIST_DOING = "QUICK_ORDER_LIST_DOING"
export const QUICK_ORDER_LIST_SUCCESS = "QUICK_ORDER_LIST_SUCCESS"
export const QUICK_ORDER_LIST_FAILURE = "QUICK_ORDER_LIST_FAILURE"
export const QUICK_SUBMIT_NO = "QUICK_SUBMIT_NO"
export const QUICK_SUBMIT_DOING = "QUICK_SUBMIT_DOING"
export const QUICK_SUBMIT_SUCCESS = "QUICK_SUBMIT_SUCCESS"
export const QUICK_SUBMIT_FAILURE = "QUICK_SUBMIT_FAILURE"
\ No newline at end of file
export const BaseUrl = "https://obs.uat.sfrx.guke.tech";
export const BaseUrlOther = "https://sob-os.uat.sfrx.guke.tech";
export const VERSION = '/api/latest';
export const ACCESS_TOKEN = '201904091445193616b5e3d3a777848dda1de1a8123d0fdf9xw7t566c1S92U88';//未获取到access_token时使用
import {
Dimensions
} from 'react-native'
const { width, height } = Dimensions.get('window');
export const Height = () => {
return height
};
export const Width = () => {
return width
};
// UI 默认图是414*896
const uiWidthPx = 414;
const uiHeightPx = 896;
export function pxSize(uiElementPx) {
return uiElementPx * Width() / uiWidthPx;
}
export function pxHeight(uiElementPx) {
return uiElementPx * Height() / uiHeightPx;
}
// 背景色
export const promary_color = "#007EFF"; // 主色
export const foundation_color = "#ffffff"; // 底色
export const promary_shadow_color = "#3CA2FF"; // 按钮阴影色
export const home_background_color = "#F7F7F7"; // 背景色
export const btn_sub_color = "#0296F7"; // 按钮色
export const dis_sub_color = "#BBBBBB"; // 禁用按钮色
// 字体色
export const promary_text_color = "#000000"; // 主字颜色
export const title_text_color = "#ffffff"; // 标题颜色
export const placehold_text_color = "#919191"; // input placeholder颜色
export const first_text_color = '#333333'; // 一级字体
export const second_text_color = "#666666"; // 次级字体
export const third_text_color = "#999999"; // 三级字体
export const point_color = "#ff0000"; // * 颜色
// 字号
export const first_text_size = 20; // 一级字号
export const second_text_size = 16; // 二级字号
export const third_text_size = 12; // 三级字号
// 字体样式
export const font_family_semibold = "PingFangSC-Semibold";
export const font_family_medium = "PingFangSC-Medium";
export const font_family_regular = "PingFangSC-Regular";
export const font_family_light = "PingFangSC-Light";
export const header_height = 58
export const icon_style = {
resizeMode: 'contain',
width: '100%',
height: '100%'
}
export const safe_view = {
flex: 1
}
\ No newline at end of file
import React from 'react';
import {
View,
Text,
StyleSheet,
TextInput,
TouchableOpacity
} from 'react-native';
import {
first_text_color,
third_text_color,
foundation_color,
dis_sub_color,
title_text_color,
second_text_size,
font_family_medium,
font_family_semibold,
font_family_regular
} from '../../base/BaseStyle';
// 星号
export function AsteriskTextStyle({style, ...props}) {
return <Text style={[styles.asterisk_text, style]} {...props} />
}
// 列表标题
export function TitleTextStyle({style, ...props}) {
return <Text style={[styles.title_text, style]} {...props} />
}
// 列表内容
export function ContTextStyle({style, ...props}) {
return <Text style={[styles.cont_text, style]} {...props} />
}
// 列表输入框内容
export function ContInputTextStyle({style, ...props}) {
return <TextInput style={[styles.cont_text, styles.text_input, style]} {...props} />
}
// 列表右侧箭头
export function ImageTextStyle({style, ...props}) {
return <View style={[styles.image_box, style]} {...props} />
}
// 包含每一个列表的样式
export function CellTextStyle({style, ...props}) {
return <View style={[styles.call_box, style]} {...props} />
}
// 子页面底部按钮
export function FooterBtnStyle({style, textStyle, title, activeOpacity, ...props}) {
return <TouchableOpacity
activeOpacity={activeOpacity}
style={[styles.sub_btn_box, style]}
{...props}>
<Text style={[styles.sub_btn, textStyle]}>{title}</Text>
</TouchableOpacity>
}
const styles = StyleSheet.create({
asterisk_text: {
color: '#FF0000',
fontSize: second_text_size
},
title_text: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_semibold
// fontWeight: 'bold'
},
cont_text: {
fontSize: second_text_size,
color: third_text_color,
flex: 1,
textAlign: 'right',
fontFamily: font_family_regular,
paddingLeft: 20
},
text_input: {
height: 38,
paddingRight: 20
},
image_box: {
width: 14,
marginLeft: 6
},
call_box: {
flexDirection: 'row',
alignItems: 'center',
height: 58,
backgroundColor: foundation_color,
paddingHorizontal: 20,
// paddingVertical: 20,
marginBottom: 18
},
sub_btn_box: {
backgroundColor: dis_sub_color,
height: 64,
display: 'flex',
alignItems: 'center',
justifyContent: 'center'
},
sub_btn: {
color: title_text_color,
fontSize: 18,
fontFamily: font_family_medium
}
})
\ No newline at end of file
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
Modal,
ScrollView,
TouchableOpacity,
SafeAreaView
} from 'react-native';
import {
Width,
pxHeight,
third_text_color,
first_text_color,
safe_view,
font_family_regular,
promary_color
} from '../../base/BaseStyle';
import DatePicker from 'react-native-date-picker';
import { changeDateFormat } from '../../utils/Utils';
class DateModel extends Component {
constructor(props) {
super(props);
this.state = {
isVisible: this.props.show,
// entityList: this.props.entityList
currentDate: this.props.date
}
}
componentWillReceiveProps(nextProps) {
// console.warn('------show--------------',nextProps.show, this.state.isVisible )
if (this.state.isVisible != nextProps.show) {
this.setState({
isVisible: nextProps.show
});
}
if (this.state.currentDate != nextProps.date) {
this.setState({
currentDate: nextProps.date
});
}
}
handleCloseModal() {
this.setState({
isVisible: false
});
this.props.closeModal(false);
}
subCancel() {
// console.warn('取消')
this.handleCloseModal()
}
subSure(date) {
// console.warn('确认',date, date instanceof Date)
if(date instanceof Date) {
date = changeDateFormat(date, 'yyyy-MM-dd hh:mm')
}
this.props.callback(date)
this.handleCloseModal()
}
currentDateChange(date) {
// let formatDate = changeDateFormat(date, 'yyyy-MM-dd hh:mm')
// console.warn('date',date)
// console.warn(formatDate)
this.setState({
currentDate: date
});
}
renderDialog() {
// let { entityList } = this.state
let { currentDate } = this.state
return (
<View style={styles.opt_area}>
<View style={styles.modal_style}>
<View style={styles.scro_box}>
<View style={ styles.box_btn }>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.subCancel()}
style={[styles.btn_sty, styles.btn_sty_left]}
>
<Text style={[styles.btn_text, styles.btn_text_left]}>取消</Text>
</TouchableOpacity>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.subSure(currentDate)}
style={styles.btn_sty}
>
<Text style={[styles.btn_text, styles.btn_text_right]}>确认</Text>
</TouchableOpacity>
</View>
<View style={styles.date_box}>
<DatePicker
date={currentDate}
onDateChange={(date) => this.currentDateChange(date)}
locale="zh"
mode="datetime"
// style={{height:100}}
/>
</View>
</View>
</View>
</View>
)
}
render() {
return (
// <View style={styles.dia_container}>
// <Text style={styles.dis_cont}>遮照层</Text>
// </View>
<View style={styles.dia_container}>
<Modal
transparent={true}
visible={this.state.isVisible}
animationType={'fade'}
onRequestClose={() => this.handleCloseModal()}>
<SafeAreaView style={safe_view}>
<TouchableOpacity style={styles.container} activeOpacity={1}
// onPress={() => this.handleCloseModal()}
>
{this.renderDialog()}
</TouchableOpacity>
</SafeAreaView>
</Modal>
</View>
);
}
}
const styles = StyleSheet.create({
dia_container: {
flex: 1,
// position: 'absolute',
// top: 0,
// left: 0,
// right: 0,
// backgroundColor: '#ccc',
// width: Width(),
// height: Height()
},
dis_cont: {
width: '80%',
maxHeight: '80%',
backgroundColor: '#FFF',
borderRadius: 10
},
container: {
flex: 1,
backgroundColor: 'rgba(0, 0, 0, 0.5)',
},
opt_area: {
flex: 1,
flexDirection: 'column',
justifyContent: 'center',
position: 'relative',
// marginTop: 12,
// marginBottom: 12,
// height: pxHeight(420)
},
modal_style: {
position: "absolute",
left: 0,
bottom: 0,
width: Width(),
flex: 1,
flexDirection: "column",
backgroundColor: '#ffffff',
borderTopLeftRadius: 12,
borderTopRightRadius: 12,
maxHeight: pxHeight(480)
// maxHeight: '100%'
},
item: {
width: Width(),
height: 40,
paddingLeft: 20,
paddingRight: 20,
alignItems: 'center'
},
itemText: {
fontSize: 16,
color: third_text_color
},
curr_item: {
color: first_text_color,
fontWeight: 'bold'
},
scro_box: {
paddingVertical: 30,
paddingTop: 10
// paddingTop: 42,
// alignItems: 'center'
},
box_btn: {
flex: 1,
paddingHorizontal: 20,
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'flex-start',
borderBottomColor: '#e8e8e8',
borderBottomWidth: 1
},
btn_sty: {
// backgroundColor: '#ccc',
width: '50%',
height: 42
},
btn_sty_left: {
// borderRightWidth: 1,
// borderRightColor: '#FF0000'
},
btn_text: {
fontFamily: font_family_regular,
fontSize: 16,
lineHeight: 42,
color: promary_color
},
btn_text_left: {
},
btn_text_right: {
textAlign: 'right'
},
date_box: {
transform: [
{ scale: .9 }
],
alignItems: 'center'
},
item_scroll: {
// height: '80%',
// marginTop: 30,
// paddingBottom: 30
},
// cancel: {
// width: Width(),
// height: 30,
// marginTop: 12,
// alignItems: 'center',
// backgroundColor: '#ffffff'
// },
})
export default DateModel;
\ No newline at end of file
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
Modal,
ScrollView,
TouchableOpacity,
SafeAreaView
} from 'react-native';
import {
Width,
pxHeight,
third_text_color,
first_text_color,
safe_view
} from '../../base/BaseStyle';
class DialogModel extends Component {
constructor(props) {
super(props);
this.state = {
isVisible: this.props.show,
entityList: this.props.entityList
}
// this.entityList = this.props.entityList
}
componentWillReceiveProps(nextProps) {
// console.warn('------show--------------',nextProps.show, this.state.isVisible )
if (this.state.isVisible != nextProps.show) {
this.setState({
isVisible: nextProps.show
});
}
if (this.state.entityList != nextProps.entityList) {
// this.entityList = nextProps.entityList
this.setState({
entityList: nextProps.entityList
})
}
}
closeModal() {
this.setState({
isVisible: false
});
this.props.closeModal(false);
}
renderItem(item, index) {
// console.warn(this.props.itemIndex)
let { itemIndex, itemValue } = this.props
return (
<TouchableOpacity key={index} onPress={this.choose.bind(this, item, index)} style={[styles.item]}>
{/* <TouchableOpacity key={i} onPress={this.choose.bind(this, index)} style={[styles.item]}> */}
{/* <Text style={[styles.itemText, itemIndex == index ? styles.curr_item : '']}>{item.name}</Text> */}
<Text style={[styles.itemText, itemValue == item.value ? styles.curr_item : '']}>{item.name}</Text>
</TouchableOpacity>
);
}
choose(item, index) {
let { itemTitle } = this.props
if (this.state.isVisible) {
// this.props.callback(i);
this.props.callback(item, itemTitle);
this.closeModal();
}
}
renderDialog() {
let { entityList } = this.state
return (
<View style={styles.opt_area}>
<View style={styles.modal_style}>
<View style={styles.scro_box}>
<ScrollView
style={styles.item_scroll}
// showsVerticalScrollIndicator={false}
>
{
entityList.map((item, index) => this.renderItem(item, index))
}
</ScrollView>
</View>
</View>
</View>
)
}
render() {
return (
// <View style={styles.dia_container}>
// <Text style={styles.dis_cont}>遮照层</Text>
// </View>
<View style={styles.dia_container}>
<Modal
transparent={true}
visible={this.state.isVisible}
animationType={'fade'}
onRequestClose={() => this.closeModal()}>
<SafeAreaView style={safe_view}>
<TouchableOpacity style={styles.container} activeOpacity={1}
onPress={() => this.closeModal()}>
{this.renderDialog()}
</TouchableOpacity>
</SafeAreaView>
</Modal>
</View>
);
}
}
const styles = StyleSheet.create({
dia_container: {
flex: 1,
// position: 'absolute',
// top: 0,
// left: 0,
// right: 0,
// backgroundColor: '#ccc',
// width: Width(),
// height: Height()
},
dis_cont: {
width: '80%',
maxHeight: '80%',
backgroundColor: '#FFF',
borderRadius: 10
},
container: {
flex: 1,
backgroundColor: 'rgba(0, 0, 0, 0.5)',
},
opt_area: {
flex: 1,
flexDirection: 'column',
justifyContent: 'center',
position: 'relative',
// marginTop: 12,
// marginBottom: 12,
// height: pxHeight(420)
},
modal_style: {
position: "absolute",
left: 0,
bottom: 0,
width: Width(),
flex: 1,
flexDirection: "column",
backgroundColor: '#ffffff',
borderTopLeftRadius: 12,
borderTopRightRadius: 12,
maxHeight: pxHeight(480)
// maxHeight: '100%'
},
item: {
width: Width(),
height: 40,
paddingLeft: 20,
paddingRight: 20,
alignItems: 'center'
},
itemText: {
fontSize: 16,
color: third_text_color
},
curr_item: {
color: first_text_color,
fontWeight: 'bold'
},
scro_box: {
paddingVertical: 40,
paddingTop: 46
},
item_scroll: {
// height: '80%',
// marginTop: 30,
// paddingBottom: 30
},
// cancel: {
// width: Width(),
// height: 30,
// marginTop: 12,
// alignItems: 'center',
// backgroundColor: '#ffffff'
// },
})
export default DialogModel;
\ No newline at end of file
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
TouchableOpacity,
Image
} from 'react-native';
import {
header_height,
promary_color,
title_text_color,
font_family_regular,
pxSize,
Width
} from '../../base/BaseStyle';
class HeadBackItem extends Component {
constructor(props) {
super(props);
this.state = { }
}
goBack() {
// console.warn('返回!=====')
// console.warn(this.props)
this.props.navigation.goBack()
}
render() {
// console.warn(this.props)
let {title} = this.props
return (
<View style={styles.header_style}>
<TouchableOpacity
activeOpacity={.8}
style={styles.head_img_box}
onPress={() => this.goBack()}
>
<View style={styles.back_style}>
<Image source={require('../../images/arrow_icon.png')} style={styles.back_style_img}/>
</View>
</TouchableOpacity>
<Text style={styles.title_style}>{title}</Text>
</View>
);
}
}
const styles = StyleSheet.create({
header_style: {
flexDirection: 'row',
height: header_height,
width: Width(),
backgroundColor: promary_color,
alignItems: 'center',
justifyContent: 'flex-start',
paddingLeft: '5%'
},
head_img_box: {
width: 40,
alignItems: 'flex-start',
justifyContent: 'flex-start'
},
back_style: {
width: pxSize(18),
height: pxSize(18)
},
back_style_img: {
resizeMode: 'contain',
width: '100%'
},
title_style: {
width: Width() - 120,
textAlign: 'center',
fontSize: 18,
color: title_text_color,
fontFamily: font_family_regular
}
})
export default HeadBackItem;
\ No newline at end of file
import React, { Component } from 'react';
import {
TouchableOpacity,
Image,
StyleSheet,
SafeAreaView
} from 'react-native';
import {connect} from 'react-redux';
import {
icon_style
} from '../../base/BaseStyle';
import {
AsteriskTextStyle,
TitleTextStyle,
ContTextStyle,
ImageTextStyle,
CellTextStyle,
ContInputTextStyle
} from '../common/CellTextStyle';
import DialogModel from '../common/DialogModel';
import LodingModel from '../common/LodingModel';
import { requestOrganizations } from '../../action/SelfAction';
import { SELF_ORDER_LIST_DOING, SELF_ORDER_LIST_SUCCESS, SELF_ORDER_LIST_FAILURE } from '../../base/ActionTypes';
import { show } from '../../utils/Utils';
// const typeArr = ["不限", "男", "女", "难", "测试1", "测试2" ,"测试3", "测试4", "测试5", "测试6", "测试7", "测试8","测试9", "测试10测试1测试1测试1测试1测试1","测试11"];
// const typeArr = ["不限", "男", "女"];
const typeOption = [
{
name: '男',
value: 'boy'
},
{
name: '女',
value: 'girl'
},
{
name: '其他',
value: 'other'
},
{
name: '其他1',
value: 'other1'
},
{
name: '其他2',
value: 'other2'
},
{
name: '其他3',
value: 'other3'
},
{
name: '其他4',
value: 'other4'
},
{
name: '其他5',
value: 'other5'
},
{
name: '其他6',
value: 'other6'
}
]
class ItemCellModel extends Component {
constructor(props) {
super(props);
this.state = {
inputValue: 'nihao',
typeName: '性别',
type: 0,
currentItem: {
name: '请选择',
value: '-1'
},
showTypePop: false, // 选择器弹窗
isSubLoding: false, // 加载中弹窗
lodingTitle: '加载中',
listCurrentOption: [], // 当前选择器数据
}
}
componentWillReceiveProps(nextProps) {
let {item: {title}, self_list_status} = this.props
if(self_list_status != nextProps.self_list_status) {
console.warn('0-------', nextProps.self_list_status)
console.warn('0-----self_list_status--', self_list_status)
switch (nextProps.self_list_status) {
case SELF_ORDER_LIST_DOING:
// this.changeSubLoding(true)
break;
case SELF_ORDER_LIST_SUCCESS:
if(title === '组织') {
console.warn('组织-----!!!--')
this.changeListCurrentOption(nextProps.selfOrderOption, 'org_name', 'org_code');
}
// this.changeSubLoding()
break;
case SELF_ORDER_LIST_FAILURE:
// this.changeSubLoding()
break;
}
// this.changeListCurrentOption(nextProps.selfOrderOption, 'org_name', 'org_code')
// console.warn('0---selfOrderOption----', nextProps.selfOrderOption)
// let obj = {}
// let tempArr = []
// nextProps.selfOrderOption.map((item, index) => {
// obj.name = item.org_name,
// obj.value = item.org_code
// tempArr.push(obj)
// })
// // typeOption = [...tempArr]
// console.warn('---typeOption----',tempArr)
}
}
componentDidMount(){
// console.warn('item======')
// console.warn(this.props.item)
}
// 修改选择器需要的数据类型
changeListCurrentOption(data, nameType, valueType) {
console.warn('0---changeListCurrentOption----', data)
let tempArr = []
data.map((item, index) => {
console.warn('-----item[nameType]---',item[nameType])
let obj = {}
obj.name = item[nameType],
obj.value = item[valueType]
tempArr.push(obj)
})
// typeOption = [...tempArr]
console.warn('---tempArr----',tempArr)
this.setState({
listCurrentOption: tempArr,
// showTypePop: !this.state.showTypePop
showTypePop: true
})
// this.changeSubLoding()
}
// 加载中 || 加载成功/失败
changeSubLoding(loading) {
if (loading) {
this.setState({
isSubLoding: true
})
} else {
this.setState({
isSubLoding: false
})
}
}
// 弹窗回调函数
handleCallBack(item) {
this.setState({
// type: i,
// typeName: typeArr[i],
currentItem: item
})
}
// 关闭弹窗
handleCloseModal(show) {
this.setState({
showTypePop: show
})
}
// 打开选择器弹窗
handleOpenDialog() {
let {item: {title}, navigation, token, userInfo, selfOrderOption, self_list_status} = this.props
// console.warn(title, this.props.navigation)
let superTitle = navigation.state.params.title
if(title === '选择产品') {
navigation.navigate('ChooseProductPage', {title: `${superTitle} - ${title}`})
} else {
if(title === '组织') {
console.warn('组织',self_list_status)
this.props.requestOrganizations(token)
console.warn(selfOrderOption)
}
// this.setState({
// showTypePop: !this.state.showTypePop
// })
}
}
// 返回星号✳️
renderAsteriskItem() {
let {item} = this.props
if(item.isRequest) {
return (
<AsteriskTextStyle>*</AsteriskTextStyle>
)
}
}
// 返回选择器或输入框
renderIsPickerItem() {
let {item} = this.props
let isPickerItem = null
if(item.isPicker) {
isPickerItem = <ContTextStyle>{item.value}{this.state.currentItem.name}-{this.state.currentItem.value}</ContTextStyle>
// isPickerItem = <ContTextStyle>{item.value}{this.state.typeName}-{this.state.type}</ContTextStyle>
} else {
isPickerItem = <ContInputTextStyle editable={!item.isEditText} placeholder={item.value}></ContInputTextStyle>
}
return isPickerItem
}
// 返回右侧箭头
renderRightArrowItem() {
let {item} = this.props
if(item.isPicker) {
return (
<ImageTextStyle>
<Image source={require('../../images/arr_rig.png')} style={icon_style}/>
</ImageTextStyle>
)
}
}
// 返回列表
renderCellItem() {
let {item} = this.props
return (
<CellTextStyle>
{ this.renderAsteriskItem() }
<TitleTextStyle>{item.title}</TitleTextStyle>
{ this.renderIsPickerItem() }
{ this.renderRightArrowItem() }
</CellTextStyle>
)
}
// 返回医生列下方的输入框
renderCellDownInputItem() {
let {item} = this.props
if(item.showInput) {
return (
<CellTextStyle>
<ContInputTextStyle
style={styles.cell_input}
placeholder={`请输入${item.title}`}
></ContInputTextStyle>
</CellTextStyle>
)
}
}
render() {
let { listCurrentOption, lodingTitle, isSubLoding } = this.state
console.warn('item======!!!',listCurrentOption)
let { item } = this.props
let active_opacity = .7
item.isEditText ? active_opacity = 1 : ''
return (
<SafeAreaView style={styles.item_container}>
<TouchableOpacity
activeOpacity={active_opacity}
onPress={() => this.handleOpenDialog()}>
{ this.renderCellItem() }
</TouchableOpacity>
{ this.renderCellDownInputItem() }
{
listCurrentOption.length ?
<DialogModel
// entityList={typeArr}
// callback={(i) => {
// this.setState({
// type: i,
// typeName: typeArr[i],
// })
// }}
// itemIndex={this.state.type}
entityList={listCurrentOption.length ? listCurrentOption : typeOption}
callback={(item) => this.handleCallBack(item)}
show={this.state.showTypePop}
itemValue={this.state.currentItem.value}
closeModal={(show) => this.handleCloseModal(show)}
/> :
// show('当前组织为空')
null
}
{/* <DialogModel
// entityList={typeArr}
// callback={(i) => {
// this.setState({
// type: i,
// typeName: typeArr[i],
// })
// }}
// itemIndex={this.state.type}
entityList={listCurrentOption.length ? listCurrentOption : typeOption}
callback={(item) => this.handleCallBack(item)}
show={this.state.showTypePop}
itemValue={this.state.currentItem.value}
closeModal={(show) => this.handleCloseModal(show)}
/> */}
<LodingModel title={lodingTitle} show={isSubLoding} />
</SafeAreaView>
);
}
}
const styles = StyleSheet.create({
item_container: {
flex: 1
},
cell_input: {
textAlign: 'left'
}
})
const mapStateToProps = (state) => {
return {
userInfo: state.login.userInfo,
token: state.login.token,
self_list_status: state.self.self_list_status,
selfOrderOption: state.self.selfOrderOption
}
}
const mapDispatchToProps = (dispatch) => {
return {
requestOrganizations: (token) => {
dispatch(requestOrganizations(token))
}
}
}
export default connect(mapStateToProps, mapDispatchToProps)(ItemCellModel);
\ No newline at end of file
import React, { Component } from 'react';
import {
ActivityIndicator,
SafeAreaView,
View,
Text,
StyleSheet,
Modal
} from 'react-native';
import {
safe_view,
promary_color
} from '../../base/BaseStyle';
class LodingModel extends Component {
constructor(props) {
super(props);
this.state = {
title: '加载中',
isVisible: this.props.show
}
}
componentWillReceiveProps(nextProps) {
if (this.state.isVisible != nextProps.show) {
this.setState({
isVisible: nextProps.show
})
}
}
render() {
let { title, size, color, style_back } = this.props
return (
<View style={styles.container}>
<Modal
transparent={true}
visible={this.state.isVisible}
animationType={'fade'}
// onRequestClose={() => this.closeModal()}>
>
<SafeAreaView style={safe_view}>
<View style={[styles.loding_cont, style_back]}>
<View style={styles.loding_title}>
<ActivityIndicator size={size ? size : "small"} color={color ? color : promary_color} />
<Text style={styles.tit_inner}>{title ? title : this.state.title}</Text>
</View>
</View>
</SafeAreaView>
</Modal>
</View>
)
}
}
const styles = StyleSheet.create({
container: {
flex: 1
},
loding_cont: {
flex: 1,
backgroundColor: 'rgba(0, 0, 0, 0.1)',
paddingTop: '55%',
alignItems: 'center'
},
loding_title: {
justifyContent: 'center',
alignItems: 'center',
flexDirection: 'row'
},
tit_inner: {
fontSize: 16,
paddingLeft: 10,
color: promary_color
}
})
export default LodingModel;
\ No newline at end of file
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
SafeAreaView,
Modal,
ScrollView,
TouchableOpacity,
FlatList,
Image
} from 'react-native';
import {
pxHeight,
foundation_color,
promary_color,
second_text_color,
third_text_color,
first_text_color,
second_text_size,
Width,
pxSize,
dis_sub_color,
safe_view,
font_family_medium,
font_family_light
} from '../../base/BaseStyle';
import { FooterBtnStyle } from '../common/CellTextStyle';
class ProductModel extends Component {
constructor(props) {
super(props);
this.state = {
isVisible: this.props.show,
topProcOptionList: [
{
title: '编辑产品'
},
{
title: '螺钉盒'
},
{
title: '器械包'
},
{
title: '工具'
}
],
topActiveIndex: 0,
contOptionData: [ // 底部产品内容
{
"id": "0",
title: '规格:JS-CGO PE 10',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 20,
imgIcon: require('../../images/model_test.png'),
select: false
},
{
"id": "1",
title: '规格:JS-CGO PE 10 11',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
imgIcon: require('../../images/model_test.png'),
select: false
},
{
"id": "2",
title: '规格:JS-CGO PE 10 22',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
imgIcon: require('../../images/model_test.png'),
select: false
},
{
"id": "3",
title: '规格:JS-CGO PE 10 33',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
imgIcon: require('../../images/model_test.png'),
select: false
},
{
"id": "4",
title: '规格:JS-CGO PE 10 44',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
imgIcon: require('../../images/model_test.png'),
select: false
},
{
"id": "5",
title: '规格:JS-CGO PE 10 55',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
imgIcon: require('../../images/model_test.png'),
select: false
}
]
}
}
componentWillReceiveProps(nextProps) {
if (this.state.isVisible != nextProps.show) {
this.setState({isVisible: nextProps.show});
}
}
// 共计已选 点击
handleCloseSelected() {
console.warn('共计已选:666--model')
this.closeModal()
this.props.closeSelected(false)
}
// 选好了 点击
handleCloseSubmit() {
console.warn('选好了--model')
this.closeModal()
this.props.closeSubmit(false)
}
closeModal() {
this.setState({
isVisible: false
});
this.props.closeModal(false);
}
/**
* 点击当前产品加减
* @param {object} item 当前小类数据
* @param {number} index 当前角标
* @param {boolean} isPlus 默认减法 false,加法 true,
*/
handelCalculationList(item, index, isPlus) {
let { contOptionData } = this.state
let { value } = contOptionData[index]
if(isPlus) {
contOptionData[index].value += 1
} else if(!isPlus && value > 0) {
contOptionData[index].value -= 1
}
this.setState({
contOptionData
})
}
// 点击顶部菜单
handleTopNav(item, index) {
this.setState({
topActiveIndex: index
})
}
// 返回顶部编辑选项
renderTopProItem() {
let { topProcOptionList, topActiveIndex } = this.state
return (
<View style={styles.top_box}>
<ScrollView
style={styles.top_scroll_cont}
horizontal={true}
showsHorizontalScrollIndicator={false}
>
{
topProcOptionList.map((item, index) =>
<TouchableOpacity
activeOpacity={.8}
style={styles.top_touch_cont}
onPress={() => this.handleTopNav(item, index)}
>
<View style={[
styles.top_inner,
(index == 1 || index == 2) ? styles.se_thr_width : '',
index == 3 ? styles.four_width : '',
index == topActiveIndex ? styles.top_inner_act : ''
]}>
<Text style={[styles.top_tit, index == topActiveIndex ? styles.top_tit_act : '']}>
{item.title}
</Text>
</View>
</TouchableOpacity>
)
}
</ScrollView>
</View>
)
}
// 返回底部主要元素
renderContItem() {
return(
<View style={styles.edit_cont}>
<ScrollView
style={styles.edit_scroll_cont}
showsVerticalScrollIndicator={false}
>
<FlatList
style={styles.edit_list}
keyExtractor={item => item.id}
data={this.state.contOptionData}
extraData={this.state}
renderItem={ ({item, index}) => this.renderContColumnItem(item, index) }
/>
</ScrollView>
</View>
)
}
// 返回每一列元素
renderContColumnItem(item, index) {
return (
<TouchableOpacity
activeOpacity={1}
style={styles.column_container}>
<View style={styles.ri_inner}>
<View style={styles.oth_img_box}>
<Image style={styles.oth_img} source={item.imgIcon}/>
</View>
<View style={styles.ri_text_box}>
<Text style={styles.ri_te_tit}>
{ item.title }
</Text>
<Text style={[styles.ri_te_ot, styles.thr_ot]}>{item.tip1}</Text>
<Text style={styles.ri_te_ot}>{item.tip2}</Text>
</View>
<View style={styles.ri_num_box}>
<TouchableOpacity
activeOpacity={.9}
style={styles.btn_inner}
onPress={() => this.handelCalculationList(item, index)}
>
<View style={[styles.thr_num_btn, styles.thr_btn_left]}>
<Image source={require('../../images/less_icon.png')} style={styles.thr_num_icon}></Image>
</View>
</TouchableOpacity>
<Text style={styles.thr_num}>{ item.value }</Text>
<TouchableOpacity
activeOpacity={.9}
style={styles.btn_inner}
onPress={() => this.handelCalculationList(item, index, true)}
>
<View style={[styles.thr_num_btn, styles.thr_btn_right]}>
<Image source={require('../../images/plur_icon.png')} style={styles.thr_num_icon}></Image>
</View>
</TouchableOpacity>
</View>
</View>
</TouchableOpacity>
)
}
// 返回底部按钮
renderFooterBtnItem() {
// let { selectShowPopup } = this.state
return (
<View style={styles.sub_box}>
<FooterBtnStyle
style={styles.sub_btn_left}
activeOpacity={.8}
title={'共计已选:666'}
textStyle= {[styles.sub_btn_tit, styles.sub_btn_left_text]}
onPress={() => this.handleCloseSelected()}
/>
<FooterBtnStyle
style={styles.sub_btn_rig}
activeOpacity={.8}
title={'选好了'}
textStyle= {[styles.sub_btn_tit, styles.sub_btn_rig_text]}
onPress={() => this.handleCloseSubmit()}
/>
</View>
)
}
renderDialog() {
return (
<View style={styles.opt_area}>
<View style={styles.modal_style}>
<View style={styles.scro_box}>
{this.renderTopProItem()}
{this.renderContItem()}
{/* {this.renderFooterBtnItem()} */}
</View>
{this.renderFooterBtnItem()}
</View>
</View>
)
}
render() {
return (
<View style={styles.dia_container}>
<Modal
transparent={true}
visible={this.state.isVisible}
animationType={'fade'}
onRequestClose={() => this.closeModal()}>
<SafeAreaView style={safe_view}>
<TouchableOpacity style={styles.container} activeOpacity={1}
// onPress={() => this.closeModal()}
>
{this.renderDialog()}
</TouchableOpacity>
</SafeAreaView>
</Modal>
</View>
);
}
}
const styles = StyleSheet.create({
dia_container: {
flex: 1,
},
container: {
flex: 1,
backgroundColor: 'rgba(0, 0, 0, 0.5)'
},
opt_area: {
flex: 1,
flexDirection: 'column',
justifyContent: 'center',
position: 'relative'
},
modal_style: {
position: "absolute",
left: 0,
bottom: 0,
width: Width(),
flex: 1,
flexDirection: "column",
backgroundColor: '#ffffff',
borderTopLeftRadius: 12,
borderTopRightRadius: 12,
height: pxHeight(580)
},
// item: {
// width: Width(),
// height: 40,
// paddingLeft: 20,
// paddingRight: 20,
// alignItems: 'center'
// },
// itemText: {
// fontSize: 16,
// color: third_text_color
// },
// curr_item: {
// color: first_text_color,
// fontWeight: 'bold'
// },
scro_box: {
flex: 1
},
top_box: {
width: Width(),
paddingHorizontal: 20
// backgroundColor: foundation_color,
},
top_scroll_cont: {
paddingBottom: 4,
borderBottomColor: '#F9F9F9',
borderBottomWidth: 1
},
top_touch_cont: {},
top_inner: {
justifyContent: 'center',
alignItems: 'center',
marginRight: 14,
borderBottomWidth: 2,
borderBottomColor: foundation_color,
minWidth: 50,
},
se_thr_width: {
minWidth: 42
},
four_width: {
minWidth: 28
},
top_inner_act: {
borderBottomWidth: 2,
borderBottomColor: promary_color
},
top_tit: {
paddingTop: 16,
paddingBottom: 12,
color: second_text_color,
// fontSize: third_text_size
fontSize: 14
},
top_tit_act: {
color: first_text_color,
fontWeight: 'bold'
},
edit_cont: {
// height: pxHeight(430)
flex: 1
},
edit_scroll_cont: {
height: '100%'
},
edit_list: {},
column_container: {
paddingHorizontal: 14
},
ri_inner: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
paddingVertical: 14,
paddingHorizontal: 8,
backgroundColor: foundation_color,
marginBottom: 14,
borderBottomWidth: 1,
borderBottomColor: '#F9F9F9'
},
oth_img_box: {
borderColor: '#ccc',
borderWidth: 1,
borderRadius: 50,
width: pxSize(50),
height: pxSize(50),
justifyContent: 'center',
alignItems: 'center'
},
oth_img: {
width: '90%',
height: '90%'
},
ri_text_box: {},
ri_te_tit: {
fontSize: second_text_size,
color: first_text_color,
// fontWeight: 'bold',
fontFamily: font_family_medium
},
thr_ot: {
// fontWeight: 'normal',
// color: first_text_color
},
ri_te_ot: {
fontSize: 14,
color: third_text_color,
fontFamily: font_family_light
},
ri_num_box: {
flexDirection: 'row',
alignItems: 'center'
},
thr_num_btn: {
width: pxSize(24),
height: pxSize(24)
},
thr_btn_left: {
marginRight: 4
},
thr_btn_right: {
marginLeft: 4
},
thr_num_icon: {
width: '100%',
height: '100%'
},
btn_inner: {},
thr_num: {
minWidth: pxSize(20),
textAlign: 'center'
},
sub_box: {
width: Width(),
backgroundColor: dis_sub_color,
flexDirection: 'row',
shadowColor: '#E5E5E5',
shadowOffset: {
width: 0,
height: -1
},
shadowOpacity: .3,
shadowRadius: 2,
elevation: 3
},
sub_btn_left: {
width: '50%',
backgroundColor: '#EEECEC'
},
sub_btn_tit: {
fontSize: 18
},
sub_btn_left_text: {
color: third_text_color
},
sub_btn_rig: {
width: '50%',
backgroundColor: promary_color
},
sub_btn_rig_text: {},
})
export default ProductModel;
\ No newline at end of file
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
Modal,
TouchableOpacity,
Image,
SafeAreaView
} from 'react-native';
import {
Width,
pxHeight,
first_text_size,
pxSize,
safe_view,
icon_style,
font_family_medium
} from '../../base/BaseStyle';
class ShowModel extends Component {
constructor(props) {
super(props);
this.state = {
isVisible: false
}
}
componentWillReceiveProps(nextProps) {
if (this.state.isVisible != nextProps.show) {
this.setState({
isVisible: nextProps.show
});
}
}
closeModal() {
this.setState({
isVisible: false
})
this.props.closeModal(false)
}
renderDialog() {
let { title, children } = this.props
console.warn(title, children)
return (
<View style={styles.opt_area}>
<View style={styles.modal_style}>
<View style={styles.modal_head}>
<Text style={styles.modal_tit}>{title}</Text>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.closeModal()}
style={styles.head_tou_clo}
>
<Image style={icon_style} source={require('../../images/close_icon.png')}></Image>
</TouchableOpacity>
</View>
<View style={styles.model_cont}>
{ children }
</View>
</View>
</View>
)
}
render() {
return (
<View style={styles.dia_container}>
<Modal
transparent={true}
visible={this.state.isVisible}
animationType={'fade'}
onRequestClose={() => this.closeModal()}>
<SafeAreaView style={safe_view}>
<TouchableOpacity style={styles.container} activeOpacity={1}
// onPress={() => this.closeModal()}
>
{this.renderDialog()}
</TouchableOpacity>
</SafeAreaView>
</Modal>
</View>
);
}
}
const styles = StyleSheet.create({
dia_container: {
flex: 1
},
container: {
flex: 1,
backgroundColor: 'rgba(0, 0, 0, 0.1)'
},
opt_area: {
flex: 1,
// flexDirection: 'column',
justifyContent: 'center',
position: 'relative'
},
modal_style: {
position: "absolute",
left: 0,
top: '26%',
width: Width() - 40,
flex: 1,
flexDirection: "column",
backgroundColor: '#ffffff',
// borderTopLeftRadius: 20,
// borderTopRightRadius: 20,
minHeight: pxHeight(380),
borderRadius: 20,
marginHorizontal: 20,
paddingHorizontal: 20,
paddingTop: 20,
paddingBottom: 30
},
modal_head: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'flex-end'
},
modal_tit: {
fontSize: first_text_size,
fontFamily: font_family_medium
},
head_tou_clo: {
width: pxSize(28),
height: pxSize(28)
},
// clo_icon: {
// width: '100%',
// height: '100%'
// },
model_cont: {
paddingTop: 20
},
})
export default ShowModel;
\ No newline at end of file
import React, {Component} from 'react'
import {Platform, StatusBar, View} from 'react-native'
import {isIphoneX} from '../../utils/Utils'
import {connect} from "react-redux";
const iosStatusBarHeight = 20;
const iosStatusBarXHeight = 44;
const PropTypes = require('prop-types');
class StatusBarView extends Component {
static propsTypes = {
backgroundColor: PropTypes.string,
isReactStackNavigator: PropTypes.boolean,
barStyle: PropTypes.string
}
static defaultProps = {
isReactStackNavigator: false,
barStyle: 'dark-content'
}
render() {
let height = 0
if (Platform.OS == 'ios') {
if (this.props.isReactStackNavigator) {
height = isIphoneX() ? iosStatusBarXHeight : iosStatusBarHeight
}
}
return (
<View style={{
height : height,
backgroundColor: this.props.backgroundColor
}}>
<StatusBar
barStyle = {this.props.barStyle}
backgroundColor={this.props.backgroundColor}
/>
</View>
)
}
}
const mapStateToProps = (state) => ({
})
const mapDispatchToProps = (dispatch) => ({
})
export default connect(mapStateToProps, mapDispatchToProps)(StatusBarView)
\ No newline at end of file
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
SafeAreaView,
ScrollView,
Image,
TouchableOpacity
} from 'react-native';
import {
home_background_color,
promary_color,
safe_view,
icon_style
} from '../../base/BaseStyle';
import StatusBarView from '../common/StatusBarView';
import HeadBackItem from '../common/HeadBackItem';
import { FooterBtnStyle, ImageTextStyle, CellTextStyle, AsteriskTextStyle, TitleTextStyle, ContInputTextStyle } from '../common/CellTextStyle';
import { connect } from 'react-redux';
import { isEmpty } from '../../utils/Utils';
class EquipConsuPage extends Component {
constructor(props) {
super(props);
this.state = {
canSubFlag: false, // 生成订单按钮样式改变
listOptionData: [ // 备注以上的元素
{
"id": "0",
title: '销售员',
name: '蔡妍',
value: '蔡妍',
isPicker: false,
select: false,
isEditable: false // 不可编辑
},
{
"id": "1",
title: '组织',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "2",
title: '手术医院',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "3",
title: '订单信息',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "4",
title: '消耗时间',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "5",
title: '患者姓名',
value: '',
isPicker: false,
select: false
},
{
"id": "6",
title: '性别', // 选择
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "7",
title: '年龄', // 输入
value: '',
isPicker: false,
select: false
},
{
"id": "8",
title: '床位',
value: '',
isPicker: false,
select: false
},
{
"id": "9",
title: '病历号',
value: '',
isPicker: false,
select: false
},
{
"id": "10",
title: '是否结单',
value: '',
isPicker: false, // 单选
select: false
},
{
"id": "11",
title: '备注',
value: '',
isPicker: false,
select: false,
isRemark: true // 备注
},
{
"id": "12",
title: '耗材明细', // 跳转
value: '',
isPicker: false,
select: false
},
{
"id": "13",
title: '添加图片',
value: '',
isPicker: false,
select: false,
isAddImg: true
}
],
submitOption: { // 提交的信息
},
currentItem: {
name: '请选择',
value: '-1'
},
currentTitle: '组织', // 当前点击项
showTypePop: false, // 选择器弹窗
isSubLoding: false, // 加载中弹窗
lodingTitle: '加载中',
listCurrentOption: [ // 当前选择器数据
{
name: '男',
value: 'boy'
},
{
name: '女',
value: 'girl'
}
],
}
}
// 生成订单 点击
handleSubmit() {
}
// 返回备注以上的元素
renderListItem() {
let { listOptionData } = this.state
let {userInfo:{ person_name }} = this.props
if(!isEmpty(person_name)) {
// this.setState({
// listOptionData: listOptionData.map(item => {
// if(item.title === '销售员') {
// item.name = person_name
// item.value = person_name
// }
// return item
// })
// })
}
return(
<View style={styles.list_cont}>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={1}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'销售员'}</TitleTextStyle>
<ContInputTextStyle editable={false} defaultValue={listOptionData[0].value}></ContInputTextStyle>
</CellTextStyle>
</TouchableOpacity>
</View>
</View>
)
}
// 返回右侧箭头
renderRightArrowItem() {
return (
<ImageTextStyle>
<Image source={require('../../images/arr_rig.png')} style={icon_style}/>
</ImageTextStyle>
)
}
// 返回选择器
renderPickerModelAndLodingModel() {
}
render() {
let {canSubFlag} = this.state
let {navigation} = this.props
let {title} = navigation.state.params
return (
<View style={styles.equip_container}>
<StatusBarView
isReactStackNavigator={true}
backgroundColor={promary_color}
barStyle = 'light-content'
/>
<SafeAreaView style={safe_view}>
<HeadBackItem title={title} navigation={navigation} />
<ScrollView
style={styles.equip_main}
showsVerticalScrollIndicator={false}
>
<Text>'器械消耗'</Text>
{this.renderListItem()}
</ScrollView>
</SafeAreaView>
<FooterBtnStyle
style={canSubFlag ? styles.sub_btn_pro : ''}
activeOpacity={canSubFlag ? .8 : 1}
title={'生成订单'}
textStyle= {styles.sub_btn}
onPress={() => this.handleSubmit()}
/>
</View>
);
}
}
const styles = StyleSheet.create({
equip_container : {
flex: 1,
backgroundColor: home_background_color
},
equip_main : {
padding: 14
},
list_cont: {
flex: 1
},
item_container: {
flex: 1
},
sub_btn_pro: {
backgroundColor: promary_color
},
sub_btn: {},
})
const mapStateToProps = (state) => {
return {
userInfo: state.login.userInfo,
token: state.login.token,
}
}
const mapDispatchToProps = (dispatch) => {
return {
// requestOrganizations: (token) => {
// dispatch(requestOrganizations(token))
// }
}
}
export default connect(mapStateToProps, mapDispatchToProps)(EquipConsuPage);
\ No newline at end of file
import React, { Component } from 'react';
import {
StyleSheet,
View,
Text,
Image,
SafeAreaView,
TouchableOpacity
} from 'react-native';
import {connect} from "react-redux";
import {
foundation_color,
promary_text_color,
second_text_size,
home_background_color,
pxSize,
promary_color,
safe_view,
font_family_regular
} from '../../base/BaseStyle';
import { exitLoginStatus } from '../../action/LoginAction';
import HeadBackItem from '../common/HeadBackItem';
import StatusBarView from '../common/StatusBarView';
class HomePage extends Component {
constructor(props) {
super(props)
this.state = {
showList: [
{
icon: require('../../images/quick_order.png'),
title: '快速下单',
page: 'QuickOrderPage',
},
{
icon: require('../../images/self_order.png'),
title: '自助下单',
page: 'SelfOrderPage',
},
{
icon: require('../../images/trans_order.png'),
title: '转单',
page: 'TransOrderPage',
},
{
icon: require('../../images/equip_consu.png'),
title: '器械消耗',
page: 'EquipConsuPage',
},
{
icon: require('../../images/return_login.png'),
title: '返回登录页',
page: 'LoginPage',
}
]
}
}
// componentWillReceiveProps(nextProps) {
// console.warn('home---------!!!!',nextProps)
// if(this.props.loginState != nextProps.loginState) {
// switch(nextProps.loginState) {
// case LOGIN_NO:
// console.warn('home-------LOGIN_NO---',nextProps.loginState)
// break
// default:
// break;
// }
// }
// }
jumpToSubpage(index) {
// console.warn('跳转')
// console.warn(index)
let {page, title} = this.state.showList[index]
if('LoginPage' === page) {
// console.warn('返回!')
// console.warn(this.props)
this.props.exitLoginStatus()
}
this.props.navigation.navigate(page, {title})
}
render() {
let {navigation} = this.props
return (
<View style={styles.home_container}>
<StatusBarView
isReactStackNavigator={true}
backgroundColor={promary_color}
barStyle = 'light-content'
/>
<SafeAreaView style={safe_view}>
<HeadBackItem title={'骨科智慧仓'} navigation={navigation} />
<View style={styles.home_cont}>
{
this.state.showList.map((item, index) =>
<TouchableOpacity
activeOpacity={.8}
style={[styles.home_list, (index%2 !== 0) && styles.home_list_even]}
onPress={() => this.jumpToSubpage(index)}>
<View style={styles.list_item}>
<View style={styles.img_box}>
<Image source={item.icon} style={styles.list_img}/>
</View>
<Text style={styles.list_tit}>{item.title}</Text>
</View>
</TouchableOpacity>
)
}
</View>
</SafeAreaView>
</View>
);
}
}
const styles = StyleSheet.create({
home_container: {
flex: 1,
// width: Width(),
// height: Height(),
// flexDirection: 'row',
// flexWrap: 'wrap',
backgroundColor: home_background_color
},
home_cont: {
// flex: 1,
flexDirection: 'row',
flexWrap: 'wrap',
marginTop: '8%',
marginLeft: '10%',
justifyContent: 'flex-start',
// backgroundColor: home_background_color
},
home_list: {
// width: '40%',
width: pxSize(150),
height: pxSize(150),
backgroundColor: foundation_color,
marginBottom: '6%',
// paddingTop: '8%',
// paddingBottom: '6%',
justifyContent: 'center',
alignItems: 'center',
borderRadius: 4
},
home_list_even: {
marginLeft: '8%'
},
list_item: {
width: '100%',
justifyContent: 'center',
alignItems: 'center'
},
img_box: {
// width: '28%',
width: pxSize(46),
marginBottom: 6
},
list_img: {
resizeMode: 'contain',
width: '100%'
},
list_tit: {
fontSize: second_text_size,
color: promary_text_color,
lineHeight: second_text_size + 12,
fontFamily: font_family_regular
}
})
const mapStateToProps = (state) => ({
loginState:state.login.loginState
})
const mapDispatchToProps = (dispatch) => ({
exitLoginStatus: () => {
dispatch(exitLoginStatus())
}
})
export default connect(mapStateToProps, mapDispatchToProps)(HomePage)
\ No newline at end of file
import React, {Component} from 'react';
import {
View,
Text,
SafeAreaView,
StyleSheet,
ImageBackground,
Image,
TextInput,
TouchableOpacity
} from 'react-native';
import {connect} from "react-redux";
import {
Width,
Height,
btn_sub_color,
promary_text_color,
title_text_color,
first_text_size,
second_text_size,
font_family_semibold,
third_text_size,
pxSize,
placehold_text_color,
font_family_regular,
safe_view
} from '../../base/BaseStyle';
import {requestLogin, autoLogin} from '../../action/LoginAction';
import {show, isEmpty} from '../../utils/Utils';
import {LOGIN_DOING,LOGIN_SUCCESS,LOGIN_FAILURE,LOGIN_NO} from '../../base/ActionTypes';
import StatusBarView from '../common/StatusBarView';
import LodingModel from '../common/LodingModel';
class LoginPage extends Component{
constructor(props) {
super(props)
this.state = {
username: '',
password: '',
subTit: '登录',
subTitList: ['登录', '登录中...'],
isSubLoding: false
}
}
componentDidMount() {
// this.subAutoLogin()
}
componentWillReceiveProps(nextProps) {
// console.warn('this---',this.props.loginState)
// console.warn('next-----',nextProps.loginState)
if(this.props.loginState != nextProps.loginState) {
// console.warn('next-----',nextProps.loginState)
// console.warn('this---',this.props.loginState)
switch(nextProps.loginState) {
case LOGIN_DOING:
this.changeSubTit(true);
break;
case LOGIN_FAILURE:
this.changeSubTit();
break;
case LOGIN_NO:
// console.warn('LOGIN_NO---',LOGIN_NO,this.props)
this.changeSubTit();
this.setState({
password: ''
})
break
case LOGIN_SUCCESS:
this.changeSubTit();
this.enterHomePage();
break;
default:
break;
}
}
}
// 登录中 || 登录成功/失败
changeSubTit(loading) {
let { subTitList } = this.state
if (loading) {
this.setState({
isSubLoding: true,
subTit: subTitList[1]
})
} else {
this.setState({
isSubLoding: false,
subTit: subTitList[0]
})
}
}
// 登录
submitLogin() {
// // 临时
// this.enterHomePage()
let {username, password, isSubLoding} = this.state
if (!isSubLoding) {
if (isEmpty(username)) {
show('请输入用户名')
return
}
if(isEmpty(password)) {
show('请输入密码')
return
}
let params = {
data:{
grant_type: "PASSWORD",
user_name: username,
user_password: password
}
}
this.props.requestLogin(params)
}
}
// 自动登录
subAutoLogin() {
let {username, password, autoLogin} = this.props
this.setState({
username,
password
})
if (isEmpty(username)) {
return
}
if(isEmpty(password)) {
return
}
let params = {
data:{
grant_type: "PASSWORD",
user_name: username,
user_password: password
}
}
autoLogin(params)
}
// 用户名改变
handleUsername(val) {
this.setState({
username: val
})
}
// 密码改变
handlePassword(val) {
this.setState({
password: val
})
}
// 进入首页
enterHomePage() {
this.props.navigation.navigate('HomePage')
}
render() {
let {username, password, isSubLoding, subTit} = this.state
return (
<View style={styles.login_container}>
<StatusBarView
isReactStackNavigator={true}
backgroundColor={"#2499F9"}
barStyle = 'light-content'
/>
<SafeAreaView style={safe_view}>
<ImageBackground source={require('../../images/login_bg.png')} style={styles.login_bg}>
<View style={styles.login_inner}>
<View style={styles.login_head}>
<Text style={styles.head_tit}>骨科智慧仓</Text>
<View style={styles.head_line}></View>
</View>
<View style={[styles.login_content]}>
<View style={styles.cont_head}>
<Text style={styles.cont_head_txt}>账号登录</Text>
</View>
<View style={styles.cont_main}>
<View style={styles.form_row}>
<TextInput
autoCapitalize='none'
placeholder="请输入您的用户名"
placeholderTextColor={placehold_text_color}
returnKeyType="next"
style={styles.row_input}
defaultValue={username}
clearButtonMode="while-editing"
onChangeText={(text) => this.handleUsername(text)}
/>
</View>
<View style={styles.form_row}>
<TextInput
autoCapitalize='none'
placeholder="请输入您的密码"
placeholderTextColor={placehold_text_color}
secureTextEntry={true}
returnKeyType="done"
style={styles.row_input}
defaultValue={password}
onChangeText={(text) => this.handlePassword(text)}
/>
</View>
</View>
<View style={styles.cont_footer}>
<TouchableOpacity
style={[styles.btn_footer, isSubLoding ? styles.btn_dis_footer : '']}
onPress={() => this.submitLogin()}
activeOpacity={ isSubLoding ? 1 : .8}>
<Text style={styles.btn_text}>{ subTit }</Text>
</TouchableOpacity>
</View>
</View>
<View style={styles.login_footer}>
<View style={styles.fo_box}>
<Image source={require('../../images/logo_foo.png')} style={styles.footer_img} />
</View>
</View>
<LodingModel title={subTit} show={isSubLoding} />
</View>
</ImageBackground>
</SafeAreaView>
</View>
)
}
}
const styles = StyleSheet.create({
login_container: {
flex: 1
},
login_bg: {
flex: 1,
// alignSelf: 'stretch',
// width: null,
// height: null,
// zIndex: -1,
// position: 'absolute',
// top: 0,
// left: 0,
// right: 0
},
login_inner: {
// flex: 1,
// position: 'relative',
// alignSelf: 'stretch',
width: Width(),
height: Height(),
paddingLeft: pxSize(33),
paddingRight: pxSize(33)
// height: null
},
login_head: {
// flex: 1,
// height: pxHeight(264),
height: '22%',
display: 'flex',
flexDirection: 'column',
justifyContent: 'flex-end',
marginBottom: 20
},
head_tit: {
color: title_text_color,
fontSize: first_text_size,
fontFamily: font_family_semibold
},
head_line: {
borderBottomColor: title_text_color,
borderBottomWidth: 2,
width: 30,
height: 14
},
login_content: {
backgroundColor: '#FFF',
borderRadius: 10,
// height: '49%',
height: pxSize(390),
width: pxSize(348),
paddingHorizontal: '8%',
paddingVertical: '12%'
},
cont_head: {
marginBottom: '12%'
},
cont_head_txt: {
color: promary_text_color,
fontSize: second_text_size,
fontFamily: font_family_semibold,
fontWeight: 'bold'
},
cont_main: {},
form_row: {
width: '100%',
height: 38,
lineHeight: 38,
backgroundColor: '#EFEFEF',
marginBottom: '8%',
borderRadius: 20,
paddingLeft: 10
},
input_plholdco: {
color: '#919191'
},
row_input: {
fontSize: third_text_size,
height: 38,
fontFamily: font_family_regular
// lineHeight: 22,
},
cont_footer: {
// borderRadius: 50
justifyContent: 'center',
flex: 1
},
btn_footer: {
width: '100%',
height: 38,
backgroundColor: btn_sub_color,
borderRadius: 20,
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
shadowColor: btn_sub_color,
shadowOffset: {
width: 1,
height: 2
},
shadowOpacity: 1,
elevation: 2,
alignItems: 'center',
borderWidth: 0
},
btn_dis_footer: {
backgroundColor: 'rgba(40, 158, 251, 0.95)',
shadowColor: 'rgba(40, 158, 251, 0.95)'
},
btn_text: {
color: title_text_color,
fontSize: second_text_size
},
login_footer: {
// height: '20%',
// height: pxHeight(220),
flex: 1,
justifyContent: 'flex-start',
alignItems: 'center'
},
fo_box: {
// width: '30%',
// height: '30%'
width: pxSize(110),
height: pxSize(30),
marginTop: '18%'
},
footer_img: {
// flex: 1
resizeMode: 'contain',
width: '100%',
height: '100%'
}
})
const mapStateToProps = (state) => ({
token:state.login.token,
userInfo:state.login.userInfo,
loginState:state.login.loginState,
username:state.login.username,
password:state.login.password
})
const mapDispatchToProps = (dispatch) => ({
requestLogin: (data) => {
dispatch(requestLogin(data))
},
autoLogin: (data) => {
dispatch(autoLogin(data))
}
})
export default connect(mapStateToProps, mapDispatchToProps)(LoginPage)
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
SafeAreaView,
ScrollView,
TouchableOpacity,
Image,
TextInput
} from 'react-native';
import {
home_background_color,
promary_color,
safe_view,
icon_style,
font_family_regular,
second_text_size,
first_text_color,
Width,
placehold_text_color,
pxSize
} from '../../base/BaseStyle';
import StatusBarView from '../common/StatusBarView';
import HeadBackItem from '../common/HeadBackItem';
import {
AsteriskTextStyle,
TitleTextStyle,
ContTextStyle,
ImageTextStyle,
CellTextStyle,
ContInputTextStyle,
FooterBtnStyle
} from '../common/CellTextStyle';
import { connect } from 'react-redux';
import { show, isEmpty, dedupQuoteArray } from '../../utils/Utils';
import { AudioRecorder, AudioUtils } from 'react-native-audio';
import DateModel from '../common/DateModel';
import DialogModel from '../common/DialogModel';
import LodingModel from '../common/LodingModel';
import { requestQuickOrganizations, requestQuickSurgeryHospital} from '../../action/QuickAction';
import { QUICK_ORDER_LIST_DOING, QUICK_ORDER_LIST_SUCCESS, QUICK_ORDER_LIST_FAILURE } from '../../base/ActionTypes';
class EquipConsuPage extends Component {
constructor(props) {
super(props);
this.state = {
canSubFlag: false, // 生成订单按钮样式改变
listOptionData: [ // 备注以上的元素
{
"id": "0",
title: '销售员',
name: '蔡妍',
value: '蔡妍',
isPicker: false,
select: false,
isEditable: false // 不可编辑
},
{
"id": "1",
title: '组织',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "2",
title: '手术医院',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "3",
title: '收单地点',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "4",
title: '收货地点',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "5",
title: '主治医生',
name: '请选择',
value: '',
isPicker: true,
select: false,
showInput: false,
inputValue: ''
},
{
"id": "6",
title: '手术类型',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "7",
title: '配台模版',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "8",
title: '手术类时间',
name: '请选择',
value: '',
dateValue: new Date(),
isPicker: true,
select: false,
showDatePicker: true
},
{
"id": "9",
title: '订单类型',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "10",
title: '备注',
value: '',
isPicker: false,
select: false,
isRemark: true // 备注
},
{
"id": "11",
title: '还有什么要安排的,可录音备注哟!',
value: '',
isPicker: false,
select: false,
isRecode: true // 录音
}
],
submitOption: { // 提交的信息
seller_code: '', // 用户名username
org_code: '', // 组织
customer_code: '', // 手术医院
bill_to_site_code: '', // 收单地点
ship_to_site_code: '', // 收货地点
doctor_name: '', // 主治医生
surgery_name: '', // 手术名称
surgery_date: '', // 手术时间
surgery_type_code: '', // 手术类型
order_type_code: '', // 订单类型
surgery_desc: '', // 备注信息
file_path: '', // 录音地址
},
currentItem: {
name: '请选择',
value: '-1'
},
currentTitle: '组织', // 当前点击项
showTypePop: false, // 选择器弹窗
isSubLoding: false, // 加载中弹窗
lodingTitle: '加载中',
listCurrentOption: [ // 当前选择器数据
{
name: '男',
value: 'boy'
},
{
name: '女',
value: 'girl'
},
{
name: '其他',
value: 'other'
}
],
dateModelPop: false, // 日期选择器
hasPermission: undefined, //录音 授权状态
audioPath: AudioUtils.DocumentDirectoryPath + '/quickAudio.aac', // 文件路径
recording: false, //是否录音
pause: false, //录音是否暂停
stop: false, //录音是否停止
currentTime: 0, //录音时长
localCustomersOption: [], // 当前医院信息:手术医院、收单地点、收货地点、主治医生
}
}
componentDidMount() {
}
componentWillReceiveProps(nextProps) {
let { quick_list_status} = this.props
let self = this
if(quick_list_status != nextProps.quick_list_status) {
console.warn('-222------', nextProps.quick_list_status)
console.warn('--222---quick_list_status--', quick_list_status)
switch (nextProps.quick_list_status) {
case QUICK_ORDER_LIST_DOING:
this.changeSubLoding(true)
break;
case QUICK_ORDER_LIST_SUCCESS:
self.changeSubLoding()
setTimeout(() => {
self.changeCurrentOption()
}, 500)
break;
case QUICK_ORDER_LIST_FAILURE:
this.changeSubLoding()
break;
}
}
}
// 修改正在加载
changeSubLoding(loading) {
this.setState({
isSubLoding: loading || false
})
}
// 选择器弹窗回调函数
handleCallBack(item, itemTitle) {
// console.warn(item, 'item------')
// console.warn('item-itemTitle-----',itemTitle)
let { listOptionData } = this.state
this.setState({
currentItem: item,
})
// if(itemTitle === '组织' || itemTitle === '手术医院') {
this.setState({
listOptionData: listOptionData.map((chItem, index) => {
if(chItem.title === itemTitle) {
console.warn('---hhh-----', item)
chItem.name = item.name
chItem.value = item.value
if (itemTitle === '主治医生' && item.name === '其他') {
chItem.showInput = true
}
}
return chItem
})
})
// }
// console.warn('listOptionData[2]-----',this.state.listOptionData[2])
}
// 关闭弹窗
handleCloseModal(show) {
this.setState({
showTypePop: show
})
}
// 修改当前选择器数据
changeCurrentOption() {
let { listOptionData, currentTitle, localCustomersOption } = this.state
let { quickOrderOption } = this.props
console.warn('当前:--quickOrderOption---', quickOrderOption)
let tempOption = []
if (currentTitle === '组织') {
tempOption = this.changeNameAndValue(quickOrderOption, 'org_name', 'org_code')
} else if (currentTitle === '手术医院') {
// tempOption =[
// {
// customer_name: '医院-4',
// customer_code: 'customer_4'
// },
// {
// customer_name: '医院-5',
// customer_code: 'customer_5'
// },
// {
// customer_name: '医院-6',
// customer_code: 'customer_6'
// }
// ]
this.setState({
localCustomersOption: quickOrderOption
})
let currentArr = []
if( quickOrderOption.length ) {
let obj = {}
quickOrderOption.forEach((item, index) => {
if(!obj.customer_code) {
obj.customer_code = item.customer_code
obj.customer_name = item.customer_name
currentArr.push(obj)
} else if(obj.customer_code && item.customer_code !== obj.customer_code) {
obj.customer_code = item.customer_code
obj.customer_name = item.customer_name
currentArr.push(obj)
}
})
}
console.log('---currentArr----', currentArr)
tempOption = this.changeNameAndValue(currentArr, 'customer_name', 'customer_code')
} else if (currentTitle === '收单地点') {
tempOption =[
{
bill_to_site_name: '收单地点-4',
bill_to_site_code: 'bill_4'
},
{
bill_to_site_name: '收单地点-5',
bill_to_site_code: 'bill_5'
},
{
bill_to_site_name: '收单地点-6',
bill_to_site_code: 'bill_6'
}
]
tempOption = this.changeNameAndValue(tempOption, 'bill_to_site_name', 'bill_to_site_code')
} else if (currentTitle === '收货地点') {
tempOption =[
{
ship_to_site_name: '收货地点-4',
ship_to_site_code: 'ship_4'
},
{
ship_to_site_name: '收货地点-5',
ship_to_site_code: 'ship_5'
},
{
ship_to_site_name: '收货地点-6',
ship_to_site_code: 'ship_6'
}
]
tempOption = this.changeNameAndValue(tempOption, 'ship_to_site_name', 'ship_to_site_code')
} else if (currentTitle === '主治医生') {
tempOption =[
{
doctor_name: '主治医生-4',
doctor_code: 'doctor_4'
},
{
doctor_name: '主治医生-5',
doctor_code: 'doctor_5'
},
{
doctor_name: '主治医生-6',
doctor_code: 'doctor_6'
}
]
tempOption.push({
doctor_name: '其他',
doctor_code: '-1'
})
tempOption = this.changeNameAndValue(tempOption, 'doctor_name', 'doctor_code')
} else if (currentTitle === '手术类型') {
tempOption =[
{
surgery_type_name: '手术类型-4',
surgery_type_code: 'surgery_4'
},
{
surgery_type_name: '手术类型-5',
surgery_type_code: 'surgery_5'
},
{
surgery_type_name: '手术类型-6',
surgery_type_code: 'surgery_6'
}
]
tempOption = this.changeNameAndValue(tempOption, 'surgery_type_name', 'surgery_type_code')
} else if (currentTitle === '订单类型') {
tempOption =[
{
order_type_name: '订单类型-4',
order_type_code: 'order_4'
},
{
order_type_name: '订单类型-5',
order_type_code: 'order_5'
},
{
order_type_name: '订单类型-6',
order_type_code: 'order_6'
}
]
tempOption = this.changeNameAndValue(tempOption, 'order_type_name', 'order_type_code')
}
this.setState({
showTypePop: true,
listCurrentOption: [...tempOption]
})
}
// 修改选择器为属性 name 和 value
changeNameAndValue(data, nameType, valueType) {
let result = []
data.forEach(item => {
let obj = {}
obj.name = item[nameType],
obj.value = item[valueType]
result.push(obj)
})
return result
}
// 组织 点击
handleOrganizationCheck() {
console.warn('组织------check')
let { state, props } = this
this.setState({
currentTitle: '组织',
currentItem: {
name: state.listOptionData[1].name,
value: state.listOptionData[1].value
}
}, () => {
let params = {
access_token: props.token
}
props.requestQuickOrganizations(params)
})
}
// 手术医院 点击
handleCustomerCheck() {
console.warn('手术医院------check')
let { state, props } = this
this.setState({
currentTitle: '手术医院',
currentItem: {
name: state.listOptionData[2].name,
value: state.listOptionData[2].value
}
}, () => {
// 在此修改接口
let params = {
access_token: props.token,
org_code: state.listOptionData[1].value,
seller_code: props.userInfo.user_name
}
console.log('-----params---', params)
props.requestQuickSurgeryHospital(params)
})
}
// 收单地点 点击
handleBillCheck() {
console.warn('收单地点------check')
let { localCustomersOption, listOptionData } = this.state
let self = this
this.setState({
currentTitle: '收单地点',
currentItem: {
name: listOptionData[3].name,
value: listOptionData[3].value
}
}, () => {
let tempOption = []
if( localCustomersOption.length ) {
localCustomersOption.forEach((item, index) => {
if(item.customer_code === listOptionData[2].value) {
// 保证是当前手术医院下的地点
let obj = {}
obj.value = item.bill_to_site_code
obj.name = item.bill_to_site_name
tempOption.push(obj)
}
})
}
tempOption = dedupQuoteArray(tempOption, 'name')
console.log('---tempOption========?????-', tempOption)
self.setState({
showTypePop: true,
listCurrentOption: [...tempOption]
})
})
}
// 收货地点 点击
handleShipCheck() {
console.warn('收货地点------check')
let { localCustomersOption, listOptionData } = this.state
let self = this
this.setState({
currentTitle: '收货地点',
currentItem: {
name: listOptionData[4].name,
value: listOptionData[4].value
}
}, () => {
let tempOption = []
if( localCustomersOption.length ) {
localCustomersOption.forEach((item, index) => {
if(item.customer_code === listOptionData[2].value) {
// 保证是当前手术医院下的地点
let obj = {}
obj.value = item.ship_to_site_code
obj.name = item.ship_to_site_name
tempOption.push(obj)
}
})
}
tempOption = dedupQuoteArray(tempOption, 'name')
console.log('---tempOption========?????-', tempOption)
self.setState({
showTypePop: true,
listCurrentOption: [...tempOption]
})
})
}
// 主治医生 点击/输入
handleDoctorCheck(text) {
console.warn('主治医生------check', text)
let { localCustomersOption, listOptionData } = this.state
let self = this
this.setState({
currentTitle: '主治医生',
currentItem: {
name: listOptionData[5].name,
value: listOptionData[5].value
}
}, () => {
let tempOption = []
if( localCustomersOption.length ) {
localCustomersOption.forEach((item, index) => {
if(item.customer_code === listOptionData[2].value) {
// 保证是当前手术医院下的医生
let obj = {}
obj.value = item.customer_doctor
obj.name = item.customer_doctor
// console.log('tempOption!!!+=========', tempOption)
tempOption.push(obj)
}
})
}
tempOption = dedupQuoteArray(tempOption, 'name')
console.log('---tempOption========?????-', tempOption)
self.setState({
showTypePop: true,
listCurrentOption: [...tempOption]
})
})
}
// 手术类型 点击
handleSurTypeCheck() {
console.warn('手术类型------check')
}
// 配台模版 点击
handleMatchTempCheck() {
console.warn('配台模版------check')
}
// 手术类时间 点击 2020-04-23 17:41
handleSurDateCheck() {
console.warn('手术类时间 点击 ===')
}
// 关闭日期选择器
closeDateModal(show) {
}
// 修改当前日期数据
dateModalCallback(date) {
console.warn('callback',date)
}
// 订单类型 点击
handleOrderCheck() {
console.warn('订单类型------check')
}
// 备注 输入
handleRemarkInput(text) {
console.warn('备注---',text)
}
// 生成订单 点击
handleSubmit() {
}
// 返回备注以上的元素
renderListItem() {
let { listOptionData, dateModelPop } = this.state
let {userInfo:{ person_name }} = this.props
if(!isEmpty(person_name)) {
// this.setState({
// listOptionData: listOptionData.map(item => {
// if(item.title === '销售员') {
// item.name = person_name
// item.value = person_name
// }
// return item
// })
// })
}
return(
<View style={styles.list_cont}>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={1}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'销售员'}</TitleTextStyle>
<ContInputTextStyle editable={false} defaultValue={listOptionData[0].value}></ContInputTextStyle>
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleOrganizationCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'组织'}</TitleTextStyle>
<ContTextStyle>{listOptionData[1].name} -- {listOptionData[1].value}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleCustomerCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'手术医院'}</TitleTextStyle>
<ContTextStyle>{listOptionData[2].name} -- {listOptionData[2].value}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleBillCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'收单地点'}</TitleTextStyle>
<ContTextStyle>{listOptionData[3].name} -- {listOptionData[3].value}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleShipCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'收货地点'}</TitleTextStyle>
<ContTextStyle>{listOptionData[4].name} -- {listOptionData[4].value}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleDoctorCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'主治医生'}</TitleTextStyle>
<ContTextStyle>{listOptionData[5].name} -- {listOptionData[5].value}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
{
listOptionData[5].showInput ?
<CellTextStyle>
<ContInputTextStyle
style={styles.cell_input}
placeholder={`请输入主治医生`}
onChangeText={(text) => this.handleDoctorCheck(text)}
></ContInputTextStyle>
</CellTextStyle> : null
}
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleSurTypeCheck()}
>
<CellTextStyle>
{/* <AsteriskTextStyle>*</AsteriskTextStyle> */}
<TitleTextStyle>{'手术类型'}</TitleTextStyle>
<ContTextStyle>{listOptionData[6].name} -- {listOptionData[6].value}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleMatchTempCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'配台模版'}</TitleTextStyle>
<ContTextStyle>{listOptionData[7].name} -- {listOptionData[7].value}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleSurDateCheck()}
>
<CellTextStyle>
<TitleTextStyle>{'手术类时间'}</TitleTextStyle>
<ContTextStyle>{listOptionData[8].name} -- {listOptionData[8].value}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
<DateModel
date={listOptionData[8].dateValue}
closeModal={(show) => this.closeDateModal(show)}
show={dateModelPop}
callback={(date) => this.dateModalCallback(date)}
/>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleOrderCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'订单类型'}</TitleTextStyle>
<ContTextStyle>{listOptionData[9].name} -- {listOptionData[9].value}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
{ this.renderPickerModel() }
</View>
)
}
// 返回右侧箭头
renderRightArrowItem() {
return (
<ImageTextStyle>
<Image source={require('../../images/arr_rig.png')} style={icon_style}/>
</ImageTextStyle>
)
}
// 返回选择器弹窗
renderPickerModel() {
let {
listCurrentOption,
currentItem,
currentTitle,
showTypePop,
} = this.state
// console.warn('弹窗-----,', listCurrentOption)
return (
<SafeAreaView style={styles.item_container}>
<DialogModel
// entityList={typeArr}
// callback={(i) => {
// this.setState({
// type: i,
// typeName: typeArr[i],
// })
// }}
// itemIndex={this.state.type}
entityList={listCurrentOption}
callback={(item, itemTitle) => this.handleCallBack(item, itemTitle)}
show={showTypePop}
itemValue={currentItem.value}
itemTitle={currentTitle}
closeModal={(show) => this.handleCloseModal(show)}
/>
</SafeAreaView>
)
}
// 返回备注元素
renderRemarksItem() {
return (
<CellTextStyle style={styles.remark_item}>
<View style={styles.rema_box}>
<Text style={styles.rema_tit}>备注</Text>
<View style = {styles.rema_Input_outer} >
<TouchableOpacity activeOpacity = {1} style = {styles.rema_Input_inner} onPress = {() => this.TextInput.focus()} >
<TextInput
placeholder = {'请输入备注信息'}
placeholderTextColor = {placehold_text_color}
underlineColorAndroid = {'transparent'}
multiline = {true}
ref = {textInput => this.TextInput = textInput}
numberOfLines = {8}
style={styles.rema_Input}
maxLength={140}
onChangeText={(text) => this.handleRemarkInput(text)}
/>
</TouchableOpacity>
</View>
</View>
</CellTextStyle>
)
}
// 返回录音元素
renderRecordingItem() {
let { recording, pause, stop, currentTime } = this.state
return (
<CellTextStyle style={styles.reco_item}>
<View style={styles.reco_btn_cont}>
<Text style={styles.reco_btn_tit}>还有什么要安排的,可录音备注哟!</Text>
{
!stop ?
<View style={styles.reco_btn_inner}>
<TouchableOpacity
activeOpacity = {.8}
style={styles.reco_btn_box}
onLongPress={this._record}
onPressOut={this._stop}
>
<View style={styles.reco_img_box}>
<Image source={require('../../images/record_icon.png')} style={icon_style}/>
</View>
<Text style={styles.reco_btn_text}>长按录音</Text>
</TouchableOpacity>
{/* <Text style={styles.reco_text} onPress={this._record}> Record(开始录音) </Text>
<Text style={styles.reco_text} onPress={this._pause}> Pause(暂停录音) </Text>
<Text style={styles.reco_text} onPress={this._resume}> Resume(恢复录音) </Text>
<Text style={styles.reco_text} onPress={this._stop}> Stop(停止录音) </Text>
<Text style={styles.reco_text} onPress={this._play}> Play(播放录音) </Text>
<Text style={styles.reco_text} onPress={this._del}> Del(删除录音) </Text>
<Text style={styles.reco_text}>
{
recording ? '正在录音' :
pause ? '已暂停' : '未开始'
}
</Text>
<Text style={styles.reco_text}>时长: {currentTime}</Text> */}
</View>
: <View style={styles.reco_play_box}>
<View style={styles.play_tit}>
<Text style={styles.play_text}>时长: {currentTime} </Text>
<Text style={styles.play_text}>正在播放</Text>
</View>
<View style={styles.play_btn}>
<TouchableOpacity
activeOpacity = {.8}
style={styles.reco_list_box}
onPress={this._play}
>
<Text style={styles.reco_text}> 播放 </Text>
</TouchableOpacity>
{/* <TouchableOpacity
activeOpacity = {.8}
style={styles.reco_list_box}
onPress={this._stopPlay}
>
<Text style={styles.reco_text}> 停止 </Text>
</TouchableOpacity> */}
<TouchableOpacity
activeOpacity = {.8}
style={styles.reco_list_box}
onPress={this._del}
>
<Text style={styles.reco_text}> 删除 </Text>
</TouchableOpacity>
</View>
</View>
}
</View>
</CellTextStyle>
)
}
// 返回正在加载中
renderLodingItem() {
let { lodingTitle, isSubLoding } = this.state
return(
<LodingModel title={lodingTitle} show={isSubLoding} style_back={styles.loding_back} />
)
}
render() {
let {canSubFlag} = this.state
let {navigation} = this.props
let {title} = navigation.state.params
return (
<View style={styles.quick_container}>
<StatusBarView
isReactStackNavigator={true}
backgroundColor={promary_color}
barStyle = 'light-content'
/>
<SafeAreaView style={safe_view}>
<HeadBackItem title={title} navigation={navigation} />
<ScrollView
style={styles.quick_main}
showsVerticalScrollIndicator={false}
>
{this.renderListItem()}
{this.renderRemarksItem()}
{this.renderRecordingItem()}
</ScrollView>
<FooterBtnStyle
style={canSubFlag ? styles.sub_btn_pro : ''}
activeOpacity={canSubFlag ? .8 : 1}
title={'生成订单'}
textStyle= {styles.sub_btn}
onPress={() => this.handleSubmit()}
/>
{ this.renderLodingItem() }
</SafeAreaView>
</View>
);
}
}
const styles = StyleSheet.create({
quick_container : {
flex: 1,
backgroundColor: home_background_color
},
quick_main : {
padding: 14
},
remark_item: {
minHeight: 80,
height: 'auto'
},
rema_box: {
paddingVertical: 16
},
rema_tit: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
// fontWeight: 'bold'
},
rema_Input_outer: {
height: 120,
alignItems: 'center',
// paddingHorizontal: 15,
paddingBottom: 0
},
rema_Input_inner: {
paddingTop: 10,
height: 105,
width: Width() - 38,
// borderWidth: 1,
// borderColor: '#eeeeee'
},
rema_Input: {
paddingVertical: 0,
maxHeight: 105,
fontSize: second_text_size,
textAlign:'left',
textAlignVertical:'top',
alignSelf:'flex-start',
justifyContent:'flex-start',
alignItems:'flex-start',
fontFamily: font_family_regular
},
list_cont: {
flex: 1
},
item_container: {
flex: 1
},
reco_item: {
height: 160,
// height: 340,
marginBottom: 42
},
reco_btn_cont: {
paddingVertical: 20
},
reco_btn_tit: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
},
reco_btn_inner: {
flex: 1,
width: Width() - 38,
// justifyContent: 'flex-end',
alignItems: 'center',
paddingTop: 30
},
reco_btn_box: {
backgroundColor: '#EEECEC',
borderRadius: 30,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexDirection: 'row',
height: 50,
width: pxSize(152)
},
reco_img_box: {
width: pxSize(20),
height: pxSize(22)
},
// reco_img: {
// width: '100%',
// height: '100%'
// },
reco_text: {
fontSize: 14,
marginVertical: 10
},
reco_btn_text: {
fontSize: second_text_size,
color: first_text_color,
marginLeft: 6,
fontFamily: font_family_regular
},
reco_play_box: {
flex: 1,
width: Width() - 68,
// justifyContent: 'flex-end',
// alignItems: 'center'
},
play_tit:{
flexDirection: 'row',
justifyContent: 'space-around',
alignItems: 'center',
height: 60
},
play_text: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
},
play_btn:{
flexDirection: 'row',
justifyContent: 'space-around',
alignItems: 'center',
// height: 80
},
reco_list_box:{
backgroundColor: '#EEECEC',
borderRadius: 30,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexDirection: 'row',
height: 34,
width: pxSize(100)
},
reco_text: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
},
sub_btn_pro: {
backgroundColor: promary_color
},
sub_btn: {},
cell_input: {
textAlign: 'left'
},
loding_back: {
backgroundColor: 'rgba(0, 0, 0, 0)'
}
})
const mapStateToProps = (state) => {
return {
userInfo: state.login.userInfo,
token: state.login.token,
quick_list_status: state.quick.quick_list_status,
submit_quick_order_status: state.quick.submit_quick_order_status,
quickOrderOption: state.quick.quickOrderOption
}
}
const mapDispatchToProps = (dispatch) => {
return {
requestQuickOrganizations: (params) => {
dispatch(requestQuickOrganizations(params))
},
requestQuickSurgeryHospital: (params) => {
dispatch(requestQuickSurgeryHospital(params))
}
}
}
export default connect(mapStateToProps, mapDispatchToProps)(EquipConsuPage);
\ No newline at end of file
import React, { Component } from 'react';
import {
View,
Text,
SafeAreaView,
StyleSheet,
TouchableOpacity,
Image,
ScrollView,
TextInput,
FlatList
} from 'react-native';
import {connect} from 'react-redux';
import {
second_text_size,
home_background_color,
dis_sub_color,
placehold_text_color,
Width,
first_text_color,
pxSize,
promary_color,
safe_view,
icon_style,
font_family_regular
} from '../../base/BaseStyle';
import {
AsteriskTextStyle,
TitleTextStyle,
ContTextStyle,
ImageTextStyle,
CellTextStyle,
ContInputTextStyle,
FooterBtnStyle
} from '../common/CellTextStyle';
import ItemCellModel from '../common/ItemCellModel';
import tagData from './module/listTagData';
import { show, isEmpty, formatStrForDate, changeDateFormat } from '../../utils/Utils';
import HeadBackItem from '../common/HeadBackItem';
import StatusBarView from '../common/StatusBarView';
import { requestOrganizations } from '../../action/SelfAction';
import { SELF_ORDER_LIST_DOING, SELF_ORDER_LIST_SUCCESS, SELF_ORDER_LIST_FAILURE } from '../../base/ActionTypes';
import DialogModel from '../common/DialogModel';
import LodingModel from '../common/LodingModel';
import DateModel from '../common/DateModel';
import DatePicker from 'react-native-date-picker';
import { AudioRecorder, AudioUtils } from 'react-native-audio';
import Sound from 'react-native-sound';
class SelfOrderPage extends Component {
constructor(props) {
super(props);
this.state = {
canSubFlag: true, // 生成订单按钮样式改变
listOptionData: [ // 备注以上的元素
{
"id": "0",
title: '销售员',
name: '蔡妍',
value: '蔡妍',
isPicker: false,
select: false,
isEditable: false // 不可编辑
},
{
"id": "1",
title: '组织',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "2",
title: '手术医院',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "3",
title: '收单地点',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "4",
title: '收货地点',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "5",
title: '主治医生',
name: '请选择',
value: '',
isPicker: true,
select: false,
showInput: false,
inputValue: ''
},
{
"id": "6",
title: '手术名称',
value: '',
isPicker: false,
select: false
},
{
"id": "7",
title: '手术类时间',
name: '请选择',
value: '',
dateValue: new Date(),
isPicker: true,
select: false,
showDatePicker: true
},
{
"id": "8",
title: '手术类型',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "9",
title: '订单类型',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "10",
title: '选择产品',
name: '请选择',
value: '',
isPicker: true,
select: false,
showItemPage: true // 展示子页
},
{
"id": "11",
title: '备注',
value: '',
isPicker: false,
select: false,
isRemark: true // 备注
},
{
"id": "12",
title: '还有什么要安排的,可录音备注哟!',
value: '',
isPicker: false,
select: false,
isRecode: true // 录音
}
],
submitOption: { // 提交的信息
seller_code: '', // 用户名username
org_code: '', // 组织
customer_code: '', // 手术医院
bill_to_site_code: '', // 收单地点
ship_to_site_code: '', // 收货地点
doctor_name: '', // 主治医生
surgery_name: '', // 手术名称
surgery_date: '', // 手术时间
surgery_type_code: '', // 手术类型
order_type_code: '', // 订单类型
surgery_desc: '', // 备注信息
file_path: '', // 录音地址
},
currentItem: {
name: '请选择',
value: '-1'
},
currentTitle: '组织', // 当前点击项
showTypePop: false, // 选择器弹窗
isSubLoding: false, // 加载中弹窗
lodingTitle: '加载中',
listCurrentOption: [ // 当前选择器数据
{
name: '男',
value: 'boy'
},
{
name: '女',
value: 'girl'
},
{
name: '其他',
value: 'other'
},
{
name: '其他1',
value: 'other1'
},
{
name: '其他2',
value: 'other2'
},
{
name: '其他3',
value: 'other3'
},
{
name: '其他4',
value: 'other4'
},
{
name: '其他5',
value: 'other5'
},
{
name: '其他6',
value: 'other6'
}
],
dateModelPop: false, // 日期选择器
hasPermission: undefined, //录音 授权状态
audioPath: AudioUtils.DocumentDirectoryPath + '/selfAudio.aac', // 文件路径
recording: false, //是否录音
pause: false, //录音是否暂停
stop: false, //录音是否停止
currentTime: 0, //录音时长
}
}
componentDidMount() {
// 请求授权
AudioRecorder.requestAuthorization()
.then(isAuthor => {
console.warn('是否授权: ' + isAuthor)
if(!isAuthor) {
return alert('请前往设置开启录音权限')
}
this.setState({hasPermission: isAuthor})
this.prepareRecordingPath(this.state.audioPath);
// 录音进展
AudioRecorder.onProgress = (data) => {
this.setState({currentTime: Math.floor(data.currentTime)});
};
// 完成录音
AudioRecorder.onFinished = (data) => {
// data 返回需要上传到后台的录音数据
console.warn(this.state.currentTime)
console.warn(data)
};
})
}
/**
* AudioRecorder.prepareRecordingAtPath(path,option)
* 录制路径
* path 路径
* option 参数
*/
prepareRecordingPath = (path) => {
const option = {
SampleRate: 44100.0, //采样率
Channels: 2, //通道
AudioQuality: 'High', //音质
AudioEncoding: 'aac', //音频编码
OutputFormat: 'mpeg_4', //输出格式
MeteringEnabled: false, //是否计量
MeasurementMode: false, //测量模式
AudioEncodingBitRate: 32000, //音频编码比特率
IncludeBase64: true, //是否是base64格式
AudioSource: 0, //音频源
}
AudioRecorder.prepareRecordingAtPath(path,option)
}
// 开始录音
_record = async () => {
console.warn('changan')
show('录音开始')
if(!this.state.hasPermission) {
return alert('没有授权')
}
if(this.state.recording) {
return alert('正在录音中...')
}
if(this.state.stop) {
// 初始化录音
this.prepareRecordingPath(this.state.audioPath)
}
this.setState({recording: true,pause: false})
try {
await AudioRecorder.startRecording()
} catch (err) {
console.log(err)
}
}
// 暂停录音
_pause = async () => {
if(!this.state.recording) {
return alert('当前未录音')
}
try {
await AudioRecorder.pauseRecording()
this.setState({pause: true, recording: false})
} catch (err) {
console.log(err)
}
}
// 恢复录音
_resume = async () => {
if(!this.state.pause) {
return alert('录音未暂停')
}
try {
await AudioRecorder.resumeRecording();
this.setState({pause: false, recording: true})
} catch (err) {
console.log(err)
}
}
// 停止录音
_stop = async () => {
console.warn('tanqi')
show('录音结束')
console.warn('停止录音',this.state.currentTime)
try {
await AudioRecorder.stopRecording();
this.setState({stop: true, recording: false, paused: false});
} catch (error) {
console.error(error);
}
}
// 播放录音
_play = async () => {
let self = this
self.whoosh = new Sound(this.state.audioPath, '', (err) => {
if(err) {
show('加载音频失败')
return console.warn(err)
}
self.whoosh.play(success => {
if(success) {
console.warn('success - 播放成功')
}else {
console.warn('fail - 播放失败')
show('播放失败')
}
})
})
}
// 停止播放录音 -- 安卓不能停止、ios可以
_stopPlay = async () => {
console.warn('tingzhi bofang')
let self = this
self.whoosh.stop(() => {
console.warn('success - 停止成功')
})
}
// 删除录音
_del = async () => {
// 初始化录音
this.prepareRecordingPath(this.state.audioPath)
this.setState({
currentTime: 0,
stop: false
})
}
// static getDerivedStateFromProps(newProps, prevState) {
// console.log('--prevState-----', newProps.selfOrderOption)
// console.log('--prevState-----', newProps.self_list_status)
// console.log('-prevState------', prevState.self_list_status)
// }
// componentDidUpdate(prevProps, prevState) {
// console.log('--componentDidUpdate-----', prevProps.selfOrderOption)
// console.log('--componentDidUpdate-----', prevProps.self_list_status)
// console.log('this.props-------', this.props.self_list_status)
// console.log('-componentDidUpdate------', prevState.self_list_status)
// }
componentWillReceiveProps(nextProps) {
let { self_list_status} = this.props
let self = this
if(self_list_status != nextProps.self_list_status) {
// console.warn('-222------', nextProps.self_list_status)
// console.warn('--222---self_list_status--', self_list_status)
switch (nextProps.self_list_status) {
case SELF_ORDER_LIST_DOING:
this.changeSubLoding(true)
break;
case SELF_ORDER_LIST_SUCCESS:
self.changeSubLoding()
setTimeout(() => {
self.changeCurrentOption()
}, 500)
break;
case SELF_ORDER_LIST_FAILURE:
this.changeSubLoding()
break;
}
}
}
// 修改正在加载
changeSubLoding(loading) {
this.setState({
isSubLoding: loading || false
})
}
// 选择器弹窗回调函数
handleCallBack(item, itemTitle) {
// console.warn(item, 'item------')
// console.warn('item-itemTitle-----',itemTitle)
let { listOptionData } = this.state
this.setState({
currentItem: item,
})
// if(itemTitle === '组织' || itemTitle === '手术医院') {
this.setState({
listOptionData: listOptionData.map((chItem, index) => {
if(chItem.title === itemTitle) {
console.warn('---hhh-----', item)
chItem.name = item.name
chItem.value = item.value
if (itemTitle === '主治医生' && item.name === '其他') {
chItem.showInput = true
}
}
return chItem
})
})
// }
// console.warn('listOptionData[2]-----',this.state.listOptionData[2])
}
// 关闭弹窗
handleCloseModal(show) {
this.setState({
showTypePop: show
})
}
// 修改当前选择器数据
changeCurrentOption() {
let { listOptionData, currentTitle } = this.state
let { selfOrderOption } = this.props
console.warn('当前:--selfOrderOption---', selfOrderOption)
let tempOption = []
if (currentTitle === '组织') {
tempOption = this.changeNameAndValue(selfOrderOption, 'org_name', 'org_code')
} else if (currentTitle === '手术医院') {
tempOption =[
{
customer_name: '医院-4',
customer_code: 'customer_4'
},
{
customer_name: '医院-5',
customer_code: 'customer_5'
},
{
customer_name: '医院-6',
customer_code: 'customer_6'
}
]
tempOption = this.changeNameAndValue(tempOption, 'customer_name', 'customer_code')
} else if (currentTitle === '收单地点') {
tempOption =[
{
bill_to_site_name: '收单地点-4',
bill_to_site_code: 'bill_4'
},
{
bill_to_site_name: '收单地点-5',
bill_to_site_code: 'bill_5'
},
{
bill_to_site_name: '收单地点-6',
bill_to_site_code: 'bill_6'
}
]
tempOption = this.changeNameAndValue(tempOption, 'bill_to_site_name', 'bill_to_site_code')
} else if (currentTitle === '收货地点') {
tempOption =[
{
ship_to_site_name: '收货地点-4',
ship_to_site_code: 'ship_4'
},
{
ship_to_site_name: '收货地点-5',
ship_to_site_code: 'ship_5'
},
{
ship_to_site_name: '收货地点-6',
ship_to_site_code: 'ship_6'
}
]
tempOption = this.changeNameAndValue(tempOption, 'ship_to_site_name', 'ship_to_site_code')
} else if (currentTitle === '主治医生') {
tempOption =[
{
doctor_name: '主治医生-4',
doctor_code: 'doctor_4'
},
{
doctor_name: '主治医生-5',
doctor_code: 'doctor_5'
},
{
doctor_name: '主治医生-6',
doctor_code: 'doctor_6'
}
]
tempOption.push({
doctor_name: '其他',
doctor_code: '-1'
})
tempOption = this.changeNameAndValue(tempOption, 'doctor_name', 'doctor_code')
} else if (currentTitle === '手术类型') {
tempOption =[
{
surgery_type_name: '手术类型-4',
surgery_type_code: 'surgery_4'
},
{
surgery_type_name: '手术类型-5',
surgery_type_code: 'surgery_5'
},
{
surgery_type_name: '手术类型-6',
surgery_type_code: 'surgery_6'
}
]
tempOption = this.changeNameAndValue(tempOption, 'surgery_type_name', 'surgery_type_code')
} else if (currentTitle === '订单类型') {
tempOption =[
{
order_type_name: '订单类型-4',
order_type_code: 'order_4'
},
{
order_type_name: '订单类型-5',
order_type_code: 'order_5'
},
{
order_type_name: '订单类型-6',
order_type_code: 'order_6'
}
]
tempOption = this.changeNameAndValue(tempOption, 'order_type_name', 'order_type_code')
}
this.setState({
showTypePop: true,
listCurrentOption: [...tempOption]
})
}
// 修改选择器为属性 name 和 value
changeNameAndValue(data, nameType, valueType) {
let result = []
data.forEach(item => {
let obj = {}
obj.name = item[nameType],
obj.value = item[valueType]
result.push(obj)
})
return result
}
// 组织 点击
handleOrganizationCheck() {
let { listOptionData } = this.state
let { token, requestOrganizations } = this.props
console.warn('组织------check', token, requestOrganizations)
let self = this
this.setState({
currentTitle: '组织',
currentItem: {
name: listOptionData[1].name,
value: listOptionData[1].value
}
}, () => {
requestOrganizations(token)
})
// this.setState({
// isSubLoding: true
// }, () => {
// setTimeout(() => {
// self.setState({
// currentTitle: '组织',
// showTypePop: true,
// currentItem: {
// name: listOptionData[1].name,
// value: listOptionData[1].value
// },
// listCurrentOption: [
// {
// name: '男',
// value: 'boy'
// },
// {
// name: '女',
// value: 'girl'
// },
// {
// name: '其他',
// value: 'other'
// }
// ],
// isSubLoding: false
// })
// }, 2000)
// })
}
// 手术医院 点击
handleCustomerCheck() {
let { listOptionData } = this.state
let { token, requestOrganizations } = this.props
console.warn('手术医院------check', token, requestOrganizations)
let self = this
this.setState({
currentTitle: '手术医院',
currentItem: {
name: listOptionData[2].name,
value: listOptionData[2].value
}
}, () => {
// 在此修改接口
requestOrganizations(token)
})
}
// 收单地点 点击
handleBillCheck() {
let { listOptionData } = this.state
let { token, requestOrganizations } = this.props
console.warn('收单地点------check', token, requestOrganizations)
let self = this
this.setState({
currentTitle: '收单地点',
currentItem: {
name: listOptionData[3].name,
value: listOptionData[3].value
}
}, () => {
// 在此修改接口
requestOrganizations(token)
})
}
// 收货地点 点击
handleShipCheck() {
let { listOptionData } = this.state
let { token, requestOrganizations } = this.props
console.warn('收货地点------check', token, requestOrganizations)
let self = this
this.setState({
currentTitle: '收货地点',
currentItem: {
name: listOptionData[4].name,
value: listOptionData[4].value
}
}, () => {
// 在此修改接口
requestOrganizations(token)
})
}
// 主治医生 点击/输入
handleDoctorCheck(text) {
let { listOptionData } = this.state
let { token, requestOrganizations } = this.props
console.warn('主治医生------check', token, requestOrganizations)
let self = this
if(text) {
// 输入
this.setState({
listOptionData: listOptionData.map(item => {
if(item.title === '主治医生') {
item.inputValue = text
}
return item
})
})
} else {
// 点击
this.setState({
currentTitle: '主治医生',
currentItem: {
name: listOptionData[5].name,
value: listOptionData[5].value
}
}, () => {
// 在此修改接口
requestOrganizations(token)
})
}
console.warn('主治医生------check',listOptionData[5])
}
// 手术名称 输入
handleSurNameInput(text) {
console.warn('手术名称---',text)
let { listOptionData } = this.state
this.setState({
listOptionData: listOptionData.map(item => {
if(item.title === '手术名称') {
item.value = text
}
return item
})
})
// console.warn('手术名称---',listOptionData[6])
}
// 手术类时间 点击 2020-04-23 17:41
handleSurDateCheck() {
console.warn('手术类时间 点击 ===')
let { listOptionData } = this.state
let date = listOptionData[7].value
if(date) {
this.setState({
listOptionData: listOptionData.map((item, index) => {
if(item.title === '手术类时间') {
item.dateValue = formatStrForDate(date)
}
return item
})
})
// console.warn('!date----', listOptionData[7])
}
this.closeDateModal(true)
}
// 关闭日期选择器
closeDateModal(show) {
this.setState({
dateModelPop: show
})
}
// 修改当前日期数据
dateModalCallback(date) {
console.warn('callback',date)
let { listOptionData } = this.state
this.setState({
listOptionData: listOptionData.map((item, index) => {
if(item.title === '手术类时间') {
item.value = date
item.dateValue = formatStrForDate(date)
}
return item
})
})
// console.warn('-----', listOptionData[7])
}
// 手术类型 点击
handleSurTypeCheck() {
let { listOptionData } = this.state
let { token, requestOrganizations } = this.props
console.warn('手术类型------check', token, requestOrganizations)
let self = this
this.setState({
currentTitle: '手术类型',
currentItem: {
name: listOptionData[8].name,
value: listOptionData[8].value
}
}, () => {
// 在此修改接口
requestOrganizations(token)
})
}
// 订单类型 点击
handleOrderCheck() {
let { listOptionData } = this.state
let { token, requestOrganizations } = this.props
console.warn('订单类型------check', token, requestOrganizations)
let self = this
this.setState({
currentTitle: '订单类型',
currentItem: {
name: listOptionData[9].name,
value: listOptionData[9].value
}
}, () => {
// 在此修改接口
requestOrganizations(token)
})
}
// 选择产品 点击跳转
handleProductCheck() {
this.props.navigation.navigate('ChooseProductPage', {title: `自助下单 - 选择产品`})
}
// 备注 输入
handleRemarkInput(text) {
console.warn('备注---',text)
let { listOptionData } = this.state
this.setState({
listOptionData: listOptionData.map(item => {
if(item.title === '备注') {
item.value = text
}
return item
})
})
console.warn('备注---',listOptionData[11])
}
// 录音 长按
handleRecordLongCheck() {
console.warn('changan')
show('录音开始')
// this._record()
}
// 录音结束
handleRecordPressOut() {
console.warn('tanqi')
show('录音结束')
// this._stop
}
// 生成订单 点击
handleSubmit() {
console.warn('生成订单', this.props.navigation)
let { navigation } = this.props
let { state: { params: { title } } } = navigation
navigation.navigate('SubSuccessPage', { title: `${title} - 下单成功` })
}
// 返回备注以上的元素
renderListItem() {
// console.warn('!!===',tagData)
// console.warn('!!===',this.props.userInfo.person_name)
let { listOptionData, dateModelPop } = this.state
let {userInfo:{ person_name }, navigation} = this.props
if(!isEmpty(person_name)) {
tagData[0].value = person_name
// this.setState({
// listOptionData: listOptionData.map(item => {
// if(item.title === '销售员') {
// item.name = person_name
// item.value = person_name
// }
// return item
// })
// })
}
return(
<View style={styles.list_cont}>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={1}
// onPress={() => this.handleOpenDialog()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'销售员'}</TitleTextStyle>
<ContInputTextStyle editable={false} defaultValue={listOptionData[0].value}></ContInputTextStyle>
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleOrganizationCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'组织'}</TitleTextStyle>
<ContTextStyle>{listOptionData[1].name} -- {listOptionData[1].value}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleCustomerCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'手术医院'}</TitleTextStyle>
<ContTextStyle>{listOptionData[2].name} -- {listOptionData[2].value}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleBillCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'收单地点'}</TitleTextStyle>
<ContTextStyle>{listOptionData[3].name} -- {listOptionData[3].value}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleShipCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'收货地点'}</TitleTextStyle>
<ContTextStyle>{listOptionData[4].name} -- {listOptionData[4].value}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleDoctorCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'主治医生'}</TitleTextStyle>
<ContTextStyle>{listOptionData[5].name} -- {listOptionData[5].value}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
{
listOptionData[5].showInput ?
<CellTextStyle>
<ContInputTextStyle
style={styles.cell_input}
placeholder={`请输入主治医生`}
onChangeText={(text) => this.handleDoctorCheck(text)}
></ContInputTextStyle>
</CellTextStyle> : null
}
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={1}
// onPress={() => this.handleSurNameInput()}
>
<CellTextStyle>
<TitleTextStyle>{'手术名称'}</TitleTextStyle>
<ContInputTextStyle
placeholder={'请输入'}
defaultValue={listOptionData[6].value}
onChangeText={(text) => this.handleSurNameInput(text)}
></ContInputTextStyle>
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleSurDateCheck()}
>
<CellTextStyle>
<TitleTextStyle>{'手术类时间'}</TitleTextStyle>
<ContTextStyle>{listOptionData[7].name} -- {listOptionData[7].value}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
<DateModel
date={listOptionData[7].dateValue}
closeModal={(show) => this.closeDateModal(show)}
show={dateModelPop}
callback={(date) => this.dateModalCallback(date)}
/>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleSurTypeCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'手术类型'}</TitleTextStyle>
<ContTextStyle>{listOptionData[8].name} -- {listOptionData[8].value}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleOrderCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'订单类型'}</TitleTextStyle>
<ContTextStyle>{listOptionData[9].name} -- {listOptionData[9].value}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleProductCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'选择产品'}</TitleTextStyle>
<ContTextStyle>{listOptionData[10].name} -- {listOptionData[10].value}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
{ this.renderPickerModel() }
{/* {
tagData.map((item, index) => {
return <ItemCellModel item={item} navigation={navigation}></ItemCellModel>
})
} */}
</View>
)
}
// 返回右侧箭头
renderRightArrowItem() {
return (
<ImageTextStyle>
<Image source={require('../../images/arr_rig.png')} style={icon_style}/>
</ImageTextStyle>
)
}
// 返回选择器弹窗
renderPickerModel() {
let { listCurrentOption,
currentItem,
currentTitle,
showTypePop,
} = this.state
// console.warn('弹窗-----,', listCurrentOption)
return (
<SafeAreaView style={styles.item_container}>
<DialogModel
// entityList={typeArr}
// callback={(i) => {
// this.setState({
// type: i,
// typeName: typeArr[i],
// })
// }}
// itemIndex={this.state.type}
entityList={listCurrentOption}
callback={(item, itemTitle) => this.handleCallBack(item, itemTitle)}
show={showTypePop}
itemValue={currentItem.value}
itemTitle={currentTitle}
closeModal={(show) => this.handleCloseModal(show)}
/>
</SafeAreaView>
)
}
// 返回备注元素
renderRemarksItem() {
return (
<CellTextStyle style={styles.remark_item}>
<View style={styles.rema_box}>
<Text style={styles.rema_tit}>备注</Text>
<View style = {styles.rema_Input_outer} >
<TouchableOpacity activeOpacity = {1} style = {styles.rema_Input_inner} onPress = {() => this.TextInput.focus()} >
<TextInput
placeholder = {'请输入备注信息'}
placeholderTextColor = {placehold_text_color}
underlineColorAndroid = {'transparent'}
multiline = {true}
ref = {textInput => this.TextInput = textInput}
numberOfLines = {8}
style={styles.rema_Input}
maxLength={140}
onChangeText={(text) => this.handleRemarkInput(text)}
/>
</TouchableOpacity>
</View>
</View>
</CellTextStyle>
)
}
// 返回录音元素
renderRecordingItem() {
let { recording, pause, stop, currentTime } = this.state
return (
<CellTextStyle style={styles.reco_item}>
<View style={styles.reco_btn_cont}>
<Text style={styles.reco_btn_tit}>还有什么要安排的,可录音备注哟!</Text>
{
!stop ?
<View style={styles.reco_btn_inner}>
<TouchableOpacity
activeOpacity = {.8}
style={styles.reco_btn_box}
onLongPress={this._record}
onPressOut={this._stop}
>
<View style={styles.reco_img_box}>
<Image source={require('../../images/record_icon.png')} style={icon_style}/>
</View>
<Text style={styles.reco_btn_text}>长按录音</Text>
</TouchableOpacity>
{/* <Text style={styles.reco_text} onPress={this._record}> Record(开始录音) </Text>
<Text style={styles.reco_text} onPress={this._pause}> Pause(暂停录音) </Text>
<Text style={styles.reco_text} onPress={this._resume}> Resume(恢复录音) </Text>
<Text style={styles.reco_text} onPress={this._stop}> Stop(停止录音) </Text>
<Text style={styles.reco_text} onPress={this._play}> Play(播放录音) </Text>
<Text style={styles.reco_text} onPress={this._del}> Del(删除录音) </Text>
<Text style={styles.reco_text}>
{
recording ? '正在录音' :
pause ? '已暂停' : '未开始'
}
</Text>
<Text style={styles.reco_text}>时长: {currentTime}</Text> */}
</View>
: <View style={styles.reco_play_box}>
<View style={styles.play_tit}>
<Text style={styles.play_text}>时长: {currentTime} </Text>
<Text style={styles.play_text}>正在播放</Text>
</View>
<View style={styles.play_btn}>
<TouchableOpacity
activeOpacity = {.8}
style={styles.reco_list_box}
onPress={this._play}
>
<Text style={styles.reco_text}> 播放 </Text>
</TouchableOpacity>
{/* <TouchableOpacity
activeOpacity = {.8}
style={styles.reco_list_box}
onPress={this._stopPlay}
>
<Text style={styles.reco_text}> 停止 </Text>
</TouchableOpacity> */}
<TouchableOpacity
activeOpacity = {.8}
style={styles.reco_list_box}
onPress={this._del}
>
<Text style={styles.reco_text}> 删除 </Text>
</TouchableOpacity>
</View>
</View>
}
</View>
</CellTextStyle>
)
}
// 返回正在加载中
renderLodingItem() {
let { lodingTitle, isSubLoding } = this.state
return(
<LodingModel title={lodingTitle} show={isSubLoding} style_back={styles.loding_back} />
)
}
render() {
let {canSubFlag} = this.state
// console.warn(this.props)
let {navigation} = this.props
let {title} = navigation.state.params
return (
<View style={styles.self_container}>
<StatusBarView
isReactStackNavigator={true}
backgroundColor={promary_color}
barStyle = 'light-content'
/>
<SafeAreaView style={safe_view}>
<HeadBackItem title={title} navigation={navigation} />
<ScrollView
style={styles.self_main}
showsVerticalScrollIndicator={false}
>
{this.renderListItem()}
{this.renderRemarksItem()}
{this.renderRecordingItem()}
</ScrollView>
<FooterBtnStyle
style={canSubFlag ? styles.sub_btn_pro : ''}
activeOpacity={canSubFlag ? .8 : 1}
title={'生成订单'}
textStyle= {styles.sub_btn}
onPress={() => this.handleSubmit()}
/>
{ this.renderLodingItem() }
</SafeAreaView>
</View>
);
}
}
const styles = StyleSheet.create({
self_container : {
flex: 1,
backgroundColor: home_background_color
},
self_main : {
padding: 14
},
remark_item: {
minHeight: 80,
height: 'auto'
},
rema_box: {
paddingVertical: 16
},
rema_tit: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
// fontWeight: 'bold'
},
rema_Input_outer: {
height: 120,
alignItems: 'center',
// paddingHorizontal: 15,
paddingBottom: 0
},
rema_Input_inner: {
paddingTop: 10,
height: 105,
width: Width() - 38,
// borderWidth: 1,
// borderColor: '#eeeeee'
},
rema_Input: {
paddingVertical: 0,
maxHeight: 105,
fontSize: second_text_size,
textAlign:'left',
textAlignVertical:'top',
alignSelf:'flex-start',
justifyContent:'flex-start',
alignItems:'flex-start',
fontFamily: font_family_regular
},
reco_item: {
height: 160,
// height: 340,
marginBottom: 42
},
reco_btn_cont: {
paddingVertical: 20
},
reco_btn_tit: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
},
reco_btn_inner: {
flex: 1,
width: Width() - 38,
// justifyContent: 'flex-end',
alignItems: 'center',
paddingTop: 30
},
reco_btn_box: {
backgroundColor: '#EEECEC',
borderRadius: 30,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexDirection: 'row',
height: 50,
width: pxSize(152)
},
reco_img_box: {
width: pxSize(20),
height: pxSize(22)
},
// reco_img: {
// width: '100%',
// height: '100%'
// },
reco_text: {
fontSize: 14,
marginVertical: 10
},
reco_btn_text: {
fontSize: second_text_size,
color: first_text_color,
marginLeft: 6,
fontFamily: font_family_regular
},
reco_play_box: {
flex: 1,
width: Width() - 68,
// justifyContent: 'flex-end',
// alignItems: 'center'
},
play_tit:{
flexDirection: 'row',
justifyContent: 'space-around',
alignItems: 'center',
height: 60
},
play_text: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
},
play_btn:{
flexDirection: 'row',
justifyContent: 'space-around',
alignItems: 'center',
// height: 80
},
reco_list_box:{
backgroundColor: '#EEECEC',
borderRadius: 30,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexDirection: 'row',
height: 34,
width: pxSize(100)
},
reco_text: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
},
sub_btn_box: {
backgroundColor: dis_sub_color,
height: 52,
display: 'flex',
alignItems: 'center',
justifyContent: 'center'
},
sub_btn_pro: {
backgroundColor: promary_color
},
sub_btn: {
// color: title_text_color,
// fontSize: second_text_size
},
list_cont: {
flex: 1
},
item_container: {
flex: 1
},
cell_input: {
textAlign: 'left'
},
loding_back: {
backgroundColor: 'rgba(0, 0, 0, 0)'
}
})
const mapStateToProps = (state) => {
return {
userInfo: state.login.userInfo,
token: state.login.token,
self_list_status: state.self.self_list_status,
selfOrderOption: state.self.selfOrderOption
}
}
const mapDispatchToProps = (dispatch) => {
return {
requestOrganizations: (token) => {
dispatch(requestOrganizations(token))
}
}
}
export default connect(mapStateToProps, mapDispatchToProps)(SelfOrderPage);
\ No newline at end of file
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
TouchableOpacity,
Image,
TextInput,
ScrollView,
SafeAreaView
} from 'react-native';
import {connect} from 'react-redux';
import {
foundation_color,
second_text_size,
home_background_color,
dis_sub_color,
Width,
third_text_size,
first_text_color,
pxSize,
promary_color,
second_text_color,
third_text_color,
first_text_size,
safe_view,
font_family_semibold,
font_family_regular,
icon_style
} from '../../../base/BaseStyle';
import HeadBackItem from '../../common/HeadBackItem';
import { FooterBtnStyle } from '../../common/CellTextStyle';
import ProductRightStyle from './ProductRightStyle';
import ProductModel from '../../common/ProductModel';
import StatusBarView from '../../common/StatusBarView';
// import ScrollableTabView, { ScrollableTabBar } from 'react-native-scrollable-tab-view';
// import TopTabBar from './customTabbar/TopTabBar';
// import LeftTabBar from './customTabbar/LeftTabBar';
// import { leftOptionList } from './mock'
class ChooseProductPage extends Component {
constructor(props) {
super(props);
this.state = {
searchValue: '',
topActiveIndex: 0,
topProcOptionList: [
{
title: '嘉思特',
iconImg: require('../../../images/cp_test_1.png')
},
{
title: '嘉思特22',
iconImg: require('../../../images/cp_test_1.png')
},
{
title: '嘉思特33',
iconImg: require('../../../images/cp_test_1.png')
},
{
title: '嘉思特44',
iconImg: require('../../../images/cp_test_1.png')
},
{
title: '嘉思特55',
iconImg: require('../../../images/cp_test_1.png')
},
{
title: '嘉思特66',
iconImg: require('../../../images/cp_test_1.png')
},
{
title: '嘉思特77',
iconImg: require('../../../images/cp_test_1.png')
},
{
title: '嘉思特88',
iconImg: require('../../../images/cp_test_1.png')
}
],
leftActiveIndex: 0,
stencilData: [],
leftOptionList: [
{
title: '手术模版',
iconImg: require('../../../images/surg_temp.png'),
stencilData: [{
"id": "0",
title: '髋关节手术001--------',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "1",
title: '髋关节手术002',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "2",
title: '髋关节手术003',
tip1: '描述信息',
tip2: '描述信息',
select: true
},
{
"id": "3",
title: '髋关节手术004',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "4",
title: '髋关节手术005',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "5",
title: '髋关节手术006',
tip1: '描述信息',
tip2: '描述信息',
select: false
}
], // 模版数据
},
{
title: '螺钉盒',
iconImg: require('../../../images/screw_box.png'),
stencilData: [{
"id": "0",
title: '髋关节手术001--ldh',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "1",
title: '髋关节手术002',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "2",
title: '髋关节手术003',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "3",
title: '髋关节手术004',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "4",
title: '髋关节手术005',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "5",
title: '髋关节手术006',
tip1: '描述信息',
tip2: '描述信息',
select: false
}
], // 模版数据
},
{
title: '器械包',
iconImg: require('../../../images/equip_bag.png'),
stencilData: [{
"id": "0",
title: '髋关节手术001----qxb',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "1",
title: '髋关节手术002',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "2",
title: '髋关节手术003',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "3",
title: '髋关节手术004',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "4",
title: '髋关节手术005',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "5",
title: '髋关节手术006',
tip1: '描述信息',
tip2: '描述信息',
select: false
}
], // 模版数据
},
{
title: '辅助工具',
iconImg: require('../../../images/auxili_tool.png'),
stencilData: [{
"id": "0",
title: '髋关节手术001------fzgj',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "1",
title: '髋关节手术002',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "2",
title: '髋关节手术003',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "3",
title: '髋关节手术004',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "4",
title: '髋关节手术005',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "5",
title: '髋关节手术006',
tip1: '描述信息',
tip2: '描述信息',
select: false
}
], // 模版数据
},
{
title: '人工髋关节假体'
},
{
title: '膝关节假体备份'
},
{
title: '骨小梁髋关节假体'
},
{
title: '骨小梁髋关节假体22'
},
{
title: '骨小梁髋关节假体33'
},
{
title: '骨小梁髋关节假体44'
},
{
title: '骨小梁髋关节假体55'
},
], // 左侧数据 - 二级菜单
defaultThridShow: false, // 默认人体髋关节-小类不显示
selectShowPopup: false, // 共计已选弹窗
}
}
componentDidMount() {
// this.setState({
// leftOptionList: leftOptionList
// })
}
// 顶部产品点击
handleTopNav(item, index) {
console.warn('top产品--',item, index)
// let {topActiveIndex} = this.state
this.setState({
topActiveIndex: index
})
}
// 左侧标题点击
handleLeftNav(item, index) {
console.warn('手术模版--', index, item)
let {leftOptionList} = this.state
this.setState({
leftActiveIndex: index,
stencilData: leftOptionList[index].stencilData
})
}
// 修改
handleChangeThrShow (show) {
this.setState({
defaultThridShow: show
})
}
// 共计已选弹窗
handleCloseSelectModal(show) {
this.setState({
selectShowPopup: show
})
}
// 点击共计已选
handleSubSelected(show) {
console.warn('共计已选:666')
this.handleCloseSelectModal(!show)
}
// 点击选好了
handleSubmit(show) {
console.warn('选好了', this.props.navigation.navigate)
this.handleCloseSelectModal(false)
console.warn('携带数据,返回到自助下单')
}
// 返回搜索元素
renderSearchItem() {
return (
<View style={styles.ser_cont}>
<TextInput
placeholder={'请输入搜索关键词'}
style={styles.ser_text_input}
defaultValue={this.state.searchValue}
/>
<View style={styles.ser_img_box}>
<Image source={require('../../../images/search_icon.png')} style={styles.ser_img}/>
</View>
</View>
)
}
// 返回顶部产品元素
renderTopProItem() {
let {leftOptionList, topProcOptionList, topActiveIndex} = this.state
return (
<View style={styles.top_box}>
<ScrollView
style={styles.top_scroll_cont}
horizontal={true}
showsHorizontalScrollIndicator={false}
>
{
topProcOptionList.map((item, index) =>
<TouchableOpacity
activeOpacity={.8}
style={styles.top_touch_cont}
onPress={() => this.handleTopNav(item, index)}
>
<View style={[styles.top_inner, index == topActiveIndex ? styles.top_inner_act : '']}>
<View style={styles.top_img_box}>
<Image source={item.iconImg} style={icon_style}/>
</View>
<Text style={[styles.top_tit, index == topActiveIndex ? styles.top_tit_act : '']}>{item.title}</Text>
</View>
</TouchableOpacity>
)
}
</ScrollView>
</View>
)
}
// 返回底部左侧元素
renderContLeftItem() {
let {leftActiveIndex, leftOptionList} = this.state
// let {leftActiveIndex} = this.state
return (
<View style={styles.cont_left_box}>
<ScrollView
style={styles.cont_left_scroll_cont}
showsVerticalScrollIndicator={false}
>
{
leftOptionList.map((item, index) =>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleLeftNav(item, index)}
>
<View style={[styles.cont_left_inner, index == leftActiveIndex ? styles.cont_left_inner_act : '']}>
{
item.iconImg ?
<View style={styles.cont_left_img_box}>
<Image source={item.iconImg} style={icon_style}/>
</View> : null
}
<Text style={[
styles.cont_left_tit,
index == leftActiveIndex ? styles.cont_left_tit_act : '',
item.iconImg ? '' : styles.cont_left_noicon]}
>
{item.title}
</Text>
</View>
</TouchableOpacity>
)
}
</ScrollView>
</View>
)
}
// 返回底部主要元素
renderContItem() {
let { leftActiveIndex, defaultThridShow, stencilData } = this.state
return (
<View style={styles.cont_bom_box}>
{ this.renderContLeftItem() }
{/* { this.renderContRightItem() } */}
<ProductRightStyle
navigation={this.props.navigation}
// isStencilItem={true}
superIndex={leftActiveIndex}
defaultThridShow={defaultThridShow}
changeThrShow={(defaultThridShow) => this.handleChangeThrShow(defaultThridShow)}
superStencilData={stencilData}
/>
</View>
)
}
// 返回底部按钮
renderFooterBtnItem() {
let { selectShowPopup } = this.state
return (
<View style={styles.sub_box}>
<FooterBtnStyle
style={styles.sub_btn_left}
activeOpacity={.8}
title={'共计已选:666'}
textStyle= {[styles.sub_btn_tit, styles.sub_btn_left_text]}
onPress={() => this.handleSubSelected(selectShowPopup)}
/>
<FooterBtnStyle
style={styles.sub_btn_rig}
activeOpacity={.8}
title={'选好了'}
textStyle= {[styles.sub_btn_tit, styles.sub_btn_rig_text]}
onPress={() => this.handleSubmit(selectShowPopup)}
/>
<ProductModel
show={ selectShowPopup }
closeModal={(show) => this.handleCloseSelectModal(show)}
closeSelected={(show) => this.handleSubSelected(show)}
closeSubmit={(show) => this.handleSubmit(show)}
/>
</View>
)
}
render() {
let {navigation} = this.props
let {title} = navigation.state.params
// console.warn('zzxd----', navigation)
return (
<View style={styles.choo_container}>
<StatusBarView
isReactStackNavigator={true}
backgroundColor={promary_color}
barStyle = 'light-content'
/>
<SafeAreaView style={safe_view}>
<HeadBackItem title={title} navigation={navigation} />
<View style={styles.choo_main}>
{this.renderSearchItem()}
{this.renderTopProItem()}
{this.renderContItem()}
</View>
{this.renderFooterBtnItem()}
</SafeAreaView>
</View>
);
}
}
const styles = StyleSheet.create({
choo_container: {
flex: 1,
backgroundColor: home_background_color
},
choo_main: {
// position: 'relative',
// height: Height(),
// width: Width()
flex: 1
},
ser_cont: {
width: Width(),
backgroundColor: foundation_color,
position: 'relative',
height: 60,
justifyContent: 'center',
paddingHorizontal: 16
},
ser_img_box: {
position: 'absolute',
left: 22,
top: 18,
width: pxSize(24),
height: pxSize(24)
},
ser_img: {
width: '100%',
height: '100%'
},
ser_text_input: {
backgroundColor: '#F5F5F5',
height: 38,
paddingLeft: 30,
borderRadius: 10,
fontSize: second_text_size,
fontFamily: font_family_regular
},
top_box: {
width: Width(),
height: 89,
backgroundColor: foundation_color,
paddingHorizontal: 20,
paddingTop: 12,
borderBottomColor: '#F4F4F4',
borderBottomWidth: 1
},
top_scroll_cont: {},
top_touch_cont: {},
top_inner: {
justifyContent: 'center',
alignItems: 'center',
marginRight: 14,
borderBottomWidth: 4,
borderBottomColor: foundation_color,
minWidth: 60
},
top_inner_act: {
borderBottomWidth: 2,
borderBottomColor: promary_color
},
top_img_box: {
width: pxSize(36),
height: pxSize(36)
},
// top_img: {
// width: '100%',
// height: '100%'
// },
top_tit: {
paddingTop: 10,
paddingBottom: 14,
color: second_text_color,
fontSize: third_text_size,
fontFamily: font_family_regular
},
top_tit_act: {
color: first_text_color,
// fontWeight: 'bold',
fontSize: 14,
fontFamily: font_family_semibold
},
cont_bom_box: {
position: 'relative',
flex: 1
// height: Height() - 266
// height: Height() - 266
// height: pxHeight(510)
},
cont_left_box: {
backgroundColor: '#F5F5F5',
width: 80,
height: '100%',
justifyContent: 'center',
alignItems: 'center'
},
cont_left_scroll_cont: {
width: '100%'
},
cont_left_inner: {
flexDirection: 'row',
height: 52,
justifyContent: 'flex-start',
alignItems: 'center'
},
cont_left_inner_act: {
backgroundColor: foundation_color
},
cont_left_img_box: {
width: pxSize(14),
height: pxSize(14),
marginRight: 4,
marginLeft: 6
},
cont_left_img: {
width: '100%',
height: '100%'
},
cont_left_tit: {
color: second_text_color,
fontSize: third_text_size,
fontFamily: font_family_regular
},
cont_left_noicon: {
textAlign: 'center',
paddingHorizontal: 10
},
cont_left_tit_act: {
color: first_text_color,
fontWeight: 'bold'
},
cont_right_box: {
position: 'absolute',
left: 80,
width: Width() - 80,
backgroundColor: foundation_color,
height: '100%',
paddingHorizontal: 20
},
cont_right_scroll_cont: {},
cont_right_list: {},
ri_container: {
borderBottomColor: '#F9F9F9',
borderBottomWidth: 2,
// backgroundColor: '#ccc'
},
ri_tou_box: {
paddingVertical: 14
},
ri_inner: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center'
},
ri_text_box: {},
ri_te_tit: {
fontSize: first_text_size,
color: first_text_color,
fontWeight: 'bold',
fontFamily: 'PingFangSC-Medium'
},
ri_te_ot: {
fontSize: second_text_size,
color: third_text_color
},
ri_img_box: {},
ri_img_check: {},
sub_box: {
width: Width(),
backgroundColor: dis_sub_color,
flexDirection: 'row'
},
sub_btn_left: {
width: '50%',
backgroundColor: '#EEECEC'
},
sub_btn_tit: {
fontSize: 18
},
sub_btn_left_text: {
color: third_text_color
},
sub_btn_rig: {
width: '50%',
backgroundColor: promary_color
},
sub_btn_rig_text: {},
// scroll_text_cont: {
// fontSize: 30,
// marginLeft: 80,
// height: 80,
// color: '#333',
// backgroundColor: '#FF0000',
// width: '100%'
// },
// card: {
// borderWidth: 1,
// backgroundColor: '#fff',
// borderColor: 'rgba(0,0,0,0.1)',
// margin: 5,
// height: 150,
// padding: 15,
// shadowColor: '#ccc',
// shadowOffset: { width: 2, height: 2, },
// shadowOpacity: 0.5,
// shadowRadius: 3,
// }
})
export default ChooseProductPage;
\ No newline at end of file
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
SafeAreaView,
TouchableOpacity,
ScrollView,
FlatList,
Image
} from 'react-native';
import {connect} from 'react-redux';
import HeadBackItem from '../../common/HeadBackItem';
import {
home_background_color,
foundation_color,
promary_color,
second_text_color,
third_text_color,
first_text_color,
second_text_size,
Width,
pxSize,
safe_view,
font_family_semibold,
font_family_light
} from '../../../base/BaseStyle';
import {
FooterBtnStyle
} from '../../common/CellTextStyle';
import StatusBarView from '../../common/StatusBarView';
class EditStencilPage extends Component {
constructor(props) {
super(props);
this.state = {
topProcOptionList: [
{
title: '编辑产品'
},
{
title: '螺钉盒'
},
{
title: '器械包'
},
{
title: '工具'
}
],
topActiveIndex: 0,
contOptionData: [ // 底部产品内容
{
"id": "0",
title: '规格:JS-CGO PE 10',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 20,
imgIcon: require('../../../images/model_test.png'),
select: false
},
{
"id": "1",
title: '规格:JS-CGO PE 10 11',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
imgIcon: require('../../../images/model_test.png'),
select: false
},
{
"id": "2",
title: '规格:JS-CGO PE 10 22',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
imgIcon: require('../../../images/model_test.png'),
select: false
},
{
"id": "3",
title: '规格:JS-CGO PE 10 33',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
imgIcon: require('../../../images/model_test.png'),
select: false
},
{
"id": "4",
title: '规格:JS-CGO PE 10 44',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
imgIcon: require('../../../images/model_test.png'),
select: false
},
{
"id": "5",
title: '规格:JS-CGO PE 10 55',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
imgIcon: require('../../../images/model_test.png'),
select: false
},
{
"id": "6",
title: '规格:JS-CGO PE 10 55',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
imgIcon: require('../../../images/model_test.png'),
select: false
},
{
"id": "7",
title: '规格:JS-CGO PE 10 55',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
imgIcon: require('../../../images/model_test.png'),
select: false
},
{
"id": "8",
title: '规格:JS-CGO PE 10 888',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
imgIcon: require('../../../images/model_test.png'),
select: false
}
]
}
}
/**
* 点击当前产品加减
* @param {object} item 当前小类数据
* @param {number} index 当前角标
* @param {boolean} isPlus 默认减法 false,加法 true,
*/
handelCalculationList(item, index, isPlus) {
let { contOptionData } = this.state
let { value } = contOptionData[index]
if(isPlus) {
contOptionData[index].value += 1
} else if(!isPlus && value > 0) {
contOptionData[index].value -= 1
}
this.setState({
contOptionData
})
}
// 点击顶部菜单
handleTopNav(item, index) {
this.setState({
topActiveIndex: index
})
}
// 返回顶部编辑选项
renderTopProItem() {
let { topProcOptionList, topActiveIndex } = this.state
return (
<View style={styles.top_box}>
<ScrollView
style={styles.top_scroll_cont}
horizontal={true}
showsHorizontalScrollIndicator={false}
>
{
topProcOptionList.map((item, index) =>
<TouchableOpacity
activeOpacity={.8}
style={styles.top_touch_cont}
onPress={() => this.handleTopNav(item, index)}
>
<View style={[
styles.top_inner,
(index == 1 || index == 2) ? styles.se_thr_width : '',
index == 3 ? styles.four_width : '',
index == topActiveIndex ? styles.top_inner_act : ''
]}>
<Text style={[styles.top_tit, index == topActiveIndex ? styles.top_tit_act : '']}>
{item.title}
</Text>
</View>
</TouchableOpacity>
)
}
</ScrollView>
</View>
)
}
// 返回底部主要元素
renderContItem() {
return(
<View style={styles.edit_cont}>
<ScrollView
style={styles.edit_scroll_cont}
showsVerticalScrollIndicator={false}
>
<FlatList
style={styles.edit_list}
keyExtractor={item => item.id}
data={this.state.contOptionData}
extraData={this.state}
renderItem={ ({item, index}) => this.renderContColumnItem(item, index) }
/>
</ScrollView>
</View>
)
}
// 返回每一列元素
renderContColumnItem(item, index) {
return (
<SafeAreaView style={styles.column_container}>
<View style={styles.ri_inner}>
<View style={styles.oth_img_box}>
<Image style={styles.oth_img} source={item.imgIcon}/>
</View>
<View style={styles.ri_text_box}>
<Text style={styles.ri_te_tit}>
{ item.title }
</Text>
<Text style={[styles.ri_te_ot, styles.thr_ot]}>{item.tip1}</Text>
<Text style={styles.ri_te_ot}>{item.tip2}</Text>
</View>
<View style={styles.ri_num_box}>
<TouchableOpacity
activeOpacity={.9}
style={styles.btn_inner}
onPress={() => this.handelCalculationList(item, index)}
>
<View style={[styles.thr_num_btn, styles.thr_btn_left]}>
<Image source={require('../../../images/less_icon.png')} style={styles.thr_num_icon}></Image>
</View>
</TouchableOpacity>
<Text style={styles.thr_num}>{ item.value }</Text>
<TouchableOpacity
activeOpacity={.9}
style={styles.btn_inner}
onPress={() => this.handelCalculationList(item, index, true)}
>
<View style={[styles.thr_num_btn, styles.thr_btn_right]}>
<Image source={require('../../../images/plur_icon.png')} style={styles.thr_num_icon}></Image>
</View>
</TouchableOpacity>
</View>
</View>
</SafeAreaView>
)
}
render() {
let {navigation} = this.props
let {title} = navigation.state.params
return (
<View style={styles.edit_container}>
<StatusBarView
isReactStackNavigator={true}
backgroundColor={promary_color}
barStyle = 'light-content'
/>
<SafeAreaView style={safe_view}>
<HeadBackItem title={title} navigation={navigation} />
<View style={styles.edit_main}>
{this.renderTopProItem()}
{this.renderContItem()}
</View>
<FooterBtnStyle
style={styles.sub_btn_pro}
activeOpacity={.8}
title={'编辑完成'}
textStyle= {styles.sub_btn}
onPress={() => console.warn('编辑完成')}
/>
</SafeAreaView>
</View>
);
}
}
const styles = StyleSheet.create({
edit_container: {
flex: 1,
backgroundColor: home_background_color,
padding: 0,
margin: 0
},
edit_main: {
flex: 1
},
top_box: {
width: Width(),
paddingHorizontal: 20,
paddingTop: 12,
// backgroundColor: foundation_color,
// borderBottomColor: '#F4F4F4',
// borderBottomWidth: 1
},
top_scroll_cont: {},
top_touch_cont: {},
top_inner: {
justifyContent: 'center',
alignItems: 'center',
marginRight: 14,
borderBottomWidth: 2,
borderBottomColor: home_background_color,
minWidth: 50,
},
se_thr_width: {
minWidth: 42
},
four_width: {
minWidth: 28
},
top_inner_act: {
borderBottomWidth: 2,
borderBottomColor: promary_color
},
top_tit: {
paddingTop: 10,
paddingBottom: 12,
color: second_text_color,
// fontSize: third_text_size
fontSize: 14
},
top_tit_act: {
color: first_text_color,
fontWeight: 'bold'
},
edit_cont: {
marginTop: 14,
flex: 1
// height: Height() - 187
},
edit_list: {},
column_container: {
paddingHorizontal: 20
},
ri_inner: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
paddingVertical: 14,
paddingHorizontal: 8,
backgroundColor: foundation_color,
marginBottom: 14
},
oth_img_box: {
borderColor: '#ccc',
borderWidth: 1,
borderRadius: 50,
width: pxSize(50),
height: pxSize(50),
justifyContent: 'center',
alignItems: 'center'
},
oth_img: {
width: '90%',
height: '90%'
},
ri_text_box: {},
ri_te_tit: {
fontSize: second_text_size,
color: first_text_color,
// fontWeight: 'bold',
fontFamily: font_family_semibold
},
thr_ot: {
// fontWeight: 'normal',
// color: first_text_color
},
ri_te_ot: {
fontSize: 14,
color: third_text_color,
fontFamily: font_family_light
},
ri_num_box: {
flexDirection: 'row',
alignItems: 'center'
},
thr_num_btn: {
width: pxSize(24),
height: pxSize(24)
},
thr_btn_left: {
marginRight: 4
},
thr_btn_right: {
marginLeft: 4
},
thr_num_icon: {
width: '100%',
height: '100%'
},
btn_inner: {},
thr_num: {
minWidth: pxSize(20),
textAlign: 'center'
},
sub_btn_pro: {
backgroundColor: promary_color
},
})
export default EditStencilPage;
\ No newline at end of file
import React , { Component } from 'react';
import {
View,
Text,
StyleSheet,
TouchableOpacity,
Image,
ScrollView,
FlatList,
SafeAreaView
} from 'react-native';
import {
first_text_color,
third_text_color,
foundation_color,
second_text_size,
Width,
second_text_color,
pxSize,
font_family_medium,
font_family_light,
font_family_regular,
icon_style
} from '../../../base/BaseStyle';
import ShowModel from '../../common/ShowModel';
// export function ProductRightStyle({isStencilItem, isBoxBagToolItem, isOtherItem, ...props}) {
// return (
// <View style={{position: 'absolute', left: 80}} {...props}>
// <Text>右侧</Text>
// </View>
// )
// }
// export function ProductRightStyle({isStencilItem, isBoxBagToolItem, isOtherItem, ...props}) {
class ProductRightStyle extends Component {
constructor (props) {
super(props)
this.state = {
// stencilData : [{
// "id": "0",
// title: '髋关节手术001',
// tip1: '描述信息',
// tip2: '描述信息',
// select: false
// },
// {
// "id": "1",
// title: '髋关节手术002',
// tip1: '描述信息',
// tip2: '描述信息',
// select: false
// },
// {
// "id": "2",
// title: '髋关节手术003',
// tip1: '描述信息',
// tip2: '描述信息',
// select: true
// },
// {
// "id": "3",
// title: '髋关节手术004',
// tip1: '描述信息',
// tip2: '描述信息',
// select: false
// },
// {
// "id": "4",
// title: '髋关节手术005',
// tip1: '描述信息',
// tip2: '描述信息',
// select: false
// },
// {
// "id": "5",
// title: '髋关节手术006',
// tip1: '描述信息',
// tip2: '描述信息',
// select: false
// }
// ], // 模版数据
stencilData: this.props.superStencilData, // 模版数据
selectItem : [], // 当前选中模版
toolShowPopup: false, // 螺钉盒等三个弹窗显示
otherListData : [{ // 人工髋关节假体等数据 -- 大类
"id": "0",
title: '中置器(PE)',
imgIcon: require('../../../images/model_test.png'),
select: false
},
{
"id": "1",
title: '内衬Harmony 28/10°OD(P 2',
imgIcon: require('../../../images/model_test.png'),
select: false
},
{
"id": "2",
title: '内衬Harmony 28/10°OD(P',
imgIcon: require('../../../images/model_test.png'),
select: false
},
{
"id": "3",
title: '中置器(PE)4',
imgIcon: require('../../../images/model_test.png'),
select: false
},
{
"id": "4",
title: '中置器(PE)5',
imgIcon: require('../../../images/model_test.png'),
select: false
},
{
"id": "5",
title: '中置器(PE)6',
imgIcon: require('../../../images/model_test.png'),
select: false
},
{
"id": "6",
title: '中置器(PE)7',
imgIcon: require('../../../images/model_test.png'),
select: false
},
{
"id": "7",
title: '中置器(PE)8',
imgIcon: require('../../../images/model_test.png'),
select: false
}
],
thridOptionData: [ // 人工髋关节假体等数据 -- 小类
{
"id": "0",
title: '规格:JS-CGO PE 10',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 20,
select: false
},
{
"id": "1",
title: '规格:JS-CGO PE 10 11',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
select: false
},
{
"id": "2",
title: '规格:JS-CGO PE 10 22',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
select: false
},
{
"id": "3",
title: '规格:JS-CGO PE 10 33',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
select: false
},
{
"id": "4",
title: '规格:JS-CGO PE 10 44',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
select: false
},
{
"id": "5",
title: '规格:JS-CGO PE 10 55',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
select: false
}
],
thridIsVisible: false, // 小类展示
}
}
componentWillReceiveProps(nextProps) {
if (this.state.thridIsVisible != nextProps.defaultThridShow) {
this.setState({thridIsVisible: nextProps.defaultThridShow});
}
if (this.state.stencilData != nextProps.superStencilData) {
this.setState({stencilData: nextProps.superStencilData});
}
}
// 点击模版选中
handleItemStencil(item, index) {
console.warn('xuanze', index, item)
let { stencilData, selectItem } = this.state
let { select, id } = item
console.warn(selectItem)
console.warn(selectItem, stencilData[id])
if (select) {
// 前一次是true,当前变成未选中
selectItem.splice(selectItem.findIndex(function (x) {
return x === id;
}), 1);
} else {
selectItem.push(id);
// 跳转到新页面
// console.warn('-----navigation', this.props.navigation.navigate)
// this.props.navigation.navigate('EditStencilPage')
}
console.warn(select, stencilData[id].select)
stencilData[id].select = !select;
this.setState({ stencilData })
this.handleRIghtStencil()
}
handleRIghtStencil() {
// console.warn(`选中了${JSON.stringify(this.state.selectItem)}`)
}
// 跳转到编辑模版
enterEditStencilPage(item, index) {
let { superIndex } = this.props
console.warn('dianji---跳转', superIndex, index, item)
if(superIndex == 0) {
this.props.navigation.navigate('EditStencilPage', {title: '选择产品 - 编辑模版'})
} else if ( superIndex > 0 && superIndex < 4) {
this.handleIsShowDialog()
} else {
this.changeThrShow(true)
}
}
// 关闭当前弹窗
handleCloseModal(show) {
this.setState({
toolShowPopup: show
})
}
// 螺钉盒、器械包、辅助工具 弹窗显示
handleIsShowDialog() {
this.setState({
toolShowPopup: !this.state.toolShowPopup
})
}
// 修改当前小类是否展示
changeThrShow(show) {
this.setState({
thridIsVisible: show
})
// this.props.changeThrShow(show) ============????
}
/**
* 点击当前小类加减
* @param {object} item 当前小类数据
* @param {number} index 当前角标
* @param {boolean} isPlus 默认减法 false,加法 true,
*/
handelCalculationThr(item, index, isPlus) {
let { thridOptionData } = this.state
let { value } = thridOptionData[index]
if(isPlus) {
thridOptionData[index].value += 1
} else if(!isPlus && value > 0) {
thridOptionData[index].value -= 1
}
this.setState({
thridOptionData
})
}
// 返回模版每一列
renderStencilItem(item, index) {
let { toolShowPopup } = this.state
return (
<SafeAreaView style={styles.ri_container}>
<View style={styles.ri_inner}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.enterEditStencilPage(item, index)}
style={styles.ri_tou_box}
>
<View style={styles.ri_text_box}>
<Text style={styles.ri_te_tit}>
{item.select ? (item.title+"--选中") : (item.title+"--未选中")}
</Text>
<Text style={styles.ri_te_ot}>{item.tip1}</Text>
<Text style={styles.ri_te_ot}>{item.tip2}</Text>
</View>
</TouchableOpacity>
<View style={styles.ri_img_box}>
<TouchableOpacity
activeOpacity={.9}
onPress={() => this.handleItemStencil(item, index)}
>
{item.select ?
<Image
source={require('../../../images/cor_blue.png')}
style={icon_style}/>
:
<Image
source={require('../../../images/frame_icon.png')}
style={icon_style}/>
}
</TouchableOpacity>
</View>
</View>
<ShowModel
title={'通用螺钉盒'}
show={ toolShowPopup }
closeModal={(show) => this.handleCloseModal(show)}
>
<View style={styles.model_cont}>
<View style={styles.model_cont_inner}>
<Text style={styles.mo_cont_title}>螺钉数量统计信息如下:</Text>
<Text style={styles.mo_cont_tip}>HB6.5()区:6</Text>
<Text style={styles.mo_cont_tip}>HB6.5()区:6</Text>
<Text style={styles.mo_cont_tip}>HB6.5()区:6</Text>
</View>
<View style={styles.mo_img_box}>
<Image style={styles.mo_img} source={require('../../../images/model_test.png')}></Image>
</View>
</View>
</ShowModel>
</SafeAreaView>
)
}
// 返回模版元素
renderStencilStyle() {
return(
<View style={styles.stencil_cont}>
<FlatList
style={styles.cont_right_list}
keyExtractor={item => item.id}
data={this.state.stencilData}
extraData={this.state}
// data={stencilData}
// extraData={this.state}
renderItem={({item, index}) => this.renderStencilItem(item, index)}
/>
{/* {
[1,2,3,4,5,6].map((item, index) =>
<Text>髋关节手术001</Text>
)
} */}
{/* <ScrollableTabView
style={{ marginTop: 20 }}
initialPage={0}
renderTabBar={() => <ScrollableTabBar />}
onChangeTab={(obj) => console.warn(Object.keys(obj),obj.i)}
initialPage={0}
tabBarUnderlineStyle={{backgroundColor: promary_color}}
tabBarActiveTextColor={first_text_color}
tabBarInactiveTextColor={second_text_color}
tabBarTextStyle={styles.top_tit}
>
<Text tabLabel='Tab #1' style={styles.scroll_text_cont}>My</Text>
<Text tabLabel='Tab #2 word word'>favorite</Text>
<Text tabLabel='Tab #3 word word word'>project</Text>
<Text tabLabel='Tab #4 word word word word'>favorite</Text>
<Text tabLabel='Tab #5'>project</Text>
</ScrollableTabView> */}
</View>
)
}
// 返回模版等四个以外的每一列 -- 小类
renderThridItem(item, index) {
return (
<SafeAreaView style={styles.thr_container}>
<View style={[styles.ri_inner, styles.thr_inner]}>
<View style={styles.ri_text_box}>
<Text style={styles.thr_ot}>
{ item.title }
</Text>
<Text style={[styles.ri_te_ot, styles.thr_ot]}>{item.tip1}</Text>
<Text style={styles.ri_te_ot}>{item.tip2}</Text>
</View>
<View style={styles.ri_num_box}>
<TouchableOpacity
activeOpacity={.9}
style={styles.btn_inner}
onPress={() => this.handelCalculationThr(item, index)}
>
{/* <View style={[styles.thr_num_btn]}> */}
<View style={[styles.thr_num_btn, styles.thr_btn_left]}>
{/* <Text style={[styles.thr_num_icon, styles.thr_icon_left]}>{'-'}</Text> */}
<Image source={require('../../../images/less_icon.png')} style={styles.thr_num_icon}></Image>
</View>
</TouchableOpacity>
<Text style={styles.thr_num}>{ item.value }</Text>
<TouchableOpacity
activeOpacity={.9}
style={styles.btn_inner}
onPress={() => this.handelCalculationThr(item, index, true)}
>
{/* <View style={[styles.thr_num_btn]}> */}
<View style={[styles.thr_num_btn, styles.thr_btn_right]}>
{/* <Text style={[styles.thr_num_icon, styles.thr_icon_right]}>{'+'}</Text> */}
<Image source={require('../../../images/plur_icon.png')} style={styles.thr_num_icon}></Image>
</View>
</TouchableOpacity>
</View>
</View>
</SafeAreaView>
)
}
// 返回模版等四个以外的动态元素 -- 小类
renderThridStyle() {
return(
<View style={styles.stencil_cont}>
{/* <TouchableOpacity
activeOpacity={.8}
style={styles.thr_head_inner}
onPress={() => this.changeThrShow(false)}
>
<View style={styles.thr_head_back}>
<View style={styles.thr_icon_box}>
<Image source={require('../../../images/arr_left.png')} style={styles.thr_icon}></Image>
</View>
<Text style={styles.thr_head_tit}>{ '测试标题' }</Text>
</View>
</TouchableOpacity> */}
<FlatList
style={styles.cont_thr_list}
keyExtractor={item => item.id}
data={this.state.thridOptionData}
extraData={this.state}
renderItem={({item, index}) => this.renderThridItem(item, index)}
/>
</View>
)
}
// 返回模版等四个以外的每一列 -- 大类
renderOtherListItem(item, index) {
return (
<SafeAreaView style={styles.oth_container}>
<View style={styles.oth_inner}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.enterEditStencilPage(item, index)}
style={styles.oth_box}
>
<View style={styles.oth_box_item}>
<View style={styles.oth_img_box}>
<Image style={styles.oth_img} source={item.imgIcon}/>
</View>
<Text style={styles.oth_tit}>{item.title}</Text>
</View>
</TouchableOpacity>
</View>
</SafeAreaView>
)
}
// 返回模版等四个以外的动态元素
renderOtherStyle() {
return(
<View style={styles.stencil_cont}>
<FlatList
style={styles.cont_other_list}
keyExtractor={item => item.id}
data={this.state.otherListData}
extraData={this.state}
renderItem={({item, index}) => this.renderOtherListItem(item, index)}
/>
</View>
)
}
// 返回右侧元素
renderRightCurrentStyle() {
let { superIndex } = this.props
let { thridIsVisible } = this.state
if(superIndex >= 0 && superIndex < 4) {
return this.renderStencilStyle()
} else {
if (!thridIsVisible) {
return this.renderOtherStyle()
} else {
return this.renderThridStyle()
}
}
}
// 返回右侧三级标题
renderThrHeadStyle() {
let { thridIsVisible } = this.state
if (thridIsVisible) {
return (
<TouchableOpacity
activeOpacity={.8}
style={styles.thr_head_inner}
onPress={() => this.changeThrShow(false)}
>
<View style={styles.thr_head_back}>
<View style={styles.thr_icon_box}>
<Image source={require('../../../images/arr_left.png')} style={styles.thr_icon}></Image>
</View>
<Text style={styles.thr_head_tit}>{ '测试标题' }</Text>
</View>
</TouchableOpacity>
)
}
}
render() {
let { stencilData } = this.state
return (
<View style={styles.cont_right_box}>
{ this.renderThrHeadStyle() }
<ScrollView
style={styles.cont_right_scroll_cont}
showsVerticalScrollIndicator={false}
>
{ this.renderRightCurrentStyle() }
</ScrollView>
</View>
)
}
}
const styles = StyleSheet.create({
cont_right_box: {
position: 'absolute',
left: 80,
top: 0,
width: Width() - 80,
backgroundColor: foundation_color,
height: '100%',
paddingHorizontal: 20
},
cont_right_scroll_cont: {},
cont_right_list: {},
ri_container: {
borderBottomColor: '#F9F9F9',
borderBottomWidth: 2,
// backgroundColor: '#ccc'
},
ri_tou_box: {},
ri_inner: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
paddingVertical: 14
},
ri_text_box: {},
ri_te_tit: {
fontSize: 18,
color: first_text_color,
// fontWeight: 'bold',
fontFamily: font_family_medium
},
ri_te_ot: {
fontSize: 14,
color: third_text_color,
fontFamily: font_family_light
},
ri_img_box: {
width: 18,
height: 18
},
// ri_img_check: {
// width: '100%',
// height: '100%'
// },
model_cont: {},
model_cont_inner: {
marginBottom: 48
},
mo_cont_title: {
color: first_text_color,
// fontWeight: 'bold',
fontSize: 14,
lineHeight: 24,
fontFamily: font_family_medium
},
mo_cont_tip: {
color: second_text_color,
fontSize: 14,
lineHeight: 24,
fontFamily: font_family_regular
},
mo_img_box: {
flex: 1,
borderWidth: 1,
borderColor: '#E1E1E1',
justifyContent: 'center',
alignItems: 'center',
height: pxSize(120)
},
mo_img: {
width: pxSize(100),
height: '100%'
},
// other right
cont_other_list: {
paddingTop: 14
},
oth_container: {
flex: 1,
marginBottom: 14
},
oth_inner: {},
oth_box: {},
oth_box_item: {
flexDirection: 'row',
justifyContent: 'flex-start',
alignItems: 'center'
},
oth_img_box: {
borderColor: '#ccc',
borderWidth: 1,
borderRadius: 50,
width: pxSize(50),
height: pxSize(50),
justifyContent: 'center',
alignItems: 'center'
},
oth_img: {
width: '90%',
height: '90%'
},
oth_tit: {
textAlign: 'left',
paddingLeft: 10,
fontSize: second_text_size,
fontFamily: font_family_regular
},
stencil_cont: {},
thr_head_inner: {},
thr_head_back: {
flexDirection: 'row',
paddingVertical: 16,
alignItems: 'center'
},
thr_icon_box: {
width: pxSize(16),
height: pxSize(20)
},
thr_icon: {
width: '100%',
height: '100%'
},
thr_head_tit: {
color: third_text_color,
paddingLeft: 10,
fontSize: second_text_size,
fontFamily: font_family_regular
},
cont_thr_list: {},
thr_container: {},
thr_inner: {
paddingVertical: 0,
paddingBottom: 26
},
thr_ot: {
// fontWeight: 'normal',
fontFamily: font_family_regular,
fontSize: second_text_size,
color: first_text_color
},
ri_num_box: {
flexDirection: 'row',
alignItems: 'center'
},
thr_num_btn: {
width: pxSize(24),
height: pxSize(24),
// justifyContent: 'center',
// alignItems: 'center',
// borderRadius: 50,
// borderWidth: 1
},
thr_btn_left: {
// borderColor: '#E6E6E6'
marginRight: 4
},
thr_btn_right: {
// borderColor: foundation_color,
// backgroundColor: promary_color
marginLeft: 4
},
thr_num_icon: {
// fontSize: 16
width: '100%',
height: '100%'
},
thr_icon_left: {
// color: third_text_color
},
thr_icon_right: {
// color: title_text_color
},
btn_inner: {},
thr_num: {
minWidth: pxSize(20),
textAlign: 'center'
},
})
export default ProductRightStyle;
\ No newline at end of file
import React, { Component } from 'react';
import {
SafeAreaView,
StyleSheet,
View,
Text,
Image,
TouchableOpacity
} from 'react-native';
import { connect } from 'react-redux';
import HeadBackItem from '../../common/HeadBackItem';
import {
promary_color,
second_text_color,
first_text_color,
pxSize,
title_text_color,
safe_view,
font_family_medium,
font_family_regular
} from '../../../base/BaseStyle';
import StatusBarView from '../../common/StatusBarView';
class SubSuccessPage extends Component {
constructor(props) {
super(props);
this.state = { }
}
handleSubmit() {
console.warn('复制订单号并返回主页')
}
render() {
let {navigation} = this.props
let {title} = navigation.state.params
return (
<View style={styles.succ_container}>
<StatusBarView
isReactStackNavigator={true}
backgroundColor={promary_color}
barStyle = 'light-content'
/>
<SafeAreaView style={safe_view}>
<HeadBackItem title={title} navigation={navigation} />
<View style={styles.succ_inner}>
<View style={styles.img_box}>
<Image source={require('../../../images/cor_green.png')} style={styles.img_icon}/>
</View>
<Text style={styles.succ_title}>{'提交成功'}</Text>
<Text style={styles.succ_text}>{'订单号:20200318121230'}</Text>
<TouchableOpacity
activeOpacity={.9}
style={styles.succ_btn}
onPress={() => this.handleSubmit()}
>
<Text style={styles.btn_text}>{'复制订单号并返回主页'}</Text>
</TouchableOpacity>
</View>
</SafeAreaView>
</View>
);
}
}
const styles = StyleSheet.create({
succ_container: {
flex: 1
},
succ_inner: {
justifyContent: 'center',
alignItems: 'center',
paddingTop: '26%'
},
img_box: {
width: pxSize(80),
height: pxSize(80)
},
img_icon: {
width: '100%',
height: '100%'
},
succ_title: {
fontSize: 17,
fontFamily: font_family_medium,
// fontWeight: 'bold',
color: first_text_color,
paddingTop: 8,
paddingBottom: 20
},
succ_text: {
fontSize: 14,
color: second_text_color,
paddingBottom: 30,
fontFamily: font_family_regular
},
succ_btn: {
backgroundColor: promary_color,
width: pxSize(330),
borderRadius: 30,
height: 48,
display: 'flex',
justifyContent: 'center',
alignItems: 'center'
},
btn_text: {
color: title_text_color,
fontSize: 16,
fontFamily: font_family_regular
}
})
export default SubSuccessPage;
\ No newline at end of file
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
TouchableOpacity,
Image,
ScrollView
} from 'react-native';
import {
first_text_color,
third_text_size,
second_text_color,
pxSize,
foundation_color,
promary_color
} from '../../../../base/BaseStyle';
class TopTabBar extends Component {
constructor(props) {
super(props);
this.state = {
}
}
// 返回自定义 bar 元素
renderTabOption(barItem, index) {
// ScrollableTabView默认传递的属性值,即跳转方法
// console.warn('top_tab_----', this.props)
// console.warn('barItem, index----', barItem, index)
let {activeTab, tabNames, goToPage, imgTabArr, textStyle, activeTextColor} = this.props
console.warn(activeTab, index, 'hh')
return (
<TouchableOpacity
activeOpacity={.8}
key={barItem}
onPress={() => goToPage(index)}
style={[styles.bar_box, activeTab == index ? styles.bar_box_act : '']}
>
<View style={styles.img_box}>
<Image source={imgTabArr[index]} style={styles.img_inner}/>
</View>
<Text style={[textStyle, activeTab == index ? activeTextColor : '']}>{barItem}</Text>
</TouchableOpacity>
)
}
render() {
let {style, tabs} = this.props
console.warn('hhhhh', tabs)
console.warn(this.props)
return (
<View style={[styles.bar_cont, style]}>
<ScrollView
style={styles.top_scroll_cont}
horizontal={true}
showsHorizontalScrollIndicator={false}
>
{
this.props.tabs.map((tab, index) => this.renderTabOption(tab, index))
}
</ScrollView>
</View>
);
}
}
const styles = StyleSheet.create({
bar_cont: {
backgroundColor: foundation_color,
borderBottomColor: '#F4F4F4',
borderBottomWidth: 1,
flexDirection: 'row',
height: 76,
paddingHorizontal: 20
},
top_scroll_cont: {
},
tab: {
},
bar_box: {
flex: 1,
alignItems: 'center',
justifyContent: 'flex-start',
// paddingBottom: 10,
borderBottomWidth: 2,
borderBottomColor: foundation_color,
width: 58,
marginRight: 8
},
bar_box_act: {
borderBottomWidth: 2,
borderBottomColor: promary_color
},
img_box: {
width: pxSize(30),
height: pxSize(30)
},
img_inner: {
width: '100%',
height: '100%'
},
tit_text: {
paddingTop: 10,
paddingBottom: 16,
color: second_text_color,
fontSize: third_text_size
},
tit_text_act: {
color: first_text_color,
fontWeight: 'bold'
}
})
export default TopTabBar;
\ No newline at end of file
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
TouchableOpacity,
Image,
ScrollView
} from 'react-native';
import {
first_text_color,
third_text_size,
second_text_color,
pxSize,
foundation_color,
promary_color
} from '../../../../base/BaseStyle';
class TopTabBar extends Component {
constructor(props) {
super(props);
this.state = {
}
}
// 返回自定义 bar 元素
renderTabOption(barItem, index) {
// ScrollableTabView默认传递的属性值,即跳转方法
// console.warn('top_tab_----', this.props)
// console.warn('barItem, index----', barItem, index)
let {activeTab, tabNames, goToPage, imgTabArr, textStyle, activeTextColor} = this.props
// console.warn(activeTab, index, 'hh')
return (
<TouchableOpacity
activeOpacity={.8}
key={barItem}
onPress={() => goToPage(index)}
style={[styles.bar_box, activeTab == index ? styles.bar_box_act : '']}
>
<View style={styles.img_box}>
<Image source={imgTabArr[index]} style={styles.img_inner}/>
</View>
<Text style={[textStyle, activeTab == index ? activeTextColor : '']}>{barItem}</Text>
</TouchableOpacity>
)
}
render() {
let {style, tabs} = this.props
// console.warn('hhhhh', tabs)
// console.warn(this.props)
return (
<View style={[styles.bar_cont, style]}>
<ScrollView
style={styles.top_scroll_cont}
horizontal={true}
showsHorizontalScrollIndicator={false}
>
{
this.props.tabs.map((tab, index) => this.renderTabOption(tab, index))
}
</ScrollView>
</View>
);
}
}
const styles = StyleSheet.create({
bar_cont: {
backgroundColor: foundation_color,
borderBottomColor: '#F4F4F4',
borderBottomWidth: 1,
flexDirection: 'row',
height: 76,
paddingHorizontal: 20
},
top_scroll_cont: {
},
tab: {
},
bar_box: {
flex: 1,
alignItems: 'center',
justifyContent: 'flex-start',
// paddingBottom: 10,
borderBottomWidth: 2,
borderBottomColor: foundation_color,
width: 58,
marginRight: 8
},
bar_box_act: {
borderBottomWidth: 2,
borderBottomColor: promary_color
},
img_box: {
width: pxSize(30),
height: pxSize(30)
},
img_inner: {
width: '100%',
height: '100%'
},
tit_text: {
paddingTop: 10,
paddingBottom: 16,
color: second_text_color,
fontSize: third_text_size
},
tit_text_act: {
color: first_text_color,
fontWeight: 'bold'
}
})
export default TopTabBar;
\ No newline at end of file
export default [
{
isRequest: true,
title: '销售员',
value: '易凯源',
isPicker: false,
isEditText: true
},
{
isRequest: true,
title: '组织',
value: '请选择',
isPicker: true
},
{
isRequest: true,
title: '手术医院',
value: '请选择',
isPicker: true
},
{
isRequest: true,
title: '收单地点',
value: '请选择',
isPicker: true
},
{
isRequest: true,
title: '收货地点',
value: '请选择',
isPicker: true
},
{
isRequest: false,
title: '主治医生',
value: '请选择',
isPicker: true,
showInput: true
},
{
isRequest: false,
title: '手术名称',
value: '请输入',
isPicker: false
},
{
isRequest: false,
title: '手术类时间',
value: '请选择',
isPicker: true,
showDatePicker: true
},
{
isRequest: true,
title: '手术类型',
value: '请选择',
isPicker: true
},
{
isRequest: true,
title: '订单类型',
value: '请选择',
isPicker: true
},
{
isRequest: true,
title: '选择产品',
value: '请选择',
isPicker: true,
showItemPage: true
}
]
\ No newline at end of file
export const leftOptionList = [
{
title: '手术模版',
iconImg: require('../../../images/surg_temp.png'),
stencilData: [{
"id": "0",
title: '髋关节手术001',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "1",
title: '髋关节手术002',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "2",
title: '髋关节手术003',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "3",
title: '髋关节手术004',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "4",
title: '髋关节手术005',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "5",
title: '髋关节手术006',
tip1: '描述信息',
tip2: '描述信息',
select: false
}
], // 模版数据
},
{
title: '螺钉盒',
iconImg: require('../../../images/screw_box.png'),
stencilData: [{
"id": "0",
title: '髋关节手术001--ldh',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "1",
title: '髋关节手术002',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "2",
title: '髋关节手术003',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "3",
title: '髋关节手术004',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "4",
title: '髋关节手术005',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "5",
title: '髋关节手术006',
tip1: '描述信息',
tip2: '描述信息',
select: false
}
], // 模版数据
},
{
title: '器械包',
iconImg: require('../../../images/equip_bag.png'),
stencilData: [{
"id": "0",
title: '髋关节手术001----qxb',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "1",
title: '髋关节手术002',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "2",
title: '髋关节手术003',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "3",
title: '髋关节手术004',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "4",
title: '髋关节手术005',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "5",
title: '髋关节手术006',
tip1: '描述信息',
tip2: '描述信息',
select: false
}
], // 模版数据
},
{
title: '辅助工具',
iconImg: require('../../../images/auxili_tool.png'),
stencilData: [{
"id": "0",
title: '髋关节手术001------fzgj',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "1",
title: '髋关节手术002',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "2",
title: '髋关节手术003',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "3",
title: '髋关节手术004',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "4",
title: '髋关节手术005',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "5",
title: '髋关节手术006',
tip1: '描述信息',
tip2: '描述信息',
select: false
}
], // 模版数据
},
{
title: '人工髋关节假体'
},
{
title: '膝关节假体备份'
},
{
title: '骨小梁髋关节假体'
},
{
title: '骨小梁髋关节假体22'
},
{
title: '骨小梁髋关节假体33'
},
{
title: '骨小梁髋关节假体44'
},
{
title: '骨小梁髋关节假体55'
},
] // 左侧数据 - 二级菜单
\ No newline at end of file
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
SafeAreaView,
ScrollView
} from 'react-native';
import {
home_background_color,
promary_color,
safe_view
} from '../../base/BaseStyle';
import StatusBarView from '../common/StatusBarView';
import HeadBackItem from '../common/HeadBackItem';
import { FooterBtnStyle } from '../common/CellTextStyle';
class EquipConsuPage extends Component {
constructor(props) {
super(props);
this.state = {
canSubFlag: false, // 生成订单按钮样式改变
}
}
// 生成订单 点击
handleSubmit() {
}
render() {
let {canSubFlag} = this.state
let {navigation} = this.props
let {title} = navigation.state.params
return (
<View style={styles.trans_container}>
<StatusBarView
isReactStackNavigator={true}
backgroundColor={promary_color}
barStyle = 'light-content'
/>
<SafeAreaView style={safe_view}>
<HeadBackItem title={title} navigation={navigation} />
<ScrollView
style={styles.trans_main}
showsVerticalScrollIndicator={false}
>
<Text>'转单⚠️⚠️'</Text>
</ScrollView>
</SafeAreaView>
<FooterBtnStyle
style={canSubFlag ? styles.sub_btn_pro : ''}
activeOpacity={canSubFlag ? .8 : 1}
title={'生成订单'}
textStyle= {styles.sub_btn}
onPress={() => this.handleSubmit()}
/>
</View>
);
}
}
const styles = StyleSheet.create({
trans_container : {
flex: 1,
backgroundColor: home_background_color
},
trans_main : {
padding: 14
},
sub_btn_pro: {
backgroundColor: promary_color
},
sub_btn: {},
})
export default EquipConsuPage;
\ No newline at end of file
import {BaseUrl, BaseUrlOther, VERSION} from '../base/BaseConstants';
// const fetch = require("node-fetch");
//post方式请求
export const PostRequest = (url, paramsObject) => {
const opts = {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
timeout: 20000 //20s超时
};
if(paramsObject) {
opts.body = JSON.stringify(paramsObject)
}
return fetch(BaseUrl + VERSION + url, opts)
.then(response => response.json())
.then(data => data)
.catch(error => {
return {error_code: -3, error_msg:'请求异常,请重试'}
})
}
//get方式请求
export const GetRequest = (url) => {
const opts = {
method: 'GET',
headers: {
// 'Accept': 'application/json',
'Content-Type': 'application/json'
},
timeout: 20000 //20s超时
};
let endBashUrl = BaseUrl
if(!url.includes('/authorized_inventory/search')) {
endBashUrl = BaseUrlOther
}
let allUrl = endBashUrl + VERSION + url
console.warn('---allUrl--=================--', allUrl)
// return fetch(BaseUrl + VERSION + url, opts)
return fetch(allUrl, opts)
.then(response => response.json())
.then(data => data)
.catch(error => {
return {error_code: -3, error_msg:'请求异常,请重试'}
})
};
//上传
export const UploadRequest = (url,datas) => {
const opts = {
method: 'POST',
body: datas,
timeout: 20000 //20s超时
};
return fetch(`${BaseUrl}${VERSION}${url}`, opts)
.then(response => response.json())
.then(data => data)
.catch(error => {
return {flag: -3, error_msg:'请求异常,请重试'}
})
};
\ No newline at end of file
import storage from 'redux-persist/es/storage';
import {persistReducer} from 'redux-persist';
import login from './module/login';
import quick from './module/quick';
import self from './module/self';
const loginConfig = {
key: 'login',
storage,
debug: false,
blackList: []
}
const selfConfig = {
key: 'self',
storage,
debug: false,
blackList: []
}
const quickConfig = {
key: 'quick',
storage,
debug: false,
blackList: []
}
const rootReducer = {
login: persistReducer(loginConfig,login),
self: persistReducer(selfConfig,self),
quick: persistReducer(quickConfig,quick),
}
export default rootReducer;
\ No newline at end of file
import {
LOGIN_NO,
LOGIN_DOING,
LOGIN_SUCCESS,
LOGIN_FAILURE,
EXIT_LOGIN,
AUTO_LOGIN_SUCCESS,
AUTO_LOGIN_FAILURE
} from '../../base/ActionTypes';
// 登录状态
const defaultState = {
loginState:LOGIN_NO, // 登录状态
userInfo:{}, // 保存用户信息
token:null,
username:'',
password:''
}
export default login = (state = defaultState, action) => {
switch (action.type) {
case LOGIN_DOING:
return Object.assign({}, state, {
loginState: LOGIN_DOING
});
case LOGIN_SUCCESS:
return Object.assign({}, state, {
loginState:LOGIN_SUCCESS,
userInfo:action.rawData,
token:action.rawData.access_token,
username:action.username,
password:action.password
});
case LOGIN_FAILURE:
return Object.assign({}, state, {
loginState:LOGIN_FAILURE
});
case EXIT_LOGIN:
return Object.assign({}, state,{
token: null,
loginState:LOGIN_NO,
userInfo:{},
password: ''
});
case AUTO_LOGIN_SUCCESS:
return Object.assign({}, state, {
loginState: LOGIN_SUCCESS,
userInfo: action.rawData,
token: action.rawData.access_token
});
case AUTO_LOGIN_FAILURE:
return Object.assign({}, state, {
loginState: LOGIN_FAILURE
});
default: // need this for default case
return state
}
}
\ No newline at end of file
import {
QUICK_ORDER_LIST_NO,
QUICK_ORDER_LIST_DOING,
QUICK_ORDER_LIST_SUCCESS,
QUICK_ORDER_LIST_FAILURE,
QUICK_SUBMIT_NO,
QUICK_SUBMIT_DOING,
QUICK_SUBMIT_SUCCESS,
QUICK_SUBMIT_FAILURE
} from '../../base/ActionTypes';
// 快速下单状态
const defaultState = {
quick_list_status: QUICK_ORDER_LIST_NO, // 获取数据状态
submit_quick_order_status: QUICK_SUBMIT_NO, // 提交订单状态
quickOrderOption: {} // 当前临时存储数据
}
export default self = (state = defaultState, action) => {
switch (action.type) {
case QUICK_ORDER_LIST_DOING:
return Object.assign({}, state, {
quick_list_status: QUICK_ORDER_LIST_DOING
});
case QUICK_ORDER_LIST_SUCCESS:
return Object.assign({}, state, {
quick_list_status: QUICK_ORDER_LIST_SUCCESS,
quickOrderOption: action.rawData
})
case QUICK_ORDER_LIST_FAILURE:
return Object.assign({}, state, {
quick_list_status: QUICK_ORDER_LIST_FAILURE
})
case QUICK_SUBMIT_DOING:
return Object.assign({}, state, {
submit_quick_order_status: QUICK_SUBMIT_DOING
});
case QUICK_SUBMIT_SUCCESS:
return Object.assign({}, state, {
submit_quick_order_status: QUICK_SUBMIT_SUCCESS,
quickOrderOption: {} // 清空当前临时数据
})
case QUICK_SUBMIT_FAILURE:
return Object.assign({}, state, {
submit_quick_order_status: QUICK_SUBMIT_FAILURE
})
default:
return state;
}
}
\ No newline at end of file
import {
SELF_ORDER_LIST_NO,
SELF_ORDER_LIST_DOING,
SELF_ORDER_LIST_SUCCESS,
SELF_ORDER_LIST_FAILURE,
SELF_SUBMIT_NO,
SELF_SUBMIT_DOING,
SELF_SUBMIT_SUCCESS,
SELF_SUBMIT_FAILURE
} from '../../base/ActionTypes';
// 自助下单状态
const defaultState = {
self_list_status: SELF_ORDER_LIST_NO, // 获取数据状态
submit_self_order_status: SELF_SUBMIT_NO, // 提交订单状态
selfOrderOption: {} // 当前临时存储数据
}
export default self = (state = defaultState, action) => {
switch (action.type) {
case SELF_ORDER_LIST_DOING:
return Object.assign({}, state, {
self_list_status: SELF_ORDER_LIST_DOING
});
case SELF_ORDER_LIST_SUCCESS:
return Object.assign({}, state, {
self_list_status: SELF_ORDER_LIST_SUCCESS,
selfOrderOption: action.rawData
})
case SELF_ORDER_LIST_FAILURE:
return Object.assign({}, state, {
self_list_status: SELF_ORDER_LIST_FAILURE
})
case SELF_SUBMIT_DOING:
return Object.assign({}, state, {
submit_self_order_status: SELF_SUBMIT_DOING
});
case SELF_SUBMIT_SUCCESS:
return Object.assign({}, state, {
submit_self_order_status: SELF_SUBMIT_SUCCESS,
selfOrderOption: {} // 清空当前临时数据
})
case SELF_SUBMIT_FAILURE:
return Object.assign({}, state, {
submit_self_order_status: SELF_SUBMIT_FAILURE
})
default:
return state;
}
}
\ No newline at end of file
import {createStore, applyMiddleware, compose} from 'redux';
import thunkMiddleware from 'redux-thunk';
import rootReducer from '../reducers';
import {persistStore,persistCombineReducers} from 'redux-persist';
import reconciler from 'redux-persist/lib/stateReconciler/autoMergeLevel2';
import storage from 'redux-persist/es/storage';
const config = {
key: 'root',
storage,
stateReconciler: reconciler,
debug: false
}
const middleWares = [
thunkMiddleware
];
const reducers = persistCombineReducers(config,rootReducer);
const enhances = [applyMiddleware(...middleWares)];
export default function configureStore(initialState) {
const store = createStore(reducers,initialState,compose(...enhances));
persistStore(store); //暂时磁盘保存数据
return store
}
import Toast from 'react-native-root-toast';
import {Dimensions, Platform,PixelRatio} from "react-native";
export const show = (data) => {
if(data != null) {
Toast.show(data, {
duration: Toast.durations.LONG,
position: Toast.positions.CENTER,
shadow: true,
hideOnPress: true,
delay: 0,
visible: true,
backgroundColor: '#222',
textColor: '#fff'
})
}
}
// 判断属性是否为空
export const isEmpty = (data) => {
let flag = false
if(!data || data == '') {
flag = true
}
return flag
}
const X_WIDTH = 375;
const X_HEIGHT = 812;
const XS_MAX_WIDTH = 414;
const XS_MAX_HEIGHT = 896;
const screenW = Dimensions.get('window').width;
const screenH = Dimensions.get('window').height;
//判断是否iPhone x
export const isIphoneX = () => {
return (
Platform.OS === 'ios' &&
((screenH === X_HEIGHT && screenW === X_WIDTH) ||
(screenH === XS_MAX_HEIGHT && screenW === XS_MAX_WIDTH))
)
};
// 修改日期格式 2020-04-23 17:41 yyyy-MM-ddThh:mm:ss
export const changeDateFormat = (time, format) => {
if( time === '' || !time ){ return }
let _time = new Date(time);
let date = {
"M+": _time.getMonth() + 1,
"d+": _time.getDate(),
"h+": _time.getHours(),
"m+": _time.getMinutes(),
"s+": _time.getSeconds(),
"q+": Math.floor((_time.getMonth() + 3) / 3),
"S+": _time.getMilliseconds()
};
if (/(y+)/i.test(format)) {
format = format.replace(RegExp.$1, (_time.getFullYear() + '').substr(4 - RegExp.$1.length));
}
for (let k in date) {
if (new RegExp("(" + k + ")").test(format)) {
format = format.replace(RegExp.$1, RegExp.$1.length == 1
? date[k] : ("00" + date[k]).substr(("" + date[k]).length));
}
}
return format;
}
// 格式化 2020-04-23 17:41 为日期
export const formatStrForDate = (str) => {
console.warn('str---', str)
if(str === '' || !str) {
return
}
let date
let tempArr = str.split('-')
let endArr = tempArr[2].split(' ')
let hsArr = endArr[1].split(':')
let dateObj = {
'year': tempArr[0],
'month': tempArr[1] - 1,
'day': endArr[0],
'hour': hsArr[0],
'minute': hsArr[1]
}
date = new Date(dateObj['year'], dateObj['month'], dateObj['day'], dateObj['hour'], dateObj['minute'])
console.warn('----date---', date)
return date
}
/**
* 拼接get请求url与参数
* @param {String} url 接口地址
* @param {Object} params 请求参数
*/
export const getUrlParams = (url, params) => {
let paramsArray = [];
// params = {
// access_token : 'token1313i12213',
// org_code: 'A02',
// eller_code : 'shi.ming'
// }
Object.keys(params).forEach(
key => paramsArray.push(`${key}=${params[key]}`)
)
if (url.search(/\?/) === -1) {
url += `?${paramsArray.join('&')}`
} else {
url += `&${paramsArray.join('&')}`
}
return url;
}
/**
* 去重引用类型数组
* @param {Array} arr 原数组
* @param {String} typeName 去重的唯一字段
*/
export const dedupQuoteArray = (arr, typeName) => {
let result = [], tmp = {}
if( arr.length ) {
result = arr.reduce(function(init, item) {
tmp[item[typeName]] ? '' : ( tmp[item[typeName]] = true && init.push(item) )
return init
}, [])
}
return result;
}
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
"plugins": [
["import", { libraryName: "@ant-design/react-native" }] // 与 Web 平台的区别是不需要设置 style
],
};
/**
* @format
*/
import {AppRegistry} from 'react-native';
import App from './App';
import {name as appName} from './app.json';
import 'react-native-gesture-handler';
AppRegistry.registerComponent(appName, () => App);
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>localhost</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
</dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
00E356F31AD99517003FC87E /* OrderAppTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* OrderAppTests.m */; };
13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; };
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
2461D27EB2EE70122902A35E /* libPods-OrderApp-OrderAppTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 92AED781923307855165148B /* libPods-OrderApp-OrderAppTests.a */; };
2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
2DCD954D1E0B4F2C00145EB5 /* OrderAppTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* OrderAppTests.m */; };
6692C6B2600DAB12F1EC2F4B /* libPods-OrderApp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F9B4A33A744BDE3AD8306FE /* libPods-OrderApp.a */; };
78CCC99D0FD3A1F45178D5DF /* libPods-OrderApp-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C4ADB9BFA4ACF61CE9F707FB /* libPods-OrderApp-tvOS.a */; };
B742DE509CCA7F52C0E1A4DC /* libPods-OrderApp-tvOSTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = EE198BD41EDC8DD1EB6B513B /* libPods-OrderApp-tvOSTests.a */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 13B07F861A680F5B00A75B9A;
remoteInfo = OrderApp;
};
2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 2D02E47A1E0B4A5D006451C7;
remoteInfo = "OrderApp-tvOS";
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = "<group>"; };
00E356EE1AD99517003FC87E /* OrderAppTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = OrderAppTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
00E356F21AD99517003FC87E /* OrderAppTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OrderAppTests.m; sourceTree = "<group>"; };
031C83FAB3D3C79F17E43986 /* Pods-OrderApp-OrderAppTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OrderApp-OrderAppTests.debug.xcconfig"; path = "Target Support Files/Pods-OrderApp-OrderAppTests/Pods-OrderApp-OrderAppTests.debug.xcconfig"; sourceTree = "<group>"; };
13B07F961A680F5B00A75B9A /* OrderApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OrderApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = OrderApp/AppDelegate.h; sourceTree = "<group>"; };
13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = OrderApp/AppDelegate.m; sourceTree = "<group>"; };
13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = OrderApp/Images.xcassets; sourceTree = "<group>"; };
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = OrderApp/Info.plist; sourceTree = "<group>"; };
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = OrderApp/main.m; sourceTree = "<group>"; };
198118769BDF34FE13CA8D77 /* Pods-OrderApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OrderApp.debug.xcconfig"; path = "Target Support Files/Pods-OrderApp/Pods-OrderApp.debug.xcconfig"; sourceTree = "<group>"; };
2D02E47B1E0B4A5D006451C7 /* OrderApp-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "OrderApp-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
2D02E4901E0B4A5D006451C7 /* OrderApp-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "OrderApp-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
5F9B4A33A744BDE3AD8306FE /* libPods-OrderApp.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-OrderApp.a"; sourceTree = BUILT_PRODUCTS_DIR; };
68E22B7502EA7C04EA086A19 /* Pods-OrderApp-tvOSTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OrderApp-tvOSTests.release.xcconfig"; path = "Target Support Files/Pods-OrderApp-tvOSTests/Pods-OrderApp-tvOSTests.release.xcconfig"; sourceTree = "<group>"; };
92AED781923307855165148B /* libPods-OrderApp-OrderAppTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-OrderApp-OrderAppTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
A9D26088C3AFDC775EA0F896 /* Pods-OrderApp-tvOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OrderApp-tvOS.debug.xcconfig"; path = "Target Support Files/Pods-OrderApp-tvOS/Pods-OrderApp-tvOS.debug.xcconfig"; sourceTree = "<group>"; };
B9365A665709E0C063171EEF /* Pods-OrderApp-tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OrderApp-tvOS.release.xcconfig"; path = "Target Support Files/Pods-OrderApp-tvOS/Pods-OrderApp-tvOS.release.xcconfig"; sourceTree = "<group>"; };
C4ADB9BFA4ACF61CE9F707FB /* libPods-OrderApp-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-OrderApp-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
C9293AE2520DF398965715F2 /* Pods-OrderApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OrderApp.release.xcconfig"; path = "Target Support Files/Pods-OrderApp/Pods-OrderApp.release.xcconfig"; sourceTree = "<group>"; };
E48FAABB18C0223E89A0D159 /* Pods-OrderApp-tvOSTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OrderApp-tvOSTests.debug.xcconfig"; path = "Target Support Files/Pods-OrderApp-tvOSTests/Pods-OrderApp-tvOSTests.debug.xcconfig"; sourceTree = "<group>"; };
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; };
EE198BD41EDC8DD1EB6B513B /* libPods-OrderApp-tvOSTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-OrderApp-tvOSTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
FD356E5457C944625FCE75F6 /* Pods-OrderApp-OrderAppTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OrderApp-OrderAppTests.release.xcconfig"; path = "Target Support Files/Pods-OrderApp-OrderAppTests/Pods-OrderApp-OrderAppTests.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
00E356EB1AD99517003FC87E /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
2461D27EB2EE70122902A35E /* libPods-OrderApp-OrderAppTests.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
6692C6B2600DAB12F1EC2F4B /* libPods-OrderApp.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
2D02E4781E0B4A5D006451C7 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
78CCC99D0FD3A1F45178D5DF /* libPods-OrderApp-tvOS.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
2D02E48D1E0B4A5D006451C7 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
B742DE509CCA7F52C0E1A4DC /* libPods-OrderApp-tvOSTests.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
00E356EF1AD99517003FC87E /* OrderAppTests */ = {
isa = PBXGroup;
children = (
00E356F21AD99517003FC87E /* OrderAppTests.m */,
00E356F01AD99517003FC87E /* Supporting Files */,
);
path = OrderAppTests;
sourceTree = "<group>";
};
00E356F01AD99517003FC87E /* Supporting Files */ = {
isa = PBXGroup;
children = (
00E356F11AD99517003FC87E /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
13B07FAE1A68108700A75B9A /* OrderApp */ = {
isa = PBXGroup;
children = (
008F07F21AC5B25A0029DE68 /* main.jsbundle */,
13B07FAF1A68108700A75B9A /* AppDelegate.h */,
13B07FB01A68108700A75B9A /* AppDelegate.m */,
13B07FB51A68108700A75B9A /* Images.xcassets */,
13B07FB61A68108700A75B9A /* Info.plist */,
13B07FB11A68108700A75B9A /* LaunchScreen.xib */,
13B07FB71A68108700A75B9A /* main.m */,
);
name = OrderApp;
sourceTree = "<group>";
};
2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
isa = PBXGroup;
children = (
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
ED2971642150620600B7C4FE /* JavaScriptCore.framework */,
5F9B4A33A744BDE3AD8306FE /* libPods-OrderApp.a */,
92AED781923307855165148B /* libPods-OrderApp-OrderAppTests.a */,
C4ADB9BFA4ACF61CE9F707FB /* libPods-OrderApp-tvOS.a */,
EE198BD41EDC8DD1EB6B513B /* libPods-OrderApp-tvOSTests.a */,
);
name = Frameworks;
sourceTree = "<group>";
};
832341AE1AAA6A7D00B99B32 /* Libraries */ = {
isa = PBXGroup;
children = (
);
name = Libraries;
sourceTree = "<group>";
};
83CBB9F61A601CBA00E9B192 = {
isa = PBXGroup;
children = (
13B07FAE1A68108700A75B9A /* OrderApp */,
832341AE1AAA6A7D00B99B32 /* Libraries */,
00E356EF1AD99517003FC87E /* OrderAppTests */,
83CBBA001A601CBA00E9B192 /* Products */,
2D16E6871FA4F8E400B85C8A /* Frameworks */,
C5F5240879AD56E5E34D1F9A /* Pods */,
);
indentWidth = 2;
sourceTree = "<group>";
tabWidth = 2;
usesTabs = 0;
};
83CBBA001A601CBA00E9B192 /* Products */ = {
isa = PBXGroup;
children = (
13B07F961A680F5B00A75B9A /* OrderApp.app */,
00E356EE1AD99517003FC87E /* OrderAppTests.xctest */,
2D02E47B1E0B4A5D006451C7 /* OrderApp-tvOS.app */,
2D02E4901E0B4A5D006451C7 /* OrderApp-tvOSTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
C5F5240879AD56E5E34D1F9A /* Pods */ = {
isa = PBXGroup;
children = (
198118769BDF34FE13CA8D77 /* Pods-OrderApp.debug.xcconfig */,
C9293AE2520DF398965715F2 /* Pods-OrderApp.release.xcconfig */,
031C83FAB3D3C79F17E43986 /* Pods-OrderApp-OrderAppTests.debug.xcconfig */,
FD356E5457C944625FCE75F6 /* Pods-OrderApp-OrderAppTests.release.xcconfig */,
A9D26088C3AFDC775EA0F896 /* Pods-OrderApp-tvOS.debug.xcconfig */,
B9365A665709E0C063171EEF /* Pods-OrderApp-tvOS.release.xcconfig */,
E48FAABB18C0223E89A0D159 /* Pods-OrderApp-tvOSTests.debug.xcconfig */,
68E22B7502EA7C04EA086A19 /* Pods-OrderApp-tvOSTests.release.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
00E356ED1AD99517003FC87E /* OrderAppTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "OrderAppTests" */;
buildPhases = (
7C449507ABCCF23676BDA93B /* [CP] Check Pods Manifest.lock */,
00E356EA1AD99517003FC87E /* Sources */,
00E356EB1AD99517003FC87E /* Frameworks */,
00E356EC1AD99517003FC87E /* Resources */,
);
buildRules = (
);
dependencies = (
00E356F51AD99517003FC87E /* PBXTargetDependency */,
);
name = OrderAppTests;
productName = OrderAppTests;
productReference = 00E356EE1AD99517003FC87E /* OrderAppTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
13B07F861A680F5B00A75B9A /* OrderApp */ = {
isa = PBXNativeTarget;
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "OrderApp" */;
buildPhases = (
D7BB6497A4126570A633BE1C /* [CP] Check Pods Manifest.lock */,
FD10A7F022414F080027D42C /* Start Packager */,
13B07F871A680F5B00A75B9A /* Sources */,
13B07F8C1A680F5B00A75B9A /* Frameworks */,
13B07F8E1A680F5B00A75B9A /* Resources */,
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
);
buildRules = (
);
dependencies = (
);
name = OrderApp;
productName = OrderApp;
productReference = 13B07F961A680F5B00A75B9A /* OrderApp.app */;
productType = "com.apple.product-type.application";
};
2D02E47A1E0B4A5D006451C7 /* OrderApp-tvOS */ = {
isa = PBXNativeTarget;
buildConfigurationList = 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "OrderApp-tvOS" */;
buildPhases = (
589FDE75F967122E25A475CC /* [CP] Check Pods Manifest.lock */,
FD10A7F122414F3F0027D42C /* Start Packager */,
2D02E4771E0B4A5D006451C7 /* Sources */,
2D02E4781E0B4A5D006451C7 /* Frameworks */,
2D02E4791E0B4A5D006451C7 /* Resources */,
2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */,
);
buildRules = (
);
dependencies = (
);
name = "OrderApp-tvOS";
productName = "OrderApp-tvOS";
productReference = 2D02E47B1E0B4A5D006451C7 /* OrderApp-tvOS.app */;
productType = "com.apple.product-type.application";
};
2D02E48F1E0B4A5D006451C7 /* OrderApp-tvOSTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "OrderApp-tvOSTests" */;
buildPhases = (
59E73AEC962C393288272D05 /* [CP] Check Pods Manifest.lock */,
2D02E48C1E0B4A5D006451C7 /* Sources */,
2D02E48D1E0B4A5D006451C7 /* Frameworks */,
2D02E48E1E0B4A5D006451C7 /* Resources */,
);
buildRules = (
);
dependencies = (
2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */,
);
name = "OrderApp-tvOSTests";
productName = "OrderApp-tvOSTests";
productReference = 2D02E4901E0B4A5D006451C7 /* OrderApp-tvOSTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
83CBB9F71A601CBA00E9B192 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1130;
TargetAttributes = {
00E356ED1AD99517003FC87E = {
CreatedOnToolsVersion = 6.2;
TestTargetID = 13B07F861A680F5B00A75B9A;
};
13B07F861A680F5B00A75B9A = {
LastSwiftMigration = 1120;
};
2D02E47A1E0B4A5D006451C7 = {
CreatedOnToolsVersion = 8.2.1;
ProvisioningStyle = Automatic;
};
2D02E48F1E0B4A5D006451C7 = {
CreatedOnToolsVersion = 8.2.1;
ProvisioningStyle = Automatic;
TestTargetID = 2D02E47A1E0B4A5D006451C7;
};
};
};
buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "OrderApp" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 83CBB9F61A601CBA00E9B192;
productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
13B07F861A680F5B00A75B9A /* OrderApp */,
00E356ED1AD99517003FC87E /* OrderAppTests */,
2D02E47A1E0B4A5D006451C7 /* OrderApp-tvOS */,
2D02E48F1E0B4A5D006451C7 /* OrderApp-tvOSTests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
00E356EC1AD99517003FC87E /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
13B07F8E1A680F5B00A75B9A /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
2D02E4791E0B4A5D006451C7 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
2D02E48E1E0B4A5D006451C7 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Bundle React Native code and images";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
};
2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Bundle React Native Code And Images";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
};
589FDE75F967122E25A475CC /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-OrderApp-tvOS-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
59E73AEC962C393288272D05 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-OrderApp-tvOSTests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
7C449507ABCCF23676BDA93B /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-OrderApp-OrderAppTests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
D7BB6497A4126570A633BE1C /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-OrderApp-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
FD10A7F022414F080027D42C /* Start Packager */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Start Packager";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n";
showEnvVarsInLog = 0;
};
FD10A7F122414F3F0027D42C /* Start Packager */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Start Packager";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
00E356EA1AD99517003FC87E /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
00E356F31AD99517003FC87E /* OrderAppTests.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
13B07F871A680F5B00A75B9A /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */,
13B07FC11A68108700A75B9A /* main.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
2D02E4771E0B4A5D006451C7 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */,
2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
2D02E48C1E0B4A5D006451C7 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
2DCD954D1E0B4F2C00145EB5 /* OrderAppTests.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
00E356F51AD99517003FC87E /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 13B07F861A680F5B00A75B9A /* OrderApp */;
targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */;
};
2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 2D02E47A1E0B4A5D006451C7 /* OrderApp-tvOS */;
targetProxy = 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = {
isa = PBXVariantGroup;
children = (
13B07FB21A68108700A75B9A /* Base */,
);
name = LaunchScreen.xib;
path = OrderApp;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
00E356F61AD99517003FC87E /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 031C83FAB3D3C79F17E43986 /* Pods-OrderApp-OrderAppTests.debug.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = OrderAppTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
OTHER_LDFLAGS = (
"-ObjC",
"-lc++",
"$(inherited)",
);
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/OrderApp.app/OrderApp";
};
name = Debug;
};
00E356F71AD99517003FC87E /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = FD356E5457C944625FCE75F6 /* Pods-OrderApp-OrderAppTests.release.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
COPY_PHASE_STRIP = NO;
INFOPLIST_FILE = OrderAppTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
OTHER_LDFLAGS = (
"-ObjC",
"-lc++",
"$(inherited)",
);
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/OrderApp.app/OrderApp";
};
name = Release;
};
13B07F941A680F5B00A75B9A /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 198118769BDF34FE13CA8D77 /* Pods-OrderApp.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 1;
ENABLE_BITCODE = NO;
GCC_PREPROCESSOR_DEFINITIONS = (
"$(inherited)",
"FB_SONARKIT_ENABLED=1",
);
INFOPLIST_FILE = OrderApp/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
"-lc++",
);
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = OrderApp;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
};
13B07F951A680F5B00A75B9A /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = C9293AE2520DF398965715F2 /* Pods-OrderApp.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 1;
INFOPLIST_FILE = OrderApp/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
"-lc++",
);
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = OrderApp;
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
};
2D02E4971E0B4A5E006451C7 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = A9D26088C3AFDC775EA0F896 /* Pods-OrderApp-tvOS.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CLANG_ANALYZER_NONNULL = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_TESTABILITY = YES;
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = "OrderApp-tvOS/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
"-lc++",
);
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.OrderApp-tvOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.2;
};
name = Debug;
};
2D02E4981E0B4A5E006451C7 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = B9365A665709E0C063171EEF /* Pods-OrderApp-tvOS.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CLANG_ANALYZER_NONNULL = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = "OrderApp-tvOS/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
"-lc++",
);
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.OrderApp-tvOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.2;
};
name = Release;
};
2D02E4991E0B4A5E006451C7 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = E48FAABB18C0223E89A0D159 /* Pods-OrderApp-tvOSTests.debug.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_ANALYZER_NONNULL = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_TESTABILITY = YES;
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = "OrderApp-tvOSTests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
"-lc++",
);
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.OrderApp-tvOSTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/OrderApp-tvOS.app/OrderApp-tvOS";
TVOS_DEPLOYMENT_TARGET = 10.1;
};
name = Debug;
};
2D02E49A1E0B4A5E006451C7 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 68E22B7502EA7C04EA086A19 /* Pods-OrderApp-tvOSTests.release.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_ANALYZER_NONNULL = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = "OrderApp-tvOSTests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
"-lc++",
);
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.OrderApp-tvOSTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/OrderApp-tvOS.app/OrderApp-tvOS";
TVOS_DEPLOYMENT_TARGET = 10.1;
};
name = Release;
};
83CBBA201A601CBA00E9B192 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)";
LIBRARY_SEARCH_PATHS = (
"\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
"\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"",
"\"$(inherited)\"",
);
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
};
name = Debug;
};
83CBBA211A601CBA00E9B192 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)";
LIBRARY_SEARCH_PATHS = (
"\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
"\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"",
"\"$(inherited)\"",
);
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "OrderAppTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
00E356F61AD99517003FC87E /* Debug */,
00E356F71AD99517003FC87E /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "OrderApp" */ = {
isa = XCConfigurationList;
buildConfigurations = (
13B07F941A680F5B00A75B9A /* Debug */,
13B07F951A680F5B00A75B9A /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "OrderApp-tvOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
2D02E4971E0B4A5E006451C7 /* Debug */,
2D02E4981E0B4A5E006451C7 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "OrderApp-tvOSTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
2D02E4991E0B4A5E006451C7 /* Debug */,
2D02E49A1E0B4A5E006451C7 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "OrderApp" */ = {
isa = XCConfigurationList;
buildConfigurations = (
83CBBA201A601CBA00E9B192 /* Debug */,
83CBBA211A601CBA00E9B192 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
}
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1130"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
BuildableName = "OrderApp-tvOS.app"
BlueprintName = "OrderApp-tvOS"
ReferencedContainer = "container:OrderApp.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7"
BuildableName = "OrderApp-tvOSTests.xctest"
BlueprintName = "OrderApp-tvOSTests"
ReferencedContainer = "container:OrderApp.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
BuildableName = "OrderApp-tvOS.app"
BlueprintName = "OrderApp-tvOS"
ReferencedContainer = "container:OrderApp.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
BuildableName = "OrderApp-tvOS.app"
BlueprintName = "OrderApp-tvOS"
ReferencedContainer = "container:OrderApp.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1130"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "OrderApp.app"
BlueprintName = "OrderApp"
ReferencedContainer = "container:OrderApp.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
BuildableName = "OrderAppTests.xctest"
BlueprintName = "OrderAppTests"
ReferencedContainer = "container:OrderApp.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "OrderApp.app"
BlueprintName = "OrderApp"
ReferencedContainer = "container:OrderApp.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "OrderApp.app"
BlueprintName = "OrderApp"
ReferencedContainer = "container:OrderApp.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:OrderApp.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
#import <React/RCTBridgeDelegate.h>
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate>
@property (nonatomic, strong) UIWindow *window;
@end
#import "AppDelegate.h"
#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#if DEBUG
#import <FlipperKit/FlipperClient.h>
#import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h>
#import <FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.h>
#import <FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h>
#import <SKIOSNetworkPlugin/SKIOSNetworkAdapter.h>
#import <FlipperKitReactPlugin/FlipperKitReactPlugin.h>
static void InitializeFlipper(UIApplication *application) {
FlipperClient *client = [FlipperClient sharedClient];
SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults];
[client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]];
[client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]];
[client addPlugin:[FlipperKitReactPlugin new]];
[client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
[client start];
}
#endif
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
#if DEBUG
InitializeFlipper(application);
#endif
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
moduleName:@"OrderApp"
initialProperties:nil];
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [UIViewController new];
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
return YES;
}
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
#else
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
}
@end
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7702" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7701"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Powered by React Native" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
<rect key="frame" x="20" y="439" width="441" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="OrderApp" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
<rect key="frame" x="20" y="140" width="441" height="43"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="548" y="455"/>
</view>
</objects>
</document>
{
"images" : [
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>zh_CN</string>
<key>CFBundleDisplayName</key>
<string>OrderApp</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSExceptionDomains</key>
<dict>
<key>localhost</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
</dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<!-- add -->
<key>NSMicrophoneUsageDescription</key>
<string>This sample uses the microphone to record your speech and convert it to text.</string>
</dict>
</plist>
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char * argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import <React/RCTLog.h>
#import <React/RCTRootView.h>
#define TIMEOUT_SECONDS 600
#define TEXT_TO_LOOK_FOR @"Welcome to React"
@interface OrderAppTests : XCTestCase
@end
@implementation OrderAppTests
- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
{
if (test(view)) {
return YES;
}
for (UIView *subview in [view subviews]) {
if ([self findSubviewInView:subview matching:test]) {
return YES;
}
}
return NO;
}
- (void)testRendersWelcomeScreen
{
UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
BOOL foundElement = NO;
__block NSString *redboxError = nil;
#ifdef DEBUG
RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
if (level >= RCTLogLevelError) {
redboxError = message;
}
});
#endif
while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
[[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
[[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) {
if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
return YES;
}
return NO;
}];
}
#ifdef DEBUG
RCTSetLogFunction(RCTDefaultLogFunction);
#endif
XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
}
@end
source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
def add_flipper_pods!(versions = {})
versions['Flipper'] ||= '~> 0.33.1'
versions['DoubleConversion'] ||= '1.1.7'
versions['Flipper-Folly'] ||= '~> 2.1'
versions['Flipper-Glog'] ||= '0.3.6'
versions['Flipper-PeerTalk'] ||= '~> 0.0.4'
versions['Flipper-RSocket'] ||= '~> 1.0'
pod 'FlipperKit', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FlipperKitLayoutPlugin', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/SKIOSNetworkPlugin', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FlipperKitUserDefaultsPlugin', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FlipperKitReactPlugin', versions['Flipper'], :configuration => 'Debug'
# List all transitive dependencies for FlipperKit pods
# to avoid them being linked in Release builds
pod 'Flipper', versions['Flipper'], :configuration => 'Debug'
pod 'Flipper-DoubleConversion', versions['DoubleConversion'], :configuration => 'Debug'
pod 'Flipper-Folly', versions['Flipper-Folly'], :configuration => 'Debug'
pod 'Flipper-Glog', versions['Flipper-Glog'], :configuration => 'Debug'
pod 'Flipper-PeerTalk', versions['Flipper-PeerTalk'], :configuration => 'Debug'
pod 'Flipper-RSocket', versions['Flipper-RSocket'], :configuration => 'Debug'
pod 'FlipperKit/Core', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/CppBridge', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FBCxxFollyDynamicConvert', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FBDefines', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FKPortForwarding', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FlipperKitHighlightOverlay', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FlipperKitLayoutTextSearchable', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FlipperKitNetworkPlugin', versions['Flipper'], :configuration => 'Debug'
end
# Post Install processing for Flipper
def flipper_post_install(installer)
installer.pods_project.targets.each do |target|
if target.name == 'YogaKit'
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.1'
end
end
end
end
target 'OrderApp' do
# Pods for OrderApp
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga', :modular_headers => true
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'RNFS', :path => '../node_modules/react-native-fs'
pod 'react-native-viewpager', :path => '../node_modules/@react-native-community/viewpager'
pod 'RNAudio', :path => '../node_modules/react-native-audio'
target 'OrderAppTests' do
inherit! :complete
# Pods for testing
end
use_native_modules!
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
add_flipper_pods!
post_install do |installer|
flipper_post_install(installer)
end
end
target 'OrderApp-tvOS' do
# Pods for OrderApp-tvOS
target 'OrderApp-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
PODS:
- boost-for-react-native (1.63.0)
- CocoaAsyncSocket (7.6.4)
- CocoaLibEvent (1.0.0)
- DoubleConversion (1.1.6)
- FBLazyVector (0.62.2)
- FBReactNativeSpec (0.62.2):
- Folly (= 2018.10.22.00)
- RCTRequired (= 0.62.2)
- RCTTypeSafety (= 0.62.2)
- React-Core (= 0.62.2)
- React-jsi (= 0.62.2)
- ReactCommon/turbomodule/core (= 0.62.2)
- Flipper (0.33.1):
- Flipper-Folly (~> 2.1)
- Flipper-RSocket (~> 1.0)
- Flipper-DoubleConversion (1.1.7)
- Flipper-Folly (2.2.0):
- boost-for-react-native
- CocoaLibEvent (~> 1.0)
- Flipper-DoubleConversion
- Flipper-Glog
- OpenSSL-Universal (= 1.0.2.19)
- Flipper-Glog (0.3.6)
- Flipper-PeerTalk (0.0.4)
- Flipper-RSocket (1.1.0):
- Flipper-Folly (~> 2.2)
- FlipperKit (0.33.1):
- FlipperKit/Core (= 0.33.1)
- FlipperKit/Core (0.33.1):
- Flipper (~> 0.33.1)
- FlipperKit/CppBridge
- FlipperKit/FBCxxFollyDynamicConvert
- FlipperKit/FBDefines
- FlipperKit/FKPortForwarding
- FlipperKit/CppBridge (0.33.1):
- Flipper (~> 0.33.1)
- FlipperKit/FBCxxFollyDynamicConvert (0.33.1):
- Flipper-Folly (~> 2.1)
- FlipperKit/FBDefines (0.33.1)
- FlipperKit/FKPortForwarding (0.33.1):
- CocoaAsyncSocket (~> 7.6)
- Flipper-PeerTalk (~> 0.0.4)
- FlipperKit/FlipperKitHighlightOverlay (0.33.1)
- FlipperKit/FlipperKitLayoutPlugin (0.33.1):
- FlipperKit/Core
- FlipperKit/FlipperKitHighlightOverlay
- FlipperKit/FlipperKitLayoutTextSearchable
- YogaKit (~> 1.18)
- FlipperKit/FlipperKitLayoutTextSearchable (0.33.1)
- FlipperKit/FlipperKitNetworkPlugin (0.33.1):
- FlipperKit/Core
- FlipperKit/FlipperKitReactPlugin (0.33.1):
- FlipperKit/Core
- FlipperKit/FlipperKitUserDefaultsPlugin (0.33.1):
- FlipperKit/Core
- FlipperKit/SKIOSNetworkPlugin (0.33.1):
- FlipperKit/Core
- FlipperKit/FlipperKitNetworkPlugin
- Folly (2018.10.22.00):
- boost-for-react-native
- DoubleConversion
- Folly/Default (= 2018.10.22.00)
- glog
- Folly/Default (2018.10.22.00):
- boost-for-react-native
- DoubleConversion
- glog
- glog (0.3.5)
- OpenSSL-Universal (1.0.2.19):
- OpenSSL-Universal/Static (= 1.0.2.19)
- OpenSSL-Universal/Static (1.0.2.19)
- RCTRequired (0.62.2)
- RCTTypeSafety (0.62.2):
- FBLazyVector (= 0.62.2)
- Folly (= 2018.10.22.00)
- RCTRequired (= 0.62.2)
- React-Core (= 0.62.2)
- React (0.62.2):
- React-Core (= 0.62.2)
- React-Core/DevSupport (= 0.62.2)
- React-Core/RCTWebSocket (= 0.62.2)
- React-RCTActionSheet (= 0.62.2)
- React-RCTAnimation (= 0.62.2)
- React-RCTBlob (= 0.62.2)
- React-RCTImage (= 0.62.2)
- React-RCTLinking (= 0.62.2)
- React-RCTNetwork (= 0.62.2)
- React-RCTSettings (= 0.62.2)
- React-RCTText (= 0.62.2)
- React-RCTVibration (= 0.62.2)
- React-Core (0.62.2):
- Folly (= 2018.10.22.00)
- glog
- React-Core/Default (= 0.62.2)
- React-cxxreact (= 0.62.2)
- React-jsi (= 0.62.2)
- React-jsiexecutor (= 0.62.2)
- Yoga
- React-Core/CoreModulesHeaders (0.62.2):
- Folly (= 2018.10.22.00)
- glog
- React-Core/Default
- React-cxxreact (= 0.62.2)
- React-jsi (= 0.62.2)
- React-jsiexecutor (= 0.62.2)
- Yoga
- React-Core/Default (0.62.2):
- Folly (= 2018.10.22.00)
- glog
- React-cxxreact (= 0.62.2)
- React-jsi (= 0.62.2)
- React-jsiexecutor (= 0.62.2)
- Yoga
- React-Core/DevSupport (0.62.2):
- Folly (= 2018.10.22.00)
- glog
- React-Core/Default (= 0.62.2)
- React-Core/RCTWebSocket (= 0.62.2)
- React-cxxreact (= 0.62.2)
- React-jsi (= 0.62.2)
- React-jsiexecutor (= 0.62.2)
- React-jsinspector (= 0.62.2)
- Yoga
- React-Core/RCTActionSheetHeaders (0.62.2):
- Folly (= 2018.10.22.00)
- glog
- React-Core/Default
- React-cxxreact (= 0.62.2)
- React-jsi (= 0.62.2)
- React-jsiexecutor (= 0.62.2)
- Yoga
- React-Core/RCTAnimationHeaders (0.62.2):
- Folly (= 2018.10.22.00)
- glog
- React-Core/Default
- React-cxxreact (= 0.62.2)
- React-jsi (= 0.62.2)
- React-jsiexecutor (= 0.62.2)
- Yoga
- React-Core/RCTBlobHeaders (0.62.2):
- Folly (= 2018.10.22.00)
- glog
- React-Core/Default
- React-cxxreact (= 0.62.2)
- React-jsi (= 0.62.2)
- React-jsiexecutor (= 0.62.2)
- Yoga
- React-Core/RCTImageHeaders (0.62.2):
- Folly (= 2018.10.22.00)
- glog
- React-Core/Default
- React-cxxreact (= 0.62.2)
- React-jsi (= 0.62.2)
- React-jsiexecutor (= 0.62.2)
- Yoga
- React-Core/RCTLinkingHeaders (0.62.2):
- Folly (= 2018.10.22.00)
- glog
- React-Core/Default
- React-cxxreact (= 0.62.2)
- React-jsi (= 0.62.2)
- React-jsiexecutor (= 0.62.2)
- Yoga
- React-Core/RCTNetworkHeaders (0.62.2):
- Folly (= 2018.10.22.00)
- glog
- React-Core/Default
- React-cxxreact (= 0.62.2)
- React-jsi (= 0.62.2)
- React-jsiexecutor (= 0.62.2)
- Yoga
- React-Core/RCTSettingsHeaders (0.62.2):
- Folly (= 2018.10.22.00)
- glog
- React-Core/Default
- React-cxxreact (= 0.62.2)
- React-jsi (= 0.62.2)
- React-jsiexecutor (= 0.62.2)
- Yoga
- React-Core/RCTTextHeaders (0.62.2):
- Folly (= 2018.10.22.00)
- glog
- React-Core/Default
- React-cxxreact (= 0.62.2)
- React-jsi (= 0.62.2)
- React-jsiexecutor (= 0.62.2)
- Yoga
- React-Core/RCTVibrationHeaders (0.62.2):
- Folly (= 2018.10.22.00)
- glog
- React-Core/Default
- React-cxxreact (= 0.62.2)
- React-jsi (= 0.62.2)
- React-jsiexecutor (= 0.62.2)
- Yoga
- React-Core/RCTWebSocket (0.62.2):
- Folly (= 2018.10.22.00)
- glog
- React-Core/Default (= 0.62.2)
- React-cxxreact (= 0.62.2)
- React-jsi (= 0.62.2)
- React-jsiexecutor (= 0.62.2)
- Yoga
- React-CoreModules (0.62.2):
- FBReactNativeSpec (= 0.62.2)
- Folly (= 2018.10.22.00)
- RCTTypeSafety (= 0.62.2)
- React-Core/CoreModulesHeaders (= 0.62.2)
- React-RCTImage (= 0.62.2)
- ReactCommon/turbomodule/core (= 0.62.2)
- React-cxxreact (0.62.2):
- boost-for-react-native (= 1.63.0)
- DoubleConversion
- Folly (= 2018.10.22.00)
- glog
- React-jsinspector (= 0.62.2)
- React-jsi (0.62.2):
- boost-for-react-native (= 1.63.0)
- DoubleConversion
- Folly (= 2018.10.22.00)
- glog
- React-jsi/Default (= 0.62.2)
- React-jsi/Default (0.62.2):
- boost-for-react-native (= 1.63.0)
- DoubleConversion
- Folly (= 2018.10.22.00)
- glog
- React-jsiexecutor (0.62.2):
- DoubleConversion
- Folly (= 2018.10.22.00)
- glog
- React-cxxreact (= 0.62.2)
- React-jsi (= 0.62.2)
- React-jsinspector (0.62.2)
- react-native-date-picker (2.7.9):
- React
- react-native-image-picker (0.14.3):
- React
- react-native-video (4.4.5):
- React
- react-native-video/Video (= 4.4.5)
- react-native-video/Video (4.4.5):
- React
- react-native-viewpager (3.3.0):
- React
- React-RCTActionSheet (0.62.2):
- React-Core/RCTActionSheetHeaders (= 0.62.2)
- React-RCTAnimation (0.62.2):
- FBReactNativeSpec (= 0.62.2)
- Folly (= 2018.10.22.00)
- RCTTypeSafety (= 0.62.2)
- React-Core/RCTAnimationHeaders (= 0.62.2)
- ReactCommon/turbomodule/core (= 0.62.2)
- React-RCTBlob (0.62.2):
- FBReactNativeSpec (= 0.62.2)
- Folly (= 2018.10.22.00)
- React-Core/RCTBlobHeaders (= 0.62.2)
- React-Core/RCTWebSocket (= 0.62.2)
- React-jsi (= 0.62.2)
- React-RCTNetwork (= 0.62.2)
- ReactCommon/turbomodule/core (= 0.62.2)
- React-RCTImage (0.62.2):
- FBReactNativeSpec (= 0.62.2)
- Folly (= 2018.10.22.00)
- RCTTypeSafety (= 0.62.2)
- React-Core/RCTImageHeaders (= 0.62.2)
- React-RCTNetwork (= 0.62.2)
- ReactCommon/turbomodule/core (= 0.62.2)
- React-RCTLinking (0.62.2):
- FBReactNativeSpec (= 0.62.2)
- React-Core/RCTLinkingHeaders (= 0.62.2)
- ReactCommon/turbomodule/core (= 0.62.2)
- React-RCTNetwork (0.62.2):
- FBReactNativeSpec (= 0.62.2)
- Folly (= 2018.10.22.00)
- RCTTypeSafety (= 0.62.2)
- React-Core/RCTNetworkHeaders (= 0.62.2)
- ReactCommon/turbomodule/core (= 0.62.2)
- React-RCTSettings (0.62.2):
- FBReactNativeSpec (= 0.62.2)
- Folly (= 2018.10.22.00)
- RCTTypeSafety (= 0.62.2)
- React-Core/RCTSettingsHeaders (= 0.62.2)
- ReactCommon/turbomodule/core (= 0.62.2)
- React-RCTText (0.62.2):
- React-Core/RCTTextHeaders (= 0.62.2)
- React-RCTVibration (0.62.2):
- FBReactNativeSpec (= 0.62.2)
- Folly (= 2018.10.22.00)
- React-Core/RCTVibrationHeaders (= 0.62.2)
- ReactCommon/turbomodule/core (= 0.62.2)
- ReactCommon/callinvoker (0.62.2):
- DoubleConversion
- Folly (= 2018.10.22.00)
- glog
- React-cxxreact (= 0.62.2)
- ReactCommon/turbomodule/core (0.62.2):
- DoubleConversion
- Folly (= 2018.10.22.00)
- glog
- React-Core (= 0.62.2)
- React-cxxreact (= 0.62.2)
- React-jsi (= 0.62.2)
- ReactCommon/callinvoker (= 0.62.2)
- RNAudio (4.3.0):
- React
- RNFS (2.14.1):
- React
- RNGestureHandler (1.3.0):
- React
- RNSound (0.11.0):
- React
- RNSound/Core (= 0.11.0)
- RNSound/Core (0.11.0):
- React
- RNSVG (12.1.0):
- React
- Yoga (1.14.0)
- YogaKit (1.18.1):
- Yoga (~> 1.14)
DEPENDENCIES:
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
- FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`)
- Flipper (~> 0.33.1)
- Flipper-DoubleConversion (= 1.1.7)
- Flipper-Folly (~> 2.1)
- Flipper-Glog (= 0.3.6)
- Flipper-PeerTalk (~> 0.0.4)
- Flipper-RSocket (~> 1.0)
- FlipperKit (~> 0.33.1)
- FlipperKit/Core (~> 0.33.1)
- FlipperKit/CppBridge (~> 0.33.1)
- FlipperKit/FBCxxFollyDynamicConvert (~> 0.33.1)
- FlipperKit/FBDefines (~> 0.33.1)
- FlipperKit/FKPortForwarding (~> 0.33.1)
- FlipperKit/FlipperKitHighlightOverlay (~> 0.33.1)
- FlipperKit/FlipperKitLayoutPlugin (~> 0.33.1)
- FlipperKit/FlipperKitLayoutTextSearchable (~> 0.33.1)
- FlipperKit/FlipperKitNetworkPlugin (~> 0.33.1)
- FlipperKit/FlipperKitReactPlugin (~> 0.33.1)
- FlipperKit/FlipperKitUserDefaultsPlugin (~> 0.33.1)
- FlipperKit/SKIOSNetworkPlugin (~> 0.33.1)
- Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`)
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
- RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
- RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`)
- React (from `../node_modules/react-native/`)
- React-Core (from `../node_modules/react-native/`)
- React-Core/DevSupport (from `../node_modules/react-native/`)
- React-Core/RCTWebSocket (from `../node_modules/react-native/`)
- React-CoreModules (from `../node_modules/react-native/React/CoreModules`)
- React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`)
- React-jsi (from `../node_modules/react-native/ReactCommon/jsi`)
- React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
- react-native-date-picker (from `../node_modules/react-native-date-picker`)
- react-native-image-picker (from `../node_modules/react-native-image-picker`)
- react-native-video (from `../node_modules/react-native-video`)
- "react-native-viewpager (from `../node_modules/@react-native-community/viewpager`)"
- React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
- React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`)
- React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`)
- React-RCTImage (from `../node_modules/react-native/Libraries/Image`)
- React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`)
- React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`)
- React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`)
- React-RCTText (from `../node_modules/react-native/Libraries/Text`)
- React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`)
- ReactCommon/callinvoker (from `../node_modules/react-native/ReactCommon`)
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
- RNAudio (from `../node_modules/react-native-audio`)
- RNFS (from `../node_modules/react-native-fs`)
- RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
- RNSound (from `../node_modules/react-native-sound`)
- RNSVG (from `../node_modules/react-native-svg`)
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
SPEC REPOS:
trunk:
- boost-for-react-native
- CocoaAsyncSocket
- CocoaLibEvent
- Flipper
- Flipper-DoubleConversion
- Flipper-Folly
- Flipper-Glog
- Flipper-PeerTalk
- Flipper-RSocket
- FlipperKit
- OpenSSL-Universal
- YogaKit
EXTERNAL SOURCES:
DoubleConversion:
:podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
FBLazyVector:
:path: "../node_modules/react-native/Libraries/FBLazyVector"
FBReactNativeSpec:
:path: "../node_modules/react-native/Libraries/FBReactNativeSpec"
Folly:
:podspec: "../node_modules/react-native/third-party-podspecs/Folly.podspec"
glog:
:podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
RCTRequired:
:path: "../node_modules/react-native/Libraries/RCTRequired"
RCTTypeSafety:
:path: "../node_modules/react-native/Libraries/TypeSafety"
React:
:path: "../node_modules/react-native/"
React-Core:
:path: "../node_modules/react-native/"
React-CoreModules:
:path: "../node_modules/react-native/React/CoreModules"
React-cxxreact:
:path: "../node_modules/react-native/ReactCommon/cxxreact"
React-jsi:
:path: "../node_modules/react-native/ReactCommon/jsi"
React-jsiexecutor:
:path: "../node_modules/react-native/ReactCommon/jsiexecutor"
React-jsinspector:
:path: "../node_modules/react-native/ReactCommon/jsinspector"
react-native-date-picker:
:path: "../node_modules/react-native-date-picker"
react-native-image-picker:
:path: "../node_modules/react-native-image-picker"
react-native-video:
:path: "../node_modules/react-native-video"
react-native-viewpager:
:path: "../node_modules/@react-native-community/viewpager"
React-RCTActionSheet:
:path: "../node_modules/react-native/Libraries/ActionSheetIOS"
React-RCTAnimation:
:path: "../node_modules/react-native/Libraries/NativeAnimation"
React-RCTBlob:
:path: "../node_modules/react-native/Libraries/Blob"
React-RCTImage:
:path: "../node_modules/react-native/Libraries/Image"
React-RCTLinking:
:path: "../node_modules/react-native/Libraries/LinkingIOS"
React-RCTNetwork:
:path: "../node_modules/react-native/Libraries/Network"
React-RCTSettings:
:path: "../node_modules/react-native/Libraries/Settings"
React-RCTText:
:path: "../node_modules/react-native/Libraries/Text"
React-RCTVibration:
:path: "../node_modules/react-native/Libraries/Vibration"
ReactCommon:
:path: "../node_modules/react-native/ReactCommon"
RNAudio:
:path: "../node_modules/react-native-audio"
RNFS:
:path: "../node_modules/react-native-fs"
RNGestureHandler:
:path: "../node_modules/react-native-gesture-handler"
RNSound:
:path: "../node_modules/react-native-sound"
RNSVG:
:path: "../node_modules/react-native-svg"
Yoga:
:path: "../node_modules/react-native/ReactCommon/yoga"
SPEC CHECKSUMS:
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
CocoaAsyncSocket: 694058e7c0ed05a9e217d1b3c7ded962f4180845
CocoaLibEvent: 2fab71b8bd46dd33ddb959f7928ec5909f838e3f
DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2
FBLazyVector: 4aab18c93cd9546e4bfed752b4084585eca8b245
FBReactNativeSpec: 5465d51ccfeecb7faa12f9ae0024f2044ce4044e
Flipper: 6c1f484f9a88d30ab3e272800d53688439e50f69
Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41
Flipper-Folly: c12092ea368353b58e992843a990a3225d4533c3
Flipper-Glog: 1dfd6abf1e922806c52ceb8701a3599a79a200a6
Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9
Flipper-RSocket: 64e7431a55835eb953b0bf984ef3b90ae9fdddd7
FlipperKit: 6dc9b8f4ef60d9e5ded7f0264db299c91f18832e
Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51
glog: 1f3da668190260b06b429bb211bfbee5cd790c28
OpenSSL-Universal: 8b48cc0d10c1b2923617dfe5c178aa9ed2689355
RCTRequired: cec6a34b3ac8a9915c37e7e4ad3aa74726ce4035
RCTTypeSafety: 93006131180074cffa227a1075802c89a49dd4ce
React: 29a8b1a02bd764fb7644ef04019270849b9a7ac3
React-Core: b12bffb3f567fdf99510acb716ef1abd426e0e05
React-CoreModules: 4a9b87bbe669d6c3173c0132c3328e3b000783d0
React-cxxreact: e65f9c2ba0ac5be946f53548c1aaaee5873a8103
React-jsi: b6dc94a6a12ff98e8877287a0b7620d365201161
React-jsiexecutor: 1540d1c01bb493ae3124ed83351b1b6a155db7da
React-jsinspector: 512e560d0e985d0e8c479a54a4e5c147a9c83493
react-native-date-picker: 1160a435db143a4a27f2319aba2052186661b2b9
react-native-image-picker: 3693786b3d5958c8f71deed66ec068b323565e0d
react-native-video: aa527b0acb37f94c4491e70df0274cb26979405d
react-native-viewpager: 118e65d8c65c56fe48d12a35cdcf1fe7e027a366
React-RCTActionSheet: f41ea8a811aac770e0cc6e0ad6b270c644ea8b7c
React-RCTAnimation: 49ab98b1c1ff4445148b72a3d61554138565bad0
React-RCTBlob: a332773f0ebc413a0ce85942a55b064471587a71
React-RCTImage: e70be9b9c74fe4e42d0005f42cace7981c994ac3
React-RCTLinking: c1b9739a88d56ecbec23b7f63650e44672ab2ad2
React-RCTNetwork: 73138b6f45e5a2768ad93f3d57873c2a18d14b44
React-RCTSettings: 6e3738a87e21b39a8cb08d627e68c44acf1e325a
React-RCTText: fae545b10cfdb3d247c36c56f61a94cfd6dba41d
React-RCTVibration: 4356114dbcba4ce66991096e51a66e61eda51256
ReactCommon: ed4e11d27609d571e7eee8b65548efc191116eb3
RNAudio: cae2991f2dccb75163f260b60da8051717b959fa
RNFS: a8fbe7060fa49157d819466404794ad9c58e58cf
RNGestureHandler: 5329a942fce3d41c68b84c2c2276ce06a696d8b0
RNSound: c980916b596cc15c8dcd2f6ecd3b13c4881dbe20
RNSVG: ce9d996113475209013317e48b05c21ee988d42e
Yoga: 3ebccbdd559724312790e7742142d062476b698e
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
PODFILE CHECKSUM: 3ef4c9182586626fa1fa1a0a41e338637035c1cf
COCOAPODS: 1.9.1
/**
* Metro configuration for React Native
* https://github.com/facebook/react-native
*
* @format
*/
module.exports = {
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: false,
},
}),
},
};
This diff could not be displayed because it is too large.
{
"name": "OrderApp",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint .",
"postinstall": "npx jetify"
},
"dependencies": {
"@ant-design/react-native": "^3.3.0",
"@react-native-community/viewpager": "^3.3.0",
"babel-plugin-import": "^1.13.0",
"react": "16.11.0",
"react-native": "0.62.2",
"react-native-audio": "^4.3.0",
"react-native-date-picker": "^2.7.9",
"react-native-datepicker": "^1.7.2",
"react-native-fs": "2.14.1",
"react-native-gesture-handler": "1.3.0",
"react-native-image-picker": "0.27.0",
"react-native-picker-select": "^7.0.0",
"react-native-root-toast": "3.1.1",
"react-native-scrollable-tab-view": "^1.0.0",
"react-native-shadow": "^1.2.2",
"react-native-sound": "^0.11.0",
"react-native-svg": "^12.1.0",
"react-native-video": "^4.4.5",
"react-navigation": "3.11.0",
"react-redux": "7.1.0",
"redux": "4.0.1",
"redux-persist": "5.10.0",
"redux-thunk": "2.3.0"
},
"devDependencies": {
"@babel/core": "^7.6.2",
"@babel/runtime": "^7.6.2",
"@react-native-community/eslint-config": "^0.0.5",
"babel-jest": "^24.9.0",
"eslint": "^6.5.1",
"jest": "^24.9.0",
"metro-react-native-babel-preset": "^0.58.0",
"react-devtools": "^4.6.0",
"react-test-renderer": "16.11.0",
"redux-devtools": "^3.5.0"
},
"jest": {
"preset": "react-native"
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment