Skip to content

Commit 00987a7

Browse files
author
suibingyue
committed
add refresh Listview
1 parent e35c38c commit 00987a7

File tree

8 files changed

+42
-25
lines changed

8 files changed

+42
-25
lines changed

app/network/api.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

2-
// var API_ADDRESS = 'http://test.api.bqmart.cn';
3-
var API_ADDRESS='https://api.bqmart.cn/';
2+
var API_ADDRESS = 'http://lsy.api.bqmart.cn';
3+
// var API_ADDRESS='https://api.bqmart.cn/';
44
var DEBUG = true;
55
// public static final String SERVERURL = "https://api.bqmart.cn";
66
// public static final String SERVERURL = "http://test.api.bqmart.cn";

app/page/home.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,9 @@ var Adviews = React.createClass({
6868
var advViews = [];
6969
var advs = this.props.advs;
7070
for(var i = 0; i < advs.length; i++){
71+
var ad = advs[i];
7172
advViews.push(
72-
<TouchableHighlight onPress={()=>this._loadWeb(advs[i].title,advs[i].url)}>
73+
<TouchableHighlight onPress={()=>this._loadWeb(ad.title,ad.url)}>
7374
<View>
7475
<View style={{height:10,backgroundColor:'#eef0f3'}} />
7576
<Image style={[styles.adv]} source={{uri:advs[i].image_path}} />
@@ -126,16 +127,16 @@ var home = React.createClass({
126127
var service1 = [];
127128
var service2 = [];
128129
var services = this.state.services;
129-
130+
//可以使用flex 布局
130131
for(var i = 0; i < 3; i++){
131132
service1.push(
132-
<ItemBlock width={this.state.item_width} service={services[i]}/>
133+
<ItemBlock key = {i} width={this.state.item_width} service={services[i]}/>
133134
);
134135
};
135136

136137
for(var i = 3; i < services.length; i++){
137138
service2.push(
138-
<ItemBlock width={this.state.item_width} service={services[i]}/>
139+
<ItemBlock key = {i} width={this.state.item_width} service={services[i]}/>
139140
);
140141
};
141142

@@ -148,7 +149,7 @@ var home = React.createClass({
148149
<View style={styles.itemRow}>
149150
{service2}
150151
</View>
151-
<Adviews advs={this.state.advs}/>
152+
<Adviews advs={this.state.advs} navigator={this.props.navigator}/>
152153
</ScrollView>
153154
);
154155
},

app/page/me.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ var Me = React.createClass({
6969
<ScrollView style={{backgroundColor:'#eef0f3'}}>
7070
<View style={[]}>
7171
<Image style={[styles.header]} source={require("image!bg_me_usericon")} >
72+
<Text>13488789409</Text>
7273
</Image>
7374
</View>
7475
<MenuItem

app/page/web.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ var Web = React.createClass({
3939
var styles = StyleSheet.create({
4040
container: {
4141
flex: 1,
42+
paddingBottom:68,
4243
},
4344
});
4445

ios/bqseller.xcodeproj/project.pbxproj

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -106,27 +106,27 @@
106106
/* End PBXContainerItemProxy section */
107107

108108
/* Begin PBXFileReference section */
109-
008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = main.jsbundle; path = main.jsbundle; sourceTree = "<group>"; };
110-
00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = ../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj; sourceTree = "<group>"; };
111-
00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = ../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj; sourceTree = "<group>"; };
112-
00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = ../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj; sourceTree = "<group>"; };
113-
00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = ../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj; sourceTree = "<group>"; };
114-
00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = ../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj; sourceTree = "<group>"; };
109+
008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = "<group>"; };
110+
00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = "<group>"; };
111+
00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = "<group>"; };
112+
00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = "<group>"; };
113+
00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = "<group>"; };
114+
00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = "<group>"; };
115115
00E356EE1AD99517003FC87E /* bqsellerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = bqsellerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
116116
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
117117
00E356F21AD99517003FC87E /* bqsellerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = bqsellerTests.m; sourceTree = "<group>"; };
118-
139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = ../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj; sourceTree = "<group>"; };
119-
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = ../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj; sourceTree = "<group>"; };
118+
139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = "<group>"; };
119+
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = "<group>"; };
120120
13B07F961A680F5B00A75B9A /* bqseller.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = bqseller.app; sourceTree = BUILT_PRODUCTS_DIR; };
121121
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = bqseller/AppDelegate.h; sourceTree = "<group>"; };
122122
13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = bqseller/AppDelegate.m; sourceTree = "<group>"; };
123123
13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
124124
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = bqseller/Images.xcassets; sourceTree = "<group>"; };
125125
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = bqseller/Info.plist; sourceTree = "<group>"; };
126126
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = bqseller/main.m; sourceTree = "<group>"; };
127-
146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = ../node_modules/react-native/React/React.xcodeproj; sourceTree = "<group>"; };
128-
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = ../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj; sourceTree = "<group>"; };
129-
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = ../node_modules/react-native/Libraries/Text/RCTText.xcodeproj; sourceTree = "<group>"; };
127+
146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = "<group>"; };
128+
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
129+
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; };
130130
/* End PBXFileReference section */
131131

