Skip to content

Commit 3be092d

Browse files
committed
delete all print
1 parent 32e914a commit 3be092d

15 files changed

+7
-39
lines changed

12306ForMac.xcodeproj/project.pbxproj

-4
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@
7373
F16CB2291D312A6D0055D39D /* LoadingTipViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F16CB2271D312A6D0055D39D /* LoadingTipViewController.swift */; };
7474
F16CB22A1D312A6D0055D39D /* LoadingTipViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F16CB2281D312A6D0055D39D /* LoadingTipViewController.xib */; };
7575
F17AB1CC1C95630E00FEB221 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = F17AB1CB1C95630E00FEB221 /* Credits.rtf */; };
76-
F196445E1C9CED830097FF67 /* Service+Utilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = F196445D1C9CED830097FF67 /* Service+Utilities.swift */; };
7776
F1C075211D83F97A006EFABB /* TicketConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1C075201D83F97A006EFABB /* TicketConstants.swift */; };
7877
F1C075231D855EE5006EFABB /* Direction.png in Resources */ = {isa = PBXBuildFile; fileRef = F1C075221D855EE5006EFABB /* Direction.png */; };
7978
F1CA12051D10F546003EFD0B /* TrainCodeDetailHeaderCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1CA12041D10F546003EFD0B /* TrainCodeDetailHeaderCell.swift */; };
@@ -179,7 +178,6 @@
179178
F16CB2271D312A6D0055D39D /* LoadingTipViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoadingTipViewController.swift; sourceTree = "<group>"; };
180179
F16CB2281D312A6D0055D39D /* LoadingTipViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LoadingTipViewController.xib; sourceTree = "<group>"; };
181180
F17AB1CB1C95630E00FEB221 /* Credits.rtf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.rtf; name = Credits.rtf; path = 12306ForMac/Resources/Credits.rtf; sourceTree = SOURCE_ROOT; };
182-
F196445D1C9CED830097FF67 /* Service+Utilities.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Service+Utilities.swift"; sourceTree = "<group>"; };
183181
F1C075201D83F97A006EFABB /* TicketConstants.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TicketConstants.swift; sourceTree = "<group>"; };
184182
F1C075221D855EE5006EFABB /* Direction.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Direction.png; path = 12306ForMac/images/Direction.png; sourceTree = SOURCE_ROOT; };
185183
F1CA12041D10F546003EFD0B /* TrainCodeDetailHeaderCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TrainCodeDetailHeaderCell.swift; sourceTree = "<group>"; };
@@ -366,7 +364,6 @@
366364
F111549E1C8D929200FA6059 /* Service.swift */,
367365
F113B4F71C8FBA2E0001AE09 /* ServiceError.swift */,
368366
F113B4F91C8FC7930001AE09 /* ErrorTranslator.swift */,
369-
F196445D1C9CED830097FF67 /* Service+Utilities.swift */,
370367
F1F2F2CF1D5AB8F700EA7786 /* Dama.swift */,
371368
F11FE6861D5F4EB70049F261 /* DamaError.swift */,
372369
);
@@ -700,7 +697,6 @@
700697
F11154731C8D921400FA6059 /* MainModel.swift in Sources */,
701698
F11154791C8D921400FA6059 /* QueryOrderWaitTimeResult.swift in Sources */,
702699
F11154771C8D921400FA6059 /* QueryLeftNewDTO.swift in Sources */,
703-
F196445E1C9CED830097FF67 /* Service+Utilities.swift in Sources */,
704700
F111549F1C8D929200FA6059 /* Service+Login.swift in Sources */,
705701
F111548F1C8D925200FA6059 /* FlashLabel.swift in Sources */,
706702
F1CA120D1D1135E2003EFD0B /* Theme.swift in Sources */,

12306ForMac/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>
22-
<string>4</string>
22+
<string>5</string>
2323
<key>Fabric</key>
2424
<dict>
2525
<key>APIKey</key>

12306ForMac/MainWindowController.swift

-2
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,11 @@ class MainWindowController: NSWindowController{
9494
}
9595

9696
func receiveDidSendLoginMessageNotification(note: NSNotification){
97-
print("receiveDidSendLoginMessageNotification")
9897
loginOut()
9998
login(isAutoLogin: false)
10099
}
101100

