xiaoxi 6 gadi atpakaļ
vecāks
revīzija
dde68d8d01

+ 20 - 0
CAISHEN.xcodeproj/project.pbxproj

@@ -164,6 +164,8 @@
164 164
 		706182061FD0F62E000473F2 /* KXCreditCardViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 706182051FD0F62E000473F2 /* KXCreditCardViewController.m */; };
165 165
 		706182091FD0F906000473F2 /* KXCreditCardTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 706182081FD0F906000473F2 /* KXCreditCardTableViewCell.m */; };
166 166
 		7061820C1FD0FBB3000473F2 /* KXCreditCardModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 7061820B1FD0FBB3000473F2 /* KXCreditCardModel.m */; };
167
+		707017D221A3A41A005BEBB6 /* huishou.html in Resources */ = {isa = PBXBuildFile; fileRef = 707017D121A3A41A005BEBB6 /* huishou.html */; };
168
+		707017D421A3AA26005BEBB6 /* KXSPWebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 707017D321A3AA26005BEBB6 /* KXSPWebViewController.swift */; };
167 169
 		7071561A1FD7883A0088BD33 /* KXCustomServiceViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 707156191FD7883A0088BD33 /* KXCustomServiceViewController.m */; };
168 170
 		707528D92112B7560016FEC3 /* KXSCManageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 707528D82112B7560016FEC3 /* KXSCManageViewController.m */; };
169 171
 		707528DC2112CD210016FEC3 /* KXSCAddViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 707528DB2112CD210016FEC3 /* KXSCAddViewController.m */; };
@@ -173,6 +175,9 @@
173 175
 		7085E09F213E5BB5000043EB /* KXAddPhotoProofViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7085E09E213E5BB5000043EB /* KXAddPhotoProofViewController.m */; };
174 176
 		7085E0A3213E6C50000043EB /* KXDebitModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 7085E0A2213E6C50000043EB /* KXDebitModel.m */; };
175 177
 		7085E0A9213E78D2000043EB /* KXPhotoProofModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 7085E0A8213E78D2000043EB /* KXPhotoProofModel.m */; };
178
+		708A6A7E219E65F3003B533D /* KXSPOrderDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 708A6A7D219E65F3003B533D /* KXSPOrderDetailViewController.swift */; };
179
+		708A6A84219E89EB003B533D /* KXSPAddressViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 708A6A83219E89EB003B533D /* KXSPAddressViewController.swift */; };
180
+		708A6A86219E8F40003B533D /* KXSPMineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 708A6A85219E8F40003B533D /* KXSPMineViewController.swift */; };
176 181
 		708B867E1FDF899500010E9C /* KXLoanRateViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 708B867D1FDF899500010E9C /* KXLoanRateViewController.m */; };
177 182
 		708B86811FDFA2DA00010E9C /* KXCommonProblemViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 708B86801FDFA2DA00010E9C /* KXCommonProblemViewController.m */; };
178 183
 		708B86841FDFA5FE00010E9C /* KXCommonProblemCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 708B86831FDFA5FE00010E9C /* KXCommonProblemCollectionViewCell.m */; };
@@ -809,6 +814,8 @@
809 814
 		706182081FD0F906000473F2 /* KXCreditCardTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KXCreditCardTableViewCell.m; sourceTree = "<group>"; };
810 815
 		7061820A1FD0FBB3000473F2 /* KXCreditCardModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KXCreditCardModel.h; sourceTree = "<group>"; };
811 816
 		7061820B1FD0FBB3000473F2 /* KXCreditCardModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KXCreditCardModel.m; sourceTree = "<group>"; };
817
+		707017D121A3A41A005BEBB6 /* huishou.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = huishou.html; sourceTree = "<group>"; };
818
+		707017D321A3AA26005BEBB6 /* KXSPWebViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KXSPWebViewController.swift; sourceTree = "<group>"; };
812 819
 		707156181FD7883A0088BD33 /* KXCustomServiceViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KXCustomServiceViewController.h; sourceTree = "<group>"; };
813 820
 		707156191FD7883A0088BD33 /* KXCustomServiceViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KXCustomServiceViewController.m; sourceTree = "<group>"; };
814 821
 		707528D72112B7560016FEC3 /* KXSCManageViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KXSCManageViewController.h; sourceTree = "<group>"; };
@@ -827,6 +834,9 @@
827 834
 		7085E0A2213E6C50000043EB /* KXDebitModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KXDebitModel.m; sourceTree = "<group>"; };
828 835
 		7085E0A7213E78D2000043EB /* KXPhotoProofModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KXPhotoProofModel.h; sourceTree = "<group>"; };
829 836
 		7085E0A8213E78D2000043EB /* KXPhotoProofModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KXPhotoProofModel.m; sourceTree = "<group>"; };
837
+		708A6A7D219E65F3003B533D /* KXSPOrderDetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KXSPOrderDetailViewController.swift; sourceTree = "<group>"; };
838
+		708A6A83219E89EB003B533D /* KXSPAddressViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KXSPAddressViewController.swift; sourceTree = "<group>"; };
839
+		708A6A85219E8F40003B533D /* KXSPMineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KXSPMineViewController.swift; sourceTree = "<group>"; };
830 840
 		708B867C1FDF899500010E9C /* KXLoanRateViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KXLoanRateViewController.h; sourceTree = "<group>"; };
831 841
 		708B867D1FDF899500010E9C /* KXLoanRateViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KXLoanRateViewController.m; sourceTree = "<group>"; };
832 842
 		708B867F1FDFA2DA00010E9C /* KXCommonProblemViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KXCommonProblemViewController.h; sourceTree = "<group>"; };
@@ -2363,6 +2373,8 @@
2363 2373
 				7659322B219BF786004ACF20 /* Mine */,
2364 2374
 				7659322A219BF74D004ACF20 /* Order */,
2365 2375
 				76593229219BF742004ACF20 /* Home */,
2376
+				707017D121A3A41A005BEBB6 /* huishou.html */,
2377
+				707017D321A3AA26005BEBB6 /* KXSPWebViewController.swift */,
2366 2378
 			);
2367 2379
 			path = SellPhone2;
2368 2380
 			sourceTree = "<group>";
@@ -2437,6 +2449,8 @@
2437 2449
 		76593231219BF7EC004ACF20 /* Controller */ = {
2438 2450
 			isa = PBXGroup;
2439 2451
 			children = (
2452
+				708A6A83219E89EB003B533D /* KXSPAddressViewController.swift */,
2453
+				708A6A85219E8F40003B533D /* KXSPMineViewController.swift */,
2440 2454
 			);
2441 2455
 			path = Controller;
2442 2456
 			sourceTree = "<group>";
@@ -2459,6 +2473,7 @@
2459 2473
 			isa = PBXGroup;
2460 2474
 			children = (
2461 2475
 				76593238219BF98F004ACF20 /* KXSPOrderViewController.swift */,
2476
+				708A6A7D219E65F3003B533D /* KXSPOrderDetailViewController.swift */,
2462 2477
 			);
2463 2478
 			path = Controller;
2464 2479
 			sourceTree = "<group>";
@@ -3842,6 +3857,7 @@
3842 3857
 				70E9A05720D39B4B004EDBBB /* KXSellPhoneInstructionsViewController.xib in Resources */,
3843 3858
 				76BE9F74218C2227007F68CD /* KXSFBuyCarTableViewCell.xib in Resources */,
3844 3859
 				C42894391F4402A700933509 /* Main.storyboard in Resources */,
3860
+				707017D221A3A41A005BEBB6 /* huishou.html in Resources */,
3845 3861
 				D10A1CBB2114017F009C681B /* KXAddgoodViewController.xib in Resources */,
3846 3862
 				70A9471F20D21B0F0028330A /* KXSellPhoneHomeCollectionViewCell.xib in Resources */,
3847 3863
 				D1956438213D3FB4000CE92D /* KXElectronAddAwokeViewController.xib in Resources */,
@@ -4054,6 +4070,7 @@
4054 4070
 				404A3951215A14F600BC4C01 /* NSNumber+TimeStamp.m in Sources */,
4055 4071
 				40FB3B98215B5A7C00054D85 /* KXRobOrderMenuViewController.m in Sources */,
4056 4072
 				C42893F31F43FFE000933509 /* KXWebDetailViewController.m in Sources */,
4073
+				708A6A84219E89EB003B533D /* KXSPAddressViewController.swift in Sources */,
4057 4074
 				706182091FD0F906000473F2 /* KXCreditCardTableViewCell.m in Sources */,
4058 4075
 				D14227A8213E5A4B0054DE1D /* KXElectronAwokeModel.m in Sources */,
4059 4076
 				708B86811FDFA2DA00010E9C /* KXCommonProblemViewController.m in Sources */,
@@ -4253,6 +4270,7 @@
4253 4270
 				70A9471E20D21B0F0028330A /* KXSellPhoneHomeCollectionViewCell.m in Sources */,
4254 4271
 				40FB3BCB215C830200054D85 /* KXRobOrderSendDetailMessageCell.m in Sources */,
4255 4272
 				7623D829216F211B00F8BA1E /* KXGetHeightTool.m in Sources */,
4273
+				707017D421A3AA26005BEBB6 /* KXSPWebViewController.swift in Sources */,
4256 4274
 				7094920A213D288C00B670D5 /* TADotView.m in Sources */,
4257 4275
 				C42895731F46DE1500933509 /* NSString+YLString.m in Sources */,
4258 4276
 				40FD7289215375D400925C25 /* KXRecycleMailMessageCell.m in Sources */,
@@ -4310,6 +4328,7 @@
4310 4328
 				40415B5F21521A2F007D69D9 /* KXRecycleCarBottomView.m in Sources */,
4311 4329
 				C40483BA1F542C0D00CBBE11 /* KXMarkView.m in Sources */,
4312 4330
 				7660AA7B21957C730010B1D4 /* PPNumberButton.m in Sources */,
4331
+				708A6A7E219E65F3003B533D /* KXSPOrderDetailViewController.swift in Sources */,
4313 4332
 				70949211213D2B7800B670D5 /* PFCollectionCell.m in Sources */,
4314 4333
 				40FD727D21534D8900925C25 /* KXRecycleOrderDetailViewController.m in Sources */,
4315 4334
 				40FB3BC8215C805700054D85 /* KXRobOrderSendDetailTitleCell.m in Sources */,
@@ -4325,6 +4344,7 @@
4325 4344
 				D11C72632074D293006BB8A5 /* NSMutableString+AvoidCrash.m in Sources */,
4326 4345
 				40415735214FA79C007D69D9 /* KXRecycleLineCell.m in Sources */,
4327 4346
 				40FB3BA2215B5D0400054D85 /* KXRobOrderMenuBannerCell.m in Sources */,
4347
+				708A6A86219E8F40003B533D /* KXSPMineViewController.swift in Sources */,
4328 4348
 				40415B592151E328007D69D9 /* KXRecycleCarTableView.m in Sources */,
4329 4349
 				C40483EB1F55602900CBBE11 /* KXUserInfo.m in Sources */,
4330 4350
 				40FD729A2153A6F500925C25 /* KXRecycleMyOderMenuTableView.m in Sources */,

BIN
CAISHEN.xcworkspace/xcuserdata/xiaoxi.xcuserdatad/UserInterfaceState.xcuserstate


+ 2 - 1
CAISHEN/AppDelegate/KXHomeViewController.m

@@ -143,7 +143,8 @@
143 143
     KXHomeNavgationController *bill = [self navigationControllerWithClassName:[NSString stringWithFormat:@"%@.KXSPHomeViewController",nameSpace] title:@"首页" imageName:@"tab_main"];
144 144
     
145 145
     KXHomeNavgationController *friend = [self navigationControllerWithClassName:@"CAISHEN.KXSPOrderViewController" title:@"订单" imageName:@"tab_flower"];
146
-    KXHomeNavgationController *mine = [self navigationControllerWithClassName:@"KXMoneyMineViewController" title:@"我的" imageName:@"tab_mine"];
146
+//    KXHomeNavgationController *mine = [self navigationControllerWithClassName:@"KXMoneyMineViewController" title:@"我的" imageName:@"tab_mine"];
147
+    KXHomeNavgationController *mine = [self navigationControllerWithClassName:@"CAISHEN.KXSPMineViewController" title:@"我的" imageName:@"tab_mine"];
147 148
     
148 149
     // 电子借条
149 150
 //    KXHomeNavgationController *home = [self navigationControllerWithClassName:@"KXElectronicHomeViewController" title:@"首页" imageName:@"tab_main"];

+ 4 - 0
CAISHEN/CAISHEN-Bridging-Header.h

@@ -39,3 +39,7 @@
39 39
 #import "PGDatePicker.h"
40 40
 #import "PPNumberButton.h"
41 41
 #import "KXLogginViewController.h"
42
+#import "KXPersonInfoViewController.h"
43
+#import "KXCustomWebViewController.h"
44
+#import "KXAboutUsViewController.h"
45
+#import "KXAdviceBackViewController.h"

+ 31 - 0
CAISHEN/SellPhone2/KXSPWebViewController.swift

@@ -0,0 +1,31 @@
1
+//
2
+//  KXSPWebViewController.swift
3
+//  CAISHEN
4
+//
5
+//  Created by xiaoxi on 2018/11/20.
6
+//  Copyright © 2018 kuxuan. All rights reserved.
7
+//
8
+
9
+import UIKit
10
+
11
+class KXSPWebViewController: KXBaseViewController, UIWebViewDelegate {
12
+
13
+    override func viewDidLoad() {
14
+        super.viewDidLoad()
15
+        addBackBtn()
16
+        name = "质检标准"
17
+        let web: UIWebView = UIWebView.init(frame: CGRect(x: 0, y: 0, width: SCREEN_WIDTH, height: SCREEN_HEIGHT-NavHeight))
18
+        web.backgroundColor = UIColor.clear
19
+        web.delegate = self
20
+        let filePath = Bundle.main.path(forResource: "huishou", ofType: "html")
21
+        var htmlString: String = String()
22
+        do {
23
+            try htmlString = String.init(contentsOfFile: filePath!)
24
+        } catch {
25
+            return
26
+        }
27
+        web.loadHTMLString(htmlString, baseURL: URL(fileURLWithPath: filePath!))
28
+        view.addSubview(web)
29
+    }
30
+
31
+}

+ 63 - 0
CAISHEN/SellPhone2/Mine/Controller/KXSPAddressViewController.swift

@@ -0,0 +1,63 @@
1
+//
2
+//  KXSPAddressViewController.swift
3
+//  CAISHEN
4
+//
5
+//  Created by xiaoxi on 2018/11/16.
6
+//  Copyright © 2018 kuxuan. All rights reserved.
7
+//
8
+
9
+import UIKit
10
+
11
+class KXSPAddressViewController: KXBaseViewController, UITableViewDelegate, UITableViewDataSource {
12
+
13
+    override func viewDidLoad() {
14
+        super.viewDidLoad()
15
+        addBackBtn()
16
+        setUpUI()
17
+    }
18
+    
19
+    override func setUpUI() {
20
+        name = "邮寄地址"
21
+        view.addSubview(tableView)
22
+    }
23
+
24
+    lazy var tableView: UITableView = {
25
+        let table: UITableView = UITableView.init(frame: CGRect.init(x: 12, y: 0, width: SCREEN_WIDTH-24, height: SCREEN_HEIGHT-NavHeight), style: .plain)
26
+        table.showsVerticalScrollIndicator = false
27
+        table.showsHorizontalScrollIndicator = false
28
+        table.delegate = self
29
+        table.dataSource = self
30
+        table.separatorStyle = .none
31
+        table.estimatedRowHeight = 0
32
+        table.estimatedSectionHeaderHeight = 0
33
+        table.estimatedSectionFooterHeight = 0
34
+        table.layer.cornerRadius = 10
35
+        if #available(iOS 11.0, *) {
36
+            table.contentInsetAdjustmentBehavior = .never
37
+        }
38
+        table.tableHeaderView = header
39
+        return table
40
+    }()
41
+    
42
+    lazy var header: UIView = {
43
+        let header: UIView = UIView.init(frame: CGRect.init(x: 0, y: 0, width: SCREEN_WIDTH-24, height: Fitesize(215)))
44
+        let imageView: UIImageView = UIImageView.init(frame: CGRect.init(x: header.width/2-Fitesize(171)/2, y: Fitesize(44), width: Fitesize(171), height: Fitesize(171)))
45
+        header.addSubview(imageView)
46
+        return header
47
+    }()
48
+    
49
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
50
+        return 3
51
+    }
52
+    
53
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
54
+        let cell: UITableViewCell = tableView.dequeueReusableCell(withIdentifier: "cell") ?? UITableViewCell.init(style: .default, reuseIdentifier: "cell")
55
+        cell.selectionStyle = .none
56
+        let arr:NSArray = ["邮寄地址:背景市朝阳区XXXXXX","联系人:XXXX","电系电话:123435"]
57
+        cell.textLabel?.text = arr[indexPath.row] as? String
58
+        cell.textLabel?.font = UIFont.init(name: "PingFangSC-Regular", size: Fitesize(17))
59
+        cell.textLabel?.textColor = UIColor.title()
60
+        return cell
61
+    }
62
+    
63
+}

+ 201 - 0
CAISHEN/SellPhone2/Mine/Controller/KXSPMineViewController.swift

@@ -0,0 +1,201 @@
1
+//
2
+//  KXSPMineViewController.swift
3
+//  CAISHEN
4
+//
5
+//  Created by xiaoxi on 2018/11/16.
6
+//  Copyright © 2018 kuxuan. All rights reserved.
7
+//
8
+
9
+import UIKit
10
+
11
+class KXSPMineViewController: KXBaseViewController, UITableViewDelegate, UITableViewDataSource {
12
+    
13
+    var avatarUrl: String = ""
14
+    var userName: String = ""
15
+    
16
+
17
+    override func viewDidLoad() {
18
+        super.viewDidLoad()
19
+        setUpUI()
20
+    }
21
+    
22
+    override func viewDidAppear(_ animated: Bool) {
23
+        super.viewDidAppear(animated)
24
+        checkIfLogin()
25
+    }
26
+    
27
+    override func setUpUI() {
28
+        name = "个人中心"
29
+        view.addSubview(tableView)
30
+    }
31
+    
32
+    lazy var tableView: UITableView = {
33
+        let table: UITableView = UITableView.init(frame: CGRect.init(x: 12, y: 0, width: SCREEN_WIDTH-24, height: SCREEN_HEIGHT-NavHeight-TabbarHeight), style: .plain)
34
+        table.backgroundColor = UIColor.clear
35
+        table.showsVerticalScrollIndicator = false
36
+        table.showsHorizontalScrollIndicator = false
37
+        table.delegate = self
38
+        table.dataSource = self
39
+        table.layer.cornerRadius = 10
40
+        table.rowHeight = Fitesize(59)
41
+        table.estimatedRowHeight = 0
42
+        table.estimatedSectionHeaderHeight = 0
43
+        table.estimatedSectionFooterHeight = 0
44
+        if #available(iOS 11.0, *) {
45
+            table.contentInsetAdjustmentBehavior = .never
46
+        }
47
+        table.tableHeaderView = header
48
+        table.tableFooterView = UIView()
49
+        return table
50
+    }()
51
+    
52
+    lazy var header: KXSPMineTableHeaderView = {
53
+        let header: KXSPMineTableHeaderView = KXSPMineTableHeaderView.init(frame: CGRect.init(x: 0, y: 0, width: SCREEN_WIDTH-24, height: Fitesize(176)))
54
+        header .addTarget(self, action: #selector(headerLoginAction), for: .touchUpInside)
55
+        return header
56
+    }()
57
+    
58
+    @objc fileprivate func headerLoginAction() -> Void {
59
+        if KXLoginManager.shareInstance()!.isLogin() == false {
60
+            pushLoginVC()
61
+        } else {
62
+            pushPersonInfoVC()
63
+        }
64
+    }
65
+    
66
+    fileprivate func pushLoginVC() -> Void {
67
+        let login: KXLogginViewController = KXLogginViewController()
68
+        navigationController?.pushViewController(login, animated: true)
69
+    }
70
+    
71
+    fileprivate func pushPersonInfoVC() -> Void {
72
+        let info: KXPersonInfoViewController = KXPersonInfoViewController()
73
+        info.avatarUrl = avatarUrl
74
+        info.nickName = userName
75
+        navigationController?.pushViewController(info, animated: true)
76
+    }
77
+    
78
+    fileprivate func checkIfLogin() -> Void {
79
+        let urlString: String = KXURL + "/user/personalCenter"
80
+        KXHTTP.post(urlString, params: nil, success: { (json) in
81
+            if KXLoginManager.shareInstance()!.isLogin() {
82
+                let response: NSDictionary = json as! NSDictionary
83
+                let userInfo: NSDictionary = response["user"] as! NSDictionary
84
+                self.header.idLabel.text = UserDefaults.standard.value(forKey: USER_NAME) as? String
85
+                self.avatarUrl = userInfo["avatar_url"] as! String
86
+                self.header.iconImageView.sd_setImageUrl(url: URL.init(string:  self.avatarUrl), placeHolderImage: UIImage.init(named: "mine_borrow"))
87
+                self.userName = userInfo["nick"] as! String
88
+                self.header.nameLabel.text = self.userName
89
+                UserDefaults.standard.set(self.userName, forKey: "userID")
90
+                UserDefaults.standard.synchronize()
91
+            } else {
92
+                self.header.nameLabel.text = "点我登录/注册"
93
+                self.header.idLabel.text = ""
94
+                self.header.iconImageView.image = UIImage.init(named: "robroder_login")
95
+            }
96
+        }) { (error) in
97
+            self.header.nameLabel.text = "点我登录/注册"
98
+            self.header.idLabel.text = ""
99
+            self.header.iconImageView.image = UIImage.init(named: "robroder_login")
100
+        }
101
+    }
102
+    
103
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
104
+        return 6
105
+    }
106
+    
107
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
108
+        let cell: UITableViewCell = tableView.dequeueReusableCell(withIdentifier: "cell") ?? UITableViewCell.init(style: .default, reuseIdentifier: "cell")
109
+        let arr:Array = ["个人信息","邮寄地址","联系客服","意见反馈","关于我们","隐私权政策"]
110
+        cell.selectionStyle = .none
111
+        cell.backgroundColor = UIColor.clear
112
+        cell.accessoryType = .disclosureIndicator
113
+        cell.textLabel?.text = arr[indexPath.row]
114
+        return cell
115
+    }
116
+    
117
+    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
118
+        switch indexPath.row {
119
+        case 0:
120
+            pushPersonInfoVC()
121
+        case 1:
122
+            let address: KXSPAddressViewController = KXSPAddressViewController()
123
+            navigationController?.pushViewController(address, animated: true)
124
+        case 2:
125
+            let service: KXSFMServiceViewController = KXSFMServiceViewController()
126
+            navigationController?.pushViewController(service, animated: true)
127
+        case 3:
128
+            let feedback: KXAdviceBackViewController  = KXAdviceBackViewController()
129
+            navigationController?.pushViewController(feedback, animated: true)
130
+        case 4:
131
+            let about: KXAboutUsViewController = KXAboutUsViewController()
132
+            navigationController?.pushViewController(about, animated: true)
133
+        case 5:
134
+            let web: KXCustomWebViewController = KXCustomWebViewController()
135
+            web.webStr = String.init(format: "http://m.henhaojie.com/agreement-bnd.html?name=%@", NSString.getAppName()!)
136
+            web.title = "隐私权政策";
137
+            navigationController?.pushViewController(web, animated: true)
138
+        default:
139
+            break
140
+        }
141
+    }
142
+
143
+}
144
+
145
+class KXSPMineTableHeaderView: UIControl {
146
+    
147
+    override init(frame: CGRect) {
148
+        super.init(frame: frame)
149
+        setupUI()
150
+    }
151
+    
152
+    required init?(coder aDecoder: NSCoder) {
153
+        fatalError("init(coder:) has not been implemented")
154
+    }
155
+    
156
+    private func setupUI() -> Void {
157
+        layer.cornerRadius = 10
158
+        backgroundColor = UIColor.white
159
+        addSubview(iconImageView)
160
+        addSubview(nameLabel)
161
+        addSubview(idLabel)
162
+        iconImageView.mas_makeConstraints { (make) in
163
+            make?.left.mas_equalTo()(self)?.offset()(Fitesize(25))
164
+            make?.centerY.mas_equalTo()(self)
165
+            make?.size.mas_equalTo()(CGSize.init(width: Fitesize(78), height: Fitesize(78)))
166
+        }
167
+        nameLabel.mas_makeConstraints { (make) in
168
+            make?.left.mas_equalTo()(iconImageView.mas_right)?.offset()(Fitesize(21))
169
+            make?.top.mas_equalTo()(iconImageView)?.offset()(Fitesize(13))
170
+        }
171
+        idLabel.mas_makeConstraints { (make) in
172
+            make?.left.mas_equalTo()(nameLabel)
173
+            make?.top.mas_equalTo()(nameLabel.mas_bottom)?.offset()(4)
174
+        }
175
+    }
176
+    
177
+    lazy var iconImageView: UIImageView = {
178
+        let imageView: UIImageView = UIImageView()
179
+        imageView.layer.cornerRadius = Fitesize(39)
180
+        imageView.layer.masksToBounds = true
181
+        imageView.image = UIImage.init(named: "robroder_login")
182
+        imageView.isUserInteractionEnabled = true
183
+        return imageView
184
+    }()
185
+    
186
+    lazy var nameLabel: UILabel = {
187
+        let label: UILabel = UILabel()
188
+        label.font = UIFont.init(name: "PingFangSC-Regular", size: Fitesize(17))
189
+        label.textColor = UIColor.title()
190
+        label.text = "点我登录/注册"
191
+        return label
192
+    }()
193
+    
194
+    lazy var idLabel: UILabel = {
195
+        let label: UILabel = UILabel()
196
+        label.font = UIFont.init(name: "PingFangSC-Regular", size: Fitesize(17))
197
+        label.textColor = UIColor.kxColor(withHex: 0x666666)
198
+        return label
199
+    }()
200
+    
201
+}

