RealNameDetailViewController.swift 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. //
  2. // RealNameDetailViewController.swift
  3. // xingchuangke
  4. //
  5. // Created by Virgil on 2019/4/16.
  6. // Copyright © 2019 Virgil. All rights reserved.
  7. //
  8. import UIKit
  9. class RealNameDetailViewController: BaseViewController {
  10. @IBOutlet weak var lblBank: UILabel!
  11. @IBOutlet weak var lblAccount: UILabel!
  12. @IBOutlet weak var lblCard: UILabel!
  13. @IBOutlet weak var lblName: UILabel!
  14. @IBOutlet weak var btnMod: UIButton!
  15. override func viewDidLoad() {
  16. super.viewDidLoad()
  17. initNavLeftBackButton()
  18. self.title = "实名认证"
  19. btnMod.setLayer(borderWidth: 1, color: 0xff4e4e)
  20. btnMod.setCornerRadius(size: 3)
  21. setContent()
  22. }
  23. @IBAction func btnMenuClick(_ sender: AnyObject) {
  24. switch (sender as! UIButton).tag {
  25. case 1001: //修改
  26. let vc = ModBankCardViewController()
  27. if dicData["cardInfo"] as? NSDictionary != nil {
  28. vc.dicData.setDictionary((dicData["cardInfo"] as! NSDictionary) as! [AnyHashable: Any])
  29. }
  30. //vc.initData();
  31. toViewController(viewController: vc)
  32. break
  33. case 1002: //
  34. break
  35. case 1003: //
  36. break
  37. case 1004: //
  38. break
  39. case 1005: //
  40. break
  41. case 1006: //
  42. break
  43. default:
  44. break
  45. }
  46. }
  47. // MARK: =============加载数据===============
  48. func loadData() {
  49. let url = RequestURL.mySettlementCard
  50. let params = NSMutableDictionary()
  51. loadDataInfo(url: url, params: params, tag: 1001)
  52. }
  53. override func returnData(tag: Int) {
  54. if tag == 1001 {
  55. setContent()
  56. }
  57. }
  58. override func returnError(tag: Int, type: String) {
  59. }
  60. func setContent() {
  61. lblName.text = CommonValue.getUserRealName()
  62. lblCard.text = CommonValue.getUserCardNo()
  63. if dicData["cardInfo"] as? NSDictionary != nil {
  64. let dic = dicData["cardInfo"] as! NSDictionary
  65. lblAccount.text = dic.getString(key: "card_number")
  66. lblBank.text = dic.getString(key: "affiliated_bank")
  67. }
  68. }
  69. override func viewWillAppear(_ animated: Bool) {
  70. super.viewWillAppear(animated)
  71. loadData()
  72. }
  73. override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
  74. super.init(nibName: "RealNameDetailViewController", bundle: nil)
  75. }
  76. required init?(coder aDecoder: NSCoder) {
  77. fatalError("init(coder:) has not been implemented")
  78. }
  79. }