     
     func loginUserWith(_ user:String, passWord:String, randCodeStr:String)->Promise<Void>{
         return Promise{ fulfill, reject in
-            let url = "https://kyfw.12306.cn/otn/login/loginAysnSuggest"
-            let params = ["loginUserDTO.user_name":user,"userDTO.password":passWord,"randCode":randCodeStr]
-            let headers = ["refer": "https://kyfw.12306.cn/otn/login/init"]
-            Service.Manager.request(url, method:.post, parameters: params, headers:headers).responseJSON(completionHandler:{response in
-                switch (response.result){
-                case .failure(let error):
-                    reject(error)
-                case .success(let data):
-                    if let loginCheck = JSON(data)["data"]["loginCheck"].string , loginCheck == "Y"{
-                        MainModel.userName = user
+            let url = passport_login
+            let params = ["user_name":user,"password":passWord,"appid":passport_appId]
+            let headers = ["refer": "https://kyfw.12306.cn/otn/login/init"]
+            Service.Manager.request(url, method:.post, parameters: params, headers:headers).responseJSON(completionHandler:{response in
+                switch (response.result){
+                case .failure(let error):
+                    reject(error)
+                case .success(let data):
+                    if let result_code = JSON(data)["result_code"].int ,result_code == 0{
                         fulfill()
                     }
                     else{
                         let error:NSError
-                        if let errorStr = JSON(data)["messages"][0].string{
+                        if let errorStr = JSON(data)["result_message"].string{
                             error = ServiceError.errorWithCode(.loginUserFailed, failureReason: errorStr)
                         }
                         else{

                        var hasLogin = false
                        if result_code == 0 {
                            hasLogin = true
                        }
                        else {
                            hasLogin = false

                        fulfill(hasLogin)
                    }
                    else{
                        let error = ServiceError.errorWithCode(.loginFailed, failureReason: "uampassport")
                        reject(error)
                    }
                }})
        }
    }
    
    func checkRandCodeForLogin(_ randCodeStr:String)->Promise<Void>{
        return Promise{ fulfill, reject in
            let url = passport_captcha_check
            let params = ["answer":randCodeStr,"login_site":"E","rand":"sjrand"]
            let headers = ["refer": "https://kyfw.12306.cn/otn/login/init"]
            Service.Manager.request(url, method:.post, parameters: params, headers:headers).responseJSON(completionHandler:{response in
                switch (response.result){
                case .failure(let error):
                    reject(error)
                case .success(let data):
                    if let msg = JSON(data)["result_code"].string , msg == "4"{
                        fulfill()
                    }
                    else{
