Commit 919dfcdb authored by IOS-张 博's avatar IOS-张 博

修改mainNetwork获取不到header配置

parent f7bf36bc
......@@ -30,11 +30,7 @@
{
//刷新token时需要重置请求构造器
[self resetRequestSerializer];
NSString *token = [QGUserInfo sharedUserInfo].apiToken;
NSString *Authorization = [NSString stringWithFormat:@"%@%@", @"Bearer ", token];
if (token) {
[self setRequestHTTPHeaderValue:Authorization forkey:@"Authorization"];
}
[self configHTTPHeaders];
}
- (instancetype)init
......@@ -60,10 +56,22 @@
//商城后台用于区分是否是主包APP,Android iOS都为0 量卡为2
[self setRequestHTTPHeaderValue:@"0" forkey:@"source"];
[self setRequestHTTPHeaderValue:@"zhenxianghua" forkey:@"appName"];
[self refreshToken];
[self configToken];
}
///配置token
- (void)configToken
{
NSString *token = [QGUserInfo sharedUserInfo].apiToken;
NSString *Authorization = [NSString stringWithFormat:@"%@%@", @"Bearer ", token];
if (token) {
[self setRequestHTTPHeaderValue:Authorization forkey:@"Authorization"];
}
}
- (NSString *)baseUrlString
{
//线上环境
......
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