|
@@ -0,0 +1,206 @@
|
|
|
+//
|
|
|
+// JDMineQrcodeViewController.swift
|
|
|
+// Koala
|
|
|
+//
|
|
|
+// Created by mac on 2023/10/12.
|
|
|
+// Copyright © 2023 刘千军. All rights reserved.
|
|
|
+//
|
|
|
+
|
|
|
+import Foundation
|
|
|
+import UIKit
|
|
|
+
|
|
|
+class JDMineQrcodeViewController: BaseViewController {
|
|
|
+
|
|
|
+
|
|
|
+ lazy var bgView : UIView = {
|
|
|
+ let v = UIView()
|
|
|
+ v.backgroundColor = .white
|
|
|
+
|
|
|
+ return v
|
|
|
+ }()
|
|
|
+
|
|
|
+
|
|
|
+ lazy var avatarIv : UIImageView = {
|
|
|
+ let v = UIImageView()
|
|
|
+ v.image = Base_Avtor_Image
|
|
|
+ v.layer.masksToBounds = true
|
|
|
+ v.layer.cornerRadius = 18
|
|
|
+ return v
|
|
|
+ }()
|
|
|
+
|
|
|
+ lazy var nicknameLb : UILabel = {
|
|
|
+ let v = UILabel()
|
|
|
+ v.textColor = _color("#333333񑘕")
|
|
|
+ v.setTextFont(.PFSR, 16)
|
|
|
+ v.text = "nickname"
|
|
|
+
|
|
|
+ return v
|
|
|
+ }()
|
|
|
+
|
|
|
+ lazy var qrcodeIV : UIImageView = {
|
|
|
+ let v = UIImageView()
|
|
|
+ v.image = _image("jdmine_invite_poster_qrbg&jdmine_invite_poster_qrbg")
|
|
|
+
|
|
|
+ return v
|
|
|
+ }()
|
|
|
+
|
|
|
+ lazy var tipLb : UILabel = {
|
|
|
+ let v = UILabel()
|
|
|
+ v.textColor = _color("#AAAAAA&#AAAAAA")
|
|
|
+ v.setTextFont(.PFSR, 14)
|
|
|
+ v.textAlignment = .center
|
|
|
+ v.text = switchLanguage("扫一扫,加极友")
|
|
|
+
|
|
|
+ return v
|
|
|
+ }()
|
|
|
+
|
|
|
+ lazy var logoIv : UIImageView = {
|
|
|
+ let v = UIImageView()
|
|
|
+ v.image = _image("Login_Logo&Login_Logo")
|
|
|
+ return v
|
|
|
+ }()
|
|
|
+
|
|
|
+ lazy var saveBtn: UIButton = {
|
|
|
+ let v = UIButton(type: .custom)
|
|
|
+ v.backgroundColor = .white
|
|
|
+ v.setImage(_image("jdmine_qrcode_save&jdmine_qrcode_save"), for: .normal)
|
|
|
+ v.setTitle(switchLanguage("保存"), for: .normal)
|
|
|
+ v.titleLabel?.setTextFont(.PFSM, 14)
|
|
|
+ v.setTitleColor(MainBackGroundColor, for: .normal)
|
|
|
+
|
|
|
+ v.layer.masksToBounds = true
|
|
|
+ v.layer.cornerRadius = 6
|
|
|
+ v.layer.borderColor = MainBackGroundColor.cgColor
|
|
|
+ v.layer.borderWidth = 0.8
|
|
|
+ v.addTarget(self, action: #selector(saveAction), for: .touchUpInside)
|
|
|
+ return v
|
|
|
+ }()
|
|
|
+
|
|
|
+ lazy var shareBtn : UIButton = {
|
|
|
+ let v = UIButton(type: .custom)
|
|
|
+ v.backgroundColor = MainBackGroundColor
|
|
|
+ v.setImage(_image("jdmine_qrcode_share&jdmine_qrcode_share"), for: .normal)
|
|
|
+ v.setTitle(switchLanguage("分享"), for: .normal)
|
|
|
+ v.titleLabel?.setTextFont(.PFSM, 14)
|
|
|
+ v.setTitleColor(.white, for: .normal)
|
|
|
+
|
|
|
+ v.layer.masksToBounds = true
|
|
|
+ v.layer.cornerRadius = 6
|
|
|
+// v.layer.borderColor = MainBackGroundColor.cgColor
|
|
|
+// v.layer.borderWidth = 0.8
|
|
|
+ v.addTarget(self, action: #selector(shareAction), for: .touchUpInside)
|
|
|
+ return v
|
|
|
+ }()
|
|
|
+
|
|
|
+ override func viewDidLoad() {
|
|
|
+ super.viewDidLoad()
|
|
|
+ self.myNavigationBar.title_Label.text = switchLanguage("二维码名片")
|
|
|
+ self.myNavigationBar.right_SuperView.isHidden = false
|
|
|
+
|
|
|
+ self.myNavigationBar.right_Button.setImage(_image("jdmine_qrcode_scan&jdmine_qrcode_scan"), for: .normal)
|
|
|
+// self.myNavigationBar.right_Button.setTitle(switchLanguage("保存")+" ", for: .normal)
|
|
|
+// self.myNavigationBar.right_Button.setTitleColor(MainBackGroundColor, for: .normal)
|
|
|
+// self.myNavigationBar.right_Button.setTextFont(.PFSM, 15)
|
|
|
+ self.myNavigationBar.right_Button.addTarget(self, action: #selector(clickRightBtnAction), for: .touchUpInside)
|
|
|
+
|
|
|
+
|
|
|
+ self.view.addSubview(bgView)
|
|
|
+
|
|
|
+ bgView.snp.makeConstraints { make in
|
|
|
+
|
|
|
+ make.top.equalTo(self.myNavigationBar.snp.bottom).offset(15)
|
|
|
+ make.left.equalTo(self.view.snp.left).offset(18)
|
|
|
+ make.right.equalTo(self.view.snp.right).offset(-18)
|
|
|
+ make.height.equalTo(458)
|
|
|
+ }
|
|
|
+
|
|
|
+ bgView.addSubview(avatarIv)
|
|
|
+ avatarIv.snp.makeConstraints { make in
|
|
|
+ make.left.equalTo(bgView.snp.left).offset(18)
|
|
|
+ make.top.equalTo(bgView.snp.top).offset(17)
|
|
|
+ make.size.equalTo(CGSize(width: 36, height: 36))
|
|
|
+ }
|
|
|
+
|
|
|
+ bgView.addSubview(nicknameLb)
|
|
|
+ nicknameLb.snp.makeConstraints { make in
|
|
|
+ make.centerY.equalTo(avatarIv)
|
|
|
+ make.left.equalTo(avatarIv.snp.right).offset(7)
|
|
|
+ }
|
|
|
+
|
|
|
+ bgView.addSubview(qrcodeIV)
|
|
|
+ qrcodeIV.snp.makeConstraints { make in
|
|
|
+ make.centerX.equalTo(bgView)
|
|
|
+ make.top.equalTo(avatarIv.snp.bottom).offset(50)
|
|
|
+ make.size.equalTo(CGSize(width: 233, height: 233))
|
|
|
+ }
|
|
|
+
|
|
|
+ bgView.addSubview(tipLb)
|
|
|
+ tipLb.snp.makeConstraints { make in
|
|
|
+ make.centerX.equalTo(bgView)
|
|
|
+ make.top.equalTo(qrcodeIV.snp.bottom).offset(6)
|
|
|
+ }
|
|
|
+
|
|
|
+ bgView.addSubview(logoIv)
|
|
|
+ logoIv.snp.makeConstraints { make in
|
|
|
+ make.centerX.equalTo(bgView)
|
|
|
+ make.bottom.equalTo(bgView.snp.bottom).offset(-28)
|
|
|
+ make.size.equalTo(CGSize(width: 116, height: 26))
|
|
|
+ }
|
|
|
+
|
|
|
+ self.view.addSubview(saveBtn)
|
|
|
+ saveBtn.snp.makeConstraints { make in
|
|
|
+ make.top.equalTo(bgView.snp.bottom).offset(33)
|
|
|
+ make.left.equalTo(self.view.snp.left).offset(18)
|
|
|
+ make.right.equalTo(self.view.snp.centerX).offset(-9)
|
|
|
+ make.height.equalTo(40)
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ self.view.addSubview(shareBtn)
|
|
|
+ shareBtn.snp.makeConstraints { make in
|
|
|
+ make.top.equalTo(bgView.snp.bottom).offset(33)
|
|
|
+ make.right.equalTo(self.view.snp.right).offset(-18)
|
|
|
+ make.left.equalTo(self.view.snp.centerX).offset(9)
|
|
|
+ make.height.equalTo(40)
|
|
|
+ }
|
|
|
+ mySwitchSkin()
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ override func mySwitchLanguage() {
|
|
|
+// hintLab.text = switchLanguage("昵称包含1-24位字符(包含数字,字符和空格),且每个月只能修改一次")
|
|
|
+// self.inView.setTextPlaceholder(text: switchLanguage("昵称"))
|
|
|
+ }
|
|
|
+
|
|
|
+ override func mySwitchSkin() {
|
|
|
+
|
|
|
+
|
|
|
+ self.view.backgroundColor = _color("#F6FAFE&#F6FAFE")
|
|
|
+// hintLab.textColor = MidTextColor
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+extension JDMineQrcodeViewController {
|
|
|
+
|
|
|
+ @objc func saveAction() ->Void {
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ @objc func shareAction() ->Void {
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @objc func clickRightBtnAction() ->Void {
|
|
|
+
|
|
|
+ }
|
|
|
+}
|