Skip to content

Commit f1ae95f

Browse files
lh_wanglh_wang
authored andcommitted
add nearby
1 parent eb2a172 commit f1ae95f

File tree

51 files changed

+2390
-52
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2390
-52
lines changed
Lines changed: 1 addition & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1 @@
1-
[
2-
{
3-
"messageid": "DD61CCF3-17B7-464E-8066-FAC7C2B58F27",
4-
"userid": "591F68A5-87E6-4A6C-810F-5A50953AE747",
5-
"username": "宋江",
6-
"time": "2015-9-23",
7-
"message": "欢迎新同学小康"
8-
},
9-
{
10-
"messageid": "F05D4D47-1A67-4F44-930F-A5B240CAAC92",
11-
"userid": "591F68A5-87E6-4A6C-810F-5A50953AE747",
12-
"username": "李逵",
13-
"time": "2015-9-22",
14-
"message": "欢迎新同学催明"
15-
},
16-
{
17-
"messageid": "DD61CCF3-17B7-464E-8066-FAC7C2B58F27",
18-
"userid": "591F68A5-87E6-4A6C-810F-5A50953AE747",
19-
"username": "敏儿",
20-
"time": "2015-9-21",
21-
"message": "欢迎新同学刘明"
22-
},
23-
{
24-
"messageid": "F05D4D47-1A67-4F44-930F-A5B240CAAC92",
25-
"userid": "591F68A5-87E6-4A6C-810F-5A50953AE747",
26-
"username": "宋江",
27-
"time": "2015-9-20",
28-
"message": "欢迎新同学刘备"
29-
},
30-
{
31-
"messageid": "DD61CCF3-17B7-464E-8066-FAC7C2B58F27",
32-
"userid": "591F68A5-87E6-4A6C-810F-5A50953AE747",
33-
"username": "宋江",
34-
"time": "2015-9-19",
35-
"message": "欢迎新同学渡边"
36-
},
37-
{
38-
"messageid": "F05D4D47-1A67-4F44-930F-A5B240CAAC92",
39-
"userid": "591F68A5-87E6-4A6C-810F-5A50953AE747",
40-
"username": "宋江",
41-
"time": "2015-9-18",
42-
"message": "欢迎新同学彩霞"
43-
},
44-
{
45-
"messageid": "F05D4D47-1A67-4F44-930F-A5B240CAAC92",
46-
"userid": "591F68A5-87E6-4A6C-810F-5A50953AE747",
47-
"username": "辛弃疾",
48-
"time": "2015-9-1",
49-
"message": "西江月·夜行黄沙道中 明月别枝惊鹊,清风半夜鸣蝉。稻花香里说丰年,听取蛙声一片。七八个星天外,两三点雨山前。旧时⑹茅店社林边,路转溪桥忽见"
50-
}
51-
]
1+
[{"messageid":"DD61CCF3-17B7-464E-8066-FAC7C2B58F27","userid":"591F68A5-87E6-4A6C-810F-5A50953AE747","username":"宋江","time":"2015-9-23","message":"欢迎新同学小康"},{"messageid":"F05D4D47-1A67-4F44-930F-A5B240CAAC92","userid":"591F68A5-87E6-4A6C-810F-5A50953AE747","username":"李逵","time":"2015-9-22","message":"欢迎新同学催明"},{"messageid":"DD61CCF3-17B7-464E-8066-FAC7C2B58F27","userid":"591F68A5-87E6-4A6C-810F-5A50953AE747","username":"敏儿","time":"2015-9-21","message":"欢迎新同学刘明"},{"messageid":"F05D4D47-1A67-4F44-930F-A5B240CAAC92","userid":"591F68A5-87E6-4A6C-810F-5A50953AE747","username":"宋江","time":"2015-9-20","message":"欢迎新同学刘备"},{"messageid":"DD61CCF3-17B7-464E-8066-FAC7C2B58F27","userid":"591F68A5-87E6-4A6C-810F-5A50953AE747","username":"宋江","time":"2015-9-19","message":"欢迎新同学渡边"},{"messageid":"F05D4D47-1A67-4F44-930F-A5B240CAAC92","userid":"591F68A5-87E6-4A6C-810F-5A50953AE747","username":"宋江","time":"2015-9-18","message":"欢迎新同学彩霞"},{"messageid":"F05D4D47-1A67-4F44-930F-A5B240CAAC92","userid":"591F68A5-87E6-4A6C-810F-5A50953AE747","username":"辛弃疾","time":"2015-9-1","message":"西江月·夜行黄沙道中 明月别枝惊鹊,清风半夜鸣蝉。稻花香里说丰年,听取蛙声一片。七八个星天外,两三点雨山前。旧时⑹茅店社林边,路转溪桥忽见"},{"messageid":"74C88D5A-22CC-4588-9B3F-D614A8706D8D","userid":"591F68A5-87E6-4A6C-810F-5A50953AE747","username":"宋江","time":"2015-9-23","message":"ss"}]

address_book/views/about/webview.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,4 @@ var webview = React.createClass({
2323

2424
});
2525

26-
2726
module.exports = webview;

nearby/.flowconfig

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
[ignore]
2+
3+
# We fork some components by platform.
4+
.*/*.web.js
5+
.*/*.android.js
6+
7+
# Some modules have their own node_modules with overlap
8+
.*/node_modules/node-haste/.*
9+
10+
# Ignore react-tools where there are overlaps, but don't ignore anything that
11+
# react-native relies on
12+
.*/node_modules/react-tools/src/React.js
13+
.*/node_modules/react-tools/src/renderers/shared/event/EventPropagators.js
14+
.*/node_modules/react-tools/src/renderers/shared/event/eventPlugins/ResponderEventPlugin.js
15+
.*/node_modules/react-tools/src/shared/vendor/core/ExecutionEnvironment.js
16+
17+
18+
# Ignore commoner tests
19+
.*/node_modules/commoner/test/.*
20+
21+
# See https://github.com/facebook/flow/issues/442
22+
.*/react-tools/node_modules/commoner/lib/reader.js
23+
24+
# Ignore jest
25+
.*/react-native/node_modules/jest-cli/.*
26+
27+
[include]
28+
29+
[libs]
30+
node_modules/react-native/Libraries/react-native/react-native-interface.js
31+
32+
[options]
33+
module.system=haste
34+
35+
munge_underscores=true
36+
37+
suppress_type=$FlowIssue
38+
suppress_type=$FlowFixMe
39+
suppress_type=$FixMe
40+
41+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(1[0-4]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
42+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(1[0-4]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)? #[0-9]+
43+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
44+
45+
[version]
46+
0.14.0

nearby/.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# OSX
2+
#
3+
.DS_Store
4+
5+
# Xcode
6+
#
7+
build/
8+
*.pbxuser
9+
!default.pbxuser
10+
*.mode1v3
11+
!default.mode1v3
12+
*.mode2v3
13+
!default.mode2v3
14+
*.perspectivev3
15+
!default.perspectivev3
16+
xcuserdata
17+
*.xccheckout
18+
*.moved-aside
19+
DerivedData
20+
*.hmap
21+
*.ipa
22+
*.xcuserstate
23+
project.xcworkspace
24+
25+
# node.js
26+
#
27+
node_modules/
28+
npm-debug.log

nearby/.watchmanconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

nearby/Nearby/index.js

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
var React = require('react-native');
2+
var Bank = require('./views/bank');
3+
var Film = require('./views/film');
4+
var Food = require('./views/food');
5+
var Toilet = require('./views/toilet');
6+
7+
var {
8+
AppRegistry,
9+
StyleSheet,
10+
Text,
11+
View,
12+
ScrollView,
13+
NavigatorIOS,
14+
StatusBarIOS,
15+
TabBarIOS
16+
} = React;
17+
18+
//高亮
19+
StatusBarIOS.setStyle('light-content');
20+
//开启网络状态
21+
StatusBarIOS.setNetworkActivityIndicatorVisible(true);
22+
23+
var Nearby = React.createClass({
24+
getInitialState: function(){
25+
return{
26+
selected: '美食'
27+
28+
};
29+
},
30+
render: function() {
31+
return (
32+
<View style={styles.container}>
33+
<TabBarIOS>
34+
<TabBarIOS.Item
35+
title='美食'
36+
selected={this.state.selected === '美食'}
37+
icon={require("image!food")}
38+
onPress={()=>{this.setState({selected: '美食'})}}>
39+
<NavigatorIOS
40+
barTintColor='#007AFF'
41+
titleTextColor="#fff"
42+
tintColor="#fff"
43+
style={styles.container}
44+
initialRoute={{
45+
component: Food,
46+
title: '美食'
47+
}}
48+
/>
49+
</TabBarIOS.Item>
50+
51+
<TabBarIOS.Item
52+
title='电影'
53+
selected={this.state.selected === '电影'}
54+
icon={require("image!film")}
55+
onPress={()=>{this.setState({selected: '电影'})}}>
56+
<NavigatorIOS
57+
style={styles.container}
58+
barTintColor='#007AFF'
59+
titleTextColor="#fff"
60+
tintColor="#fff"
61+
initialRoute={{
62+
component: Film,
63+
title: '电影'
64+
}}
65+
/>
66+
</TabBarIOS.Item>
67+
68+
<TabBarIOS.Item
69+
title='银行'
70+
selected={this.state.selected === '银行'}
71+
icon={require("image!bank")}
72+
onPress={()=>{this.setState({selected: '银行'})}}>
73+
<NavigatorIOS
74+
style={styles.container}
75+
barTintColor='#007AFF'
76+
titleTextColor="#fff"
77+
tintColor="#fff"
78+
initialRoute={{
79+
component: Bank,
80+
title: '银行'
81+
}}
82+
/>
83+
</TabBarIOS.Item>
84+
85+
<TabBarIOS.Item
86+
title='厕所'
87+
selected={this.state.selected === '厕所'}
88+
icon={require("image!toilet")}
89+
onPress={()=>{this.setState({selected: '厕所'})}}>
90+
<NavigatorIOS
91+
style={styles.container}
92+
barTintColor='#007AFF'
93+
titleTextColor="#fff"
94+
tintColor="#fff"
95+
initialRoute={{
96+
component: Toilet,
97+
title: '厕所'
98+
}}
99+
/>
100+
</TabBarIOS.Item>
101+
</TabBarIOS>
102+
</View>
103+
);
104+
},
105+
106+
});
107+
108+
var styles = StyleSheet.create({
109+
container: {
110+
flex: 1
111+
}
112+
});
113+
114+
module.exports = Nearby;

nearby/Nearby/views/bank.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
var React = require('react-native');
2+
3+
var {
4+
View
5+
} = React;
6+
7+
var Bank = React.createClass({
8+
render: function(){
9+
return (
10+
<View></View>
11+
);
12+
}
13+
});
14+
15+
module.exports = Bank;
16+

nearby/Nearby/views/film.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
var React = require('react-native');
2+
3+
var {
4+
View
5+
} = React;
6+
7+
var Film = React.createClass({
8+
render: function(){
9+
return (
10+
<View></View>
11+
);
12+
}
13+
});
14+
15+
module.exports = Film;
16+

0 commit comments

Comments
 (0)