Commit 7fc20f0c0651c42e05e514987540aac0d959b85e
1 parent
dc957507
提交修改
Showing
7 changed files
with
105 additions
and
7 deletions
metaCode/Classes/Main/MinePage/Controller/CNLiveInfoShowViewController.swift
| @@ -67,7 +67,7 @@ class CNLiveInfoShowViewController: CNLiveBaseViewController, WKNavigationDelega | @@ -67,7 +67,7 @@ class CNLiveInfoShowViewController: CNLiveBaseViewController, WKNavigationDelega | ||
| 67 | attrString = "https://wjjh5.cnlive.com/yuanmaYszc.html" | 67 | attrString = "https://wjjh5.cnlive.com/yuanmaYszc.html" |
| 68 | case .safety: | 68 | case .safety: |
| 69 | titleName = "内容安全协议" | 69 | titleName = "内容安全协议" |
| 70 | - attrString = "https://wjj.ys1.cnliveimg.com/term/cnBNraqxy.html " | 70 | + attrString = "https://wjj.ys1.cnliveimg.com/term/cnBNraqxy.html" |
| 71 | case .none: | 71 | case .none: |
| 72 | break | 72 | break |
| 73 | } | 73 | } |
metaCode/Classes/Main/MinePage/Controller/CNLiveMineAddInfoViewController.swift
| @@ -326,7 +326,10 @@ extension CNLiveMineAddInfoViewController { | @@ -326,7 +326,10 @@ extension CNLiveMineAddInfoViewController { | ||
| 326 | if listModel.id == 9 { | 326 | if listModel.id == 9 { |
| 327 | CNLiveMineViewModel.requestApplyShopInfo { [weak self] result, respStatue in | 327 | CNLiveMineViewModel.requestApplyShopInfo { [weak self] result, respStatue in |
| 328 | if respStatue == .success { | 328 | if respStatue == .success { |
| 329 | - self?.navigationController?.pushViewController(CNLiveMineShopViewController.init(showType: .one, listModel: listModel, tempArray: []), animated: true) | 329 | + let model = result as! MineApplyShopInfoModel |
| 330 | + if model.state == "0" || model.state == "4" { | ||
| 331 | + self?.navigationController?.pushViewController(CNLiveMineShopViewController.init(showType: .one, listModel: listModel, tempArray: []), animated: true) | ||
| 332 | + } | ||
| 330 | } | 333 | } |
| 331 | } | 334 | } |
| 332 | } else { | 335 | } else { |
metaCode/Classes/Main/MinePage/Controller/CNLiveMineShopViewController.swift
| @@ -328,6 +328,8 @@ class CNLiveMineShopViewController : CNLiveBaseViewController, UITextViewDelegat | @@ -328,6 +328,8 @@ class CNLiveMineShopViewController : CNLiveBaseViewController, UITextViewDelegat | ||
| 328 | } | 328 | } |
| 329 | var image_one: UIImage! | 329 | var image_one: UIImage! |
| 330 | var image_two: UIImage! | 330 | var image_two: UIImage! |
| 331 | + var is_have_image_one: Bool! = false | ||
| 332 | + var is_have_image_two: Bool! = false | ||
| 331 | var temp_dict_one: NSMutableDictionary! | 333 | var temp_dict_one: NSMutableDictionary! |
| 332 | var temp_dict_two: NSMutableDictionary! | 334 | var temp_dict_two: NSMutableDictionary! |
| 333 | for dict in threeArray { | 335 | for dict in threeArray { |
| @@ -350,6 +352,17 @@ class CNLiveMineShopViewController : CNLiveBaseViewController, UITextViewDelegat | @@ -350,6 +352,17 @@ class CNLiveMineShopViewController : CNLiveBaseViewController, UITextViewDelegat | ||
| 350 | image_two = content as? UIImage | 352 | image_two = content as? UIImage |
| 351 | temp_dict_two = dict as? NSMutableDictionary | 353 | temp_dict_two = dict as? NSMutableDictionary |
| 352 | } | 354 | } |
| 355 | + if title as! String == "*店铺LOGO" && content is NSString && (content as! NSString).isNotBlank() { | ||
| 356 | + is_have_image_one = true | ||
| 357 | + } | ||
| 358 | + if title as! String == "特殊资质" && content is NSString && (content as! NSString).isNotBlank() { | ||
| 359 | + is_have_image_two = true | ||
| 360 | + } | ||
| 361 | + } | ||
| 362 | + if is_have_image_one || is_have_image_two { | ||
| 363 | + temp_array.addObjects(from: threeArray as! [Any]) | ||
| 364 | + uploadWithMessage() | ||
| 365 | + return | ||
| 353 | } | 366 | } |
| 354 | UploadManager.uploadImage(imageData: image_one.jpegData(compressionQuality: 1.0)! as NSData, progressBlock: {key, progress in }, successBlock: { [self] key,url in | 367 | UploadManager.uploadImage(imageData: image_one.jpegData(compressionQuality: 1.0)! as NSData, progressBlock: {key, progress in }, successBlock: { [self] key,url in |
| 355 | temp_dict_one.removeObject(forKey: "content") | 368 | temp_dict_one.removeObject(forKey: "content") |
| @@ -394,6 +407,8 @@ class CNLiveMineShopViewController : CNLiveBaseViewController, UITextViewDelegat | @@ -394,6 +407,8 @@ class CNLiveMineShopViewController : CNLiveBaseViewController, UITextViewDelegat | ||
| 394 | DispatchQueue.main.asyncAfter(deadline: .now()+1) { [self] in | 407 | DispatchQueue.main.asyncAfter(deadline: .now()+1) { [self] in |
| 395 | self.navigationController?.pushViewController(CNLiveMineAuthResultViewController.init(StandListModel.init(), show_type: .detail_shop), animated: true) | 408 | self.navigationController?.pushViewController(CNLiveMineAuthResultViewController.init(StandListModel.init(), show_type: .detail_shop), animated: true) |
| 396 | } | 409 | } |
| 410 | + } else { | ||
| 411 | + self.navigationController | ||
| 397 | } | 412 | } |
| 398 | }) | 413 | }) |
| 399 | } | 414 | } |
metaCode/Classes/Main/MinePage/Controller/CNLiveMineViewController.swift
| @@ -44,6 +44,8 @@ class CNLiveMineViewController : CNLiveBaseViewController, UITableViewDelegate, | @@ -44,6 +44,8 @@ class CNLiveMineViewController : CNLiveBaseViewController, UITableViewDelegate, | ||
| 44 | let array03 : [Dictionary] = [["name":"帮助与反馈","icon":"mine_list_icon_help_feedback"], | 44 | let array03 : [Dictionary] = [["name":"帮助与反馈","icon":"mine_list_icon_help_feedback"], |
| 45 | ["name":"更多设置","icon":"mine_list_icon_set_more"]] | 45 | ["name":"更多设置","icon":"mine_list_icon_set_more"]] |
| 46 | dataArray.add(array03) | 46 | dataArray.add(array03) |
| 47 | + let array04 : [Dictionary] = [["name":"订单列表","icon":"mine_list_icon_help_feedback"]] | ||
| 48 | + dataArray.add(array04) | ||
| 47 | return dataArray | 49 | return dataArray |
| 48 | }() | 50 | }() |
| 49 | 51 | ||
| @@ -166,6 +168,10 @@ extension CNLiveMineViewController { | @@ -166,6 +168,10 @@ extension CNLiveMineViewController { | ||
| 166 | self.navigationController?.pushViewController(CNLiveTypeFeedBackViewController.init(show_type: .setting), animated: true) | 168 | self.navigationController?.pushViewController(CNLiveTypeFeedBackViewController.init(show_type: .setting), animated: true) |
| 167 | } | 169 | } |
| 168 | 170 | ||
| 171 | + if indexPath.section == 4 { | ||
| 172 | + self.navigationController?.pushViewController(CNLiveShopOrderViewController.init(), animated: true) | ||
| 173 | + } | ||
| 174 | + | ||
| 169 | } | 175 | } |
| 170 | 176 | ||
| 171 | func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { | 177 | func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { |
metaCode/Classes/Main/MinePage/View/CNLiveMineInputMessageView.swift
| @@ -56,7 +56,7 @@ class MineInputTextShopCustomView: UIView, UITextViewDelegate, UITextFieldDelega | @@ -56,7 +56,7 @@ class MineInputTextShopCustomView: UIView, UITextViewDelegate, UITextFieldDelega | ||
| 56 | 56 | ||
| 57 | lazy var moreBtn: UIButton = { | 57 | lazy var moreBtn: UIButton = { |
| 58 | let moreBtn = UIButton(type: .custom) | 58 | let moreBtn = UIButton(type: .custom) |
| 59 | - moreBtn.frame = CGRect(x: 0, y: 0, width: 70, height: 30) | 59 | + moreBtn.frame = CGRect(x: 0, y: 0, width: adapt_length(length: 70), height: adapt_length(length: 30)) |
| 60 | moreBtn.setTitleColor(HexColor("#B4B4B4"), for: .normal) | 60 | moreBtn.setTitleColor(HexColor("#B4B4B4"), for: .normal) |
| 61 | moreBtn.titleLabel?.font = BoldFont_16_Fit | 61 | moreBtn.titleLabel?.font = BoldFont_16_Fit |
| 62 | moreBtn.isHidden = true | 62 | moreBtn.isHidden = true |
metaCode/Classes/Main/ShopPage/Controller/CNLiveShopOrderExpressListViewController.swift
| @@ -41,7 +41,7 @@ class CNLiveShopOrderExpressListViewController: CNLiveBaseViewController, UITabl | @@ -41,7 +41,7 @@ class CNLiveShopOrderExpressListViewController: CNLiveBaseViewController, UITabl | ||
| 41 | navigationBarHidden = false | 41 | navigationBarHidden = false |
| 42 | titleName = "物流详情" | 42 | titleName = "物流详情" |
| 43 | 43 | ||
| 44 | -// loadDataSourceAction() | 44 | + loadDataSourceAction() |
| 45 | 45 | ||
| 46 | view.addSubview(tableView) | 46 | view.addSubview(tableView) |
| 47 | tableView.snp.makeConstraints { make in | 47 | tableView.snp.makeConstraints { make in |
metaCode/Classes/Main/ShopPage/View/CNLiveShopBodyExpressView.swift
| @@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
| 7 | 7 | ||
| 8 | import Foundation | 8 | import Foundation |
| 9 | 9 | ||
| 10 | -class ShopBodyOrderExpressListTableViewCell: UITableViewCell { | 10 | +class ShopBodyOrderExpressListTableViewCell: UITableViewCell, UICollectionViewDataSource, UICollectionViewDelegate{ |
| 11 | 11 | ||
| 12 | lazy var logoImageView: UIImageView = { | 12 | lazy var logoImageView: UIImageView = { |
| 13 | let logoImageView = UIImageView.init() | 13 | let logoImageView = UIImageView.init() |
| @@ -58,10 +58,24 @@ class ShopBodyOrderExpressListTableViewCell: UITableViewCell { | @@ -58,10 +58,24 @@ class ShopBodyOrderExpressListTableViewCell: UITableViewCell { | ||
| 58 | return expressAddress | 58 | return expressAddress |
| 59 | }() | 59 | }() |
| 60 | 60 | ||
| 61 | + let kShopBodyOrderExpressListCollectionViewCellIdentifier = "kShopBodyOrderExpressListCollectionViewCellIdentifier" | ||
| 62 | + lazy var collectionView: UICollectionView = { | ||
| 63 | + let layout = UICollectionViewFlowLayout.init() | ||
| 64 | + layout.itemSize = CGSizeMake(adapt_length(length: 65), adapt_length(length: 65)) | ||
| 65 | + layout.minimumLineSpacing = adapt_length(length: 5) | ||
| 66 | + layout.scrollDirection = .horizontal | ||
| 67 | + let collectionView = UICollectionView.init(frame: CGRect.zero, collectionViewLayout: layout) | ||
| 68 | + collectionView.dataSource = self | ||
| 69 | + collectionView.delegate = self | ||
| 70 | + collectionView.backgroundColor = .white | ||
| 71 | + collectionView.register(ShopBodyOrderExpressListCollectionViewCell.self, forCellWithReuseIdentifier: kShopBodyOrderExpressListCollectionViewCellIdentifier) | ||
| 72 | + return collectionView | ||
| 73 | + }() | ||
| 74 | + | ||
| 61 | lazy var totleExpress: UILabel = { | 75 | lazy var totleExpress: UILabel = { |
| 62 | let totleExpress = UILabel.init() | 76 | let totleExpress = UILabel.init() |
| 63 | totleExpress.textColor = HexColor("#9b9b9b") | 77 | totleExpress.textColor = HexColor("#9b9b9b") |
| 64 | - totleExpress.font = regular_font(pointSize: 12) | 78 | + totleExpress.font = regular_adapt_font(pointSize: 12) |
| 65 | return totleExpress | 79 | return totleExpress |
| 66 | }() | 80 | }() |
| 67 | 81 | ||
| @@ -104,6 +118,18 @@ class ShopBodyOrderExpressListTableViewCell: UITableViewCell { | @@ -104,6 +118,18 @@ class ShopBodyOrderExpressListTableViewCell: UITableViewCell { | ||
| 104 | make.left.equalTo(expressTime.snp.left) | 118 | make.left.equalTo(expressTime.snp.left) |
| 105 | make.right.equalToSuperview().offset(-adapt_length(length: 15)) | 119 | make.right.equalToSuperview().offset(-adapt_length(length: 15)) |
| 106 | } | 120 | } |
| 121 | + addSubview(collectionView) | ||
| 122 | + collectionView.snp.makeConstraints { make in | ||
| 123 | + make.top.equalTo(expressAddress.snp.bottom).offset(adapt_length(length: 15)) | ||
| 124 | + make.left.equalToSuperview().offset(adapt_length(length: 15)) | ||
| 125 | + make.right.equalToSuperview().offset(-adapt_length(length: 15)) | ||
| 126 | + make.height.equalTo(adapt_length(length: 65)) | ||
| 127 | + } | ||
| 128 | + addSubview(totleExpress) | ||
| 129 | + totleExpress.snp.makeConstraints { make in | ||
| 130 | + make.left.equalToSuperview().offset(adapt_length(length: 15)) | ||
| 131 | + make.bottom.equalToSuperview().offset(-adapt_length(length: 15)) | ||
| 132 | + } | ||
| 107 | } | 133 | } |
| 108 | 134 | ||
| 109 | 135 | ||
| @@ -113,7 +139,27 @@ class ShopBodyOrderExpressListTableViewCell: UITableViewCell { | @@ -113,7 +139,27 @@ class ShopBodyOrderExpressListTableViewCell: UITableViewCell { | ||
| 113 | 139 | ||
| 114 | } | 140 | } |
| 115 | 141 | ||
| 116 | - @objc func actionClick() { | 142 | + @objc func actionClick(sender: UIButton) { |
| 143 | + if !_listModel.express_num!.isNotBlank() { | ||
| 144 | + return | ||
| 145 | + } | ||
| 146 | + | ||
| 147 | + let pasteboard = UIPasteboard.general | ||
| 148 | + pasteboard.string = _listModel.express_num | ||
| 149 | + showMessage(message: "复制成功") | ||
| 150 | + } | ||
| 151 | + | ||
| 152 | + func numberOfSections(in collectionView: UICollectionView) -> Int { | ||
| 153 | + return 1 | ||
| 154 | + } | ||
| 155 | + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { | ||
| 156 | + return _listModel.detail_goods.count | ||
| 157 | + } | ||
| 158 | + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { | ||
| 159 | + return UICollectionViewCell.init() | ||
| 160 | + } | ||
| 161 | + | ||
| 162 | + func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { | ||
| 117 | 163 | ||
| 118 | } | 164 | } |
| 119 | 165 | ||
| @@ -121,5 +167,33 @@ class ShopBodyOrderExpressListTableViewCell: UITableViewCell { | @@ -121,5 +167,33 @@ class ShopBodyOrderExpressListTableViewCell: UITableViewCell { | ||
| 121 | fatalError("init(coder:) has not been implemented") | 167 | fatalError("init(coder:) has not been implemented") |
| 122 | } | 168 | } |
| 123 | 169 | ||
| 170 | +} | ||
| 171 | + | ||
| 172 | +class ShopBodyOrderExpressListCollectionViewCell: UICollectionViewCell { | ||
| 173 | + | ||
| 174 | + lazy var goodsImage: UIImageView = { | ||
| 175 | + let goodsImage = UIImageView.init() | ||
| 176 | + goodsImage.contentMode = .scaleAspectFill | ||
| 177 | + goodsImage.layer.cornerRadius = 6 | ||
| 178 | + return goodsImage | ||
| 179 | + }() | ||
| 180 | + | ||
| 181 | + lazy var expressNum: UILabel = { | ||
| 182 | + let expressNum = UILabel.init() | ||
| 183 | + expressNum.font = regular_adapt_font(pointSize: 9) | ||
| 184 | + expressNum.textColor = HexColor("#ffffff") | ||
| 185 | + expressNum.backgroundColor = HexColor("#000000") | ||
| 186 | + expressNum.textAlignment | ||
| 187 | + return expressNum | ||
| 188 | + }() | ||
| 124 | 189 | ||
| 190 | + override init(frame: CGRect) { | ||
| 191 | + super.init(frame: frame) | ||
| 192 | + contentView.backgroundColor = .white | ||
| 193 | + | ||
| 194 | + } | ||
| 195 | + | ||
| 196 | + required init?(coder: NSCoder) { | ||
| 197 | + fatalError("init(coder:) has not been implemented") | ||
| 198 | + } | ||
| 125 | } | 199 | } |