| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- //
- // SMobileChangeViewController.swift
- // O2Platform
- //
- // Created by 刘振兴 on 2016/10/17.
- // Copyright © 2016年 zoneland. All rights reserved.
- //
- import UIKit
- import Alamofire
- import AlamofireImage
- import AlamofireObjectMapper
- import ObjectMapper
- import CocoaLumberjack
- import O2OA_Auth_SDK
- class SMobileChangeViewController: UIViewController {
- @IBOutlet weak var modifyButton: UIButton!
-
- @IBOutlet weak var phoneNumberLabel: UILabel!
-
- override func awakeFromNib() {
-
- }
-
- override func viewDidLoad() {
- super.viewDidLoad()
-
-
- let mobile = O2AuthSDK.shared.bindDevice()?.mobile
-
- self.phoneNumberLabel.text = mobile
-
- self.modifyButton.layer.borderWidth = 1.0
- self.modifyButton.layer.cornerRadius = 20
- self.modifyButton.layer.masksToBounds = true
- self.modifyButton.layer.borderColor = RGB(251, g: 71, b: 71).cgColor
-
- }
- override func didReceiveMemoryWarning() {
- super.didReceiveMemoryWarning()
- // Dispose of any resources that can be recreated.
- }
-
- @IBAction func modifyMobileAction(_ sender: UIButton) {
-
- self.showDefaultConfirm(title: "确认提示", message: "确定要解绑当前手机号码,解绑后需要重新绑定服务器后才能继续使用?") { (action) in
- O2AuthSDK.shared.clearAllInformationBeforeReBind(callback: { (result, msg) in
- DDLogInfo("清空登录和绑定信息,result:\(result), msg:\(msg ?? "")")
- OOAppsInfoDB.shareInstance.removeAll()
- DispatchQueue.main.async {
- self.forwardDestVC("login", "bindVC")
- }
- })
- }
-
- }
-
- }
|