//
//  LoginHttpPostCmd.m
//  MobilePortal
//
//  Created by xiejiangbo on 2019/9/25.
//  Copyright © 2019 yin chen. All rights reserved.
//

#import "LoginHttpPostCmd.h"
#import "LoginHttpPostResult.h"

static NSString *kActionUrl = @"/appEir/loginCheck";
//static NSString *kActionUrl = @"/eccp-portal/user/login";

@implementation LoginHttpPostCmd
-(instancetype)initWithVersion:(NSString *)version{
    if ([version isEqualToString:PHttpVersion_v1]) {
        return [[LoginHttpPostCmd alloc]initWithAuthorizationState:AuthorizationNull];
    }else{
        NSAssert(NO, @"Invalid version");
    }
    return nil;
}

- (instancetype)initWithAuthorizationState:(AuthorizationState)state{
    self = [super initWithAuthorizationState:state];
    if (self != nil) {
        self.result = [[LoginHttpPostResult alloc]init];
    }
    return self;
}

- (NSString *)getActionUrl{
    
    return kActionUrl;
}
@end
NSString *const kHttpLoginHttpPostCmd_userid = @"userid";
NSString *const kHttpLoginHttpPostCmd_password = @"password";
NSString *const kHttpLoginHttpPostCmd_ticket = @"ticket";
NSString *const kHttpLoginHttpPostCmd_type = @"type";
NSString *const kHttpLoginHttpPostCmd_attr = @"attr";
