1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- //
- // RealNameDetailViewController.swift
- // xingchuangke
- //
- // Created by Virgil on 2019/4/16.
- // Copyright © 2019 Virgil. All rights reserved.
- //
- import UIKit
- class RealNameDetailViewController: BaseViewController {
- @IBOutlet weak var lblBank: UILabel!
- @IBOutlet weak var lblAccount: UILabel!
- @IBOutlet weak var lblCard: UILabel!
- @IBOutlet weak var lblName: UILabel!
- @IBOutlet weak var btnMod: UIButton!
- override func viewDidLoad() {
- super.viewDidLoad()
- initNavLeftBackButton()
- self.title = "实名认证"
- btnMod.setLayer(borderWidth: 1, color: 0xff4e4e)
- btnMod.setCornerRadius(size: 3)
- setContent()
- }
- @IBAction func btnMenuClick(_ sender: AnyObject) {
- switch (sender as! UIButton).tag {
- case 1001: //修改
- let vc = ModBankCardViewController()
- if dicData["cardInfo"] as? NSDictionary != nil {
- vc.dicData.setDictionary((dicData["cardInfo"] as! NSDictionary) as! [AnyHashable: Any])
- }
- //vc.initData();
- toViewController(viewController: vc)
- break
- case 1002: //
- break
- case 1003: //
- break
- case 1004: //
- break
- case 1005: //
- break
- case 1006: //
- break
- default:
- break
- }
- }
- // MARK: =============加载数据===============
- func loadData() {
- let url = RequestURL.mySettlementCard
- let params = NSMutableDictionary()
- loadDataInfo(url: url, params: params, tag: 1001)
- }
- override func returnData(tag: Int) {
- if tag == 1001 {
- setContent()
- }
- }
- override func returnError(tag: Int, type: String) {
- }
- func setContent() {
- lblName.text = CommonValue.getUserRealName()
- lblCard.text = CommonValue.getUserCardNo()
- if dicData["cardInfo"] as? NSDictionary != nil {
- let dic = dicData["cardInfo"] as! NSDictionary
- lblAccount.text = dic.getString(key: "card_number")
- lblBank.text = dic.getString(key: "affiliated_bank")
- }
- }
- override func viewWillAppear(_ animated: Bool) {
- super.viewWillAppear(animated)
- loadData()
- }
- override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
- super.init(nibName: "RealNameDetailViewController", bundle: nil)
- }
- required init?(coder aDecoder: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
- }
|