//
//  getPhonePriceList.m
//  Open
//
//  Created by 看看智能 on 2017/3/13.
//  Copyright © 2017年 黄江涛 . All rights reserved.
//

#import "getPhonePriceList.h"

@implementation getPhonePriceList
+(id)getPhonePriceList:(NSString *)telephone Handle:(void (^)(phoneModel *, NSError *))complete
{
    NSString * pathNew_1 =[IPDIZHI stringByAppendingString:@"/socialsecurity/phoneservice/getPhonePriceList"];
    NSString * pathNew1 =  [pathNew_1 stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
    NSDictionary *dictNew =@{
                             @"telephoneno":telephone
                             };
    NSLog(@"dictNew:%@",dictNew);
    return [self  POST:pathNew1 parameters:dictNew completionHandler:^(id responseObj, NSError *error) {
        NSLog(@"%@",responseObj);
        complete( [phoneModel mj_objectWithKeyValues:responseObj],error);
        if (error) {
            NSLog(@"打印错误:%@",error);
        }
    }];


}

+(id)getAlipayOrderNo:(NSString *)telephoneNo andProductId:(NSString *)ID andUserid:(NSString *)userid Handle:(void (^)(photoTwoModel *, NSError *))complete
{
    NSString * pathNew_1 =[IPDIZHI stringByAppendingString:@"/socialsecurity/kankan/getAlipayOrderNo"];
    NSString * pathNew1 =  [pathNew_1 stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
    NSDictionary *dictNew =@{
                             @"telephoneno":telephoneNo,
                             @"productId":ID,
                             @"userid":userid
                             };
    NSLog(@"dictNew:%@",dictNew);
    return [self  POST:pathNew1 parameters:dictNew completionHandler:^(id responseObj, NSError *error) {
        NSLog(@"%@",responseObj);
        complete( [photoTwoModel mj_objectWithKeyValues:responseObj],error);
        if (error) {
            NSLog(@"打印错误:%@",error);
        }
    }];
}
@end
