| | |
| | | import JQTools |
| | | |
| | | class LoginVC: BaseVC { |
| | | |
| | | @IBOutlet weak var btn_pwdLogin: UIButton! |
| | | @IBOutlet weak var btn_smsCodeLogin: UIButton! |
| | | |
| | | @IBOutlet weak var tf_phone: QMUITextField! |
| | | @IBOutlet weak var tf_verify: QMUITextField! |
| | | @IBOutlet weak var btn_getCode: UIButton! |
| | | @IBOutlet weak var btn_eye: UIButton! |
| | | @IBOutlet weak var btn_wechat: QMUIButton! |
| | | @IBOutlet weak var textView_treaty: UITextView! |
| | | @IBOutlet weak var btn_login: UIButton! |
| | | @IBOutlet weak var btn_register: UIButton! |
| | | @IBOutlet weak var cons_registerCenterX: NSLayoutConstraint! |
| | | @IBOutlet weak var cons_loginCenterX: NSLayoutConstraint! |
| | | @IBOutlet weak var btn_reader: UIButton! |
| | | @IBOutlet weak var cons_stackHei: NSLayoutConstraint! |
| | | @IBOutlet weak var stack_handleView: UIStackView! |
| | | @IBOutlet weak var view_threeParty: UIView! |
| | | |
| | | |
| | | @IBOutlet weak var cons_loginWidth: NSLayoutConstraint! |
| | | private let loginType = BehaviorRelay<LoginType>(value: .pwd) |
| | | @IBOutlet weak var btn_pwdLogin: UIButton! |
| | | @IBOutlet weak var btn_smsCodeLogin: UIButton! |
| | | |
| | | override func viewDidLoad() { |
| | | super.viewDidLoad() |
| | | |
| | | } |
| | | |
| | | override func setUI() { |
| | | |
| | | view_threeParty.isHidden = !WXApi.isWXAppInstalled() |
| | | btn_wechat.imagePosition = .top |
| | | btn_wechat.spacingBetweenImageAndTitle = 8 |
| | | |
| | | |
| | | textView_treaty.isEditable = false |
| | | textView_treaty.linkTextAttributes = [.foregroundColor:UIColor(hexStr: "#3a9edc").withAlphaComponent(0.8)] |
| | | let paragraphStyle = NSMutableParagraphStyle() |
| | | paragraphStyle.lineBreakMode = NSLineBreakMode.byCharWrapping |
| | | paragraphStyle.lineSpacing = 5 |
| | | |
| | | let content = "我已阅读并同意\n《隐私协议》\n《用户协议》\n《运动安全告知书》" |
| | | let attribute = NSMutableAttributedString(string: content) |
| | | attribute.addAttribute(.foregroundColor, value: UIColor.black.withAlphaComponent(0.6), range: NSRange(location: 0, length: content.count)) |
| | | attribute.addAttribute(.font, value: UIFont.systemFont(ofSize: 12, weight: .medium), range: NSRange(location: 0, length: content.count)) |
| | | attribute.addAttributes([NSAttributedString.Key.link:URL(string: "tip://treaty")!], range: content.jq_subRange("《隐私协议》")!) |
| | | attribute.addAttribute(NSAttributedString.Key.underlineStyle, value: NSNumber(value:NSUnderlineStyle.single.rawValue), range: content.jq_subRange("《隐私协议》")!) |
| | | attribute.addAttribute(.underlineColor, value: UIColor(hexStr: "#3a9edc"), range: content.jq_subRange("《隐私协议》")!) |
| | | |
| | | attribute.addAttributes([NSAttributedString.Key.link:URL(string: "tip://user")!], range: content.jq_subRange("《用户协议》")!) |
| | | attribute.addAttribute(NSAttributedString.Key.underlineStyle, value: NSNumber(value:NSUnderlineStyle.single.rawValue), range: content.jq_subRange("《用户协议》")!) |
| | | attribute.addAttribute(.underlineColor, value: UIColor(hexStr: "#3a9edc"), range: content.jq_subRange("《用户协议》")!) |
| | | @IBOutlet weak var tf_phone: QMUITextField! |
| | | @IBOutlet weak var tf_verify: QMUITextField! |
| | | @IBOutlet weak var btn_getCode: UIButton! |
| | | @IBOutlet weak var btn_eye: UIButton! |
| | | @IBOutlet weak var btn_wechat: QMUIButton! |
| | | @IBOutlet weak var textView_treaty: UITextView! |
| | | @IBOutlet weak var btn_login: UIButton! |
| | | @IBOutlet weak var btn_register: UIButton! |
| | | @IBOutlet weak var cons_registerCenterX: NSLayoutConstraint! |
| | | @IBOutlet weak var cons_loginCenterX: NSLayoutConstraint! |
| | | @IBOutlet weak var btn_reader: UIButton! |
| | | @IBOutlet weak var cons_stackHei: NSLayoutConstraint! |
| | | @IBOutlet weak var stack_handleView: UIStackView! |
| | | @IBOutlet weak var view_threeParty: UIView! |
| | | |
| | | |
| | | attribute.addAttributes([NSAttributedString.Key.link:URL(string: "tip://sportSafety")!], range: content.jq_subRange("《运动安全告知书》")!) |
| | | attribute.addAttribute(NSAttributedString.Key.underlineStyle, value: NSNumber(value:NSUnderlineStyle.single.rawValue), range: content.jq_subRange("《运动安全告知书》")!) |
| | | attribute.addAttribute(.underlineColor, value: UIColor(hexStr: "#3a9edc"), range: content.jq_subRange("《运动安全告知书》")!) |
| | | @IBOutlet weak var cons_loginWidth: NSLayoutConstraint! |
| | | private let loginType = BehaviorRelay<LoginType>(value: .pwd) |
| | | |
| | | override func viewDidLoad() { |
| | | super.viewDidLoad() |
| | | |
| | | } |
| | | |
| | | override func setUI() { |
| | | |
| | | view_threeParty.isHidden = !WXApi.isWXAppInstalled() |
| | | btn_wechat.imagePosition = .top |
| | | btn_wechat.spacingBetweenImageAndTitle = 8 |
| | | |
| | | |
| | | attribute.addAttributes([.paragraphStyle:paragraphStyle], range: _NSRange(location: 0, length: content.count)) |
| | | self.textView_treaty.attributedText = attribute |
| | | self.textView_treaty.delegate = self |
| | | textView_treaty.isEditable = false |
| | | textView_treaty.linkTextAttributes = [.foregroundColor:UIColor(hexStr: "#3a9edc").withAlphaComponent(0.8)] |
| | | let paragraphStyle = NSMutableParagraphStyle() |
| | | paragraphStyle.lineBreakMode = NSLineBreakMode.byCharWrapping |
| | | paragraphStyle.lineSpacing = 5 |
| | | |
| | | btn_login.localGradientColor(cornerRadius: 20) |
| | | } |
| | | |
| | | override func setRx() { |
| | | loginType.subscribe(onNext: { [weak self] type in |
| | | guard let weakSelf = self else {return} |
| | | weakSelf.tf_verify.text = "" |
| | | weakSelf.btn_getCode.isHidden = type == .pwd |
| | | weakSelf.btn_eye.isHidden = type == .smsCode |
| | | switch type { |
| | | case .pwd: |
| | | weakSelf.tf_verify.isSecureTextEntry = !weakSelf.btn_eye.isSelected |
| | | weakSelf.tf_verify.keyboardType = .default |
| | | weakSelf.tf_verify.maximumTextLength = 18 |
| | | weakSelf.tf_verify.placeholder = "请输入密码" |
| | | case .smsCode: |
| | | weakSelf.tf_verify.isSecureTextEntry = false |
| | | weakSelf.tf_verify.keyboardType = .numberPad |
| | | weakSelf.tf_verify.maximumTextLength = 6 |
| | | weakSelf.tf_verify.placeholder = "请输入验证码" |
| | | } |
| | | |
| | | }).disposed(by: disposeBag) |
| | | |
| | | } |
| | | let content = "我已阅读并同意\n《隐私协议》\n《用户协议》\n《运动安全告知书》" |
| | | let attribute = NSMutableAttributedString(string: content) |
| | | attribute.addAttribute(.foregroundColor, value: UIColor.black.withAlphaComponent(0.6), range: NSRange(location: 0, length: content.count)) |
| | | attribute.addAttribute(.font, value: UIFont.systemFont(ofSize: 12, weight: .medium), range: NSRange(location: 0, length: content.count)) |
| | | attribute.addAttributes([NSAttributedString.Key.link:URL(string: "tip://treaty")!], range: content.jq_subRange("《隐私协议》")!) |
| | | attribute.addAttribute(NSAttributedString.Key.underlineStyle, value: NSNumber(value:NSUnderlineStyle.single.rawValue), range: content.jq_subRange("《隐私协议》")!) |
| | | attribute.addAttribute(.underlineColor, value: UIColor(hexStr: "#3a9edc"), range: content.jq_subRange("《隐私协议》")!) |
| | | |
| | | @IBAction func exchangeLoginTypeAction(_ sender: UIButton) { |
| | | btn_pwdLogin.isSelected = sender.tag == 10 |
| | | btn_smsCodeLogin.isSelected = sender.tag == 11 |
| | | let type:LoginType = sender.tag == 10 ? .pwd:.smsCode |
| | | loginType.accept(type) |
| | | |
| | | cons_registerCenterX.constant = btn_pwdLogin.isSelected ? -82:0 |
| | | cons_loginCenterX.constant = btn_pwdLogin.isSelected ? 82:0 |
| | | cons_loginWidth.constant = btn_pwdLogin.isSelected ? 144:189 |
| | | |
| | | let str = btn_pwdLogin.isSelected ? "登录":"注册/登录" |
| | | |
| | | self.cons_stackHei.constant = self.btn_pwdLogin.isSelected ? 25:0 |
| | | attribute.addAttributes([NSAttributedString.Key.link:URL(string: "tip://user")!], range: content.jq_subRange("《用户协议》")!) |
| | | attribute.addAttribute(NSAttributedString.Key.underlineStyle, value: NSNumber(value:NSUnderlineStyle.single.rawValue), range: content.jq_subRange("《用户协议》")!) |
| | | attribute.addAttribute(.underlineColor, value: UIColor(hexStr: "#3a9edc"), range: content.jq_subRange("《用户协议》")!) |
| | | |
| | | UIView.animate(withDuration: 0.4) { |
| | | self.view.layoutIfNeeded() |
| | | self.btn_login.setTitle(str, for: .normal) |
| | | if self.btn_pwdLogin.isSelected{ |
| | | self.stack_handleView.alpha = 1 |
| | | self.btn_login.localGradientColor(cornerRadius: 20,bounds: CGRect(x: 0, y: 0, width: 144, height: 40)) |
| | | }else{ |
| | | self.stack_handleView.alpha = 0 |
| | | self.btn_login.localGradientColor(cornerRadius: 20,bounds: CGRect(x: 0, y: 0, width: 189, height: 40)) |
| | | } |
| | | } completion: { _ in |
| | | self.tf_verify.text = "" |
| | | self.view.endEditing(false) |
| | | } |
| | | } |
| | | |
| | | @IBAction func eyeAction(_ sender: UIButton) { |
| | | sender.isSelected = !sender.isSelected |
| | | if loginType.value == .pwd{ |
| | | tf_verify.isSecureTextEntry = !sender.isSelected |
| | | } |
| | | } |
| | | |
| | | @IBAction func getCodeAction(_ sender: UIButton) { |
| | | guard !tf_phone.text!.isEmpty else {alertError(msg: tf_phone.placeholder!);return} |
| | | guard tf_phone.text!.jq_isPhone else {alertError(msg: "请输入正确的手机号");return} |
| | | Services.getSMSCode(phone: tf_phone.text!, type: .login).subscribe(onNext: {data in |
| | | if data.code == 200{ |
| | | sender.openCountDown() |
| | | }else{ |
| | | alertError(msg: data.msg) |
| | | } |
| | | }) { error in |
| | | alertError(msg: error.localizedDescription) |
| | | }.disposed(by: disposeBag) |
| | | } |
| | | |
| | | @IBAction func loginAction(_ sender: UIButton) { |
| | | attribute.addAttributes([NSAttributedString.Key.link:URL(string: "tip://sportSafety")!], range: content.jq_subRange("《运动安全告知书》")!) |
| | | attribute.addAttribute(NSAttributedString.Key.underlineStyle, value: NSNumber(value:NSUnderlineStyle.single.rawValue), range: content.jq_subRange("《运动安全告知书》")!) |
| | | attribute.addAttribute(.underlineColor, value: UIColor(hexStr: "#3a9edc"), range: content.jq_subRange("《运动安全告知书》")!) |
| | | |
| | | let type = loginType.value |
| | | guard !tf_phone.text!.isEmpty else {alertError(msg: tf_phone.placeholder!);return} |
| | | guard tf_phone.text!.jq_isPhone else {alertError(msg: "请输入正确的手机号");return} |
| | | guard !tf_verify.text!.isEmpty else {alertError(msg: tf_verify.placeholder!);return} |
| | | guard btn_reader.isSelected else {alert(msg: "请阅读并同意《隐私协议》《用户协议》《运动安全告知书》");return} |
| | | |
| | | Services.login(phone: tf_phone.text!, verity: tf_verify.text!, type: type).subscribe(onNext: {[weak self] data in |
| | | guard let weakSelf = self else { return } |
| | | if let token = data.data{ |
| | | UserViewModel.saveToken(token) |
| | | Services.userDetails().subscribe(onNext: {[weak self] data in |
| | | guard let weakSelf = self else { return } |
| | | if let m = data.data{ |
| | | //需要修改密码 |
| | | if m.needChange == 1{ |
| | | let vc = LoginRegOrForgotVC(type: .updatePwd,force: weakSelf.tf_phone.text!) |
| | | self?.push(vc: vc) |
| | | }else{ |
| | | m.save() |
| | | app.registerAndLoginSuccess() |
| | | } |
| | | } |
| | | }) { error in |
| | | attribute.addAttributes([.paragraphStyle:paragraphStyle], range: _NSRange(location: 0, length: content.count)) |
| | | self.textView_treaty.attributedText = attribute |
| | | self.textView_treaty.delegate = self |
| | | |
| | | }.disposed(by: weakSelf.disposeBag) |
| | | } |
| | | }) { error in |
| | | btn_login.localGradientColor(cornerRadius: 20) |
| | | } |
| | | |
| | | }.disposed(by: disposeBag) |
| | | } |
| | | |
| | | @IBAction func updatePwdAction(_ sender: UIButton) { |
| | | let vc = LoginRegOrForgotVC(type: .updatePwd) |
| | | push(vc: vc) |
| | | } |
| | | |
| | | @IBAction func forgotPwdAction(_ sender: UIButton) { |
| | | let vc = LoginRegOrForgotVC(type: .forgotPwd) |
| | | push(vc: vc) |
| | | } |
| | | |
| | | @IBAction func registerAction(_ sender: UIButton) { |
| | | guard btn_reader.isSelected else {alert(msg: "请阅读并同意《隐私协议》《用户协议》《运动安全告知书》");return} |
| | | let vc = LoginRegOrForgotVC(type: .register) |
| | | push(vc: vc) |
| | | } |
| | | |
| | | |
| | | @IBAction func readAgreentAction(_ sender: UIButton) { |
| | | override func setRx() { |
| | | loginType.subscribe(onNext: { [weak self] type in |
| | | guard let weakSelf = self else {return} |
| | | weakSelf.tf_verify.text = "" |
| | | weakSelf.btn_getCode.isHidden = type == .pwd |
| | | weakSelf.btn_eye.isHidden = type == .smsCode |
| | | switch type { |
| | | case .pwd: |
| | | weakSelf.tf_verify.isSecureTextEntry = !weakSelf.btn_eye.isSelected |
| | | weakSelf.tf_verify.keyboardType = .default |
| | | weakSelf.tf_verify.maximumTextLength = 18 |
| | | weakSelf.tf_verify.placeholder = "请输入密码" |
| | | case .smsCode: |
| | | weakSelf.tf_verify.isSecureTextEntry = false |
| | | weakSelf.tf_verify.keyboardType = .numberPad |
| | | weakSelf.tf_verify.maximumTextLength = 6 |
| | | weakSelf.tf_verify.placeholder = "请输入验证码" |
| | | } |
| | | |
| | | var temp = [String]() |
| | | }).disposed(by: disposeBag) |
| | | |
| | | let v1 = UserDefaults.standard.value(forKey: "agreent_1") |
| | | let v2 = UserDefaults.standard.value(forKey: "agreent_2") |
| | | let v3 = UserDefaults.standard.value(forKey: "agreent_3") |
| | | } |
| | | |
| | | if v1 == nil{temp.append("《隐私协议》")} |
| | | if v2 == nil{temp.append("《用户协议》")} |
| | | if v3 == nil{temp.append("《运动营告知书》")} |
| | | @IBAction func exchangeLoginTypeAction(_ sender: UIButton) { |
| | | btn_pwdLogin.isSelected = sender.tag == 10 |
| | | btn_smsCodeLogin.isSelected = sender.tag == 11 |
| | | let type:LoginType = sender.tag == 10 ? .pwd:.smsCode |
| | | loginType.accept(type) |
| | | |
| | | if temp.count > 0{ |
| | | alert(msg: String(format: "请阅读并同意 %@", temp.joined(separator: ",")));return |
| | | } |
| | | cons_registerCenterX.constant = btn_pwdLogin.isSelected ? -82:0 |
| | | cons_loginCenterX.constant = btn_pwdLogin.isSelected ? 82:0 |
| | | cons_loginWidth.constant = btn_pwdLogin.isSelected ? 144:189 |
| | | |
| | | sender.isSelected = !sender.isSelected |
| | | } |
| | | |
| | | @IBAction func wechatLoginAcion(_ sender: QMUIButton) { |
| | | guard btn_reader.isSelected else {alert(msg: "请阅读并同意《隐私协议》《用户协议》《运动安全告知书》");return} |
| | | showHUD() |
| | | WeChatTools.sendAuthRequest() |
| | | } |
| | | |
| | | |
| | | override var preferredStatusBarStyle: UIStatusBarStyle{ |
| | | return .default |
| | | } |
| | | let str = btn_pwdLogin.isSelected ? "登录":"注册/登录" |
| | | |
| | | override var shouldAutorotate: Bool{ |
| | | return false |
| | | } |
| | | self.cons_stackHei.constant = self.btn_pwdLogin.isSelected ? 25:0 |
| | | |
| | | UIView.animate(withDuration: 0.4) { |
| | | self.view.layoutIfNeeded() |
| | | self.btn_login.setTitle(str, for: .normal) |
| | | if self.btn_pwdLogin.isSelected{ |
| | | self.stack_handleView.alpha = 1 |
| | | self.btn_login.localGradientColor(cornerRadius: 20,bounds: CGRect(x: 0, y: 0, width: 144, height: 40)) |
| | | }else{ |
| | | self.stack_handleView.alpha = 0 |
| | | self.btn_login.localGradientColor(cornerRadius: 20,bounds: CGRect(x: 0, y: 0, width: 189, height: 40)) |
| | | } |
| | | } completion: { _ in |
| | | self.tf_verify.text = "" |
| | | self.view.endEditing(false) |
| | | } |
| | | } |
| | | |
| | | @IBAction func eyeAction(_ sender: UIButton) { |
| | | sender.isSelected = !sender.isSelected |
| | | if loginType.value == .pwd{ |
| | | tf_verify.isSecureTextEntry = !sender.isSelected |
| | | } |
| | | } |
| | | |
| | | @IBAction func getCodeAction(_ sender: UIButton) { |
| | | guard !tf_phone.text!.isEmpty else {alertError(msg: tf_phone.placeholder!);return} |
| | | guard tf_phone.text!.jq_isPhone else {alertError(msg: "请输入正确的手机号");return} |
| | | Services.getSMSCode(phone: tf_phone.text!, type: .login).subscribe(onNext: {data in |
| | | if data.code == 200{ |
| | | sender.openCountDown() |
| | | }else{ |
| | | alertError(msg: data.msg) |
| | | } |
| | | }) { error in |
| | | alertError(msg: error.localizedDescription) |
| | | }.disposed(by: disposeBag) |
| | | } |
| | | |
| | | @IBAction func loginAction(_ sender: UIButton) { |
| | | |
| | | let type = loginType.value |
| | | guard !tf_phone.text!.isEmpty else {alertError(msg: tf_phone.placeholder!);return} |
| | | guard tf_phone.text!.jq_isPhone else {alertError(msg: "请输入正确的手机号");return} |
| | | guard !tf_verify.text!.isEmpty else {alertError(msg: tf_verify.placeholder!);return} |
| | | |
| | | #if !DEBUG |
| | | guard btn_reader.isSelected else {alert(msg: "请阅读并同意《隐私协议》《用户协议》《运动安全告知书》");return} |
| | | #endif |
| | | |
| | | |
| | | Services.login(phone: tf_phone.text!, verity: tf_verify.text!, type: type).subscribe(onNext: {[weak self] data in |
| | | guard let weakSelf = self else { return } |
| | | if let token = data.data{ |
| | | UserViewModel.saveToken(token) |
| | | Services.userDetails().subscribe(onNext: {[weak self] data in |
| | | guard let weakSelf = self else { return } |
| | | if let m = data.data{ |
| | | //需要修改密码 |
| | | if m.needChange == 1{ |
| | | let vc = LoginRegOrForgotVC(type: .updatePwd,force: weakSelf.tf_phone.text!) |
| | | self?.push(vc: vc) |
| | | }else{ |
| | | m.save() |
| | | app.registerAndLoginSuccess() |
| | | } |
| | | } |
| | | }) { error in |
| | | |
| | | }.disposed(by: weakSelf.disposeBag) |
| | | } |
| | | }) { error in |
| | | |
| | | }.disposed(by: disposeBag) |
| | | } |
| | | |
| | | @IBAction func updatePwdAction(_ sender: UIButton) { |
| | | let vc = LoginRegOrForgotVC(type: .updatePwd) |
| | | push(vc: vc) |
| | | } |
| | | |
| | | @IBAction func forgotPwdAction(_ sender: UIButton) { |
| | | let vc = LoginRegOrForgotVC(type: .forgotPwd) |
| | | push(vc: vc) |
| | | } |
| | | |
| | | @IBAction func registerAction(_ sender: UIButton) { |
| | | guard btn_reader.isSelected else {alert(msg: "请阅读并同意《隐私协议》《用户协议》《运动安全告知书》");return} |
| | | let vc = LoginRegOrForgotVC(type: .register) |
| | | push(vc: vc) |
| | | } |
| | | |
| | | |
| | | @IBAction func readAgreentAction(_ sender: UIButton) { |
| | | |
| | | var temp = [String]() |
| | | |
| | | let v1 = UserDefaults.standard.value(forKey: "agreent_1") |
| | | let v2 = UserDefaults.standard.value(forKey: "agreent_2") |
| | | let v3 = UserDefaults.standard.value(forKey: "agreent_3") |
| | | |
| | | if v1 == nil{temp.append("《隐私协议》")} |
| | | if v2 == nil{temp.append("《用户协议》")} |
| | | if v3 == nil{temp.append("《运动营告知书》")} |
| | | |
| | | if temp.count > 0{ |
| | | alert(msg: String(format: "请阅读并同意 %@", temp.joined(separator: ",")));return |
| | | } |
| | | |
| | | sender.isSelected = !sender.isSelected |
| | | } |
| | | |
| | | @IBAction func wechatLoginAcion(_ sender: QMUIButton) { |
| | | guard btn_reader.isSelected else {alert(msg: "请阅读并同意《隐私协议》《用户协议》《运动安全告知书》");return} |
| | | showHUD() |
| | | WeChatTools.sendAuthRequest() |
| | | } |
| | | |
| | | |
| | | override var preferredStatusBarStyle: UIStatusBarStyle{ |
| | | return .default |
| | | } |
| | | |
| | | override var shouldAutorotate: Bool{ |
| | | return false |
| | | } |
| | | } |
| | | |
| | | extension LoginVC:UITextViewDelegate{ |
| | | func textView(_ textView: UITextView, shouldInteractWith URL: URL, in characterRange: NSRange, interaction: UITextItemInteraction) -> Bool { |
| | | func textView(_ textView: UITextView, shouldInteractWith URL: URL, in characterRange: NSRange, interaction: UITextItemInteraction) -> Bool { |
| | | |
| | | var str:String = "" |
| | | var str:String = "" |
| | | |
| | | if #available(iOS 16.0, *) { |
| | | str = URL.host(percentEncoded: true)! |
| | | } else { |
| | | str = URL.host! |
| | | } |
| | | if #available(iOS 16.0, *) { |
| | | str = URL.host(percentEncoded: true)! |
| | | } else { |
| | | str = URL.host! |
| | | } |
| | | |
| | | switch str { |
| | | case "treaty": |
| | | push(vc: CommonWebVC(type: .privacy)) |
| | | case "user": |
| | | push(vc: CommonWebVC(type: .user)) |
| | | case "sportSafety": |
| | | push(vc: CommonWebVC(type: .safe)) |
| | | default:break |
| | | } |
| | | return true |
| | | } |
| | | switch str { |
| | | case "treaty": |
| | | push(vc: CommonWebVC(type: .privacy)) |
| | | case "user": |
| | | push(vc: CommonWebVC(type: .user)) |
| | | case "sportSafety": |
| | | push(vc: CommonWebVC(type: .safe)) |
| | | default:break |
| | | } |
| | | return true |
| | | } |
| | | } |