Commit fd7c9a33422c8c6fa605e647ed2bd1aa48495467

Authored by liushiyu
1 parent 6b5d3459

相关类名修改

metaCode.xcodeproj/project.pbxproj
... ... @@ -79,7 +79,7 @@
79 79 794BC1652AF9E70D00A68C74 /* CNLiveShopOrderSendViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 794BC1642AF9E70D00A68C74 /* CNLiveShopOrderSendViewController.swift */; };
80 80 794FF1052B01FC8800385E85 /* CNLiveShopOrderSearchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 794FF1042B01FC8800385E85 /* CNLiveShopOrderSearchViewController.swift */; };
81 81 794FF1072B01FC9800385E85 /* CNLiveShopOrderSearchListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 794FF1062B01FC9800385E85 /* CNLiveShopOrderSearchListViewController.swift */; };
82   - 794FF1092B02131300385E85 /* CNLiveFileManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 794FF1082B02131300385E85 /* CNLiveFileManager.swift */; };
  82 + 794FF1092B02131300385E85 /* CNLiveSaveSearchDB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 794FF1082B02131300385E85 /* CNLiveSaveSearchDB.swift */; };
83 83 796398942A260C0100D045EB /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7963988D2A260C0100D045EB /* AppDelegate.swift */; };
84 84 7963989D2A260E6200D045EB /* CNLiveBaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7963989C2A260E6200D045EB /* CNLiveBaseViewController.swift */; };
85 85 79656E382AAEBA8E00119A61 /* CNLiveMineInputViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79656E372AAEBA8E00119A61 /* CNLiveMineInputViewController.swift */; };
... ... @@ -247,7 +247,7 @@
247 247 794BC1642AF9E70D00A68C74 /* CNLiveShopOrderSendViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopOrderSendViewController.swift; sourceTree = "<group>"; };
248 248 794FF1042B01FC8800385E85 /* CNLiveShopOrderSearchViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopOrderSearchViewController.swift; sourceTree = "<group>"; };
249 249 794FF1062B01FC9800385E85 /* CNLiveShopOrderSearchListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopOrderSearchListViewController.swift; sourceTree = "<group>"; };
250   - 794FF1082B02131300385E85 /* CNLiveFileManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveFileManager.swift; sourceTree = "<group>"; };
  250 + 794FF1082B02131300385E85 /* CNLiveSaveSearchDB.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveSaveSearchDB.swift; sourceTree = "<group>"; };
251 251 7963988D2A260C0100D045EB /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
252 252 7963989C2A260E6200D045EB /* CNLiveBaseViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CNLiveBaseViewController.swift; sourceTree = "<group>"; };
253 253 79656E372AAEBA8E00119A61 /* CNLiveMineInputViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveMineInputViewController.swift; sourceTree = "<group>"; };
... ... @@ -543,7 +543,7 @@
543 543 7C7C62F52A4D72E9007A912E /* CNLiveIdentityDB.swift */,
544 544 79BA085C2AB18E8300D01875 /* CNLiveSaveAuthDB.swift */,
545 545 79EABB882AB4497700F3A4E2 /* CNLiveSaveStandDB.swift */,
546   - 794FF1082B02131300385E85 /* CNLiveFileManager.swift */,
  546 + 794FF1082B02131300385E85 /* CNLiveSaveSearchDB.swift */,
547 547 );
548 548 path = Database;
549 549 sourceTree = "<group>";
... ... @@ -1232,7 +1232,7 @@
1232 1232 798A44F92A30835400815935 /* CNLiveHelpFeedBackViewController.swift in Sources */,
1233 1233 79A68C4A2A26E6CE00DC3B43 /* (null) in Sources */,
1234 1234 790D01852A2D89E100C5978D /* UIColor+CNLiveExtensions.swift in Sources */,
1235   - 794FF1092B02131300385E85 /* CNLiveFileManager.swift in Sources */,
  1235 + 794FF1092B02131300385E85 /* CNLiveSaveSearchDB.swift in Sources */,
