123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- //
- // ShopManagerViewController.swift
- // xingchuangke
- //
- // Created by Virgil on 2019/3/28.
- // Copyright © 2019 Virgil. All rights reserved.
- //
- import UIKit
- class ShopManagerViewController: BaseViewController {
- @IBOutlet weak var viewMenu1: UIView!
- @IBOutlet weak var viewMenu2: UIView!
- @IBOutlet weak var viewMenu3: UIView!
- @IBOutlet weak var viewMenu4: UIView!
- @IBOutlet weak var viewMenuContent: UIView!
- @IBOutlet weak var btnOpen: UIButton!
- @IBOutlet weak var imgBackgroud: UIImageView!
- override func viewDidLoad() {
- super.viewDidLoad()
- self.title = "开通商户"
- imgBackgroud.marginTop(top: 0)
- imgBackgroud.setSizeHeight(height: ScreenWidth / 375 * 271)
- let viewHeader = CommonViewUntils.getViewForXIB(xibName: "NavView") as! NavView
- viewHeader.initView(title: "开通商户") {[weak self] (index, _) in
- if index == 0 {
- self!.handleBack()
- } else {
- let vc = SNCheckViewController()
- vc.type = 0
- self!.toViewController(viewController: vc)
- }
- }
- viewHeader.initRightBtn(title: "SN码查询")
- viewHeader.imgBackgroud.isHidden = true
- self.view.addSubview(viewHeader)
- viewHeader.marginTop(top: 0)
- btnOpen.marginTop(top: (imgBackgroud.height() - viewHeader.bottom() - btnOpen.height() ) / 2 - 20, view: viewHeader)
- CommonViewUntils.setViewAverage(arrView: [viewMenu1, viewMenu2], marginLeft: 15, marginRight: 5, between: 5)
- CommonViewUntils.setViewAverage(arrView: [viewMenu3, viewMenu4], marginLeft: 15, marginRight: 5, between: 5)
- viewMenuContent.marginTop(top: 15, view: imgBackgroud)
- }
- @IBAction func btnMenuClick(_ sender: AnyObject) {
- switch (sender as! UIButton).tag {
- case 1001: // 开通商户
- toViewController(viewController: SelectPayBrandViewController())
- break
- case 1002: // 未提交
- let vc = ShopListViewController()
- vc.type = 0
- toViewController(viewController: vc)
- break
- case 1003: // 待修改
- let vc = ShopListViewController()
- vc.type = 1
- toViewController(viewController: vc)
- break
- case 1004: // 审核中
- let vc = ShopListViewController()
- vc.type = 2
- toViewController(viewController: vc)
- break
- case 1005: // 审核通过
- let vc = ShopListViewController()
- vc.type = 3
- toViewController(viewController: vc)
- break
- case 1006: //
- break
- default:
- break
- }
- }
- override func viewWillAppear(_ animated: Bool) {
- super.viewWillAppear(animated)
- appDelegate.setNavigationBarHidden(isHidden: true)
- }
- override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
- super.init(nibName: "ShopManagerViewController", bundle: nil)
- }
- required init?(coder aDecoder: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
- }
|