//
//  SinglePointWeChatHttp.swift
//  MobilePortal
//
//  Created by caiyang on 2020/8/24.
//  Copyright © 2020 yin chen. All rights reserved.
//

import UIKit

class SinglePointWeChatHttp: NSObject {
    
    class func sharedInstance()->SinglePointWeChatHttp {
        struct SharedStatic {
            static var instance: SinglePointWeChatHttp = SinglePointWeChatHttp()
        }
        return SharedStatic.instance
    }
    // MARK: APP 消息详情存储
    func juphMessageJsonActionHttp(resultBlock:@escaping passParameterBlock,errorBlock:@escaping passParameterBlock) {
        let cmd:HttpCommand = MessageJsonHttpPostCmd.init(version: PHttpVersion_v1)
        let block:httpBlock = {[weak self] (result:RequestResult!,useInfo:Any!)->() in
            if result != nil {
                self?.httpMessageJsonHttpResultResponse(result: result, resultBlock: resultBlock, errorBlock: errorBlock)
            }else{
                print("空的")
            }
        }
        let dic:NSMutableDictionary = NSMutableDictionary()
        dic[kHttpMessageJsonHttpPostCmd_empid] = judgmentStrNil(str: AccountInfo.sharedInstance().UserId)
        dic[kHttpMessageJsonHttpPostCmd_equipmentId] = judgmentStrNil(str: AccountInfo.sharedInstance().appUUID) // 设备ID
        dic[kHttpMessageJsonHttpPostCmd_jpushInfo] = judgmentStrNil(str: AccountInfo.sharedInstance().UMS_messageJSON) // 极光ID
        let completeDelegate = SMBaseHttpComplete.init(block: block , withUserInfo: nil)
        cmd.requestInfo = dic as? [AnyHashable : Any]
        cmd.completeDelegate=completeDelegate
        print("url==%@",cmd.getUrl())
        cmd.execute()
    }
    func httpMessageJsonHttpResultResponse(result:RequestResult,resultBlock:@escaping passParameterBlock,errorBlock:@escaping passParameterBlock){
        let r:MessageJsonHttpResult = result as! MessageJsonHttpResult
        if r.isOk() {
            resultBlock(r.getMessageJsonHttpResult())
        }else{
//            SMToastView.showMessage("请查看当前网络状态！")
            errorBlock("")
        }
    }
    
    
    // MARK: APP 极光ID注册
    func juphRegistrationIDActionHttp(resultBlock:@escaping passParameterBlock,errorBlock:@escaping passParameterBlock) {
        let cmd:HttpCommand = JuphRegistrationIDHttpPostCmd.init(version: PHttpVersion_v1)
        let block:httpBlock = {[weak self] (result:RequestResult!,useInfo:Any!)->() in
            if result != nil {
                self?.httpJuphRegistrationIDHttpResultResponse(result: result, resultBlock: resultBlock, errorBlock: errorBlock)
            }else{
                print("空的")
            }
        }
        let dic:NSMutableDictionary = NSMutableDictionary()
        dic[kHttpJuphRegistrationIDHttpPostCmd_empid] = judgmentStrNil(str: AccountInfo.sharedInstance().UserId)
        dic[kHttpJuphRegistrationIDHttpPostCmd_equipmentId] = judgmentStrNil(str: AccountInfo.sharedInstance().appUUID) // 设备ID
        dic[kHttpJuphRegistrationIDHttpPostCmd_regId] = judgmentStrNil(str: AccountInfo.sharedInstance().juph_registrationID) // 极光ID
        let completeDelegate = SMBaseHttpComplete.init(block: block , withUserInfo: nil)
        cmd.requestInfo = dic as? [AnyHashable : Any]
        cmd.completeDelegate=completeDelegate
        print("url==%@",cmd.getUrl())
        cmd.execute()
    }
    func httpJuphRegistrationIDHttpResultResponse(result:RequestResult,resultBlock:@escaping passParameterBlock,errorBlock:@escaping passParameterBlock){
        let r:JuphRegistrationIDHttpResult = result as! JuphRegistrationIDHttpResult
        if r.isOk() {
            resultBlock(r.getJuphRegistrationIDHttpResult())
        }else{
            SMToastView.showMessage("请查看当前网络状态！")
            errorBlock("")
        }
    }
    // MARK: APP 是否停用禁用
    func judgmentDeactivateEnable(userid:String?,resultBlock:@escaping passParameterBlock,errorBlock:@escaping passParameterBlock) {
        let cmd:HttpCommand = DeactivateEnableHttpPostCmd.init(version: PHttpVersion_v1)
        let block:httpBlock = {[weak self] (result:RequestResult!,useInfo:Any!)->() in
            if result != nil {
                self?.httpDeactivateEnableHttpResultResponse(result: result, resultBlock: resultBlock, errorBlock: errorBlock)
            }else{
                print("空的")
            }
        }
        let dic:NSMutableDictionary = NSMutableDictionary()
        dic[kHttpDeactivateEnableHttpPostCmd_userId] = judgmentStrNil(str: userid)
        dic[kHttpDeactivateEnableHttpPostCmd_appVersion] = "V2"
        let completeDelegate = SMBaseHttpComplete.init(block: block , withUserInfo: nil)
        cmd.requestInfo = dic as? [AnyHashable : Any]
        cmd.completeDelegate=completeDelegate
        print("url==%@",cmd.getUrl())
        cmd.execute()
    }
    func httpDeactivateEnableHttpResultResponse(result:RequestResult,resultBlock:@escaping passParameterBlock,errorBlock:@escaping passParameterBlock){
        let r:DeactivateEnableHttpResult = result as! DeactivateEnableHttpResult
        if r.isOk() {
            resultBlock(r.getDeactivateEnableHttpResult())
        }else{
            SMToastView.showMessage("请查看当前网络状态！")
            errorBlock("")
        }
    }
    
    
    // MARK: IDM 判断 Token
    func judgmentTokenExpired(resultBlock:@escaping passParameterBlock,errorBlock:@escaping passParameterBlock) {
        let cmd:HttpCommand = VerificationTokenHttpPostCmd.init(version: PHttpVersion_v1)
        let block:httpBlock = {[weak self] (result:RequestResult!,useInfo:Any!)->() in
            if result != nil {
                self?.httpVerificationTokenHttpResultResponse(result: result, resultBlock: resultBlock, errorBlock: errorBlock)
            }else{
                print("空的")
            }
        }
        let dic:NSMutableDictionary = NSMutableDictionary()
        dic[kHttpVerificationTokenHttpPostCmd_tokenId] = AccountInfo.sharedInstance().singlePoint_access_token!
//        dic[kHttpVerificationTokenHttpPostCmd_tokenId] = "MTAuMTEuMTgwLjgw|OWFjMjgxMmQzMGM4ZTQ4N2NjYWMzZWVjYzQxOWFkM2Y1MDI0ZDc0MGQyMGM2NjUwYTBhNWE1MTNlMzQxNDQ5OA==|pvtrTYt3UsMOJf9YQUbKU4xakdI="
        dic[kHttpVerificationTokenHttpPostCmd_remoteIp] = AccountInfo.sharedInstance().singlePoint_remoteIp
        dic[kHttpVerificationTokenHttpPostCmd_appId] = AccountInfo.sharedInstance().singlePoint_appId
        let completeDelegate = SMBaseHttpComplete.init(block: block , withUserInfo: nil)
        cmd.requestInfo = dic as? [AnyHashable : Any]
        cmd.completeDelegate=completeDelegate
        print("url==%@",cmd.getUrl())
        cmd.execute()
    }
    func httpVerificationTokenHttpResultResponse(result:RequestResult,resultBlock:@escaping passParameterBlock,errorBlock:@escaping passParameterBlock){
        let r:VerificationTokenHttpResult = result as! VerificationTokenHttpResult
        if r.isOk() {
            let array:NSMutableArray = r.getVerificationTokenHttpResult()
            if array.count == 0{
                print("验证成功！")
                resultBlock("")
            } else {
                print("验证失败！")
                errorBlock("")
                self.getRefreshTokenHttpPostCmd(resultBlock: resultBlock, errorBlock: errorBlock)
            }
        }else{
            SMToastView.showMessage("请查看当前网络状态！")
            errorBlock("")
        }
    }
    
    
    // MARK:IDM 刷新 Token
    func getRefreshTokenHttpPostCmd(resultBlock:@escaping passParameterBlock,errorBlock:@escaping passParameterBlock){
        let cmd:HttpCommand = RefreshTokenHttpPostCmd.init(version: PHttpVersion_v1)
        let block:httpBlock = {[weak self] (result:RequestResult!,useInfo:Any!)->() in
            if result != nil {
                self?.httpRefeshTokenHttpResultResponse(result: result, resultBlock: resultBlock, errorBlock: errorBlock)
            }else{
                print("空的")
            }
        }
        let dic:NSMutableDictionary = NSMutableDictionary()
        dic[kHttpRefreshTokenHttpPostCmd_appId] = AccountInfo.sharedInstance().singlePoint_appId
        dic[kHttpRefreshTokenHttpPostCmd_token] = "IDM:P@ssw0rd"
        dic[kHttpRefreshTokenHttpPostCmd_username] = AccountInfo.sharedInstance().UserId
        dic[kHttpRefreshTokenHttpPostCmd_remoteIp] = AccountInfo.sharedInstance().singlePoint_remoteIp
        cmd.requestInfo = dic as [NSObject:AnyObject]
        let completeDelegate = SMBaseHttpComplete.init(block: block , withUserInfo: nil)
        cmd.completeDelegate=completeDelegate
        print("url==%@",cmd.getUrl())
        cmd.execute()
    }
    func httpRefeshTokenHttpResultResponse(result:RequestResult,resultBlock:@escaping passParameterBlock,errorBlock:@escaping passParameterBlock){
        let r:RefeshTokenHttpResult = result as! RefeshTokenHttpResult
        if r.isOk() {
            let array:NSMutableArray = r.getRefeshTokenHttpResult()
            if (array.count == 0) {
                AccountInfo.sharedInstance().singlePoint_startTime = newDateStr()
                resultBlock("")
            } else {
                SMToastView.showMessage((array[0] as! String))
                errorBlock("")
            }
        }else{
            SMToastView.showMessage("请查看当前网络状态！")
            errorBlock("")
        }
    }
    
