| | |
| | | if status{ |
| | | UserViewModel.clearToken() |
| | | app.needLogin() |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | self.profileImg = image |
| | | self.btn_userProfile.setImage(image, for: .normal) |
| | | image.uploadImgToService().subscribe { text in |
| | | Services.updateUserProfile(text).subscribe(onNext: {_ in |
| | | Services.updateUserProfile(text).subscribe(onNext: {[weak self] _ in |
| | | alertSuccess(msg: "修改成功") |
| | | self?.btn_userProfile.sd_setImage(with: URL(string: text), for: .normal,placeholderImage: UIImage(named: "btn_userProfile")) |
| | | NotificationCenter.default.post(name: UpdateWelfare_Noti, object: nil) |
| | | }) { error in |
| | | alertError(msg: error.localizedDescription) |