+ 73 - 0
CAISHEN/SellPhone2/Order/Controller/KXSPOrderDetailViewController.swift

@@ -0,0 +1,73 @@
1
+//
2
+//  KXSPOrderDetailViewController.swift
3
+//  CAISHEN
4
+//
5
+//  Created by xiaoxi on 2018/11/16.
6
+//  Copyright © 2018 kuxuan. All rights reserved.
7
+//
8
+
9
+import UIKit
10
+
11
+class KXSPOrderDetailViewController: KXBaseViewController, UITableViewDelegate, UITableViewDataSource {
12
+    
13
+    var dataSource: NSMutableArray = NSMutableArray.init()
14
+    
15
+    override func viewDidLoad() {
16
+        super.viewDidLoad()
17
+        addBackBtn()
18
+        setUpUI()
19
+    }
20
+    
21
+    override func setUpUI() {
22
+        name = "订单详情"
23
+        view.addSubview(tableView)
24
+    }
25
+    
26
+    lazy var tableView: UITableView = {
27
+        let table: UITableView = UITableView.init(frame: CGRect.init(x: 12, y: 0, width: SCREEN_WIDTH-24, height: SCREEN_HEIGHT-NavHeight), style: .plain)
28
+        table.showsVerticalScrollIndicator = false
29
+        table.showsHorizontalScrollIndicator = false
30
+        table.delegate = self
31
+        table.dataSource = self
32
+        table.register(KXSPOrderTableViewCell.classForCoder(), forCellReuseIdentifier: "KXSPOrderTableViewCell")
33
+        table.rowHeight = Fitesize(234)
34
+        table.estimatedRowHeight = 0
35
+        table.estimatedSectionHeaderHeight = 0
36
+        table.estimatedSectionFooterHeight = 0
37
+        table.separatorStyle = .none
38
+        table.tableFooterView = tableFooterView
39
+        if #available(iOS 11.0, *) {
40
+            table.contentInsetAdjustmentBehavior = .never
41
+        }
42
+        return table
43
+    }()
44
+    
45
+    lazy var tableFooterView: UIView = {
46
+        let view: UIView = UIView.init(frame: CGRect.init(x: 0, y: 0, width: tableView.frame.width, height: Fitesize(122)))
47
+        let button: UIButton = UIButton.init(type: .custom)
48
+        button.frame = CGRect.init(x: Fitesize(40), y: Fitesize(74), width: view.frame.width-Fitesize(80), height: Fitesize(48))
49
+        button.layer.cornerRadius = 24
50
+        button.titleLabel?.font = UIFont.init(name: "PingFangSC-Light", size: Fitesize(17))
51
+        button.setTitleColor(UIColor.white, for: .normal)
52
+        button.addTarget(self, action: #selector(nextButtonAction(sender:)), for: .touchUpInside)
53
+        return view
54
+    }()
55
+    
56
+    @objc fileprivate func nextButtonAction(sender: UIButton) -> Void {
57
+        
58
+    }
59
+
60
+    func numberOfSections(in tableView: UITableView) -> Int {
61
+        return 1
62
+    }
63
+    
64
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
65
+        return dataSource.count
66
+    }
67
+    
68
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
69
+        let cell: KXSPOrderTableViewCell = tableView.dequeueReusableCell(withIdentifier: "KXSPOrderTableViewCell", for: indexPath) as! KXSPOrderTableViewCell
70
+        return cell
71
+    }
72
+    
73
+}