102101
func receiveAutoLoginMessageNotification(note: NSNotification){
103-
print("receiveAutoLoginMessageNotification")
104102
loginOut()
105103
login(isAutoLogin: true)
106104
}

12306ForMac/Model/MainModel.swift

-2
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,9 @@ class MainModel{
4141
}
4242
start = start.advancedBy(10)
4343
end = start.advancedBy(5)
44-
// print(ticketInfo.substringWithRange(Range(start..<end)))
4544
}
4645
let priceStr = ticketInfo.substringWithRange(Range(start.advancedBy(1)..<end.advancedBy(1)))
4746
let price = Double(priceStr)! / 10
48-
// Swift.print("indentifier = \(indentifier) price = \(price) yp = \(ticketInfo)")
4947
return price
5048
}
5149
else{

12306ForMac/Model/QueryLeftNewDTO.swift

-2
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,7 @@ M/12075/0100
311311

312312
let seatType = SeatTypePair(id1: id1, id2: id2, number: number, price: price)
313313
seatTypePairDic[id1] = seatType
314-
// print("\(TrainCode) id1:\(id1) id:\(id2) number:\(number) price:\(price)")
315314
}
316-
// print("")
317315
}
318316
}
319317

12306ForMac/Service/Dama.swift

-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ class Dama: NSObject {
121121
}
122122
}
123123
}
124-
//耗时:print(response.timeline.totalDuration)
125124
}
126125
}
127126

12306ForMac/Service/Service+Login.swift

