Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
GMNetService
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
GMNetService
Commits
22904dc8
Commit
22904dc8
authored
Sep 19, 2017
by
wangjun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改电话认证通知
parent
466c6b64
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
WMNetService.h
GMNetService/Classes/WMNetService.h
+1
-1
WMNetService.m
GMNetService/Classes/WMNetService.m
+9
-1
No files found.
GMNetService/Classes/WMNetService.h
View file @
22904dc8
...
...
@@ -35,7 +35,7 @@
@property
(
nonatomic
,
strong
)
NSString
*
webHost
;
@property
(
nonatomic
,
strong
)
NSString
*
loginExpiredName
;
@property
(
nonatomic
,
strong
)
NSString
*
urlCommonParameters
;
@property
(
nonatomic
,
copy
)
NSString
*
login
AuthenticationName
;
@property
(
nonatomic
,
copy
,
readonly
)
NSString
*
phone
AuthenticationName
;
//普通请求网络之前调用
@property
(
nonatomic
,
copy
)
void
(
^
beforeAction
)
(
void
);
//上传操作之前调用,返回一个HttpHeader, 类型是NSDictionary
...
...
GMNetService/Classes/WMNetService.m
View file @
22904dc8
...
...
@@ -12,6 +12,14 @@
@implementation
WMNetService
-
(
instancetype
)
init
{
self
=
[
super
init
];
if
(
self
)
{
_phoneAuthenticationName
=
@"PHONE_AUTHENTICATION"
;
}
return
self
;
}
+
(
instancetype
)
sharedInstance
{
static
dispatch_once_t
onceToken
;
...
...
@@ -211,7 +219,7 @@
if
(
statusCode
==
HttpStatusCodeUnauthorized
){
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
_loginExpiredName
object
:
nil
];
}
else
if
(
statusCode
==
HttpStatusCodeAuthentication
)
{
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
_
login
AuthenticationName
object
:
nil
];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
_
phone
AuthenticationName
object
:
nil
];
}
else
{
errorStr
=
[
NSString
stringWithFormat
:
@"网络错误: %ld"
,
statusCode
];
debugLog
(
@"%@"
,
errorStr
);
...
...
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