Commit b0921318395e81bd7da380f4e26d5e04f13cf658
1 parent
b5ba5d04
跳转实名认证
Showing
11 changed files
with
68 additions
and
19 deletions
metaCode/Classes/Config/CNLiveConfigUserInfo.swift
metaCode/Classes/Main/HomePage/Controller/AuthMainController/CNMetaCodeHomePageController.swift
| ... | ... | @@ -522,6 +522,11 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel |
| 522 | 522 | |
| 523 | 523 | let identityModel = dataArray[toIndex] as! StandListModel |
| 524 | 524 | if let toBannerView = self.pageFlowView.cells[toIndex] as? CNCustomIndexView{ |
| 525 | + | |
| 526 | + let userInfo = UserInfoManager.shared.userInfo | |
| 527 | + userInfo.currentChannelId = String(format: "%d", toBannerView.idModel?.id ?? 0) | |
| 528 | + UserInfoManager.cacheUserInfo(userInfo: userInfo) | |
| 529 | + | |
| 525 | 530 | self.pageFlowView.scrollView.bringSubviewToFront(toBannerView) |
| 526 | 531 | UIView.animate(withDuration: 0.2) { |
| 527 | 532 | toBannerView.downSlideView.frame = CGRectMake(-LeftGap, 0, KSreenWidth, KSreenHeight) |
| ... | ... | @@ -730,6 +735,11 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel |
| 730 | 735 | func getAuthenticationsApi(channelId:String , listModel:StandListModel) |
| 731 | 736 | { |
| 732 | 737 | showLoading(message: "") |
| 738 | + | |
| 739 | + let userInfo = UserInfoManager.shared.userInfo | |
| 740 | + userInfo.currentChannelId = channelId | |
| 741 | + UserInfoManager.cacheUserInfo(userInfo: userInfo) | |
| 742 | + | |
| 733 | 743 | let vsid = UserInfoManager.shared.userInfo.currentUser?.vsid ?? "" |
| 734 | 744 | CNLiveMineViewModel.requestsIndustryInfo(channelId: channelId, sid: UserInfoManager.shared.userInfo.uid, vsid: vsid) { result, respStatue in |
| 735 | 745 | if respStatue == .success{//UserInfoManager.shared.userInfo.uid vsid "1342671" "2" | ... | ... |
metaCode/Classes/Main/HomePage/Controller/DigitalAuth/CNLiveDigitalRealManageController.swift
| ... | ... | @@ -185,7 +185,11 @@ class CNLiveDigitalRealManageController:CNLiveBaseViewController,UITableViewData |
| 185 | 185 | } |
| 186 | 186 | //新增实名 |
| 187 | 187 | @objc func addRealBtnAction(){ |
| 188 | - | |
| 188 | + let vc = CNLiveRealNameAuthController() | |
| 189 | + vc.channelId = UserInfoManager.shared.userInfo.currentChannelId | |
| 190 | + vc.vsid = UserInfoManager.shared.userInfo.currentUser?.vsid ?? "" | |
| 191 | + vc.sid = UserInfoManager.shared.userInfo.uid | |
| 192 | + currentViewController()?.navigationController?.pushViewController(vc, animated: true) | |
| 189 | 193 | } |
| 190 | 194 | |
| 191 | 195 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | ... | ... |
metaCode/Classes/Main/HomePage/View/VerticalViews/CNCustomIndexView.swift
| ... | ... | @@ -319,7 +319,7 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange |
| 319 | 319 | UserInfoManager.shared.userInfo.userMsgUsers?.verifyUsers.forEach({ userMdl in |
| 320 | 320 | infoArr.append(userMdl.name) |
| 321 | 321 | }) |
| 322 | - MineStandListAlertView.showStandListView(infos: infoArr as NSArray,name: "实名对象切换", show_type: .string) {text in | |
| 322 | + MineStandListAlertView.showStandListView(infos: infoArr as NSArray,name: "实名对象切换", show_type: .string, isAddPerson: true) {text in | |
| 323 | 323 | let seleText = text as? String |
| 324 | 324 | let tempArr = UserInfoManager.shared.userInfo.userMsgUsers?.verifyUsers |
| 325 | 325 | tempArr?.forEach({ userMdl in | ... | ... |
metaCode/Classes/Main/HomePage/View/VerticalViews/MainView/CNMainView.swift
metaCode/Classes/Main/MinePage/Controller/CNLiveMineInputViewController.swift
| ... | ... | @@ -359,7 +359,7 @@ extension CNLiveMineInputViewController { |
| 359 | 359 | let show_type: CNLiveStandListAlertShowType = infoModel.children.count > 0 ? .custom : .date |
| 360 | 360 | self.view.endEditing(true) |
| 361 | 361 | DispatchQueue.main.asyncAfter(deadline: .now()+0.5) { |
| 362 | - MineStandListAlertView.showStandListView(infos: infoModel.children as NSArray,name: "选择\(infoModel.name ?? "")", show_type: show_type) {[weak self] text in | |
| 362 | + MineStandListAlertView.showStandListView(infos: infoModel.children as NSArray,name: "选择\(infoModel.name ?? "")", show_type: show_type, isAddPerson: false) {[weak self] text in | |
| 363 | 363 | infoModel.value = text as? String |
| 364 | 364 | self?.tableView.reloadData() |
| 365 | 365 | // let is_result = self?.inspectResult() | ... | ... |
metaCode/Classes/Main/MinePage/View/CNLiveMineInfoAlertView.swift
| ... | ... | @@ -534,7 +534,7 @@ class UpdataAlertView: UIView { |
| 534 | 534 | ConfigManager.shared.show_update = false |
| 535 | 535 | showMessage(message: "跳转到AppStore") |
| 536 | 536 | } |
| 537 | - | |
| 537 | + | |
| 538 | 538 | @objc func setupCloseButtonAction() -> Void { |
| 539 | 539 | ConfigManager.shared.show_update = false |
| 540 | 540 | removeFromSuperview() |
| ... | ... | @@ -554,11 +554,11 @@ class MineStandListAlertView: UIView, UIPickerViewDelegate, UIPickerViewDataSour |
| 554 | 554 | |
| 555 | 555 | lazy var tapGesture = UITapGestureRecognizer() |
| 556 | 556 | lazy var grayMaskView: UIView = { |
| 557 | - let grayMaskView = UIView() | |
| 558 | - tapGesture.addTarget(self, action: #selector(setupCloseButtonAction)) | |
| 559 | - grayMaskView.backgroundColor = UIColor.black.withAlphaComponent(0.2) | |
| 560 | - grayMaskView.addGestureRecognizer(tapGesture) | |
| 561 | - return grayMaskView | |
| 557 | + let grayMaskView = UIView() | |
| 558 | + tapGesture.addTarget(self, action: #selector(setupCloseButtonAction)) | |
| 559 | + grayMaskView.backgroundColor = UIColor.black.withAlphaComponent(0.2) | |
| 560 | + grayMaskView.addGestureRecognizer(tapGesture) | |
| 561 | + return grayMaskView | |
| 562 | 562 | }() |
| 563 | 563 | |
| 564 | 564 | lazy var backView: UIView = { |
| ... | ... | @@ -567,7 +567,21 @@ class MineStandListAlertView: UIView, UIPickerViewDelegate, UIPickerViewDataSour |
| 567 | 567 | backView.layer.cornerRadius = 12 |
| 568 | 568 | return backView |
| 569 | 569 | }() |
| 570 | + lazy var addRealPersonButton: UIButton = { | |
| 571 | + let updataButton = UIButton(type: .custom) | |
| 572 | + updataButton.setTitle("新增实名", for: .normal) | |
| 573 | + updataButton.setTitleColor(.white, for: .normal) | |
| 574 | + updataButton.titleLabel?.font = Font_13 | |
| 575 | + updataButton.layer.cornerRadius = 15 | |
| 576 | + updataButton.layer.masksToBounds = true | |
| 577 | + updataButton.layer.borderWidth = 1 | |
| 578 | + updataButton.layer.borderColor = HexColor("#FFFFFF")?.cgColor | |
| 579 | + updataButton.backgroundColor = .clear | |
| 580 | + updataButton.addTarget(self, action: #selector(addRealPersonActionMothod), for: .touchUpInside) | |
| 581 | + return updataButton | |
| 582 | + }() | |
| 570 | 583 | |
| 584 | + | |
| 571 | 585 | lazy var pickerView: UIPickerView = { |
| 572 | 586 | let pickerView = UIPickerView.init() |
| 573 | 587 | pickerView.backgroundColor = .white |
| ... | ... | @@ -637,14 +651,15 @@ class MineStandListAlertView: UIView, UIPickerViewDelegate, UIPickerViewDataSour |
| 637 | 651 | closeButton.addTarget(self, action: #selector(setupCloseButtonAction), for: .touchUpInside) |
| 638 | 652 | return closeButton |
| 639 | 653 | }() |
| 640 | - | |
| 654 | + | |
| 655 | + var _isAddPerson: Bool = false | |
| 641 | 656 | var text: Any? |
| 642 | 657 | var _infos: NSArray? |
| 643 | 658 | var _show_type: CNLiveStandListAlertShowType? |
| 644 | 659 | var result: CloseGenderResultBlock? |
| 645 | - init(frame: CGRect, infos: NSArray, show_type: CNLiveStandListAlertShowType) { | |
| 660 | + init(frame: CGRect, infos: NSArray, show_type: CNLiveStandListAlertShowType,isAddPerson:Bool) { | |
| 646 | 661 | super.init(frame: frame) |
| 647 | - | |
| 662 | + _isAddPerson = isAddPerson | |
| 648 | 663 | _infos = infos |
| 649 | 664 | _show_type = show_type//56842.5+7840.34 |
| 650 | 665 | if _show_type == .custom { |
| ... | ... | @@ -674,6 +689,7 @@ class MineStandListAlertView: UIView, UIPickerViewDelegate, UIPickerViewDataSour |
| 674 | 689 | |
| 675 | 690 | addSubview(grayMaskView) |
| 676 | 691 | addSubview(backView) |
| 692 | + addSubview(addRealPersonButton) | |
| 677 | 693 | backView.addSubview(pickerView) |
| 678 | 694 | backView.addSubview(datePicker) |
| 679 | 695 | backView.addSubview(nameLable) |
| ... | ... | @@ -692,6 +708,13 @@ class MineStandListAlertView: UIView, UIPickerViewDelegate, UIPickerViewDataSour |
| 692 | 708 | make.left.right.equalToSuperview() |
| 693 | 709 | make.height.equalTo(250) |
| 694 | 710 | } |
| 711 | + addRealPersonButton.snp.makeConstraints { make in | |
| 712 | + make.centerX.equalToSuperview() | |
| 713 | + make.bottom.equalTo(backView.snp.top).offset(-40) | |
| 714 | + make.width.equalTo(105) | |
| 715 | + make.height.equalTo(30) | |
| 716 | + } | |
| 717 | + | |
| 695 | 718 | doneButton.snp.makeConstraints { make in |
| 696 | 719 | make.right.equalToSuperview() |
| 697 | 720 | make.top.equalTo(10) |
| ... | ... | @@ -725,8 +748,8 @@ class MineStandListAlertView: UIView, UIPickerViewDelegate, UIPickerViewDataSour |
| 725 | 748 | } |
| 726 | 749 | } |
| 727 | 750 | |
| 728 | - static public func showStandListView(infos: NSArray, name: String, show_type: CNLiveStandListAlertShowType, result: @escaping CloseGenderResultBlock) { | |
| 729 | - let pickerView = MineStandListAlertView.init(frame: .zero, infos: infos, show_type: show_type) | |
| 751 | + static public func showStandListView(infos: NSArray, name: String, show_type: CNLiveStandListAlertShowType,isAddPerson: Bool, result: @escaping CloseGenderResultBlock) { | |
| 752 | + let pickerView = MineStandListAlertView.init(frame: .zero, infos: infos, show_type: show_type, isAddPerson: isAddPerson) | |
| 730 | 753 | pickerView.result = result |
| 731 | 754 | pickerView.nameLable.text = name |
| 732 | 755 | let delegate = UIApplication.shared.delegate as! AppDelegate |
| ... | ... | @@ -790,6 +813,16 @@ class MineStandListAlertView: UIView, UIPickerViewDelegate, UIPickerViewDataSour |
| 790 | 813 | fatalError("init(coder:) has not been implemented") |
| 791 | 814 | } |
| 792 | 815 | |
| 816 | + @objc func addRealPersonActionMothod() -> Void { | |
| 817 | + print("新增实名") | |
| 818 | + self.setupCloseButtonAction() | |
| 819 | + let vc = CNLiveRealNameAuthController() | |
| 820 | + vc.channelId = UserInfoManager.shared.userInfo.currentChannelId | |
| 821 | + vc.vsid = UserInfoManager.shared.userInfo.currentUser?.vsid ?? "" | |
| 822 | + vc.sid = UserInfoManager.shared.userInfo.uid | |
| 823 | + currentViewController()?.navigationController?.pushViewController(vc, animated: true) | |
| 824 | + } | |
| 825 | + | |
| 793 | 826 | @objc func setupCloseButtonAction() -> Void { |
| 794 | 827 | removeFromSuperview() |
| 795 | 828 | } | ... | ... |
metaCode/Classes/Main/MinePage/View/CNLiveMineInputMessageView.swift
| ... | ... | @@ -362,7 +362,7 @@ class MineInputTextShopCustomView: UIView, UITextViewDelegate, UITextFieldDelega |
| 362 | 362 | } |
| 363 | 363 | contentTextField.resignFirstResponder() |
| 364 | 364 | contentTextView.resignFirstResponder() |
| 365 | - MineStandListAlertView.showStandListView(infos: dataArray, name:String(title[index...]), show_type:dataArray.count == 0 ? .date : .text, result: { [self] text in | |
| 365 | + MineStandListAlertView.showStandListView(infos: dataArray, name:String(title[index...]), show_type:dataArray.count == 0 ? .date : .text, isAddPerson: false, result: { [self] text in | |
| 366 | 366 | if dataArray.count == 0 { |
| 367 | 367 | _dict.setObject((text as! NSString).timeStrChangeTotimeInterval("yyyy-MM-dd"), forKey: "content" as NSCopying) |
| 368 | 368 | moreBtn.setTitle(text as? String, for: .normal) | ... | ... |
metaCode/Classes/Main/ShopPage/Controller/CNLiveShopOrderExpressViewController.swift
| ... | ... | @@ -225,14 +225,14 @@ extension CNLiveShopOrderExpressViewController { |
| 225 | 225 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { |
| 226 | 226 | if !hiddenShop && indexPath.row == 0 { |
| 227 | 227 | if dataArray.count > 0 { |
| 228 | - MineStandListAlertView.showStandListView(infos: textArray, name: "请选择店铺", show_type: .string) { [weak self] text in | |
| 228 | + MineStandListAlertView.showStandListView(infos: textArray, name: "请选择店铺", show_type: .string, isAddPerson: false) { [weak self] text in | |
| 229 | 229 | let index = self!.textArray.index(of: text) |
| 230 | 230 | self!.selectStoreModel = (self!.dataArray[index] as! ShopOrderStoreModel) |
| 231 | 231 | self!.tableView.reloadData() |
| 232 | 232 | } |
| 233 | 233 | } else { |
| 234 | 234 | loadDataSourceAction { [weak self] in |
| 235 | - MineStandListAlertView.showStandListView(infos: self!.textArray, name: "请选择店铺", show_type: .string) { text in | |
| 235 | + MineStandListAlertView.showStandListView(infos: self!.textArray, name: "请选择店铺", show_type: .string, isAddPerson: false) { text in | |
| 236 | 236 | let index = self!.textArray.index(of: text) |
| 237 | 237 | self!.selectStoreModel = (self!.dataArray[index] as! ShopOrderStoreModel) |
| 238 | 238 | self!.tableView.reloadData() | ... | ... |
metaCode/Classes/Main/ShopPage/Controller/CNLiveShopTransListViewController.swift
| ... | ... | @@ -44,7 +44,7 @@ class CNLiveShopTransListViewController: CNLiveBaseViewController, UITableViewDe |
| 44 | 44 | lazy var headerView: ShopBodyTransListHeaderView = { |
| 45 | 45 | let headerView = ShopBodyTransListHeaderView.init(frame: CGRect.zero) |
| 46 | 46 | headerView.clickBlcok = { [self] headerView in |
| 47 | - MineStandListAlertView.showStandListView(infos: [currentDate!,"YYYY年MM月"], name:"选择月份", show_type:.max_date, result: { [self] text in | |
| 47 | + MineStandListAlertView.showStandListView(infos: [currentDate!,"YYYY年MM月"], name:"选择月份", show_type:.max_date, isAddPerson: false, result: { [self] text in | |
| 48 | 48 | currentDate = (text as! NSString).timeStrChangeTotimedate("YYYY-MM-dd") |
| 49 | 49 | current_string = (text as! String) |
| 50 | 50 | let array = (text as! NSString).components(separatedBy: "-") as NSArray | ... | ... |
metaCode/Classes/Main/ShopPage/View/CNLiveShopBodyCouponView.swift
| ... | ... | @@ -243,7 +243,7 @@ class ShopBodyCouponCreateTableViewCell: UITableViewCell, UITextFieldDelegate { |
| 243 | 243 | showMessage(message: "该项不可编辑") |
| 244 | 244 | return |
| 245 | 245 | } |
| 246 | - MineStandListAlertView.showStandListView(infos: [currentDate!,"YYYY-MM-dd"], name:_couponModel.subTitle!, show_type:.min_date, result: { [self] text in | |
| 246 | + MineStandListAlertView.showStandListView(infos: [currentDate!,"YYYY-MM-dd"], name:_couponModel.subTitle!, show_type:.min_date, isAddPerson: false, result: { [self] text in | |
| 247 | 247 | currentDate = (text as! NSString).timeStrChangeTotimedate("YYYY-MM-dd") |
| 248 | 248 | titleNumber.text = (text as! String) |
| 249 | 249 | if (dateSelectCallBack != nil) { | ... | ... |