Commit 0ff55856fe62c9def94064df3bcef86190b22b8e
1 parent
ec3f1ac5
提交修改
Showing
4 changed files
with
32 additions
and
12 deletions
metaCode/Classes/Main/MinePage/Controller/CNLiveMineAddInfoViewController.swift
| ... | ... | @@ -189,7 +189,7 @@ class CNLiveMineAddInfoViewController : CNLiveBaseViewController, UITableViewDel |
| 189 | 189 | self!.pageNum = 1 |
| 190 | 190 | self!.loadData() |
| 191 | 191 | }) |
| 192 | - tableView.mj_footer = MJRefreshBackNormalFooter.init(refreshingBlock: {[weak self] in | |
| 192 | + tableView.mj_footer = MJRefreshAutoNormalFooter.init(refreshingBlock: {[weak self] in | |
| 193 | 193 | self!.pageNum += 1 |
| 194 | 194 | self!.loadData() |
| 195 | 195 | }) | ... | ... |
metaCode/Classes/Main/MinePage/Controller/CNLiveMineEarnListViewController.swift
| ... | ... | @@ -88,11 +88,13 @@ class CNLiveMineEarnListViewController: CNLiveBaseViewController, JXPagingViewLi |
| 88 | 88 | } |
| 89 | 89 | } |
| 90 | 90 | if _show_type == .record { |
| 91 | - CNLiveMineViewModel.requestWithIntegralRecord(page: page) { result, respStatue in | |
| 91 | + CNLiveMineViewModel.requestWithIntegralRecord(page: page) { [self] result, respStatue in | |
| 92 | 92 | if respStatue == .success { |
| 93 | 93 | let listModel = result as! MineIntegralRecordModel |
| 94 | 94 | self.network_type = .success |
| 95 | - self.dataArray.removeAllObjects() | |
| 95 | + if pageNum == 1 { | |
| 96 | + self.dataArray.removeAllObjects() | |
| 97 | + } | |
| 96 | 98 | self.dataArray.addObjects(from: listModel.integralList) |
| 97 | 99 | self.tableView.reloadData() |
| 98 | 100 | self.tableView.mj_header?.endRefreshing() |
| ... | ... | @@ -134,7 +136,7 @@ class CNLiveMineEarnListViewController: CNLiveBaseViewController, JXPagingViewLi |
| 134 | 136 | } |
| 135 | 137 | |
| 136 | 138 | private func addRefreshView() { |
| 137 | - let footerView = MJRefreshBackNormalFooter.init(refreshingBlock: {[weak self] in | |
| 139 | + let footerView = MJRefreshAutoNormalFooter.init(refreshingBlock: {[weak self] in | |
| 138 | 140 | self!.pageNum += 1 |
| 139 | 141 | self!.loadDataWithTradRecord(page: self!.pageNum) {result,respStatue in } |
| 140 | 142 | }) | ... | ... |
metaCode/Classes/Main/MinePage/Controller/CNLiveMineInfoViewController.swift
| ... | ... | @@ -8,7 +8,7 @@ |
| 8 | 8 | import Foundation |
| 9 | 9 | import HXPHPicker |
| 10 | 10 | import Kingfisher |
| 11 | - | |
| 11 | +import APButton | |
| 12 | 12 | typealias ClickInfoResultBlock = (_ image: UIImage) -> Void |
| 13 | 13 | class CNLiveMineInfoViewController: CNLiveBaseViewController, PhotoPickerControllerDelegate { |
| 14 | 14 | |
| ... | ... | @@ -34,14 +34,15 @@ class CNLiveMineInfoViewController: CNLiveBaseViewController, PhotoPickerControl |
| 34 | 34 | return changeBtn |
| 35 | 35 | }() |
| 36 | 36 | |
| 37 | - lazy var sendBtn: UIButton = { | |
| 38 | - let sendBtn = UIButton.init(type: .custom) | |
| 37 | + lazy var sendBtn: APButton = { | |
| 38 | + let sendBtn = APButton() | |
| 39 | 39 | sendBtn.setTitle("确认", for: .normal) |
| 40 | 40 | sendBtn.setTitleColor(.white, for: .normal) |
| 41 | 41 | sendBtn.titleLabel?.font = BoldFont_19_Fit |
| 42 | 42 | sendBtn.layer.cornerRadius = 20 |
| 43 | 43 | sendBtn.layer.masksToBounds = true |
| 44 | 44 | sendBtn.isHidden = true |
| 45 | + sendBtn.activityIndicator.color = .white | |
| 45 | 46 | sendBtn.addTarget(self, action: #selector(changeSendAction), for: .touchUpInside) |
| 46 | 47 | return sendBtn |
| 47 | 48 | }() |
| ... | ... | @@ -124,8 +125,10 @@ class CNLiveMineInfoViewController: CNLiveBaseViewController, PhotoPickerControl |
| 124 | 125 | } |
| 125 | 126 | |
| 126 | 127 | @objc func changeSendAction() { |
| 128 | + sendBtn.startAnimating() | |
| 127 | 129 | CNLiveMineViewModel.requestUploadIconAction(_select_image) { [weak self] type, statue in |
| 128 | 130 | if statue { |
| 131 | + self?.sendBtn.stopAnimating() | |
| 129 | 132 | //再这里进行图片上传 |
| 130 | 133 | self!.reslut(self!._select_image) |
| 131 | 134 | self!.navigationController?.popViewController(animated: true) | ... | ... |
metaCode/Classes/Main/MinePage/Controller/CNLiveTypeFeedBackViewController.swift
| ... | ... | @@ -6,7 +6,7 @@ |
| 6 | 6 | // |
| 7 | 7 | |
| 8 | 8 | import Foundation |
| 9 | - | |
| 9 | +import APButton | |
| 10 | 10 | |
| 11 | 11 | enum ListShowType { |
| 12 | 12 | case feedback |
| ... | ... | @@ -29,7 +29,9 @@ class CNLiveTypeFeedBackViewController : CNLiveBaseViewController, UITableViewDe |
| 29 | 29 | tableView.tableHeaderView = UIView.init(frame: CGRect(x: 0, y: 0, width: KSreenWidth, height: 1)) |
| 30 | 30 | tableView.separatorStyle = .none |
| 31 | 31 | tableView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0) |
| 32 | - tableView.register(MineBodyTwoListViewCell.self, forCellReuseIdentifier: kCNLiveMineOneFeedBackViewCellIdentifier) | |
| 32 | + if _show_type != .info { | |
| 33 | + tableView.register(MineBodyTwoListViewCell.self, forCellReuseIdentifier: kCNLiveMineOneFeedBackViewCellIdentifier) | |
| 34 | + } | |
| 33 | 35 | return tableView |
| 34 | 36 | }() |
| 35 | 37 | |
| ... | ... | @@ -61,17 +63,22 @@ class CNLiveTypeFeedBackViewController : CNLiveBaseViewController, UITableViewDe |
| 61 | 63 | dataArray.add(["icon":"","name":"昵称","more":(UserInfoManager.shared.userInfo.nickName.count > 0 ? UserInfoManager.shared.userInfo.nickName : "请输入昵称"),"avatar":""]) |
| 62 | 64 | dataArray.add(["icon":"","name":"性别","more":UserInfoManager.shared.userInfo.gender,"avatar":""]) |
| 63 | 65 | dataArray.add(["icon":"","name":"生日","more":UserInfoManager.shared.userInfo.birthday,"avatar":""]) |
| 66 | + self.tableView.register(MineBodyTwoListViewCell.self, forCellReuseIdentifier: kCNLiveMineOneFeedBackViewCellIdentifier+"0") | |
| 67 | + self.tableView.register(MineBodyTwoListViewCell.self, forCellReuseIdentifier: kCNLiveMineOneFeedBackViewCellIdentifier+"1") | |
| 68 | + self.tableView.register(MineBodyTwoListViewCell.self, forCellReuseIdentifier: kCNLiveMineOneFeedBackViewCellIdentifier+"2") | |
| 69 | + self.tableView.register(MineBodyTwoListViewCell.self, forCellReuseIdentifier: kCNLiveMineOneFeedBackViewCellIdentifier+"3") | |
| 64 | 70 | } |
| 65 | 71 | return dataArray |
| 66 | 72 | }() |
| 67 | 73 | |
| 68 | - lazy var logoutButton: UIButton = { | |
| 69 | - let logoutButton = UIButton.init(type: .custom) | |
| 74 | + lazy var logoutButton: APButton = { | |
| 75 | + let logoutButton = APButton() | |
| 70 | 76 | logoutButton.setTitle("退出登录", for: .normal) |
| 71 | 77 | logoutButton.backgroundColor = .white |
| 72 | 78 | logoutButton.setTitleColor(HexColor("#609BFF"), for: .normal) |
| 73 | 79 | logoutButton.layer.cornerRadius = 10 |
| 74 | 80 | logoutButton.layer.masksToBounds = true |
| 81 | + logoutButton.activityIndicator.color = .white | |
| 75 | 82 | logoutButton.addTarget(self, action: #selector(logoutAction), for: .touchUpInside) |
| 76 | 83 | return logoutButton |
| 77 | 84 | }() |
| ... | ... | @@ -186,8 +193,10 @@ class CNLiveTypeFeedBackViewController : CNLiveBaseViewController, UITableViewDe |
| 186 | 193 | } |
| 187 | 194 | |
| 188 | 195 | @objc func logoutAction() -> Void { |
| 189 | - AlertTool.systemActionSheet(title: nil, message: nil, actionTitles: ["退出登录"]) { index in | |
| 196 | + logoutButton.startAnimating() | |
| 197 | + AlertTool.systemActionSheet(title: nil, message: nil, actionTitles: ["退出登录"]) { [self] index in | |
| 190 | 198 | if index == 1 { |
| 199 | + logoutButton.stopAnimating() | |
| 191 | 200 | UserDefaults.standard.set(false,forKey: "is_login") |
| 192 | 201 | UserInfoManager.clearUserInfo() |
| 193 | 202 | let window = UIApplication.shared.delegate?.window |
| ... | ... | @@ -214,6 +223,12 @@ extension CNLiveTypeFeedBackViewController { |
| 214 | 223 | |
| 215 | 224 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { |
| 216 | 225 | |
| 226 | + if _show_type == .info { | |
| 227 | + let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveMineOneFeedBackViewCellIdentifier+"\(indexPath.row)") as! MineBodyTwoListViewCell | |
| 228 | + let dict = dataArray[indexPath.section] as! NSDictionary | |
| 229 | + cell.setupWithDataSource(show_type: _show_type,dict: dict as! Dictionary<String, Any>) | |
| 230 | + return cell | |
| 231 | + } | |
| 217 | 232 | let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveMineOneFeedBackViewCellIdentifier) as! MineBodyTwoListViewCell |
| 218 | 233 | let dict = dataArray[indexPath.section] as! NSDictionary |
| 219 | 234 | cell.setupWithDataSource(show_type: _show_type,dict: dict as! Dictionary<String, Any>) | ... | ... |