+ 224 - 11
CAISHEN/SellPhone2/Order/Controller/KXSPOrderViewController.swift

@@ -8,23 +8,236 @@
8 8
 
9 9
 import UIKit
10 10
 
11
-class KXSPOrderViewController: KXBaseViewController {
11
+class KXSPOrderViewController: KXBaseViewController, UITableViewDelegate, UITableViewDataSource {
12 12
 
13
+    var dataSource: NSMutableArray = NSMutableArray.init()
14
+    var page = 1
15
+    var module: String = "phone"
16
+    
17
+    
13 18
     override func viewDidLoad() {
14 19
         super.viewDidLoad()
15
-
16
-        // Do any additional setup after loading the view.
20
+        setUpUI()
17 21
     }
18 22
     
23
+    override func setUpUI() {
24
+        name = "订单"
25
+        view.addSubview(segView)
26
+        view.addSubview(tableView)
27
+    }
28
+    
29
+    lazy var segView: UISegmentedControl = {
30
+        let seg: UISegmentedControl = UISegmentedControl.init(items: ["手机","平板","电脑"])
31
+        seg.frame = CGRect.init(x: 12, y: 0, width: SCREEN_WIDTH-24, height: Fitesize(48))
32
+        seg.layer.cornerRadius = 8
33
+        seg.setTitleTextAttributes([NSAttributedString.Key.font: UIFont.init(name: "PingFangSC-Light", size: Fitesize(17))!], for: .normal)
34
+        seg.tintColor = UIColor.base()
35
+        return seg
36
+    }()
37
+    
38
+    lazy var tableView: UITableView = {
39
+        let table: UITableView = UITableView.init(frame: CGRect.init(x: 12, y: Fitesize(48), width: SCREEN_WIDTH-24, height: SCREEN_HEIGHT-NavHeight-Fitesize(48)), style: .grouped)
40
+        table.showsVerticalScrollIndicator = false
41
+        table.showsHorizontalScrollIndicator = false
42
+        table.delegate = self
43
+        table.dataSource = self
44
+        table.register(KXSPOrderTableViewCell.classForCoder(), forCellReuseIdentifier: "KXSPOrderTableViewCell")
45
+        table.rowHeight = Fitesize(234)
46
+        table.estimatedRowHeight = 0
47
+        table.estimatedSectionHeaderHeight = 0
48
+        table.estimatedSectionFooterHeight = 0
49
+        table.separatorStyle = .none
50
+        return table
51
+    }()
52
+    
53
+    func requestDataSourceWithPage(Page : Int) -> Void {
54
+        let urlString: String = KXURL + "/recycle/getList"
55
+        KXHTTP.post(urlString, params: ["page": Page, "module": module], success: { (json) in
56
+            let response: NSDictionary = json as! NSDictionary
57
+            let arr: NSArray = response["data"] as! [NSDictionary] as NSArray
58
+            if Page == 1 {
59
+                self.dataSource.removeAllObjects()
60
+            }
61
+            self.dataSource.addObjects(from: arr as! [Any])
62
+        }) { (error) in
63
+            
64
+        }
65
+        
66
+    }
67
+    
68
+    func numberOfSections(in tableView: UITableView) -> Int {
69
+        return dataSource.count
70
+    }
19 71
 
20
-    /*
21
-    // MARK: - Navigation
22
-
23
-    // In a storyboard-based application, you will often want to do a little preparation before navigation
24
-    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
25
-        // Get the new view controller using segue.destination.
26
-        // Pass the selected object to the new view controller.
72
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
73
+        return 1
74
+    }
75
+    
76
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
77
+        let cell: KXSPOrderTableViewCell = tableView.dequeueReusableCell(withIdentifier: "KXSPOrderTableViewCell", for: indexPath) as! KXSPOrderTableViewCell
78
+        return cell
27 79
     }
28
-    */
80
+    
81
+}
29 82
 
83
+class KXSPOrderTableViewCell: UITableViewCell {
84
+    
85
+    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
86
+        super.init(style: style, reuseIdentifier: reuseIdentifier)
87
+        selectionStyle = .none
88
+        layer.cornerRadius = 10
89
+        contentView.addSubview(iconImageView)
90
+        contentView.addSubview(nameLabel)
91
+        contentView.addSubview(priceLabel)
92
+        contentView.addSubview(statusLabel)
93
+        contentView.addSubview(line)
94
+        contentView.addSubview(canshu)
95
+        contentView.addSubview(xinghao)
96
+        contentView.addSubview(yanse)
97
+        contentView.addSubview(chengse)
98
+        contentView.addSubview(neicun)
99
+        contentView.addSubview(shijian)
100
+        contentView.addSubview(weixiu)
101
+        iconImageView.mas_makeConstraints { (make) in
102
+            make?.left.mas_equalTo()(contentView)?.offset()(Fitesize(14))
103
+            make?.top.mas_equalTo()(contentView)?.offset()(Fitesize(17))
104
+            make?.size.mas_equalTo()(CGSize.init(width: Fitesize(70), height: Fitesize(70)))
105
+        }
106
+        nameLabel.mas_makeConstraints { (make) in
107
+            make?.left.mas_equalTo()(iconImageView.mas_right)?.offset()(Fitesize(20))
108
+            make?.top.mas_equalTo()(contentView)?.offset()(Fitesize(14))
109
+        }
110
+        priceLabel.mas_makeConstraints { (make) in
111
+            make?.left.mas_equalTo()(nameLabel)
112
+            make?.top.mas_equalTo()(nameLabel.mas_bottom)?.offset()(5)
113
+        }
114
+        statusLabel.mas_makeConstraints { (make) in
115
+            make?.left.mas_equalTo()(priceLabel)
116
+            make?.top.mas_equalTo()(priceLabel.mas_bottom)?.offset()(2)
117
+        }
118
+        line.mas_makeConstraints { (make) in
119
+            make?.left.mas_equalTo()(contentView)?.offset()(Fitesize(15))
120
+            make?.right.mas_equalTo()(contentView)?.offset()(-Fitesize(15))
121
+            make?.top.mas_equalTo()(statusLabel.mas_bottom)?.offset()(Fitesize(14))
122
+            make?.height.mas_equalTo()(0.5)
123
+        }
124
+        canshu.mas_makeConstraints { (make) in
125
+            make?.left.mas_equalTo()(contentView)?.offset()(Fitesize(17))
126
+            make?.top.mas_equalTo()(line.mas_bottom)?.offset()(Fitesize(13))
127
+        }
128
+        xinghao.mas_makeConstraints { (make) in
129
+            make?.left.mas_equalTo()(canshu)
130
+            make?.top.mas_equalTo()(canshu.mas_bottom)?.offset()(Fitesize(10))
131
+        }
132
+        yanse.mas_makeConstraints { (make) in
133
+            make?.left.mas_equalTo()(xinghao)
134
+            make?.top.mas_equalTo()(xinghao.mas_bottom)?.offset()(2)
135
+        }
136
+        chengse.mas_makeConstraints { (make) in
137
+            make?.left.mas_equalTo()(yanse)
138
+            make?.top.mas_equalTo()(yanse.mas_bottom)?.offset()(2)
139
+        }
140
+        neicun.mas_makeConstraints { (make) in
141
+            make?.left.mas_equalTo()(contentView)?.offset()(Fitesize(182))
142
+            make?.top.mas_equalTo()(xinghao)
143
+        }
144
+        shijian.mas_makeConstraints { (make) in
145
+            make?.left.mas_equalTo()(neicun)
146
+            make?.top.mas_equalTo()(yanse)
147
+        }
148
+        weixiu.mas_makeConstraints { (make) in
149
+            make?.left.mas_equalTo()(shijian)
150
+            make?.top.mas_equalTo()(chengse)
151
+        }
152
+    }
153
+    
154
+    required init?(coder aDecoder: NSCoder) {
155
+        fatalError("init(coder:) has not been implemented")
156
+    }
157
+    
158
+    override func configTableViewCell(model: AnyObject, indexPath: NSIndexPath) {
159
+        
160
+    }
161
+    
162
+    lazy var iconImageView: UIImageView = {
163
+        let imageView:UIImageView = UIImageView()
164
+        imageView.layer.cornerRadius = 7
165
+        return imageView
166
+    }()
167
+    
168
+    lazy var nameLabel: UILabel = {
169
+        let label: UILabel = UILabel()
170
+        label.font = UIFont.init(name: "PingFangSC-Medium", size: Fitesize(18))
171
+        label.textColor = UIColor.title()
172
+        return label
173
+    }()
174
+    
175
+    lazy var priceLabel: UILabel = {
176
+        let label: UILabel = UILabel()
177
+        return label
178
+    }()
179
+    
180
+    lazy var statusLabel: UILabel = {
181
+        let label: UILabel = UILabel()
182
+        label.font = UIFont.init(name: "PingFangSC-Regular", size: Fitesize(14))
183
+        label.textColor = UIColor.kxColor(withHex: 0x666666)
184
+        return label
185
+    }()
186
+    
187
+    lazy var line: UIView = {
188
+        let view: UIView = UIView()
189
+        view.backgroundColor = UIColor.kxColor(withHex: 0xd8d8d8)
190
+        return view
191
+    }()
192
+    
193
+    lazy var canshu: UILabel = {
194
+        let label: UILabel = UILabel()
195
+        label.font = UIFont.init(name: "PingFangSC-Medium", size: Fitesize(16))
196
+        label.textColor = UIColor.title()
197
+        label.text = "评估参数"
198
+        return label
199
+    }()
200
+    
201
+    lazy var xinghao: UILabel = {
202
+        let label: UILabel = UILabel()
203
+        label.font = UIFont.init(name: "PingFangSC-Regular", size: Fitesize(14))
204
+        label.textColor = UIColor.kxColor(withHex: 0x666666)
205
+        return label
206
+    }()
207
+    
208
+    lazy var yanse: UILabel = {
209
+        let label: UILabel = UILabel()
210
+        label.font = UIFont.init(name: "PingFangSC-Regular", size: Fitesize(14))
211
+        label.textColor = UIColor.kxColor(withHex: 0x666666)
212
+        return label
213
+    }()
214
+    
215
+    lazy var chengse: UILabel = {
216
+        let label: UILabel = UILabel()
217
+        label.font = UIFont.init(name: "PingFangSC-Regular", size: Fitesize(14))
218
+        label.textColor = UIColor.kxColor(withHex: 0x666666)
219
+        return label
220
+    }()
221
+    
222
+    lazy var neicun: UILabel = {
223
+        let label: UILabel = UILabel()
224
+        label.font = UIFont.init(name: "PingFangSC-Regular", size: Fitesize(14))
225
+        label.textColor = UIColor.kxColor(withHex: 0x666666)
226
+        return label
227
+    }()
228
+    
229
+    lazy var shijian: UILabel = {
230
+        let label: UILabel = UILabel()
231
+        label.font = UIFont.init(name: "PingFangSC-Regular", size: Fitesize(14))
232
+        label.textColor = UIColor.kxColor(withHex: 0x666666)
233
+        return label
234
+    }()
235
+    
236
+    lazy var weixiu: UILabel = {
237
+        let label: UILabel = UILabel()
238
+        label.font = UIFont.init(name: "PingFangSC-Regular", size: Fitesize(14))
239
+        label.textColor = UIColor.kxColor(withHex: 0x666666)
240
+        return label
241
+    }()
242
+    
30 243
 }