    // MARK:设备是否可用绑定
    func getDeviceDisabledHttpPostCmd(resultBlock:@escaping passParameterBlock,errorBlock:@escaping passParameterBlock){
        let cmd:HttpCommand = DeviceDisabledHttpPostCmd.init(version: PHttpVersion_v1)
        let block:httpBlock = {[weak self] (result:RequestResult!,useInfo:Any!)->() in
            if result != nil {
                self?.httpDeviceDisabledHttpResultResponse(result: result, resultBlock: resultBlock, errorBlock: errorBlock)
            }else{
                print("空的")
            }
        }
        let dic:NSMutableDictionary = NSMutableDictionary()
        dic[kHttpDeviceDisabledHttpPostCmd_userid] = AccountInfo.sharedInstance().UserId
        dic[kHttpDeviceDisabledHttpPostCmd_id] = AccountInfo.sharedInstance().appUUID
        cmd.requestInfo = dic as [NSObject:AnyObject]
        let completeDelegate = SMBaseHttpComplete.init(block: block , withUserInfo: nil)
        cmd.completeDelegate=completeDelegate
        print("url==%@",cmd.getUrl())
        cmd.execute()
    }
    func httpDeviceDisabledHttpResultResponse(result:RequestResult,resultBlock:@escaping passParameterBlock,errorBlock:@escaping passParameterBlock){
        let r:DeviceDisabledHttpResult = result as! DeviceDisabledHttpResult
        if r.isOk() {
            let array:NSMutableArray = r.getDeviceDisabledHttpResult()
            if (array.count == 0) {
                /// 上传手机信息
//                getLoginDeviceInformationHttpCmd()
                resultBlock("")
            } else {
                SMToastView.showMessage((array[0] as! String))
                errorBlock("")
            }
        }else{
            SMToastView.showMessage("请查看当前网络状态！")
            errorBlock("")
        }
    }
    // MARK: 根据公司获取登录方式
    func getLoginTypeHttpGetCmd(userid:String,resultBlock:@escaping passParameterBlock,errorBlock:@escaping passParameterBlock){
        let cmd:HttpCommand = LoginTypeHttpGetCmd.init(version: PHttpVersion_v1)
        let block:httpBlock = {[weak self] (result:RequestResult!,useInfo:Any!)->() in
            if result != nil {
                self?.httpLoginTypeHttpResultResponse(result: result, resultBlock: resultBlock, errorBlock: errorBlock)
            }else{
                print("空的")
            }
        }
        let dic:NSMutableDictionary = NSMutableDictionary()
        dic[kHttpLoginTypeHttpGetCmd_userid] = judgmentStrNil(str: userid)
        cmd.requestInfo = dic as [NSObject:AnyObject]
        let completeDelegate = SMBaseHttpComplete.init(block: block , withUserInfo: nil)
        cmd.completeDelegate = completeDelegate
        print("url==%@",cmd.getUrl())
        cmd.execute()
    }
    func httpLoginTypeHttpResultResponse(result:RequestResult,resultBlock:@escaping passParameterBlock,errorBlock:@escaping passParameterBlock){
        let r:LoginTypeHttpResult = result as! LoginTypeHttpResult
        if r.isOk() {
            let httpArray = r.getLoginTypeHttpResult() as NSMutableArray
            resultBlock(httpArray as NSMutableArray)
        }else{
            SMToastView.showMessage("请查看当前网络状态！")
            errorBlock("")
        }
    }
    // MARK: 判断是否开启微信绑定
    func getWechatScopeListHttpCmd(resultBlock:@escaping passParameterBlock,errorBlock:@escaping passParameterBlock){
        let cmd:HttpCommand = WeChatTypeHttpPostCmd.init(version: PHttpVersion_v1)
        let block:httpBlock = {[weak self] (result:RequestResult!,useInfo:Any!)->() in
            if result != nil {
                self?.httpWechatWeChatTypeHttpResultResponse(result: result, resultBlock: resultBlock, errorBlock: errorBlock)
            }else{
                print("空的")
            }
        }
        let dic:NSMutableDictionary = NSMutableDictionary()
        let attrDic:NSMutableDictionary = NSMutableDictionary()
        var filtersArr:NSMutableArray = NSMutableArray()
        attrDic[kHttpWeChatTypeHttpPostCmd_empid] = judgmentStrNil(str: "")
        attrDic[kHttpWeChatTypeHttpPostCmd_companyname] = judgmentStrNil(str: "上药控股有限公司")
        dic[kHttpWeChatTypeHttpPostCmd_attr] = attrDic
        
        let name = ["key":"name","opt":"LIKE","type":"S","value":"wxlogintype"]
        let system = ["key":"system","opt":"LIKE","type":"S","value":"wxlogintype"]
        let keyword = ["key":"keyword","opt":"LIKE","type":"S","value":"wxlogintype"]

        filtersArr = [name,system,keyword]
        dic[kHttpWeChatTypeHttpPostCmd_filters] = filtersArr
        dic[kHttpWeChatTypeHttpPostCmd_logic] = "or"
        dic[kHttpWeChatTypeHttpPostCmd_pageNum] = 1
        dic[kHttpWeChatTypeHttpPostCmd_pageSize] = 10
        cmd.requestInfo = dic as [NSObject:AnyObject]
        let completeDelegate = SMBaseHttpComplete.init(block: block , withUserInfo: nil)
        cmd.completeDelegate=completeDelegate
        print("url==%@",cmd.getUrl())
        cmd.execute()
    }
    func httpWechatWeChatTypeHttpResultResponse(result:RequestResult,resultBlock:@escaping passParameterBlock,errorBlock:@escaping passParameterBlock){
        let r:WeChatTypeHttpResult = result as! WeChatTypeHttpResult
        if r.isOk() {
            let httpArray = r.getWeChatTypeHttpResult() as NSMutableArray
            resultBlock(httpArray as NSMutableArray)
        }else{
            SMToastView.showMessage("请查看当前网络状态！")
            errorBlock("")
        }
    }
    