1236 1236 79396EED2A319F220053E1AF /* NSObject+CNLiveExtensions.swift in Sources */,
1237 1237 19FA201B2AE60423001F7186 /* CNLiveDownSlideModelLayout.swift in Sources */,
1238 1238 7C4931312A2F142F000E44B4 /* CNHomePageBackgroupView.swift in Sources */,
... ...
metaCode/Classes/Common/Util/CNLiveCommonBaseModel.swift
... ... @@ -13,11 +13,7 @@ class BaseModel: HandyJSON {
13 13  
14 14 required init() {}
15 15  
16   - func mapping(mapper: HelpingMapper) {
17   -
18   - }
  16 + func mapping(mapper: HelpingMapper) {}
19 17  
20   - func didFinishMapping() {
21   -
22   - }
  18 + func didFinishMapping() {}
23 19 }
... ...
metaCode/Classes/Config/Database/CNLiveFileManager.swift renamed to metaCode/Classes/Config/Database/CNLiveSaveSearchDB.swift
... ... @@ -7,9 +7,9 @@
7 7  
8 8 import Foundation
9 9  
10   -class CNLiveFileManager: NSObject {
  10 +class CNLiveSaveSearchDB: NSObject {
11 11  
12   - static let shared = CNLiveFileManager.init()
  12 + static let shared = CNLiveSaveSearchDB.init()
13 13  
14 14 open func save(object: Any, key: String) {
15 15 var temp_dic = NSMutableDictionary.init(contentsOfFile: userFileDir+"storage.plist")
... ... @@ -71,7 +71,7 @@ class CNLiveFileManager: NSObject {
71 71 }()
72 72  
73 73 private lazy var fileDir: String = {
74   - let path = "\(NSHomeDirectory())/Documents/metaCode"
  74 + let path = "\(NSHomeDirectory())/Documents/metaCode/saveSearch"
75 75 let fileManager = FileManager.default
76 76 var isDir: ObjCBool = false
77 77 let exist: Bool = fileManager.fileExists(atPath: path, isDirectory: &isDir)
... ...
metaCode/Classes/Main/MinePage/Controller/CNLiveMineViewController.swift
... ... @@ -46,7 +46,7 @@ class CNLiveMineViewController : CNLiveBaseViewController, UITableViewDelegate,
46 46 dataArray.add(array03)
47 47  
48 48  
49   - dataArray.add([["name":"订单列表","icon":"mine_list_icon_help_feedback"]])
  49 +// dataArray.add([["name":"订单列表","icon":"mine_list_icon_help_feedback"]])
50 50  
51 51  
52 52 return dataArray
... ...
metaCode/Classes/Main/ShopPage/Controller/CNLiveShopOrderDetailViewController.swift
... ... @@ -159,16 +159,20 @@ extension CNLiveShopOrderDetailViewController {
159 159 case "快递发货":
160 160 self.navigationController?.pushViewController(CNLiveShopOrderSendViewController.init(orderId: detailModel.id! as NSString, show_type: .splite), animated: true)
161 161 case "查看进度":
162   - print("查看进度")
  162 + var YBYProgress:CNLiveShopOrderExpressDetailYBYProgress = CNLiveShopOrderExpressDetailYBYProgress.Zero
  163 + if detailModel.state == "3" {
  164 + YBYProgress = .Zero
  165 + } else {
  166 + YBYProgress = .Complete
  167 + }
  168 + self.navigationController?.pushViewController(CNLiveShopOrderExpressDetailViewController.init(orderId: detailModel.id! as NSString, expId: "", express_num: "", show_type: .byYourself, progress: YBYProgress), animated: true)
163 169 case "物流详情":
164   - print("物流详情")
165 170 pushExpressVC(detailModel: detailModel)
166 171 case "退款详情":
167   - print("退款详情")
168 172 let vc = CNLiveShopOrderDetailViewController(orderId: detailModel.id!, show_type: .sale, form_type: .order)
169 173 self.navigationController?.pushViewController(vc, animated: true)
170 174 case "订单详情":
171   - self.navigationController?.pushViewController(CNLiveShopOrderDetailViewController(orderId: refuundModel.id!, show_type: .order, form_type: .afterSale), animated: true)
  175 + self.navigationController?.pushViewController(CNLiveShopOrderDetailViewController(orderId: refuundModel.orderid!, show_type: .order, form_type: .afterSale), animated: true)
172 176 case "确认退款":
173 177 ConfigAlertManager.shared.presentAlert(title: "提示", message: "确认给用户退款?", actionTitles: ["取消","确认"]) { [weak self] index in
174 178 if index == 1 {
... ...
metaCode/Classes/Main/ShopPage/Controller/CNLiveShopOrderSearchListViewController.swift
... ... @@ -203,13 +203,13 @@ extension CNLiveShopOrderSearchListViewController {
203 203 textField.text = "\(textField.text?.prefix(29) ?? "")"
204 204 }
205 205  
206   - let historyDataArr = CNLiveFileManager.shared.take(key: kShopOrderListSearchHistroyDatas) as! NSMutableArray
  206 + let historyDataArr = CNLiveSaveSearchDB.shared.take(key: kShopOrderListSearchHistroyDatas) as! NSMutableArray
207 207 if historyDataArr.contains(textField.text! as String) {
208 208 historyDataArr.remove(textField.text! as String)
209 209 }
210 210  
211 211 historyDataArr.insert(textField.text! as String, at: 0)
212   - CNLiveFileManager.shared.save(object: historyDataArr, key: kShopOrderListSearchHistroyDatas)
  212 + CNLiveSaveSearchDB.shared.save(object: historyDataArr, key: kShopOrderListSearchHistroyDatas)
213 213  
214 214 loadDataSourceAction(page: 1)
215 215  
... ... @@ -306,10 +306,8 @@ extension CNLiveShopOrderSearchListViewController {
306 306 private func pushExpressVC(listModel: ShopOrderListModel) {
307 307 if listModel.send_num > 1 || listModel.is_send == "0" {
308 308 self.navigationController?.pushViewController(CNLiveShopOrderExpressListViewController.init(orderId: listModel.id! as NSString), animated: true)
309   -// self.navigationController?.pushViewController(CNLiveShopOrderExpressListViewController.init(orderId: "1000073435"), animated: true)
310 309 } else {
311 310 self.navigationController?.pushViewController(CNLiveShopOrderExpressDetailViewController.init(orderId: listModel.id! as NSString, expId: "", express_num: listModel.express_num! as NSString, show_type: .orderExpress, progress: .Zero), animated: true)
312   -// self.navigationController?.pushViewController(CNLiveShopOrderExpressDetailViewController.init(orderId: "1000021749", expId: "0", express_num: "1234556789012345", show_type: .orderExpress, progress: .Zero), animated: true)
313 311 }
314 312 }
315 313  
... ...
metaCode/Classes/Main/ShopPage/Controller/CNLiveShopOrderSearchViewController.swift
... ... @@ -137,11 +137,11 @@ class CNLiveShopOrderSearchViewController: CNLiveBaseViewController, UITextField
137 137 historyArr.insert(title, at: 0)
138 138 tableView.reloadData()
139 139  
140   - CNLiveFileManager.shared.save(object: historyArr, key: kShopOrderListSearchHistroyDatas)
  140 + CNLiveSaveSearchDB.shared.save(object: historyArr, key: kShopOrderListSearchHistroyDatas)
141 141 }
142 142  
143 143 func take() {
144   - let takeArr = CNLiveFileManager.shared.take(key: kShopOrderListSearchHistroyDatas)
  144 + let takeArr = CNLiveSaveSearchDB.shared.take(key: kShopOrderListSearchHistroyDatas)
145 145 if (takeArr as AnyObject).count > 0 {
146 146 historyArr = NSMutableArray.init(array: takeArr as! [Any])
147 147 tableView.reloadData()
... ... @@ -161,7 +161,7 @@ class CNLiveShopOrderSearchViewController: CNLiveBaseViewController, UITextField
161 161 func deleteAll() {
162 162  
163 163 historyArr.removeAllObjects()
164   - CNLiveFileManager.shared.delete(key: kShopOrderListSearchHistroyDatas)
  164 + CNLiveSaveSearchDB.shared.delete(key: kShopOrderListSearchHistroyDatas)
165 165  
166 166 tableView.reloadData()
167 167 }
... ... @@ -169,7 +169,7 @@ class CNLiveShopOrderSearchViewController: CNLiveBaseViewController, UITextField
169 169 func delete(index: NSInteger) {
170 170  
171 171 historyArr.removeObject(at: index)
172   - CNLiveFileManager.shared.save(object: historyArr, key: kShopOrderListSearchHistroyDatas)
  172 + CNLiveSaveSearchDB.shared.save(object: historyArr, key: kShopOrderListSearchHistroyDatas)
173 173  
174 174 tableView.reloadData()
175 175 }
... ...
metaCode/Classes/Main/ShopPage/Controller/CNLiveShopOrderViewController.swift
... ... @@ -38,6 +38,7 @@ class CNLiveShopOrderViewController: CNLiveBaseViewController {
38 38 lazy var categoryView: JXSegmentedView = {
39 39 let categoryView = JXSegmentedView.init(frame: CGRectMake(0, KNavigationHeight, KSreenWidth, CGFloat(kCNLiveShopOrderListSectionTitleHeight)))
40 40 categoryView.dataSource = dataSource
  41 + categoryView.delegate = self
41 42 categoryView.collectionView.backgroundColor = HexColor("fafbfd")
42 43 categoryView.backgroundColor = .white
43 44  
... ... @@ -67,6 +68,16 @@ class CNLiveShopOrderViewController: CNLiveBaseViewController {
67 68 return JXSegmentedListContainerView(dataSource: self)
68 69 }()
69 70  
  71 + override func viewWillAppear(_ animated: Bool) {
  72 + super.viewWillAppear(animated)
  73 + self.navigationController?.interactivePopGestureRecognizer?.isEnabled = (categoryView.selectedIndex == 0)
  74 + }
  75 +
  76 + override func viewWillDisappear(_ animated: Bool) {
  77 + super.viewWillDisappear(animated)
  78 + self.navigationController?.interactivePopGestureRecognizer?.isEnabled = true
  79 + }
  80 +
70 81 override func viewDidLoad() {
71 82 super.viewDidLoad()
72 83 view.backgroundColor = .white
... ...
metaCode/Classes/Main/ShopPage/View/CNLiveShopBodyListView.swift
... ... @@ -370,6 +370,7 @@ class ShopBodyOrderListViewCell: UITableViewCell {
370 370 iconView.backgroundColor = .white
371 371 iconView.layer.cornerRadius = 5
372 372 iconView.layer.masksToBounds = true
  373 + iconView.contentMode = .scaleAspectFit
373 374 iconView.image = UIImage.imageWithColor(color: HexColor("#f9f9f9")!, size: CGSize(width: 90, height: 90))
374 375 return iconView
375 376 }()
... ...