//
|
// 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()
|
}
|
}
|