132132
/* Begin PBXFrameworksBuildPhase section */
@@ -595,32 +595,42 @@
595595
isa = XCBuildConfiguration;
596596
buildSettings = {
597597
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
598+
CODE_SIGN_IDENTITY = "iPhone Developer";
599+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
598600
DEAD_CODE_STRIPPING = NO;
599601
HEADER_SEARCH_PATHS = (
600602
"$(inherited)",
601603
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
602604
"$(SRCROOT)/../node_modules/react-native/React/**",
603605
);
604-
INFOPLIST_FILE = "bqseller/Info.plist";
606+
INFOPLIST_FILE = bqseller/Info.plist;
607+
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
605608
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
606609
OTHER_LDFLAGS = "-ObjC";
607610
PRODUCT_NAME = bqseller;
611+
PROVISIONING_PROFILE = "";
612+
TARGETED_DEVICE_FAMILY = 1;
608613
};
609614
name = Debug;
610615
};
611616
13B07F951A680F5B00A75B9A /* Release */ = {
612617
isa = XCBuildConfiguration;
613618
buildSettings = {
614619
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
620+
CODE_SIGN_IDENTITY = "iPhone Developer";
621+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
615622
HEADER_SEARCH_PATHS = (
616623
"$(inherited)",
617624
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
618625
"$(SRCROOT)/../node_modules/react-native/React/**",
619626
);
620-
INFOPLIST_FILE = "bqseller/Info.plist";
627+
INFOPLIST_FILE = bqseller/Info.plist;
628+
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
621629
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
622630
OTHER_LDFLAGS = "-ObjC";
623631
PRODUCT_NAME = bqseller;
632+
PROVISIONING_PROFILE = "";
633+
TARGETED_DEVICE_FAMILY = 1;
624634
};
625635
name = Release;
626636
};

ios/bqseller.xcodeproj/xcshareddata/xcschemes/bqseller.xcscheme

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@
3737
</BuildActionEntries>
3838
</BuildAction>
3939
<TestAction
40+
buildConfiguration = "Debug"
4041
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
4142
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
42-
shouldUseLaunchSchemeArgsEnv = "YES"
43-
buildConfiguration = "Debug">
43+
shouldUseLaunchSchemeArgsEnv = "YES">
4444
<Testables>
4545
<TestableReference
4646
skipped = "NO">
@@ -62,15 +62,18 @@
6262
ReferencedContainer = "container:bqseller.xcodeproj">
6363
</BuildableReference>
6464
</MacroExpansion>
65+
<AdditionalOptions>
66+
</AdditionalOptions>
6567
</TestAction>
6668
<LaunchAction
69+
buildConfiguration = "Debug"
6770
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
6871
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
6972
launchStyle = "0"
7073
useCustomWorkingDirectory = "NO"
71-
buildConfiguration = "Debug"
7274
ignoresPersistentStateOnLaunch = "NO"
7375
debugDocumentVersioning = "YES"
76+
debugServiceExtension = "internal"
7477
allowLocationSimulation = "YES">
7578
<BuildableProductRunnable
7679
runnableDebuggingMode = "0">
@@ -86,10 +89,10 @@
8689
</AdditionalOptions>
8790
</LaunchAction>
8891
<ProfileAction
92+
buildConfiguration = "Release"
8993
shouldUseLaunchSchemeArgsEnv = "YES"
9094
savedToolIdentifier = ""
9195
useCustomWorkingDirectory = "NO"
92-
buildConfiguration = "Release"
9396
debugDocumentVersioning = "YES">
9497
<BuildableProductRunnable
9598
runnableDebuggingMode = "0">

ios/bqseller/AppDelegate.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
3131
* on the same Wi-Fi network.
3232
*/
3333

34-
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"];
34+
jsCodeLocation = [NSURL URLWithString:@"http://10.0.0.26:8081/index.ios.bundle?platform=ios&dev=true"];
3535

3636
/**
3737
* OPTION 2

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
},
88
"dependencies": {
99
"react-native": "^0.12.0",
10+
"react-native-refresher": "^0.1.1",
1011
"react-native-swiper": "^1.3.0",
1112
"react-timer-mixin": "^0.13.3"
1213
}

0 commit comments

Comments
 (0)