Skip to content

Commit

Permalink
delete all print
Browse files Browse the repository at this point in the history
  • Loading branch information
fancymax committed Sep 17, 2016
1 parent 32e914a commit 3be092d
Show file tree
Hide file tree
Showing 15 changed files with 7 additions and 39 deletions.
4 changes: 0 additions & 4 deletions 12306ForMac.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */; };
Expand Down Expand Up @@ -179,7 +178,6 @@
F16CB2271D312A6D0055D39D /* LoadingTipViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoadingTipViewController.swift; sourceTree = "<group>"; };
F16CB2281D312A6D0055D39D /* LoadingTipViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LoadingTipViewController.xib; sourceTree = "<group>"; };
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 = "<group>"; };
F1C075201D83F97A006EFABB /* TicketConstants.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TicketConstants.swift; sourceTree = "<group>"; };
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 = "<group>"; };
Expand Down Expand Up @@ -366,7 +364,6 @@
F111549E1C8D929200FA6059 /* Service.swift */,
F113B4F71C8FBA2E0001AE09 /* ServiceError.swift */,
F113B4F91C8FC7930001AE09 /* ErrorTranslator.swift */,
F196445D1C9CED830097FF67 /* Service+Utilities.swift */,
F1F2F2CF1D5AB8F700EA7786 /* Dama.swift */,
F11FE6861D5F4EB70049F261 /* DamaError.swift */,
);
Expand Down Expand Up @@ -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 */,
Expand Down
2 changes: 1 addition & 1 deletion 12306ForMac/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>4</string>
<string>5</string>
<key>Fabric</key>
<dict>
<key>APIKey</key>
Expand Down
2 changes: 0 additions & 2 deletions 12306ForMac/MainWindowController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 0 additions & 2 deletions 12306ForMac/Model/MainModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,9 @@ class MainModel{
}
start = start.advancedBy(10)
end = start.advancedBy(5)
// print(ticketInfo.substringWithRange(Range(start..<end)))
}
let priceStr = ticketInfo.substringWithRange(Range(start.advancedBy(1)..<end.advancedBy(1)))
let price = Double(priceStr)! / 10
// Swift.print("indentifier = \(indentifier) price = \(price) yp = \(ticketInfo)")
return price
}
else{
Expand Down
2 changes: 0 additions & 2 deletions 12306ForMac/Model/QueryLeftNewDTO.swift
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,7 @@ M/12075/0100

let seatType = SeatTypePair(id1: id1, id2: id2, number: number, price: price)
seatTypePairDic[id1] = seatType
// print("\(TrainCode) id1:\(id1) id:\(id2) number:\(number) price:\(price)")
}
// print("")
}
}

1 change: 0 additions & 1 deletion 12306ForMac/Service/Dama.swift
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ class Dama: NSObject {
}
}
}
//耗时:print(response.timeline.totalDuration)
}
}

Expand Down
2 changes: 0 additions & 2 deletions 12306ForMac/Service/Service+Login.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ extension Service {
case .Failure(let error):
reject(error)
case .Success(let content):
print(response.request?.allHTTPHeaderFields)
var dynamicJs = ""
if let matches = Regex("src=\"/otn/dynamicJs/([^\"]+)\"").getMatches(content){
dynamicJs = matches[0][0]
Expand All @@ -69,7 +68,6 @@ extension Service {
{
let url = "https://kyfw.12306.cn/otn/login/loginOut"
Service.Manager.request(.GET, url).responseString(completionHandler:{response in
print(response.result)
})
}

Expand Down
10 changes: 4 additions & 6 deletions 12306ForMac/Service/Service+Order.swift
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ extension Service{
Service.Manager.request(.POST, url, headers:headers).responseJSON(completionHandler:{response in
switch (response.result){
case .Failure(let error):
print(error)
logger.error(error.localizedDescription)
case .Success(let data):
let jsonData = JSON(data)["data"]
guard jsonData["normal_passengers"].count > 0 else {
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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 {
Expand Down
1 change: 0 additions & 1 deletion 12306ForMac/Service/Service+QueryOrder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
5 changes: 1 addition & 4 deletions 12306ForMac/StationData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ class StationNameJs{
self.allStationMap[oneStation.Name] = oneStation
}
}
else
{
print("match station fail")
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ class TicketQueryViewController: NSViewController {

func receiveCheckPassengerMessageNotification(notification: NSNotification) {
if !self.passengersPopover.shown {
print("not my message in DisclosureViewController")
return
}

Expand Down Expand Up @@ -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)
}

Expand Down Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class TrainCodeDetailViewController: NSViewController {

var queryByTrainCodeParam: QueryByTrainCodeParam? {
didSet{
// print("\(queryByTrainCodeParam.ToGetParams())")
if oldValue != nil {
if oldValue!.ToGetParams() == queryByTrainCodeParam!.ToGetParams() {
return
Expand Down
1 change: 0 additions & 1 deletion 12306ForMac/UserControls/AutoCompleteTextField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 0 additions & 4 deletions 12306ForMac/UserControls/RandCodeImageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
{
Expand Down
3 changes: 0 additions & 3 deletions 12306ForMac/UserControls/RandCodeImageView2.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 3be092d

Please sign in to comment.