//
//  ChangePassWordViewController.swift
//  MobilePortal
//
//  Created by xiejiangbo on 2019/6/28.
//  Copyright © 2019 yin chen. All rights reserved.
//

import UIKit

class ChangePassWordViewController: BaseViewController ,UITextFieldDelegate{

    var textViewImage:UIImageView!
    var textViewLineImage:UIImageView!
    var newViewLineImage:UIImageView!
    var verificationCodeLineImage:UIImageView!
    
    
    var oldViewImage:UIImageView!
    var newViewImage:UIImageView!
    var verificationCodeViewImage:UIImageView!
    
    var oldTextView:UITextField!
    var newTextView:UITextField!
    var confirmPassTextView:UITextField!
    
    var redImage:UIImageView!
    var redLabel:UILabel!
    
    
    var changePassWordButton:UIButton!
    var changePassWordType:ChangePassWordType = .LoginChangePassWordType
    var signOutBlock:selectBlock!
    
    var loginType:LoginType = .OldLoginType {
        didSet {
            if loginType == .OldLoginType {
                redImage.isHidden = true
                redLabel.isHidden = true
            }else{
                redImage.isHidden = false
                redLabel.isHidden = false
            }
        }
    }
    
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.initTitleBar()
        self.title = "修改密码"
        self.view.backgroundColor = UIColor.white
        addInitTextView()
        addInitLoginButton()
        getLoginTypeHttpAction()
        // Do any additional setup after loading the view.
    }
    override func arrowResponse() {
        if self.changePassWordType == .LoginChangePassWordType {
            AccountInfo.sharedInstance().clearAccount()
        }
        hideNavigationBar()
        self.navigationController?.popViewController(animated: true)
    }
    override func gotoMessageVC(){
        self.actionGotoMessageWeb(messageId: AccountInfo.sharedInstance().messageId!, isHomePushType: .YesIsHomePushType)
    }

}
