Commit 54713266 authored by 汪洋's avatar 汪洋

Merge branch 'wangjun/dev-GMNetService' into 'master'

修改电话认证通知



See merge request !2
parents b9a626cd 22904dc8
......@@ -35,7 +35,7 @@
@property (nonatomic, strong) NSString *webHost;
@property (nonatomic, strong) NSString *loginExpiredName;
@property (nonatomic, strong) NSString *urlCommonParameters;
@property (nonatomic, copy) NSString *loginAuthenticationName;
@property (nonatomic, copy, readonly) NSString *phoneAuthenticationName;
//普通请求网络之前调用
@property (nonatomic, copy) void (^beforeAction) (void);
//上传操作之前调用,返回一个HttpHeader, 类型是NSDictionary
......
......@@ -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:_loginAuthenticationName object:nil];
[[NSNotificationCenter defaultCenter] postNotificationName:_phoneAuthenticationName object:nil];
} else {
errorStr = [NSString stringWithFormat:@"网络错误: %ld", statusCode];
debugLog(@"%@", errorStr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment