Commit c95592fc authored by zhuchuanyong's avatar zhuchuanyong

环境配置:dev-test-pro

parent 6afc12be
API_URL=http://dev.vtstar.net/
APP_NAME=RN-开发
\ No newline at end of file
API_URL=http://pro.vtstar.net/
APP_NAME=RN-生产
\ No newline at end of file
API_URL=http://test.vtstar.net/
APP_NAME=RN-test
\ No newline at end of file
apply plugin: "com.android.application" apply plugin: "com.android.application"
apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"
import com.android.build.OutputFile import com.android.build.OutputFile
/** /**
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
"@rematch/core": "^1.4.0", "@rematch/core": "^1.4.0",
"react": "16.13.1", "react": "16.13.1",
"react-native": "0.63.4", "react-native": "0.63.4",
"react-native-config": "^1.4.2",
"react-native-gesture-handler": "^1.9.0", "react-native-gesture-handler": "^1.9.0",
"react-native-reanimated": "^1.13.2", "react-native-reanimated": "^1.13.2",
"react-native-safe-area-context": "^3.1.9", "react-native-safe-area-context": "^3.1.9",
......
...@@ -2,12 +2,13 @@ ...@@ -2,12 +2,13 @@
* @Author: zhuchuanyong * @Author: zhuchuanyong
* @Date: 2021-01-25 14:44:12 * @Date: 2021-01-25 14:44:12
* @LastEditors: zhuchuanyong * @LastEditors: zhuchuanyong
* @LastEditTime: 2021-01-28 13:32:42 * @LastEditTime: 2021-01-29 11:04:17
* @FilePath: \src\views\Home.js * @FilePath: \src\views\Home.js
*/ */
import {Button} from '@ant-design/react-native'; import {Button} from '@ant-design/react-native';
import React from 'react'; import React from 'react';
import {View, Text} from 'react-native';
import Config from 'react-native-config';
const Home = (props) => { const Home = (props) => {
let {navigation} = props; let {navigation} = props;
const gotoDetail = () => { const gotoDetail = () => {
...@@ -17,8 +18,13 @@ const Home = (props) => { ...@@ -17,8 +18,13 @@ const Home = (props) => {
target: '干翻华为 Are you ok', target: '干翻华为 Are you ok',
}); });
}; };
console.log('Config', Config);
return ( return (
<> <>
<View>
<Text>{Config.API_URL}</Text>
<Text>{Config.VERSION_NAME}</Text>
</View>
<Button type="primary" onPress={() => gotoDetail()}> <Button type="primary" onPress={() => gotoDetail()}>
Home Home
</Button> </Button>
......
...@@ -6861,6 +6861,11 @@ react-native-collapsible@^1.5.2: ...@@ -6861,6 +6861,11 @@ react-native-collapsible@^1.5.2:
dependencies: dependencies:
prop-types "^15.6.2" prop-types "^15.6.2"
react-native-config@^1.4.2:
version "1.4.2"
resolved "https://registry.yarnpkg.com/react-native-config/-/react-native-config-1.4.2.tgz#cc39f22ed72c5cb06af1adf0ba70ef01593900b4"
integrity sha512-iTvCvThvFTH7SdiBcsxYtpLy86zglsh51ZBqFPPZ75tdrQMdlRnDNnb86kNjQf03KT0qs1nCMLRejfPMIim8iA==
react-native-gesture-handler@^1.9.0: react-native-gesture-handler@^1.9.0:
version "1.9.0" version "1.9.0"
resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-1.9.0.tgz#e441b1c0277c3fd4ca3e5c58fdd681e2f0ceddf0" resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-1.9.0.tgz#e441b1c0277c3fd4ca3e5c58fdd681e2f0ceddf0"
......
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 to comment