+ 79 - 0
CAISHEN/SellPhone2/huishou.html

@@ -0,0 +1,79 @@
1
+<!DOCTYPE html>
2
+<html lang="en">
3
+    <head>
4
+        <meta charset="UTF-8">
5
+        <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
6
+        <style>
7
+            html,
8
+            body,
9
+            p {
10
+                margin: 0;
11
+                padding: 0;
12
+            }
13
+        
14
+            .content {
15
+                padding: 0rem 0.14rem 0;
16
+            }
17
+        
18
+            h {
19
+                margin: 0;
20
+            }
21
+        
22
+            h {
23
+                font-size: 16px;
24
+                color: #333;
25
+                padding-top: 0.10rem;
26
+                padding-bottom: 4px;
27
+            }
28
+        
29
+            p {
30
+                font-size: 14px;
31
+                color: #444;
32
+                padding-top: 4px;
33
+                padding-bottom: 4px;
34
+            }
35
+        </style>
36
+    </head>
37
+    <body>
38
+        <div class="content">
39
+            <h>1、查看手机型号</h>
40
+            <p>&emsp;&emsp;后壳—机身标贴—型号</p>
41
+            <p>&emsp;&emsp;设置—关于本机—型号</p>
42
+            <h>2、查看手机内存、版本</h>
43
+            <p></p>
44
+            <h>3、成色判断</h>
45
+            <p>&emsp;&emsp;查看机身外观是否存在弯曲、掉漆、划痕、磕碰等情况,综合判断手机成色。</p>
46
+            <p>&emsp;&emsp;全新手机:未拆包装或仅拆包装未激活,配件齐全,无任何使用痕迹。</p>
47
+            <h>4、外观完好</h>
48
+            <p>&emsp;&emsp;屏幕完好无划痕,机身有轻微使用痕迹。</p>
49
+            <h>5、外观有瑕疵</h>
50
+            <p>&emsp;&emsp;有明显使用痕迹、划痕、磕碰掉漆情况。</p>
51
+            <h>6、检测触摸屏</h>
52
+            <p>&emsp;&emsp;查看触摸是否正常,是否存在漏光、色差等现象。</p>
53
+            <p>&emsp;&emsp;划动图标,检查触摸是否正常。</p>
54
+            <h>7、检查WiFi</h>
55
+            <p>&emsp;&emsp;在WiFi覆盖区域看是否能正常连接WiFi。</p>
56
+            <h>8、检测蓝牙</h>
57
+            <p>&emsp;&emsp;检测是否可以正常搜索并连接蓝牙。</p>
58
+            <h>9、检测指纹</h>
59
+            <p>&emsp;&emsp;查看是否可以准确识别指纹信息。</p>
60
+            <h>10、检测账号</h>
61
+            <p>&emsp;&emsp;检查iCloud、flyme等账号是否接触绑定。</p>
62
+            <h>11、检查拍照</h>
63
+            <p>&emsp;&emsp;检查前后拍照功能是否正常。</p>
64
+            <h>12、充电检查</h>
65
+            <p>&emsp;&emsp;检测手机是否可以正常充电。</p>
66
+            <h>13、维修检测</h>
67
+            <p>&emsp;&emsp;查看维修标识是否完善,机身螺丝是否有划动痕迹。</p>
68
+            <h>14、进水检测</h>
69
+            <p>&emsp;&emsp;查看防水标识是否变色,手机插口、机身等是否有
70
+            受潮、霉变等现象。</p>
71
+            <h>15、检测按键</h>
72
+            <p>&emsp;&emsp;检测每个按键是否正常工作。</p>
73
+            <h>16、通话检测</h>
74
+            <p>&emsp;&emsp;拨打电话,检测通话是否清晰正常。</p>
75
+            <h>17、光感检测</h>
76
+            <p>&emsp;&emsp;检测是否可以正常呈现光感效果。</p>
77
+        </div>
78
+    </body>
79
+</html>