1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- //
- // LoginViewController.swift
- // xingchuangke
- //
- // Created by Virgil on 2019/3/22.
- // Copyright © 2019 Virgil. All rights reserved.
- //
- import UIKit
- class RegViewController1: BaseViewController {
- @IBOutlet weak var btnLogin: UIButton!
- @IBOutlet weak var btnClose: UIButton!
- @IBOutlet weak var txtPhone: UITextField!
- override func viewDidLoad() {
- super.viewDidLoad()
- self.title = "注册账号"
- initNavLeftBackButton()
- txtPhone.setContentMarginLeft(leftWidth: 15)
- txtPhone.setCornerRadius(size: 4)
- }
- override func KeyboardHidden(gestureRecognizer: UIGestureRecognizer) {
- txtPhone.resignFirstResponder()
- }
- //btnAddTarget(view: self.view, selector: #selector(self.btnMenuClick))
- @IBAction func btnMenuClick(_ sender: AnyObject) {
- switch (sender as! UIButton).tag {
- case 1001: // 清空手机号
- txtPhone.text = ""
- break
- case 1002: // 显示隐藏密码
- break
- case 1003: //
- break
- case 1004: // 下一步
- if txtPhone.text!.length() < 1 {
- SVProgressHUD.showError(withStatus: "请输入您的推荐码")
- return
- }
- loadData()
- break
- case 1005: //
- break
- case 1006: //
- break
- default:
- break
- }
- }
- // MARK: =============加载数据===============
- func loadData() {
- let url = RequestURL.findRecCode
- let params = NSMutableDictionary()
- params.setValue(txtPhone.text!, forKey: "recCode")
- submitData(url: url, params: params, tag: 1001)
- }
- override func returnData(tag: Int) {
- if tag == 1001 {
- let vc = RegViewController2()
- vc.recCode = txtPhone.text!
- toViewController(viewController: vc)
- }
- }
- override func returnError(tag: Int, type: String) {
- }
- override func viewWillAppear(_ animated: Bool) {
- super.viewWillAppear(animated)
- }
- override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
- super.init(nibName: "RegViewController1", bundle: nil)
- }
- required init?(coder aDecoder: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
- }
|