-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ extension Service {
5151
case .Failure(let error):
5252
reject(error)
5353
case .Success(let content):
54-
print(response.request?.allHTTPHeaderFields)
5554
var dynamicJs = ""
5655
if let matches = Regex("src=\"/otn/dynamicJs/([^\"]+)\"").getMatches(content){
5756
dynamicJs = matches[0][0]
@@ -69,7 +68,6 @@ extension Service {
6968
{
7069
let url = "https://kyfw.12306.cn/otn/login/loginOut"
7170
Service.Manager.request(.GET, url).responseString(completionHandler:{response in
72-
print(response.result)
7371
})
7472
}
7573

12306ForMac/Service/Service+Order.swift

+4-6
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ extension Service{
8787
Service.Manager.request(.POST, url, headers:headers).responseJSON(completionHandler:{response in
8888
switch (response.result){
8989
case .Failure(let error):
90-
print(error)
90+
logger.error(error.localizedDescription)
9191
case .Success(let data):
9292
let jsonData = JSON(data)["data"]
9393
guard jsonData["normal_passengers"].count > 0 else {
@@ -152,8 +152,8 @@ extension Service{
152152
fulfill()
153153
}
154154
else {
155-
logger.error("\(JSON(data))")
156-
print(params)
155+
logger.error("params:\(params)")
156+
logger.error("JSON:\(JSON(data))")
157157
let error:NSError
158158
if let message = JSON(data)["messages"][0].string{
159159
error = ServiceError.errorWithCode(.SubmitOrderFailed, failureReason: message)
@@ -409,17 +409,15 @@ extension Service{
409409
p1 = 60
410410
}
411411

412-
print("calcWaitTime=\(p1)")
413412
return p1
414413
}
415414

416415
Service.Manager.request(.GET, url + params, headers:headers).responseJSON(completionHandler:{response in
417416
switch (response.result){
418417
case .Failure(let error):
419-
print(error)
418+
logger.error(error.localizedDescription)
420419
failMethod(error:error as NSError)
421420
case .Success(let data):
422-
print(JSON(data))
423421
let waitTimeResult = QueryOrderWaitTimeResult(json: JSON(data)["data"])
424422

425423
if let submitStatus = waitTimeResult.queryOrderWaitTimeStatus where submitStatus == true {

12306ForMac/Service/Service+QueryOrder.swift

-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ extension Service{
5959
let jsonData = JSON(data)["data"]
6060
let orderDBList = JSON(data)["data"]["orderDBList"]
6161
guard orderDBList.count > 0 else {
62-
print("queryMyOrder:\(jsonData)")
6362
reject(NSError(domain: "queryMyOrderWithPageIndex:", code: 0, userInfo: nil))
6463
return
6564
}

12306ForMac/StationData.swift

+1-4
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ class StationNameJs{
4747
self.allStationMap[oneStation.Name] = oneStation
4848
}
4949
}
50-
else
51-
{
52-
print("match station fail")
53-
}
50+
5451
}
5552
}

12306ForMac/TicketViewControllers/TicketQueryViewController.swift

+1-5
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ class TicketQueryViewController: NSViewController {
193193

194194
func receiveCheckPassengerMessageNotification(notification: NSNotification) {
195195
if !self.passengersPopover.shown {
196-
print("not my message in DisclosureViewController")
197196
return
198197
}
199198

@@ -301,12 +300,10 @@ class TicketQueryViewController: NSViewController {
301300
}()
302301

303302
func receiveDidSendSubmitMessageNotification(note: NSNotification){
304-
print("receiveDidSendSubmitMessageNotification")
305303
openSubmitSheet(isAutoSubmit: false)
306304
}
307305

308306
func receiveAutoSubmitMessageNotification(note: NSNotification){
309-
print("receiveAutoSubmitMessageNotification")
310307
openSubmitSheet(isAutoSubmit: true)
311308
}
312309

@@ -334,8 +331,7 @@ class TicketQueryViewController: NSViewController {
334331
if response == NSModalResponseOK{
335332
self.trainFilterKey = self.trainFilterWindowController.trainFilterKey
336333
self.seatFilterKey = self.trainFilterWindowController.seatFilterKey
337-
print(self.trainFilterKey)
338-
print(self.seatFilterKey)
334+
logger.info("trainFilterKey:\(self.trainFilterKey) seatFilterKey:\(self.seatFilterKey)")
339335

340336
self.filterQueryResult = self.ticketQueryResult.filter({item in return self.trainFilterKey.containsString("|" + item.TrainCode! + "|")})
341337
self.leftTicketTable.reloadData()

12306ForMac/TicketViewControllers/TrainCodeDetailViewController.swift

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ class TrainCodeDetailViewController: NSViewController {
1313

1414
var queryByTrainCodeParam: QueryByTrainCodeParam? {
1515
didSet{
16-
// print("\(queryByTrainCodeParam.ToGetParams())")
1716
if oldValue != nil {
1817
if oldValue!.ToGetParams() == queryByTrainCodeParam!.ToGetParams() {
1918
return

12306ForMac/UserControls/AutoCompleteTextField.swift

-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ class AutoCompleteTextField:NSTextField{
148148

149149
//This happens when we just started a new word or if we have already typed the entire word
150150
if subStringRange.length == 0 || lengthOfWord == 0 {
151-
Swift.print("complete lengthOfWord = \(lengthOfWord) identier = \((sender as! NSTextField).identifier)")
152151
self.autoCompletePopover?.close()
153152
return
154153
}

12306ForMac/UserControls/RandCodeImageView.swift

-4
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ class RandCodeImageView:NSImageView {
4343

4444
override func mouseDown(theEvent: NSEvent) {
4545
let frameOffsetInWindow = convertPoint(self.frame.origin, fromView: nil)
46-
// Swift.print("frameInWindowX:\(frameOffsetInWindow.x) frameInWindowY:\(frameOffsetInWindow.y)")
4746

4847
let imageOriginX = self.frame.origin.x - frameOffsetInWindow.x
4948
let imageOriginY = self.frame.origin.y + self.bounds.height - frameOffsetInWindow.y
@@ -53,15 +52,12 @@ class RandCodeImageView:NSImageView {
5352
let randCodeY = (imageOriginY - mouseY)/1.2 - 30
5453

5554
if ((randCodeX < 0) || (randCodeY < 0)){
56-
Swift.print("randCodeX:\(Int(randCodeX)),randCodeY:\(Int(randCodeY)) error")
5755
return
5856
}
5957

6058
let pointX = mouseX - (self.frame.origin.x - frameOffsetInWindow.x)
6159
let pointY = mouseY - (self.frame.origin.y - frameOffsetInWindow.y)
6260

63-
// 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)")
64-
6561
var isAdd = true
6662
if imageDots.count != 0
6763
{

12306ForMac/UserControls/RandCodeImageView2.swift

-3
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,6 @@ class RandCodeImageView2:NSImageView {
136136
section.colIndex = 3
137137
}
138138

139-
Swift.print("pointX = \(pointX) pointY = \(pointY)")
140-
Swift.print("rowIndex = \(section.rowIndex) colIndex = \(section.colIndex)")
141-
142139
return section
143140
}
144141

0 commit comments

Comments
 (0)