diff --git a/12306ForMac.xcodeproj/project.pbxproj b/12306ForMac.xcodeproj/project.pbxproj index 99e789d..d8cd78c 100644 --- a/12306ForMac.xcodeproj/project.pbxproj +++ b/12306ForMac.xcodeproj/project.pbxproj @@ -73,7 +73,6 @@ F16CB2291D312A6D0055D39D /* LoadingTipViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F16CB2271D312A6D0055D39D /* LoadingTipViewController.swift */; }; F16CB22A1D312A6D0055D39D /* LoadingTipViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F16CB2281D312A6D0055D39D /* LoadingTipViewController.xib */; }; F17AB1CC1C95630E00FEB221 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = F17AB1CB1C95630E00FEB221 /* Credits.rtf */; }; - F196445E1C9CED830097FF67 /* Service+Utilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = F196445D1C9CED830097FF67 /* Service+Utilities.swift */; }; F1C075211D83F97A006EFABB /* TicketConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1C075201D83F97A006EFABB /* TicketConstants.swift */; }; F1C075231D855EE5006EFABB /* Direction.png in Resources */ = {isa = PBXBuildFile; fileRef = F1C075221D855EE5006EFABB /* Direction.png */; }; F1CA12051D10F546003EFD0B /* TrainCodeDetailHeaderCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1CA12041D10F546003EFD0B /* TrainCodeDetailHeaderCell.swift */; }; @@ -179,7 +178,6 @@ F16CB2271D312A6D0055D39D /* LoadingTipViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoadingTipViewController.swift; sourceTree = ""; }; F16CB2281D312A6D0055D39D /* LoadingTipViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LoadingTipViewController.xib; sourceTree = ""; }; F17AB1CB1C95630E00FEB221 /* Credits.rtf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.rtf; name = Credits.rtf; path = 12306ForMac/Resources/Credits.rtf; sourceTree = SOURCE_ROOT; }; - F196445D1C9CED830097FF67 /* Service+Utilities.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Service+Utilities.swift"; sourceTree = ""; }; F1C075201D83F97A006EFABB /* TicketConstants.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TicketConstants.swift; sourceTree = ""; }; F1C075221D855EE5006EFABB /* Direction.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Direction.png; path = 12306ForMac/images/Direction.png; sourceTree = SOURCE_ROOT; }; F1CA12041D10F546003EFD0B /* TrainCodeDetailHeaderCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TrainCodeDetailHeaderCell.swift; sourceTree = ""; }; @@ -366,7 +364,6 @@ F111549E1C8D929200FA6059 /* Service.swift */, F113B4F71C8FBA2E0001AE09 /* ServiceError.swift */, F113B4F91C8FC7930001AE09 /* ErrorTranslator.swift */, - F196445D1C9CED830097FF67 /* Service+Utilities.swift */, F1F2F2CF1D5AB8F700EA7786 /* Dama.swift */, F11FE6861D5F4EB70049F261 /* DamaError.swift */, ); @@ -700,7 +697,6 @@ F11154731C8D921400FA6059 /* MainModel.swift in Sources */, F11154791C8D921400FA6059 /* QueryOrderWaitTimeResult.swift in Sources */, F11154771C8D921400FA6059 /* QueryLeftNewDTO.swift in Sources */, - F196445E1C9CED830097FF67 /* Service+Utilities.swift in Sources */, F111549F1C8D929200FA6059 /* Service+Login.swift in Sources */, F111548F1C8D925200FA6059 /* FlashLabel.swift in Sources */, F1CA120D1D1135E2003EFD0B /* Theme.swift in Sources */, diff --git a/12306ForMac/Info.plist b/12306ForMac/Info.plist index 45d1b95..c4b21ae 100644 --- a/12306ForMac/Info.plist +++ b/12306ForMac/Info.plist @@ -19,7 +19,7 @@ CFBundleSignature ???? CFBundleVersion - 4 + 5 Fabric APIKey diff --git a/12306ForMac/MainWindowController.swift b/12306ForMac/MainWindowController.swift index 854ac05..3ebe612 100644 --- a/12306ForMac/MainWindowController.swift +++ b/12306ForMac/MainWindowController.swift @@ -94,13 +94,11 @@ class MainWindowController: NSWindowController{ } func receiveDidSendLoginMessageNotification(note: NSNotification){ - print("receiveDidSendLoginMessageNotification") loginOut() login(isAutoLogin: false) } func receiveAutoLoginMessageNotification(note: NSNotification){ - print("receiveAutoLoginMessageNotification") loginOut() login(isAutoLogin: true) } diff --git a/12306ForMac/Model/MainModel.swift b/12306ForMac/Model/MainModel.swift index 5d4c2f8..82215dc 100644 --- a/12306ForMac/Model/MainModel.swift +++ b/12306ForMac/Model/MainModel.swift @@ -41,11 +41,9 @@ class MainModel{ } start = start.advancedBy(10) end = start.advancedBy(5) -// print(ticketInfo.substringWithRange(Range(start.. 0 else { @@ -152,8 +152,8 @@ extension Service{ fulfill() } else { - logger.error("\(JSON(data))") - print(params) + logger.error("params:\(params)") + logger.error("JSON:\(JSON(data))") let error:NSError if let message = JSON(data)["messages"][0].string{ error = ServiceError.errorWithCode(.SubmitOrderFailed, failureReason: message) @@ -409,17 +409,15 @@ extension Service{ p1 = 60 } - print("calcWaitTime=\(p1)") return p1 } Service.Manager.request(.GET, url + params, headers:headers).responseJSON(completionHandler:{response in switch (response.result){ case .Failure(let error): - print(error) + logger.error(error.localizedDescription) failMethod(error:error as NSError) case .Success(let data): - print(JSON(data)) let waitTimeResult = QueryOrderWaitTimeResult(json: JSON(data)["data"]) if let submitStatus = waitTimeResult.queryOrderWaitTimeStatus where submitStatus == true { diff --git a/12306ForMac/Service/Service+QueryOrder.swift b/12306ForMac/Service/Service+QueryOrder.swift index 21b8e38..ca168fb 100644 --- a/12306ForMac/Service/Service+QueryOrder.swift +++ b/12306ForMac/Service/Service+QueryOrder.swift @@ -59,7 +59,6 @@ extension Service{ let jsonData = JSON(data)["data"] let orderDBList = JSON(data)["data"]["orderDBList"] guard orderDBList.count > 0 else { - print("queryMyOrder:\(jsonData)") reject(NSError(domain: "queryMyOrderWithPageIndex:", code: 0, userInfo: nil)) return } diff --git a/12306ForMac/StationData.swift b/12306ForMac/StationData.swift index 54756b5..bf2edf0 100644 --- a/12306ForMac/StationData.swift +++ b/12306ForMac/StationData.swift @@ -47,9 +47,6 @@ class StationNameJs{ self.allStationMap[oneStation.Name] = oneStation } } - else - { - print("match station fail") - } + } } \ No newline at end of file diff --git a/12306ForMac/TicketViewControllers/TicketQueryViewController.swift b/12306ForMac/TicketViewControllers/TicketQueryViewController.swift index d13b783..dc65c90 100644 --- a/12306ForMac/TicketViewControllers/TicketQueryViewController.swift +++ b/12306ForMac/TicketViewControllers/TicketQueryViewController.swift @@ -193,7 +193,6 @@ class TicketQueryViewController: NSViewController { func receiveCheckPassengerMessageNotification(notification: NSNotification) { if !self.passengersPopover.shown { - print("not my message in DisclosureViewController") return } @@ -301,12 +300,10 @@ class TicketQueryViewController: NSViewController { }() func receiveDidSendSubmitMessageNotification(note: NSNotification){ - print("receiveDidSendSubmitMessageNotification") openSubmitSheet(isAutoSubmit: false) } func receiveAutoSubmitMessageNotification(note: NSNotification){ - print("receiveAutoSubmitMessageNotification") openSubmitSheet(isAutoSubmit: true) } @@ -334,8 +331,7 @@ class TicketQueryViewController: NSViewController { if response == NSModalResponseOK{ self.trainFilterKey = self.trainFilterWindowController.trainFilterKey self.seatFilterKey = self.trainFilterWindowController.seatFilterKey - print(self.trainFilterKey) - print(self.seatFilterKey) + logger.info("trainFilterKey:\(self.trainFilterKey) seatFilterKey:\(self.seatFilterKey)") self.filterQueryResult = self.ticketQueryResult.filter({item in return self.trainFilterKey.containsString("|" + item.TrainCode! + "|")}) self.leftTicketTable.reloadData() diff --git a/12306ForMac/TicketViewControllers/TrainCodeDetailViewController.swift b/12306ForMac/TicketViewControllers/TrainCodeDetailViewController.swift index bc423d4..0d053c7 100644 --- a/12306ForMac/TicketViewControllers/TrainCodeDetailViewController.swift +++ b/12306ForMac/TicketViewControllers/TrainCodeDetailViewController.swift @@ -13,7 +13,6 @@ class TrainCodeDetailViewController: NSViewController { var queryByTrainCodeParam: QueryByTrainCodeParam? { didSet{ -// print("\(queryByTrainCodeParam.ToGetParams())") if oldValue != nil { if oldValue!.ToGetParams() == queryByTrainCodeParam!.ToGetParams() { return diff --git a/12306ForMac/UserControls/AutoCompleteTextField.swift b/12306ForMac/UserControls/AutoCompleteTextField.swift index 640a9dc..0448fad 100644 --- a/12306ForMac/UserControls/AutoCompleteTextField.swift +++ b/12306ForMac/UserControls/AutoCompleteTextField.swift @@ -148,7 +148,6 @@ class AutoCompleteTextField:NSTextField{ //This happens when we just started a new word or if we have already typed the entire word if subStringRange.length == 0 || lengthOfWord == 0 { - Swift.print("complete lengthOfWord = \(lengthOfWord) identier = \((sender as! NSTextField).identifier)") self.autoCompletePopover?.close() return } diff --git a/12306ForMac/UserControls/RandCodeImageView.swift b/12306ForMac/UserControls/RandCodeImageView.swift index 8bf0199..18ec18a 100644 --- a/12306ForMac/UserControls/RandCodeImageView.swift +++ b/12306ForMac/UserControls/RandCodeImageView.swift @@ -43,7 +43,6 @@ class RandCodeImageView:NSImageView { override func mouseDown(theEvent: NSEvent) { let frameOffsetInWindow = convertPoint(self.frame.origin, fromView: nil) -// Swift.print("frameInWindowX:\(frameOffsetInWindow.x) frameInWindowY:\(frameOffsetInWindow.y)") let imageOriginX = self.frame.origin.x - frameOffsetInWindow.x let imageOriginY = self.frame.origin.y + self.bounds.height - frameOffsetInWindow.y @@ -53,15 +52,12 @@ class RandCodeImageView:NSImageView { let randCodeY = (imageOriginY - mouseY)/1.2 - 30 if ((randCodeX < 0) || (randCodeY < 0)){ - Swift.print("randCodeX:\(Int(randCodeX)),randCodeY:\(Int(randCodeY)) error") return } let pointX = mouseX - (self.frame.origin.x - frameOffsetInWindow.x) let pointY = mouseY - (self.frame.origin.y - frameOffsetInWindow.y) -// Swift.print("mouseX:\(mouseX) mouseY:\(mouseY) framX:\(self.frame.origin.x) frameY:\(self.frame.origin.y) boundsX:\(self.bounds.origin.x) boundsY:\(self.bounds.origin.y)") - var isAdd = true if imageDots.count != 0 { diff --git a/12306ForMac/UserControls/RandCodeImageView2.swift b/12306ForMac/UserControls/RandCodeImageView2.swift index 11478b6..ba4681a 100644 --- a/12306ForMac/UserControls/RandCodeImageView2.swift +++ b/12306ForMac/UserControls/RandCodeImageView2.swift @@ -136,9 +136,6 @@ class RandCodeImageView2:NSImageView { section.colIndex = 3 } - Swift.print("pointX = \(pointX) pointY = \(pointY)") - Swift.print("rowIndex = \(section.rowIndex) colIndex = \(section.colIndex)") - return section }