Commit 9e02c154 authored by 刘俊宏's avatar 刘俊宏

同上完成账号信息

parent e7ae0600
...@@ -64,7 +64,11 @@ class PersonCenterViewController: BaseViewController,UITableViewDelegate,UITable ...@@ -64,7 +64,11 @@ class PersonCenterViewController: BaseViewController,UITableViewDelegate,UITable
//MARK: -方法 //MARK: -方法
@IBAction func editAction(_ sender: Any) { @IBAction func editAction(_ sender: Any) {
print("编辑资料") print("编辑资料")
if self.dataModel == nil {
return
}
let vc = AccountViewController() let vc = AccountViewController()
vc.dataModel = self.dataModel
self.navigationController?.pushViewController(vc, animated: true) self.navigationController?.pushViewController(vc, animated: true)
} }
......
...@@ -15,20 +15,22 @@ class AccountViewController: BaseViewController{ ...@@ -15,20 +15,22 @@ class AccountViewController: BaseViewController{
@IBOutlet weak var nameLbl: UILabel! @IBOutlet weak var nameLbl: UILabel!
@IBOutlet weak var firstView: UIView! @IBOutlet weak var firstView: UIView!
var dataModel: AdminInfoModel? = nil
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
navbar.title = "账号信息" navbar.title = "账号信息"
self.view.addSubview(navbar) self.view.addSubview(navbar)
print(dataModel)
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
firstView?.snp.makeConstraints({ (make) in firstView?.snp.makeConstraints({ (make) in
make.top.equalTo(NavCGRect.height) make.top.equalTo(NavCGRect.height)
make.left.right.equalTo(0) make.left.right.equalTo(0)
make.height.equalTo(50) make.height.equalTo(50)
}) })
nameLbl.text = dataModel?.data?.admin_name
accountLbl.text = dataModel?.data?.user_name
phoneLbl.text = dataModel?.data?.phone
} }
//MARK: -方法 //MARK: -方法
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment