杨锴
2025-04-16 09a372bc45fde16fd42257ab6f78b8deeecf720b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//
//  BindAccountVC.swift
//  XQMuse
//
//  Created by 无故事王国 on 2024/8/21.
//
 
import UIKit
 
let BindWechat_Noti = Notification.Name.init("BindWechat_Noti")
 
class BindAccountVC: BaseVC {
                @IBOutlet weak var label_phone: UILabel!
                @IBOutlet weak var label_wchatBindState: UILabel!
    @IBOutlet weak var label_wechatBind: UILabel!
    
    override func viewDidLoad() {
        super.viewDidLoad()
                                title = "账号绑定"
                                label_phone.text = UserViewModel.getAvatarInfo().cellPhone
        label_wechatBind.text = UserViewModel.getAvatarInfo().wxOpenId.isEmpty ? "未绑定":"已绑定"
    }
 
    override func setRx() {
        NotificationCenter.default.rx.notification(BindWechat_Noti).take(until: self.rx.deallocated).subscribe(onNext: {[weak self] _ in
            self?.label_wechatBind.text = UserViewModel.getAvatarInfo().wxOpenId.isEmpty ? "未绑定":"已绑定"
        }).disposed(by: disposeBag)
    }
 
                @IBAction func bindPhoneAction(_ sender: Any) {
        guard sceneDelegate!.checkisLoginState() else {return}
                                let vc = BindPhone_1_VC()
                                push(vc: vc)
                }
 
 
                @IBAction func updatePwdAction(_ sender: TapBtn) {
        guard sceneDelegate!.checkisLoginState() else {return}
                                let vc = ForgotPasswordVC()
                                push(vc: vc)
                }
 
    @IBAction func bindWechatAction(_ sender: TapBtn) {
        WeChatTools.sendAuthRequest()
    }
}