绑定手机 设置密码
This commit is contained in:
@@ -9,13 +9,17 @@ import Foundation
|
||||
import RxSwift
|
||||
class UserViewModel: NSObject {
|
||||
static let userVM = UserViewModel.init()
|
||||
|
||||
let selfInfo = PublishSubject<UserObject>()
|
||||
let userInfo = PublishSubject<UserObject>()
|
||||
func getUserInfo(uid:Int) {
|
||||
let params = ["uid":uid]
|
||||
RequestGet(path: "user/get", parma: params) { data in
|
||||
if var info = Deserialized<UserObject>.toModel(with: data) {
|
||||
self.userInfo.onNext(info)
|
||||
if let info = Deserialized<UserObject>.toModel(with: data) {
|
||||
if uid == AuthManager.userUid {
|
||||
self.selfInfo.onNext(info)
|
||||
} else {
|
||||
self.userInfo.onNext(info)
|
||||
}
|
||||
}
|
||||
} fail: { code, message in
|
||||
|
||||
|
Reference in New Issue
Block a user