    // MARK: 获取登录方式
    func getScopeListHttpCmd(resultBlock:@escaping passParameterBlock,errorBlock:@escaping passParameterBlock){
        let cmd:HttpCommand = ScopeListHttpCmd.init(version: PHttpVersion_v1)
        let block:httpBlock = {[weak self] (result:RequestResult!,useInfo:Any!)->() in
            if result != nil {
                self?.httpScopeListHttpResultResponse(result: result, resultBlock: resultBlock, errorBlock: errorBlock)
            }else{
                print("空的")
            }
        }
        let dic:NSMutableDictionary = NSMutableDictionary()
        dic[kHttpSNHttpBasePostCmd_system] = "logintype"
        if AccountInfo.sharedInstance().UserId == nil || AccountInfo.sharedInstance().UserId == "" {
            dic[kHttpSNHttpBasePostCmd_companyname] = "上药控股有限公司"
        } else {
            dic[kHttpSNHttpBasePostCmd_companyname] = judgmentStrNil(str: AccountInfo.sharedInstance().infoCompanyName)
        }
        cmd.requestInfo = dic as [NSObject:AnyObject]
        let completeDelegate = SMBaseHttpComplete.init(block: block , withUserInfo: nil)
        cmd.completeDelegate=completeDelegate
        print("url==%@",cmd.getUrl())
        cmd.execute()
    }
    func httpScopeListHttpResultResponse(result:RequestResult,resultBlock:@escaping passParameterBlock,errorBlock:@escaping passParameterBlock){
        let r:ScopeListHttpResult = result as! ScopeListHttpResult
        if r.isOk() {
            let httpArray = r.getScopeListHttpResult() as NSMutableArray
            resultBlock(httpArray as NSMutableArray)
        }else{
            SMToastView.showMessage("请查看当前网络状态！")
            errorBlock("")
        }
    }
    // MARK:版本更新
    func getNewVersionUpdateHttpCmd(resultBlock:@escaping passParameterBlock,errorBlock:@escaping passParameterBlock){
        let cmd:HttpCommand = NewVersionUpdateHttpCmd.init(version: PHttpVersion_v1)
        let block:httpBlock = {[weak self] (result:RequestResult!,useInfo:Any!)->() in
            if result != nil {
                self?.httpNewVersionUpdateHttpResultResponse(result: result, resultBlock: resultBlock, errorBlock: errorBlock)
            }else{
                print("空的")
            }
        }
        let dic:NSMutableDictionary = NSMutableDictionary()
        let attrDic:NSMutableDictionary = NSMutableDictionary()
        attrDic[kHttpAdvisoryHttpCmd_empid] = judgmentStrNil(str: AccountInfo.sharedInstance().UserId)
        dic[kHttpAdvisoryHttpCmd_attr] = attrDic
        dic[kHttpAdvisoryHttpCmd_orderby] = "createon"
        dic[kHttpAdvisoryHttpCmd_pageNum] = "0"
        dic[kHttpAdvisoryHttpCmd_pageSize] = "20"
        dic[kHttpAdvisoryHttpCmd_sort] = "desc"
        let filtersDic:NSMutableDictionary = NSMutableDictionary()
        if AccountInfo.sharedInstance().isTest == "1" {
            //           测试版 正式版
            filtersDic[kHttpAdvisoryHttpCmd_value] = "41"
        } else if AccountInfo.sharedInstance().isTest == "2" {
            // 体验版
            filtersDic[kHttpAdvisoryHttpCmd_value] = "42"
        }
        let filtersArray = NSMutableArray()
        filtersArray.add(filtersDic)
        dic[kHttpAdvisoryHttpCmd_filters] = filtersArray
        cmd.requestInfo = dic as [NSObject:AnyObject]
        let completeDelegate = SMBaseHttpComplete.init(block: block , withUserInfo: nil)
        cmd.completeDelegate=completeDelegate
        print("url==%@",cmd.getUrl())
        cmd.execute()
    }
    func httpNewVersionUpdateHttpResultResponse(result:RequestResult,resultBlock:@escaping passParameterBlock,errorBlock:@escaping passParameterBlock){
        resultBlock(result)
    }
    // MARK:手机是否禁用
    func getUntuedCellPhoneHttpPostCmd(resultBlock:@escaping passParameterBlock,errorBlock:@escaping passParameterBlock){
        let cmd:HttpCommand = UntuedCellPhoneHttpPostCmd.init(version: PHttpVersion_v1)
        let block:httpBlock = {[weak self] (result:RequestResult!,useInfo:Any!)->() in
            if result != nil {
                self?.httpUntuedCellPhoneHttpPostResultResponse(result: result, resultBlock: resultBlock, errorBlock: errorBlock)
            }else{
                print("空的")
            }
        }
        let dic:NSMutableDictionary = NSMutableDictionary()
        let filtersDic:NSMutableDictionary = NSMutableDictionary()
        filtersDic[kHttpUntuedCellPhoneHttpPostCmd_key] = "ID"
        filtersDic[kHttpUntuedCellPhoneHttpPostCmd_opt] = "EQ"
        filtersDic[kHttpUntuedCellPhoneHttpPostCmd_type] = "S"
        filtersDic[kHttpUntuedCellPhoneHttpPostCmd_value] = AccountInfo.sharedInstance().appUUID
        let filtersArray = NSMutableArray()
        filtersArray.add(filtersDic)
        dic[kHttpUntuedCellPhoneHttpPostCmd_filters] = filtersArray
        cmd.requestInfo = dic as [NSObject:AnyObject]
        let completeDelegate = SMBaseHttpComplete.init(block: block , withUserInfo: nil)
        cmd.completeDelegate=completeDelegate
        print("url==%@",cmd.getUrl())
        cmd.execute()
    }
    func httpUntuedCellPhoneHttpPostResultResponse(result:RequestResult,resultBlock:@escaping passParameterBlock,errorBlock:@escaping passParameterBlock){
        let r:UntuedCellPhoneHttpPostResult = result as! UntuedCellPhoneHttpPostResult
        if r.isOk() {
            let array:NSMutableArray = r.getUntuedCellPhoneHttpPostResult()
//            self.judgmentPhone(httpArray: array)
            resultBlock(array)
        }else{
            errorBlock("")
            SMToastView.showMessage("请查看当前网络状态！")
        }
//        hidenHintView()
    }
    /// 上传手机信息
    func getLoginDeviceInformationHttpCmd(resultBlock:@escaping passParameterBlock,errorBlock:@escaping passParameterBlock){
        let cmd:HttpCommand = DeviceInformationHttpCmd.init(version: PHttpVersion_v1)
        let block:httpBlock = {[weak self] (result:RequestResult!,useInfo:Any!)->() in
            if result != nil {
                self?.httpDeviceInformationHttpResultResponse(result: result, resultBlock: resultBlock, errorBlock: errorBlock)
            }else{
                print("空的")
            }
        }
        let dic:NSMutableDictionary = NSMutableDictionary()
        cmd.requestInfo = DeviceInformation.share().getDeviceInformation(dic) as [NSObject:AnyObject]
        let completeDelegate = SMBaseHttpComplete.init(block: block , withUserInfo: nil)
        cmd.requestInfo = dic as? [AnyHashable : Any]
        cmd.completeDelegate=completeDelegate
        print("url==%@",cmd.getUrl())
        cmd.execute()
        
    }
    // MARK:上传手机信息成功后 刷新页面
    func httpDeviceInformationHttpResultResponse(result: RequestResult,resultBlock:@escaping passParameterBlock,errorBlock:@escaping passParameterBlock) {
        let r:DeviceInformationHttpResult = result as! DeviceInformationHttpResult
        if r.isOk() {
            let array:NSMutableArray = r.getDeviceInformationHttpResult()
            if array.count != 0{
                SMToastView.showMessage((array[0] as! String) )
                errorBlock("")
//                self.hidenHintView()
            }else{
                /// 获取个人信息
//                getMyInformationHttpGetCmd()
                resultBlock("")
            }
        }else{
            SMToastView.showMessage("请查看当前网络状态！")
            errorBlock("")
//            self.hidenHintView()
        }
    }
    // MARK:录入日志
    func setIdmLogSaveHttpPostCmd(inputmessage:String,logmessage:String,idmmessage:String){
        let cmd:HttpCommand = IdmLogSaveHttpPostCmd.init(version: PHttpVersion_v1)
        let block:httpBlock = {[weak self] (result:RequestResult!,useInfo:Any!)->() in
            if result != nil {
                self?.httpIdmLogSaveHttpResultResponse(result: result)
            }else{
                print("空的")
            }
        }
        let dic:NSMutableDictionary = NSMutableDictionary()
        dic[kHttpIdmLogSaveHttpPostCmd_inputmessage] = inputmessage
        dic[kHttpIdmLogSaveHttpPostCmd_logmessage] = logmessage
        dic[kHttpIdmLogSaveHttpPostCmd_idmmessage] = idmmessage
        cmd.requestInfo = dic as [NSObject:AnyObject]
        let completeDelegate = SMBaseHttpComplete.init(block: block , withUserInfo: nil)
        cmd.completeDelegate=completeDelegate
        print("url==%@",cmd.getUrl())
        cmd.execute()
    }
    func httpIdmLogSaveHttpResultResponse(result:RequestResult){
        
    }
   
   
}
