Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
GMBase
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
GMBase
Commits
c1110a64
Commit
c1110a64
authored
Dec 05, 2017
by
汪洋
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'jinzhu/master' into 'master'
增加httpmethod 可选 See merge request
!8
parents
b8676879
53d41ce0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
3 deletions
+12
-3
Podfile.lock
Example/Podfile.lock
+2
-2
WMFetchDataViewModel.h
GMBase/Classes/WMFetchDataViewModel.h
+2
-0
WMFetchDataViewModel.m
GMBase/Classes/WMFetchDataViewModel.m
+8
-1
No files found.
Example/Podfile.lock
View file @
c1110a64
...
...
@@ -14,7 +14,7 @@ PODS:
- AFNetworking/Serialization (3.1.0)
- AFNetworking/UIKit (3.1.0):
- AFNetworking/NSURLSession
- GMBase (0.2.
0
):
- GMBase (0.2.
1
):
- GMHud
- GMKit
- GMNetService
...
...
@@ -88,7 +88,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
GMBase:
9d827019fb8ea34d2c1d8c3e345f42088d117781
GMBase:
f95d65a135a42f5da0a6cd997eb82347166d7ec6
GMCache: fb0af70b420715ef9519487fdd932a357b3cd8d4
GMHud: 74387462a8b9f099c760a1ddbf493cc86da7cdbc
GMKit: 4820e0eb7727735f88fb2f983f178edd074343c1
...
...
GMBase/Classes/WMFetchDataViewModel.h
View file @
c1110a64
...
...
@@ -81,6 +81,8 @@
*/
NSString
*
_deduplicationKey
;
}
@property
(
nonatomic
,
assign
)
HttpMethod
httpMethod
;
@property
(
nonatomic
,
copy
)
NSArray
*
notDeduplicate
;
// 去重时被去掉的数据总计。在上拉加载更多时,这个数目仍要被用上,否则在某种极端的情况下,startNum会与服务器对不上,导致出现没有数据返回
@property
(
nonatomic
,
assign
)
NSInteger
deleteCount
;
...
...
GMBase/Classes/WMFetchDataViewModel.m
View file @
c1110a64
...
...
@@ -24,6 +24,8 @@
_fetchDataErrorMsg
=
@"获取数据失败,请重试"
;
_fetchDataNilMsg
=
@"暂时没有相关数据"
;
_message
=
@""
;
//方便 某个接口做其他请求方式 上传需求
_httpMethod
=
HttpMethodGet
;
}
return
self
;
}
...
...
@@ -47,8 +49,13 @@
return
;
}
if
(
_httpMethod
==
nil
)
{
//防止某种情况下为空 加一个默认值
_httpMethod
=
HttpMethodGet
;
}
[
self
buildParams
];
[[
WMNetService
sharedInstance
]
sendRequestWithURLString
:
_remoteUrl
parameters
:
_params
method
:
HttpMethodGet
success
:^
(
id
responseObject
)
{
[[
WMNetService
sharedInstance
]
sendRequestWithURLString
:
_remoteUrl
parameters
:
_params
method
:
_httpMethod
success
:^
(
id
responseObject
)
{
if
([
self
shouldClearDataForResponse
:
responseObject
])
{
[
self
clearData
];
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment