Commit ec3f1ac52ed4e89898621904452a77b03b0e1856
1 parent
42b1cd93
添加webViewUA
Showing
11 changed files
with
73 additions
and
22 deletions
metaCode/Classes/Environment/CNLiveEnvironment.swift
| @@ -67,6 +67,8 @@ class CNLiveEnvironmentManager: NSObject{ | @@ -67,6 +67,8 @@ class CNLiveEnvironmentManager: NSObject{ | ||
| 67 | var img_token_url: String | 67 | var img_token_url: String |
| 68 | /// 网家家电商域名请求 | 68 | /// 网家家电商域名请求 |
| 69 | var base_mjj_shop_url: String | 69 | var base_mjj_shop_url: String |
| 70 | + /// 元码webViewUA设置 | ||
| 71 | + var base_web_UA: String = "yuanma" | ||
| 70 | 72 | ||
| 71 | ///当前环境 | 73 | ///当前环境 |
| 72 | var currentEnvironment: CNLiveEnvironment | 74 | var currentEnvironment: CNLiveEnvironment |
metaCode/Classes/Main/HomePage/Controller/CNWebViewController.swift
| @@ -27,7 +27,16 @@ class CNWebViewController:CNLiveBaseViewController ,WKNavigationDelegate{ | @@ -27,7 +27,16 @@ class CNWebViewController:CNLiveBaseViewController ,WKNavigationDelegate{ | ||
| 27 | _url = newValue! | 27 | _url = newValue! |
| 28 | if (_url != ""){ | 28 | if (_url != ""){ |
| 29 | let webUrl: URL! = URL.init(string: _url!) | 29 | let webUrl: URL! = URL.init(string: _url!) |
| 30 | - webView.load(URLRequest.init(url:webUrl)) | 30 | + webView.evaluateJavaScript("navigator.userAgent") { [self] result, error in |
| 31 | + let userAgent = result as! String | ||
| 32 | + if error == nil && userAgent.count > 0 { | ||
| 33 | + if !userAgent.contains(CNLiveEnvironmentManager.shared.base_web_UA) { | ||
| 34 | + let newUserAgent = userAgent + CNLiveEnvironmentManager.shared.base_web_UA | ||
| 35 | + webView.customUserAgent = newUserAgent | ||
| 36 | + } | ||
| 37 | + } | ||
| 38 | + webView.load(URLRequest.init(url:webUrl)) | ||
| 39 | + } | ||
| 31 | } | 40 | } |
| 32 | } | 41 | } |
| 33 | } | 42 | } |
metaCode/Classes/Main/LoginPage/Controller/CNLiveLoginViewController.swift
| @@ -8,6 +8,7 @@ | @@ -8,6 +8,7 @@ | ||
| 8 | import Foundation | 8 | import Foundation |
| 9 | import UIKit | 9 | import UIKit |
| 10 | import SnapKit | 10 | import SnapKit |
| 11 | +import APButton | ||
| 11 | 12 | ||
| 12 | class CNLiveLoginViewController : CNLiveBaseViewController, UITextViewDelegate { | 13 | class CNLiveLoginViewController : CNLiveBaseViewController, UITextViewDelegate { |
| 13 | 14 | ||
| @@ -52,12 +53,13 @@ class CNLiveLoginViewController : CNLiveBaseViewController, UITextViewDelegate { | @@ -52,12 +53,13 @@ class CNLiveLoginViewController : CNLiveBaseViewController, UITextViewDelegate { | ||
| 52 | return veriText | 53 | return veriText |
| 53 | }() | 54 | }() |
| 54 | 55 | ||
| 55 | - lazy var loginButton: UIButton = { | ||
| 56 | - let loginButton = UIButton(type: .custom) | 56 | + lazy var loginButton: APButton = { |
| 57 | + let loginButton = APButton() | ||
| 57 | loginButton.setTitle("登 录", for: .normal) | 58 | loginButton.setTitle("登 录", for: .normal) |
| 58 | loginButton.setTitleColor(.white, for: .normal) | 59 | loginButton.setTitleColor(.white, for: .normal) |
| 59 | loginButton.titleLabel?.font = BoldFont_16_Fit | 60 | loginButton.titleLabel?.font = BoldFont_16_Fit |
| 60 | loginButton.layer.cornerRadius = 20 | 61 | loginButton.layer.cornerRadius = 20 |
| 62 | + loginButton.activityIndicator.color = .white | ||
| 61 | loginButton.layer.masksToBounds = true | 63 | loginButton.layer.masksToBounds = true |
| 62 | loginButton.addTarget(self, action: #selector(sendLoginActionMothod), for: .touchUpInside) | 64 | loginButton.addTarget(self, action: #selector(sendLoginActionMothod), for: .touchUpInside) |
| 63 | return loginButton | 65 | return loginButton |
| @@ -283,7 +285,9 @@ extension CNLiveLoginViewController { | @@ -283,7 +285,9 @@ extension CNLiveLoginViewController { | ||
| 283 | return | 285 | return |
| 284 | } | 286 | } |
| 285 | view.endEditing(true) | 287 | view.endEditing(true) |
| 286 | - CNLiveLoginViewModel.requestLoginAction(userName: phoneText.text ?? "", countryCode: country, verCode: veriText.text ?? "") { | 288 | + loginButton.startAnimating() |
| 289 | + CNLiveLoginViewModel.requestLoginAction(userName: phoneText.text ?? "", countryCode: country, verCode: veriText.text ?? "") { [self] in | ||
| 290 | + loginButton.stopAnimating() | ||
| 287 | let window = UIApplication.shared.delegate?.window | 291 | let window = UIApplication.shared.delegate?.window |
| 288 | window??.rootViewController = CNLiveBaseTabBarViewController.init() | 292 | window??.rootViewController = CNLiveBaseTabBarViewController.init() |
| 289 | } | 293 | } |
metaCode/Classes/Main/MinePage/Controller/CNLiveInputFeedBackViewController.swift
| @@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
| 7 | 7 | ||
| 8 | import Foundation | 8 | import Foundation |
| 9 | import HXPHPicker | 9 | import HXPHPicker |
| 10 | - | 10 | +import APButton |
| 11 | enum InputFeedBackType { | 11 | enum InputFeedBackType { |
| 12 | case problem | 12 | case problem |
| 13 | case product | 13 | case product |
| @@ -100,13 +100,14 @@ class CNLiveInputFeedBackViewController: CNLiveBaseViewController, UITextViewDel | @@ -100,13 +100,14 @@ class CNLiveInputFeedBackViewController: CNLiveBaseViewController, UITextViewDel | ||
| 100 | return mobileField | 100 | return mobileField |
| 101 | }() | 101 | }() |
| 102 | 102 | ||
| 103 | - lazy var sendButton: UIButton = { | ||
| 104 | - let sendButton = UIButton(type: .custom) | 103 | + lazy var sendButton: APButton = { |
| 104 | + let sendButton = APButton() | ||
| 105 | sendButton.setTitle("提 交", for: .normal) | 105 | sendButton.setTitle("提 交", for: .normal) |
| 106 | sendButton.setTitleColor(.white, for: .normal) | 106 | sendButton.setTitleColor(.white, for: .normal) |
| 107 | sendButton.titleLabel?.font = BoldFont_16_Fit | 107 | sendButton.titleLabel?.font = BoldFont_16_Fit |
| 108 | sendButton.layer.cornerRadius = 20 | 108 | sendButton.layer.cornerRadius = 20 |
| 109 | sendButton.layer.masksToBounds = true | 109 | sendButton.layer.masksToBounds = true |
| 110 | + sendButton.activityIndicator.color = .white | ||
| 110 | sendButton.addTarget(self, action: #selector(sendInfoActionMothod), for: .touchUpInside) | 111 | sendButton.addTarget(self, action: #selector(sendInfoActionMothod), for: .touchUpInside) |
| 111 | return sendButton | 112 | return sendButton |
| 112 | }() | 113 | }() |
| @@ -212,9 +213,11 @@ class CNLiveInputFeedBackViewController: CNLiveBaseViewController, UITextViewDel | @@ -212,9 +213,11 @@ class CNLiveInputFeedBackViewController: CNLiveBaseViewController, UITextViewDel | ||
| 212 | } | 213 | } |
| 213 | 214 | ||
| 214 | @objc func sendInfoActionMothod() { | 215 | @objc func sendInfoActionMothod() { |
| 215 | - CNLiveMineViewModel.requestFeedBack(text: p_textView.text ?? "", contactWay: UserInfoManager.shared.userInfo.mobile, images: imageUrlArray) { type, result in | 216 | + sendButton.startAnimating() |
| 217 | + CNLiveMineViewModel.requestFeedBack(text: p_textView.text ?? "", contactWay: UserInfoManager.shared.userInfo.mobile, images: imageUrlArray) { [self] type, result in | ||
| 216 | if result { | 218 | if result { |
| 217 | showMessage(message: "内容提交成功") | 219 | showMessage(message: "内容提交成功") |
| 220 | + sendButton.stopAnimating() | ||
| 218 | self.navigationController?.popViewController(animated: true) | 221 | self.navigationController?.popViewController(animated: true) |
| 219 | } | 222 | } |
| 220 | } | 223 | } |
metaCode/Classes/Main/MinePage/Controller/CNLiveMineAddInfoViewController.swift
| @@ -99,6 +99,7 @@ class CNLiveMineAddInfoViewController : CNLiveBaseViewController, UITableViewDel | @@ -99,6 +99,7 @@ class CNLiveMineAddInfoViewController : CNLiveBaseViewController, UITableViewDel | ||
| 99 | } | 99 | } |
| 100 | if _show_type == .info || _show_type == .add { | 100 | if _show_type == .info || _show_type == .add { |
| 101 | showLoading(message: "") | 101 | showLoading(message: "") |
| 102 | + NotificationCenter.default.addObserver(self, selector: #selector(StandAuthNotificationSuccessAction), name: Notification.Name.StandAuth.StandAuthNotificationSuccess, object: nil) | ||
| 102 | } | 103 | } |
| 103 | loadData() | 104 | loadData() |
| 104 | addRefreshView() | 105 | addRefreshView() |
| @@ -110,6 +111,10 @@ class CNLiveMineAddInfoViewController : CNLiveBaseViewController, UITableViewDel | @@ -110,6 +111,10 @@ class CNLiveMineAddInfoViewController : CNLiveBaseViewController, UITableViewDel | ||
| 110 | } | 111 | } |
| 111 | } | 112 | } |
| 112 | 113 | ||
| 114 | + deinit { | ||
| 115 | + NotificationCenter.default.removeObserver(self, name: Notification.Name.StandAuth.StandAuthNotificationSuccess, object: nil) | ||
| 116 | + } | ||
| 117 | + | ||
| 113 | private func loadData() { | 118 | private func loadData() { |
| 114 | if _show_type == .add { | 119 | if _show_type == .add { |
| 115 | CNLiveMineViewModel.requestAuthStandList(page: self.pageNum) { [weak self] result, respStatue in | 120 | CNLiveMineViewModel.requestAuthStandList(page: self.pageNum) { [weak self] result, respStatue in |
| @@ -184,13 +189,18 @@ class CNLiveMineAddInfoViewController : CNLiveBaseViewController, UITableViewDel | @@ -184,13 +189,18 @@ class CNLiveMineAddInfoViewController : CNLiveBaseViewController, UITableViewDel | ||
| 184 | self!.pageNum = 1 | 189 | self!.pageNum = 1 |
| 185 | self!.loadData() | 190 | self!.loadData() |
| 186 | }) | 191 | }) |
| 187 | - tableView.mj_footer = MJRefreshFooter.init(refreshingBlock: {[weak self] in | 192 | + tableView.mj_footer = MJRefreshBackNormalFooter.init(refreshingBlock: {[weak self] in |
| 188 | self!.pageNum += 1 | 193 | self!.pageNum += 1 |
| 189 | self!.loadData() | 194 | self!.loadData() |
| 190 | }) | 195 | }) |
| 191 | } | 196 | } |
| 192 | } | 197 | } |
| 193 | 198 | ||
| 199 | + @objc func StandAuthNotificationSuccessAction() { | ||
| 200 | + self.pageNum = 1 | ||
| 201 | + loadData() | ||
| 202 | + } | ||
| 203 | + | ||
| 194 | 204 | ||
| 195 | @objc func noteSetAction() {} | 205 | @objc func noteSetAction() {} |
| 196 | @objc func backCopyAction() {} | 206 | @objc func backCopyAction() {} |
metaCode/Classes/Main/MinePage/Controller/CNLiveMineEarnListViewController.swift
| @@ -59,11 +59,13 @@ class CNLiveMineEarnListViewController: CNLiveBaseViewController, JXPagingViewLi | @@ -59,11 +59,13 @@ class CNLiveMineEarnListViewController: CNLiveBaseViewController, JXPagingViewLi | ||
| 59 | self.pageNum = 1 | 59 | self.pageNum = 1 |
| 60 | } | 60 | } |
| 61 | if _show_type == .balance { | 61 | if _show_type == .balance { |
| 62 | - CNLiveMineViewModel.requestWithTradRecord(page: page) { result, respStatue in | 62 | + CNLiveMineViewModel.requestWithTradRecord(page: page) { [self] result, respStatue in |
| 63 | if respStatue == .success { | 63 | if respStatue == .success { |
| 64 | let listModel = result as! MineTradingRecordBaseModel | 64 | let listModel = result as! MineTradingRecordBaseModel |
| 65 | self.network_type = .success | 65 | self.network_type = .success |
| 66 | - self.dataArray.removeAllObjects() | 66 | + if pageNum == 1 { |
| 67 | + self.dataArray.removeAllObjects() | ||
| 68 | + } | ||
| 67 | self.dataArray.addObjects(from: listModel.list) | 69 | self.dataArray.addObjects(from: listModel.list) |
| 68 | self.tableView.reloadData() | 70 | self.tableView.reloadData() |
| 69 | self.tableView.mj_header?.endRefreshing() | 71 | self.tableView.mj_header?.endRefreshing() |
| @@ -71,6 +73,10 @@ class CNLiveMineEarnListViewController: CNLiveBaseViewController, JXPagingViewLi | @@ -71,6 +73,10 @@ class CNLiveMineEarnListViewController: CNLiveBaseViewController, JXPagingViewLi | ||
| 71 | if self.dataArray.count > 0 { | 73 | if self.dataArray.count > 0 { |
| 72 | self.addRefreshView() | 74 | self.addRefreshView() |
| 73 | } | 75 | } |
| 76 | + if listModel.lasePage { | ||
| 77 | + self.tableView.mj_footer?.endRefreshing() | ||
| 78 | + self.tableView.mj_footer?.endRefreshingWithNoMoreData() | ||
| 79 | + } | ||
| 74 | }else if (respStatue == .noNetwork) { | 80 | }else if (respStatue == .noNetwork) { |
| 75 | self.network_type = .noNetwork | 81 | self.network_type = .noNetwork |
| 76 | self.tableView.reloadEmptyDataSet() | 82 | self.tableView.reloadEmptyDataSet() |
| @@ -128,7 +134,7 @@ class CNLiveMineEarnListViewController: CNLiveBaseViewController, JXPagingViewLi | @@ -128,7 +134,7 @@ class CNLiveMineEarnListViewController: CNLiveBaseViewController, JXPagingViewLi | ||
| 128 | } | 134 | } |
| 129 | 135 | ||
| 130 | private func addRefreshView() { | 136 | private func addRefreshView() { |
| 131 | - let footerView = MJRefreshAutoNormalFooter.init(refreshingBlock: {[weak self] in | 137 | + let footerView = MJRefreshBackNormalFooter.init(refreshingBlock: {[weak self] in |
| 132 | self!.pageNum += 1 | 138 | self!.pageNum += 1 |
| 133 | self!.loadDataWithTradRecord(page: self!.pageNum) {result,respStatue in } | 139 | self!.loadDataWithTradRecord(page: self!.pageNum) {result,respStatue in } |
| 134 | }) | 140 | }) |
metaCode/Classes/Main/MinePage/Controller/CNLiveMineInputViewController.swift
| @@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
| 8 | import Foundation | 8 | import Foundation |
| 9 | import EmptyDataSet_Swift | 9 | import EmptyDataSet_Swift |
| 10 | import HXPHPicker | 10 | import HXPHPicker |
| 11 | - | 11 | +import APButton |
| 12 | typealias resultUploadImageBlock = (_ url: String) -> Void | 12 | typealias resultUploadImageBlock = (_ url: String) -> Void |
| 13 | class CNLiveMineInputViewController : CNLiveBaseViewController, UITableViewDelegate, UITableViewDataSource, EmptyDataSetSource, EmptyDataSetDelegate, PhotoPickerControllerDelegate{ | 13 | class CNLiveMineInputViewController : CNLiveBaseViewController, UITableViewDelegate, UITableViewDataSource, EmptyDataSetSource, EmptyDataSetDelegate, PhotoPickerControllerDelegate{ |
| 14 | 14 | ||
| @@ -36,14 +36,15 @@ class CNLiveMineInputViewController : CNLiveBaseViewController, UITableViewDeleg | @@ -36,14 +36,15 @@ class CNLiveMineInputViewController : CNLiveBaseViewController, UITableViewDeleg | ||
| 36 | return tipLabel | 36 | return tipLabel |
| 37 | }() | 37 | }() |
| 38 | 38 | ||
| 39 | - lazy var sendButton: UIButton = { | ||
| 40 | - let sendButton = UIButton(type: .custom) | 39 | + lazy var sendButton: APButton = { |
| 40 | + let sendButton = APButton() | ||
| 41 | sendButton.setTitle("添加身份", for: .normal) | 41 | sendButton.setTitle("添加身份", for: .normal) |
| 42 | sendButton.setTitleColor(.white, for: .normal) | 42 | sendButton.setTitleColor(.white, for: .normal) |
| 43 | sendButton.titleLabel?.font = BoldFont_16_Fit | 43 | sendButton.titleLabel?.font = BoldFont_16_Fit |
| 44 | sendButton.layer.cornerRadius = 20 | 44 | sendButton.layer.cornerRadius = 20 |
| 45 | sendButton.layer.masksToBounds = true | 45 | sendButton.layer.masksToBounds = true |
| 46 | sendButton.isHidden = true | 46 | sendButton.isHidden = true |
| 47 | + sendButton.activityIndicator.color = .white | ||
| 47 | sendButton.addTarget(self, action: #selector(sendInfoActionMothod), for: .touchUpInside) | 48 | sendButton.addTarget(self, action: #selector(sendInfoActionMothod), for: .touchUpInside) |
| 48 | return sendButton | 49 | return sendButton |
| 49 | }() | 50 | }() |
| @@ -133,9 +134,11 @@ class CNLiveMineInputViewController : CNLiveBaseViewController, UITableViewDeleg | @@ -133,9 +134,11 @@ class CNLiveMineInputViewController : CNLiveBaseViewController, UITableViewDeleg | ||
| 133 | if (self.tempCell != nil) { | 134 | if (self.tempCell != nil) { |
| 134 | self.tempCell._infoModel?.value = url | 135 | self.tempCell._infoModel?.value = url |
| 135 | } | 136 | } |
| 137 | + sendButton.startAnimating() | ||
| 136 | CNLiveMineViewModel.requestsPOSTAuthInfo(identityId: "\(_listModel.id)", infos: self.dataArray) { [self] result, respStatue in | 138 | CNLiveMineViewModel.requestsPOSTAuthInfo(identityId: "\(_listModel.id)", infos: self.dataArray) { [self] result, respStatue in |
| 137 | if respStatue == .success { | 139 | if respStatue == .success { |
| 138 | showMessage(message: "上传成功") | 140 | showMessage(message: "上传成功") |
| 141 | + sendButton.stopAnimating() | ||
| 139 | DispatchQueue.main.asyncAfter(deadline: .now()+1) { [self] in | 142 | DispatchQueue.main.asyncAfter(deadline: .now()+1) { [self] in |
| 140 | self.navigationController?.pushViewController(CNLiveMineAuthResultViewController.init(listModel: _listModel,show_type: .result_success), animated: true) | 143 | self.navigationController?.pushViewController(CNLiveMineAuthResultViewController.init(listModel: _listModel,show_type: .result_success), animated: true) |
| 141 | } | 144 | } |
metaCode/Classes/Main/MinePage/Controller/CNLiveMineViewController.swift
| @@ -68,7 +68,10 @@ class CNLiveMineViewController : CNLiveBaseViewController, UITableViewDelegate, | @@ -68,7 +68,10 @@ class CNLiveMineViewController : CNLiveBaseViewController, UITableViewDelegate, | ||
| 68 | tableView.snp.makeConstraints { make in | 68 | tableView.snp.makeConstraints { make in |
| 69 | make.edges.equalToSuperview() | 69 | make.edges.equalToSuperview() |
| 70 | } | 70 | } |
| 71 | + | ||
| 72 | + NotificationCenter.default.addObserver(self, selector: #selector(StandAuthNotificationSuccessAction), name: Notification.Name.StandAuth.StandAuthNotificationSuccess, object: nil) | ||
| 71 | } | 73 | } |
| 74 | + | ||
| 72 | 75 | ||
| 73 | public func loadDataWithPoint() { | 76 | public func loadDataWithPoint() { |
| 74 | CNLiveMineViewModel.requestWithCheckIn { [weak self] result, respStatue in | 77 | CNLiveMineViewModel.requestWithCheckIn { [weak self] result, respStatue in |
| @@ -90,8 +93,13 @@ class CNLiveMineViewController : CNLiveBaseViewController, UITableViewDelegate, | @@ -90,8 +93,13 @@ class CNLiveMineViewController : CNLiveBaseViewController, UITableViewDelegate, | ||
| 90 | return .lightContent | 93 | return .lightContent |
| 91 | } | 94 | } |
| 92 | 95 | ||
| 96 | + | ||
| 97 | + @objc func StandAuthNotificationSuccessAction() { | ||
| 98 | + tableView.reloadData() | ||
| 99 | + } | ||
| 100 | + | ||
| 93 | deinit { | 101 | deinit { |
| 94 | - | 102 | + NotificationCenter.default.removeObserver(self, name: Notification.Name.StandAuth.StandAuthNotificationSuccess, object: nil) |
| 95 | } | 103 | } |
| 96 | } | 104 | } |
| 97 | 105 |
metaCode/Classes/Main/MinePage/View/CNLiveMineBodyListView.swift
| @@ -587,13 +587,15 @@ class MineBodyFourViewCell: UITableViewCell { | @@ -587,13 +587,15 @@ class MineBodyFourViewCell: UITableViewCell { | ||
| 587 | 587 | ||
| 588 | } | 588 | } |
| 589 | 589 | ||
| 590 | + var _listModel: MineTaskCheckListModel! | ||
| 590 | func setupWithData(listModel: MineTaskCheckListModel) { | 591 | func setupWithData(listModel: MineTaskCheckListModel) { |
| 592 | + _listModel = listModel | ||
| 591 | iconView.kf.indicatorType = .activity | 593 | iconView.kf.indicatorType = .activity |
| 592 | iconView.kf.setImage(with: URL(string: listModel.icon ?? "") , placeholder: UIImage.imageWithColor(color: HexColor("#f9f9f9")!, size: CGSizeMake(50, 50))) | 594 | iconView.kf.setImage(with: URL(string: listModel.icon ?? "") , placeholder: UIImage.imageWithColor(color: HexColor("#f9f9f9")!, size: CGSizeMake(50, 50))) |
| 593 | nameLabel.text = listModel.title ?? "" | 595 | nameLabel.text = listModel.title ?? "" |
| 594 | descLabel.text = "积分值+\(listModel.score ?? "")" | 596 | descLabel.text = "积分值+\(listModel.score ?? "")" |
| 595 | - if listModel.taskId!.contains("check_in") { | ||
| 596 | - if listModel.status!.contains("false") { | 597 | + if _listModel.taskId!.contains("check_in") { |
| 598 | + if _listModel.status!.contains("true") { | ||
| 597 | shareBtn.setTitle("去签到", for: .normal) | 599 | shareBtn.setTitle("去签到", for: .normal) |
| 598 | }else{ | 600 | }else{ |
| 599 | shareBtn.titleEdgeInsets = UIEdgeInsets.zero | 601 | shareBtn.titleEdgeInsets = UIEdgeInsets.zero |
| @@ -617,6 +619,7 @@ class MineBodyFourViewCell: UITableViewCell { | @@ -617,6 +619,7 @@ class MineBodyFourViewCell: UITableViewCell { | ||
| 617 | CNLiveMineViewModel.requestWithCheckInAction { [self] result, respStatue in | 619 | CNLiveMineViewModel.requestWithCheckInAction { [self] result, respStatue in |
| 618 | sender.stopAnimating() | 620 | sender.stopAnimating() |
| 619 | showMessage(message: "签到成功") | 621 | showMessage(message: "签到成功") |
| 622 | + _listModel.status = "false" | ||
| 620 | shareBtn.titleEdgeInsets = UIEdgeInsets.zero | 623 | shareBtn.titleEdgeInsets = UIEdgeInsets.zero |
| 621 | shareBtn.imageEdgeInsets = UIEdgeInsets.zero | 624 | shareBtn.imageEdgeInsets = UIEdgeInsets.zero |
| 622 | shareBtn.setTitleColor(HexColor("#999999"), for: .normal) | 625 | shareBtn.setTitleColor(HexColor("#999999"), for: .normal) |
metaCode/Classes/Main/MinePage/ViewModel/CNLiveMineViewModel.swift
| @@ -557,7 +557,6 @@ class CNLiveMineViewModel: NSObject { | @@ -557,7 +557,6 @@ class CNLiveMineViewModel: NSObject { | ||
| 557 | timeCount = timeCount - 1 | 557 | timeCount = timeCount - 1 |
| 558 | // 时间到了取消时间源 | 558 | // 时间到了取消时间源 |
| 559 | if timeCount <= 0 { | 559 | if timeCount <= 0 { |
| 560 | - | ||
| 561 | codeTimer.cancel() | 560 | codeTimer.cancel() |
| 562 | // 返回主线程处理一些事件,更新UI等等 | 561 | // 返回主线程处理一些事件,更新UI等等 |
| 563 | DispatchQueue.main.async { | 562 | DispatchQueue.main.async { |
| @@ -673,8 +672,10 @@ class CNLiveMineViewModel: NSObject { | @@ -673,8 +672,10 @@ class CNLiveMineViewModel: NSObject { | ||
| 673 | let param = NSMutableDictionary() | 672 | let param = NSMutableDictionary() |
| 674 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "targetId") | 673 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "targetId") |
| 675 | param.setValue("0", forKey: "type")//0全部(默认) 1收入 2支出 | 674 | param.setValue("0", forKey: "type")//0全部(默认) 1收入 2支出 |
| 676 | - param.setValue("\((timeStamp * 1000) - 30*24*60*60)", forKey: "startTime")//"1600569015000" | ||
| 677 | - param.setValue("\((timeStamp * 1000))", forKey: "endTime")//"1603074615000" | 675 | +// param.setValue("\((timeStamp * 1000) - 30*24*60*60)", forKey: "startTime")//"1600569015000" |
| 676 | +// param.setValue("\((timeStamp * 1000))", forKey: "endTime")//"1603074615000" | ||
| 677 | + param.setValue("1600569015000", forKey: "startTime") | ||
| 678 | + param.setValue("1603074615000", forKey: "endTime") | ||
| 678 | param.setValue("10", forKey: "pageSize") | 679 | param.setValue("10", forKey: "pageSize") |
| 679 | param.setValue("\(page)", forKey: "pageNo") | 680 | param.setValue("\(page)", forKey: "pageNo") |
| 680 | let custom_param = NSMutableDictionary() | 681 | let custom_param = NSMutableDictionary() |
metaCode/Info.plist
| @@ -2,11 +2,13 @@ | @@ -2,11 +2,13 @@ | ||
| 2 | <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | 2 | <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
| 3 | <plist version="1.0"> | 3 | <plist version="1.0"> |
| 4 | <dict> | 4 | <dict> |
| 5 | + <key>CFBundleDevelopmentRegion</key> | ||
| 6 | + <string>zh_CN</string> | ||
| 5 | <key>CFBundleAllowMixedLocalizations</key> | 7 | <key>CFBundleAllowMixedLocalizations</key> |
| 6 | <true/> | 8 | <true/> |
| 7 | <key>CFBundleLocalizations</key> | 9 | <key>CFBundleLocalizations</key> |
| 8 | <array> | 10 | <array> |
| 9 | - <string>zh</string> | 11 | + <string>zh_CN</string> |
| 10 | </array> | 12 | </array> |
| 11 | <key>NSAppTransportSecurity</key> | 13 | <key>NSAppTransportSecurity</key> |
| 12 | <dict> | 14 | <dict> |