Skip to content

Commit 19857bc

Browse files
committed
完成首页列表
1 parent 4d2dba5 commit 19857bc

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

News_Pro/app/components/HomeFlatListView.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export default class HomeFlatListView extends PureComponent {
106106

107107
//上拉加载更多
108108
_onEndReached = () => {
109-
this._getNewsList;
109+
this._getNewsList();
110110
}
111111

112112
//下拉刷新
@@ -157,7 +157,7 @@ export default class HomeFlatListView extends PureComponent {
157157
//初始加载的条数,不会被卸载
158158
initialNumToRender={10}
159159
//决定当距离内容最底部还有多远时候触发onEndReached回调,数值范围:0~1。例如:0.5表示可见布局的最底端距离content最底端等于可见布局一半高度的时候调用该回调
160-
onEndReachedThreshold={0.1}
160+
onEndReachedThreshold={0.5}
161161
//当列表被滚动到距离内容最底部不足onEndReacchedThreshold设置的距离时调用此函数
162162
onEndReached={this._onEndReached}
163163
//ListHeaderComponent={this._renderHeader}

News_Pro/app/utils/fetch.js

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ function formatData(headers, data) {
2929

3030
export default ajax = ({url, method, data, dataType, headers, success, error, complete}) => {
3131

32+
console.log(url)
33+
3234
let options = {}
3335

3436
//默认method

News_Pro/ios/News_Pro/Info.plist

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@
4141
<key>NSLocationWhenInUseUsageDescription</key>
4242
<string></string>
4343
<key>NSAppTransportSecurity</key>
44-
<!--See http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/ -->
4544
<dict>
45+
<key>NSAllowsArbitraryLoads</key>
46+
<true/>
4647
<key>NSExceptionDomains</key>
4748
<dict>
4849
<key>localhost</key>

0 commit comments

Comments
 (0)